Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Resolve #750 - Remove Explicit Interface Implementations #751

Merged
merged 12 commits into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content/LeagueSandbox-Default
Submodule LeagueSandbox-Default updated 61 files
+5 −4 Buffs/Blind/Blind.cs
+5 −4 Buffs/Disarm/Disarm.cs
+8 −8 Buffs/HealCheck/HealCheck.cs
+8 −8 Buffs/HealSpeed/HealSpeed.cs
+8 −8 Buffs/Highlander/Highlander.cs
+5 −4 Buffs/Invulnerable/Invulnerable.cs
+8 −8 Buffs/LuluR/LuluR.cs
+8 −8 Buffs/LuluWBuff/LuluWBuff.cs
+8 −7 Buffs/LuluWDebuff/LuluWDebuff.cs
+8 −8 Buffs/Overdrive/Overdrive.cs
+4 −4 Buffs/OverdriveSlow/OverdriveSlow.cs
+8 −8 Buffs/Quickdraw/Quickdraw.cs
+5 −4 Buffs/Silence/Silence.cs
+8 −9 Buffs/SummonerExhaustDebuff/SummonerExhaustDebuff.cs
+8 −9 Buffs/SummonerHasteBuff/SummonerHasteBuff.cs
+8 −8 Buffs/SummonerReviveSpeedBoost/SummonerReviveSpeedBoost.cs
+9 −9 Buffs/YoumuusGhostblade/YoumuusGhostblade.cs
+10 −12 Champions/Akali/E.cs
+7 −9 Champions/Akali/Passive.cs
+9 −11 Champions/Akali/Q.cs
+11 −12 Champions/Akali/R.cs
+14 −16 Champions/Akali/W.cs
+8 −8 Champions/Annie/Q.cs
+11 −13 Champions/Annie/W.cs
+10 −11 Champions/Blitzcrank/Q.cs
+11 −13 Champions/Blitzcrank/W.cs
+12 −13 Champions/Caitlyn/E.cs
+7 −7 Champions/Caitlyn/Q.cs
+7 −7 Champions/Caitlyn/R.cs
+7 −7 Champions/Evelynn/Passive.cs
+14 −14 Champions/Ezreal/E.cs
+7 −7 Champions/Ezreal/Passive.cs
+10 −12 Champions/Ezreal/Q.cs
+9 −11 Champions/Ezreal/R.cs
+9 −11 Champions/Ezreal/W.cs
+7 −7 Champions/Gangplank/Q.cs
+16 −17 Champions/Garen/E.cs
+14 −15 Champions/Global/DeathfireGrasp.cs
+11 −16 Champions/Global/Recall.cs
+16 −29 Champions/Global/SummonerDot.cs
+9 −12 Champions/Global/SummonerExhaust.cs
+11 −14 Champions/Global/SummonerFlash.cs
+15 −12 Champions/Global/SummonerHaste.cs
+15 −19 Champions/Global/SummonerHeal.cs
+20 −41 Champions/Global/SummonerMana.cs
+9 −16 Champions/Global/SummonerRevive.cs
+9 −11 Champions/Global/SummonerSmite.cs
+11 −14 Champions/Global/YoumusBlade.cs
+12 −14 Champions/Graves/E.cs
+11 −13 Champions/Karthus/R.cs
+9 −11 Champions/Kassadin/Q.cs
+9 −11 Champions/Lucian/E.cs
+10 −12 Champions/Lucian/Q.cs
+7 −7 Champions/Lucian/W.cs
+12 −14 Champions/Lulu/R.cs
+27 −29 Champions/Lulu/W.cs
+11 −13 Champions/Lux/R.cs
+12 −14 Champions/MasterYi/R.cs
+9 −11 Champions/Olaf/Q.cs
+9 −10 Champions/Teemo/Q.cs
+3 −0 LeagueSandbox-Default.csproj
3 changes: 3 additions & 0 deletions GameServerCore/Content/INavGrid.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Numerics;
using GameServerCore.Domain.GameObjects;

namespace GameServerCore.Content
{
Expand Down Expand Up @@ -28,5 +29,7 @@ public interface INavGrid
bool IsWalkable(Vector2 coords);
bool IsWalkable(float x, float y);
Vector2 GetSize();
bool IsAnythingBetween(IGameObject a, IGameObject b);
Vector2 GetClosestTerrainExit(Vector2 location);
}
}
13 changes: 8 additions & 5 deletions GameServerCore/Domain/GameObjects/IAttackableUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ namespace GameServerCore.Domain.GameObjects
{
public interface IAttackableUnit : IGameObject
{
bool IsModelUpdated { get; set; }
bool IsDead { get; }
string Model { get; set; }
int KillDeathCounter { get; }
bool IsModelUpdated { get; set; }
int KillDeathCounter { get; set; }
int MinionCounter { get; }
string Model { get; }
IInventoryManager Inventory { get; }
IReplication Replication { get; }
IStats Stats { get; }
IInventoryManager Inventory { get; }

void Die(IAttackableUnit killer);
void TakeDamage(IAttackableUnit attacker, float damage, DamageType type, DamageSource source, bool isCrit);
void TakeDamage(IAttackableUnit attacker, float damage, DamageType type, DamageSource source, DamageText damageText);
void Die(IAttackableUnit killer);

bool IsInDistress();
bool ChangeModel(string model);
}
}
4 changes: 3 additions & 1 deletion GameServerCore/Domain/GameObjects/IBaseTurret.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
{
public interface IBaseTurret : IObjAiBase
{
string Name { get; }
uint ParentNetId { get; }
string Name { get; }

void CheckForTargets();
}
}
8 changes: 5 additions & 3 deletions GameServerCore/Domain/GameObjects/IChampion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,24 @@ namespace GameServerCore.Domain.GameObjects
{
public interface IChampion : IObjAiBase
{
IShop Shop { get; }
float RespawnTimer { get; }
float ChampionGoldFromMinions { get; }
float ChampionGoldFromMinions { get; set; }
IRuneCollection RuneList { get; }
Dictionary<short, ISpell> Spells { get; }
int Skin { get; }
IChampionStats ChampStats { get; }
byte SkillPoints { get; set; }

// basic
void TeleportTo(float x, float y);
void UpdateSkin(int skinNo);
int GetChampionHash();
void StopChampionMovement();
bool CanMove();
void UpdateMoveOrder(MoveOrder order);
bool CanCast();
void Recall();
void Respawn();

// spells
void SetSpell(string name, byte slot, bool enabled = false);
Expand All @@ -29,6 +31,6 @@ public interface IChampion : IObjAiBase
ISpell GetSpell(byte slot);
ISpell LevelUpSpell(byte slot);


void OnKill(IAttackableUnit killed);
}
}
81 changes: 41 additions & 40 deletions GameServerCore/Domain/GameObjects/IChampionStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,47 @@
{
public interface IChampionStats
{
int Assists { get; }
int Kills { get; }
int DoubleKills { get; }
int UnrealKills { get; }
float GoldEarned { get; }
float GoldSpent { get; }
int CurrentKillingSpree { get; }
float LargestCriticalStrike { get; }
int LargestKillingSpree { get; }
int LargestMultiKill { get; }
float LongestTimeSpentLiving { get; }
float MagicDamageDealt { get; }
float MagicDamageDealtToChampions { get; }
float MagicDamageTaken { get; }
int MinionsKilled { get; }
int NeutralMinionsKilled { get; }
int NeutralMinionsKilledInEnemyJungle { get; }
int NeutralMinionsKilledInTeamJungle { get; }
int Deaths { get; }
int PentaKills { get; }
float PhysicalDamageDealt { get; }
float PhysicalDamageDealtToChampions { get; }
float PhysicalDamageTaken { get; }
int QuadraKills { get; }
int TeamId { get; }
float TotalDamageDealt { get; }
float TotalDamageDealtToChampions { get; }
float TotalDamageTaken { get; }
int TotalHeal { get; }
float TotalTimeCrowdControlDealt { get; }
float TotalTimeSpentDead { get; }
int TotalUnitsHealed { get; }
int TripleKills { get; }
float TrueDamageDealt { get; }
float TrueDamageDealtToChampions { get; }
float TrueDamageTaken { get; }
int TurretsKilled { get; }
int BarracksKilled { get; }
int WardsKilled { get; }
int WardsPlaced { get; }
int Kills { get; set; }
int DoubleKills { get; set; }
int TripleKills { get; set; }
int QuadraKills { get; set; }
int PentaKills { get; set; }
int UnrealKills { get; set; }
int Deaths { get; set; }
int Assists { get; set; }
int CurrentKillingSpree { get; set; }
int LargestKillingSpree { get; set; }
int LargestMultiKill { get; set; }
int MinionsKilled { get; set; }
int NeutralMinionsKilled { get; set; }
int NeutralMinionsKilledInEnemyJungle { get; set; }
int NeutralMinionsKilledInTeamJungle { get; set; }
int TurretsKilled { get; set; }
int BarracksKilled { get; set; }
int WardsKilled { get; set; }
int WardsPlaced { get; set; }
int TeamId { get; set; }
int TotalHeal { get; set; }
int TotalUnitsHealed { get; set; }

float GoldEarned { get; set; }
float GoldSpent { get; set; }
float LargestCriticalStrike { get; set; }
float LongestTimeSpentLiving { get; set; }
float MagicDamageDealt { get; set; }
float MagicDamageDealtToChampions { get; set; }
float MagicDamageTaken { get; set; }
float PhysicalDamageDealt { get; set; }
float PhysicalDamageDealtToChampions { get; set; }
float PhysicalDamageTaken { get; set; }
float TotalDamageDealt { get; set; }
float TotalDamageDealtToChampions { get; set; }
float TotalDamageTaken { get; set; }
float TotalTimeCrowdControlDealt { get; set; }
float TotalTimeSpentDead { get; set; }
float TrueDamageDealt { get; set; }
float TrueDamageDealtToChampions { get; set; }
float TrueDamageTaken { get; set; }

byte[] GetBytes();
}
Expand Down
27 changes: 19 additions & 8 deletions GameServerCore/Domain/GameObjects/IGameObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,35 @@

namespace GameServerCore.Domain.GameObjects
{
public interface IGameObject : ITarget
public interface IGameObject : ITarget, IUpdate
{
uint NetId { get; }
ITarget Target { get; }
List<Vector2> Waypoints { get; }
int CurWaypoint { get; }
List<Vector2> Waypoints { get; }
ITarget Target { get; }
TeamId Team { get; }
int AttackerCount { get; }
float CollisionRadius { get; }
float VisionRadius { get; }
bool IsDashing { get; }

float GetZ();
float GetMoveSpeed();
void SetPosition(float x, float y);
void SetWaypoints(List<Vector2> newWaypoints);
void SetTeam(TeamId team);

void ClearMovementUpdated();

void OnAdded();
void OnCollision(IGameObject collider);
void OnRemoved();

void SetPosition(float x, float y);
void SetPosition(Vector2 vec);
void SetTeam(TeamId team);
void SetToRemove();
void SetVisibleByTeam(TeamId team, bool visible);
void SetWaypoints(List<Vector2> newWaypoints);

bool IsCollidingWith(IGameObject o);
bool IsMovementUpdated();
bool IsToRemove();
bool IsVisibleByTeam(TeamId team);
}
}
3 changes: 3 additions & 0 deletions GameServerCore/Domain/GameObjects/IInhibitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace GameServerCore.Domain.GameObjects
{
public interface IInhibitor : IObjAnimatedBuilding
{
bool RespawnAnnounced { get; }
InhibitorState InhibitorState { get; }
void SetState(InhibitorState state, IGameObject killer);
double GetRespawnTimer();
}
}
32 changes: 25 additions & 7 deletions GameServerCore/Domain/GameObjects/IObjAiBase.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
using GameServerCore.Enums;
using System.Collections.Generic;
using GameServerCore.Enums;

namespace GameServerCore.Domain.GameObjects
{
public interface IObjAiBase : IAttackableUnit
{
IAttackableUnit TargetUnit { get; }
IAttackableUnit AutoAttackTarget { get; }
IAttackableUnit TargetUnit { get; set; }
IAttackableUnit AutoAttackTarget { get; set; }
bool IsAttacking { get; set; }
bool IsDashing { get; }
bool HasMadeInitialAttack { get; set; }

float AutoAttackDelay { get; }
float AutoAttackProjectileSpeed { get; }
float AutoAttackDelay { get; set; }
float AutoAttackProjectileSpeed { get; set; }
MoveOrder MoveOrder { get; }
bool IsCastingSpell { get; }
bool IsMelee { get; }
bool IsCastingSpell { get; set; }
bool IsMelee { get; set; }
void UpdateTargetUnit(IAttackableUnit unit);
void StopMovement();
void TeleportTo(float x, float y);
void AddStatModifier(IStatsModifier statModifier);
void RemoveStatModifier(IStatsModifier statModifier);
void SetTargetUnit(IAttackableUnit target);
void AutoAttackHit(IAttackableUnit target);

// buffs
bool HasBuffGameScriptActive(string buffNamespace, string buffClass);
void AddBuffGameScript(string buffNamespace, string buffClass, ISpell ownerSpell, float removeAfter = -1f, bool isUnique = false);
void RemoveBuffSlot(IBuff b);
byte GetNewBuffSlot(IBuff b);
void AddBuff(IBuff b);
void ApplyCrowdControl(ICrowdControl cc);
void RemoveCrowdControl(ICrowdControl cc);
void SetDashingState(bool state);
void DashToTarget(ITarget t, float dashSpeed, float followTargetMaxDistance, float backDistance, float travelTime);
Dictionary<string, IBuff> GetBuffs();
void RemoveBuff(IBuff b);
}
}
4 changes: 3 additions & 1 deletion GameServerCore/Domain/GameObjects/IStat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ public interface IStat
float BaseBonus { get; }
float FlatBonus { get; set; }
float BaseValue { get; set; }
float PercentBonus { get; }
float PercentBonus { get; set; }
float PercentBaseBonus { get; }
float Total { get; }
bool ApplyStatModificator(IStatModifier statModifcator);
bool RemoveStatModificator(IStatModifier statModifcator);
}
}
24 changes: 15 additions & 9 deletions GameServerCore/Domain/GameObjects/IStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GameServerCore.Domain.GameObjects
{
public interface IStats
public interface IStats: IUpdate
{
ulong SpellsEnabled { get; }
ulong SummonerSpellsEnabled { get; }
Expand All @@ -13,16 +13,16 @@ public interface IStats
bool IsPhysicalImmune { get; }
bool IsLifestealImmune { get; }
bool IsTargetable { get; }
IsTargetableToTeamFlags IsTargetableToTeam { get; }
float AttackSpeedFlat { get; }
IsTargetableToTeamFlags IsTargetableToTeam { get; set; }
float AttackSpeedFlat { get; set; }
float HealthPerLevel { get; }
float ManaPerLevel { get; }
float AdPerLevel { get; }
float ArmorPerLevel { get; }
float MagicResistPerLevel { get; }
float HealthRegenerationPerLevel { get; }
float ManaRegenerationPerLevel { get; }
float GrowthAttackSpeed { get; }
float GrowthAttackSpeed { get; set; }
float[] ManaCost { get; }
IStat AbilityPower { get; }
IStat Armor { get; }
Expand Down Expand Up @@ -50,14 +50,20 @@ public interface IStats
float Experience { get; set; }
float CurrentHealth { get; set; }
float CurrentMana { get; set; }
bool IsGeneratingGold { get; }
bool IsGeneratingGold { get; set; }
float SpellCostReduction { get; }


void AddModifier(IStatsModifier modifier);
void RemoveModifier(IStatsModifier modifier);
void LevelUp();

float GetTotalAttackSpeed();
bool GetActionState(ActionState state);
bool GetSpellEnabled(byte id);
void SetSpellEnabled(byte id, bool enabled);
bool GetSummonerSpellEnabled(byte id);

void SetActionState(ActionState state, bool enabled);
void SetSpellEnabled(byte id, bool enabled);
void SetSummonerSpellEnabled(byte id, bool enabled);
void AddModifier(IStatsModifier modifier);
void RemoveModifier(IStatsModifier modifier);
}
}
6 changes: 4 additions & 2 deletions GameServerCore/Domain/GameObjects/ITarget.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace GameServerCore.Domain.GameObjects
using System.Numerics;

namespace GameServerCore.Domain.GameObjects
{
public interface ITarget
{
Expand All @@ -7,6 +9,6 @@ public interface ITarget
bool IsSimpleTarget { get; }

float GetDistanceTo(ITarget target);

Vector2 GetPosition();
}
}
9 changes: 9 additions & 0 deletions GameServerCore/Domain/IAnnounce.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace GameServerCore.Domain
{
public interface IAnnounce
{
bool IsAnnounced { get; }
long EventTime { get; }
void Execute();
}
}
6 changes: 3 additions & 3 deletions GameServerCore/Domain/IBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

namespace GameServerCore.Domain
{
public interface IBuff
public interface IBuff: IStackable, IUpdate
{
float Duration { get; }
float TimeElapsed { get; }
IObjAiBase TargetUnit { get; }
IObjAiBase SourceUnit { get; }
BuffType BuffType { get; }
string Name { get; }
int Stacks { get; }
byte Slot { get; }

void ResetDuration();
bool Elapsed();
}
}
Loading