diff --git a/Buffs/Blind/Blind.cs b/Buffs/Blind/Blind.cs index 41fa4f24f..3ce30ff22 100644 --- a/Buffs/Blind/Blind.cs +++ b/Buffs/Blind/Blind.cs @@ -1,6 +1,7 @@ using LeagueSandbox.GameServer.API; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; +using GameServerCore.Enums; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Blind @@ -9,12 +10,12 @@ internal class Blind : IBuffGameScript { private UnitCrowdControl _crowd = new UnitCrowdControl(CrowdControlType.BLIND); - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { unit.ApplyCrowdControl(_crowd); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveCrowdControl(_crowd); } diff --git a/Buffs/Disarm/Disarm.cs b/Buffs/Disarm/Disarm.cs index fa19b201e..5b4e44905 100644 --- a/Buffs/Disarm/Disarm.cs +++ b/Buffs/Disarm/Disarm.cs @@ -1,6 +1,7 @@ using LeagueSandbox.GameServer.API; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; +using GameServerCore.Enums; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Disarm @@ -9,12 +10,12 @@ internal class Disarm : IBuffGameScript { private UnitCrowdControl _crowd = new UnitCrowdControl(CrowdControlType.DISARM); - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { unit.ApplyCrowdControl(_crowd); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveCrowdControl(_crowd); } diff --git a/Buffs/HealCheck/HealCheck.cs b/Buffs/HealCheck/HealCheck.cs index 6cfb1392c..de53adb63 100644 --- a/Buffs/HealCheck/HealCheck.cs +++ b/Buffs/HealCheck/HealCheck.cs @@ -1,21 +1,21 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.Scripting.CSharp; namespace HealCheck { internal class HealCheck : IBuffGameScript { - private Buff _healBuff; + private IBuff _healBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _healBuff = AddBuffHudVisual("SummonerHealCheck", 35.0f, 1, BuffType.COMBAT_DEHANCER, unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { RemoveBuffHudVisual(_healBuff); } diff --git a/Buffs/HealSpeed/HealSpeed.cs b/Buffs/HealSpeed/HealSpeed.cs index f95795d74..be9333c22 100644 --- a/Buffs/HealSpeed/HealSpeed.cs +++ b/Buffs/HealSpeed/HealSpeed.cs @@ -1,7 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -10,9 +10,9 @@ namespace HealSpeed internal class HealSpeed : IBuffGameScript { private StatsModifier _statMod; - private Buff _healBuff; + private IBuff _healBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.PercentBonus = 0.3f; @@ -20,7 +20,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) _healBuff = AddBuffHudVisual("SummonerHeal", 1.0f, 1, BuffType.COMBAT_ENCHANCER, unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveStatModifier(_statMod); RemoveBuffHudVisual(_healBuff); diff --git a/Buffs/Highlander/Highlander.cs b/Buffs/Highlander/Highlander.cs index bdc3db351..f8965be7f 100644 --- a/Buffs/Highlander/Highlander.cs +++ b/Buffs/Highlander/Highlander.cs @@ -1,8 +1,8 @@ using GameServerCore.Enums; using static LeagueSandbox.GameServer.API.ApiFunctionManager; using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -11,9 +11,9 @@ namespace Highlander internal class Highlander : IBuffGameScript { private StatsModifier _statMod; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.PercentBonus = _statMod.MoveSpeed.PercentBonus + (15f + ownerSpell.Level * 10) / 100f; @@ -23,7 +23,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) //Immunity to slowness not added } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { RemoveBuffHudVisual(_visualBuff); unit.RemoveStatModifier(_statMod); diff --git a/Buffs/Invulnerable/Invulnerable.cs b/Buffs/Invulnerable/Invulnerable.cs index 44a28db57..52cd12020 100644 --- a/Buffs/Invulnerable/Invulnerable.cs +++ b/Buffs/Invulnerable/Invulnerable.cs @@ -1,6 +1,7 @@ using LeagueSandbox.GameServer.API; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; +using GameServerCore.Enums; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Invulnerable @@ -9,12 +10,12 @@ internal class Invulnerable : IBuffGameScript { private UnitCrowdControl _crowd = new UnitCrowdControl(CrowdControlType.INVULNERABLE); - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { unit.ApplyCrowdControl(_crowd); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveCrowdControl(_crowd); } diff --git a/Buffs/LuluR/LuluR.cs b/Buffs/LuluR/LuluR.cs index a8b545e0f..581ca5f8b 100644 --- a/Buffs/LuluR/LuluR.cs +++ b/Buffs/LuluR/LuluR.cs @@ -1,7 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -14,9 +14,9 @@ internal class LuluR : IBuffGameScript private float _meantimeDamage; private float _healthNow; private float _healthBonus; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.Size.PercentBonus = _statMod.Size.PercentBonus + 1; @@ -29,7 +29,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) unit.AddStatModifier(_statMod); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { _healthNow = unit.Stats.CurrentHealth - _healthBonus; _meantimeDamage = _healthBefore - _healthNow; diff --git a/Buffs/LuluWBuff/LuluWBuff.cs b/Buffs/LuluWBuff/LuluWBuff.cs index fdda915ba..d455fe0c8 100644 --- a/Buffs/LuluWBuff/LuluWBuff.cs +++ b/Buffs/LuluWBuff/LuluWBuff.cs @@ -1,7 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -10,9 +10,9 @@ namespace LuluWBuff internal class LuluWBuff : IBuffGameScript { private StatsModifier _statMod; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { var ap = ownerSpell.Owner.Stats.AbilityPower.Total * 0.001; _statMod = new StatsModifier(); @@ -23,7 +23,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { RemoveBuffHudVisual(_visualBuff); unit.RemoveStatModifier(_statMod); diff --git a/Buffs/LuluWDebuff/LuluWDebuff.cs b/Buffs/LuluWDebuff/LuluWDebuff.cs index ad799ef7c..2be487e0e 100644 --- a/Buffs/LuluWDebuff/LuluWDebuff.cs +++ b/Buffs/LuluWDebuff/LuluWDebuff.cs @@ -1,8 +1,8 @@ using GameServerCore.Enums; using LeagueSandbox.GameServer.API; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -13,9 +13,9 @@ internal class LuluWDebuff : IBuffGameScript private UnitCrowdControl _crowdDisarm = new UnitCrowdControl(CrowdControlType.DISARM); private UnitCrowdControl _crowdSilence = new UnitCrowdControl(CrowdControlType.SILENCE); private StatsModifier _statMod; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.BaseBonus = _statMod.MoveSpeed.BaseBonus - 60; @@ -27,7 +27,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveCrowdControl(_crowdDisarm); unit.RemoveCrowdControl(_crowdSilence); diff --git a/Buffs/Overdrive/Overdrive.cs b/Buffs/Overdrive/Overdrive.cs index 09d4319af..c8697704d 100644 --- a/Buffs/Overdrive/Overdrive.cs +++ b/Buffs/Overdrive/Overdrive.cs @@ -1,7 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -10,9 +10,9 @@ namespace Overdrive internal class Overdrive : IBuffGameScript { private StatsModifier _statMod; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.PercentBonus = _statMod.MoveSpeed.PercentBonus + (12f + ownerSpell.Level * 4) / 100f; @@ -21,7 +21,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) _visualBuff = AddBuffHudVisual("Overdrive", 8.0f, 1, BuffType.COMBAT_ENCHANCER, unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { RemoveBuffHudVisual(_visualBuff); unit.RemoveStatModifier(_statMod); diff --git a/Buffs/OverdriveSlow/OverdriveSlow.cs b/Buffs/OverdriveSlow/OverdriveSlow.cs index af7c31d58..bf7cc829c 100644 --- a/Buffs/OverdriveSlow/OverdriveSlow.cs +++ b/Buffs/OverdriveSlow/OverdriveSlow.cs @@ -1,5 +1,5 @@ -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -9,14 +9,14 @@ internal class OverdriveSlow : IBuffGameScript { private StatsModifier _statMod; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.PercentBonus = _statMod.MoveSpeed.PercentBonus - 0.3f; unit.AddStatModifier(_statMod); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveStatModifier(_statMod); } diff --git a/Buffs/Quickdraw/Quickdraw.cs b/Buffs/Quickdraw/Quickdraw.cs index 64c49bf71..0f940d855 100644 --- a/Buffs/Quickdraw/Quickdraw.cs +++ b/Buffs/Quickdraw/Quickdraw.cs @@ -1,7 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -10,14 +10,14 @@ namespace Quickdraw internal class Quickdraw : IBuffGameScript { private StatsModifier _statMod = new StatsModifier(); - private Buff _visualBuff; + private IBuff _visualBuff; public void OnUpdate(double diff) { } - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod.AttackSpeed.PercentBonus = 0.2f + (0.1f * ownerSpell.Level); unit.AddStatModifier(_statMod); @@ -25,7 +25,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { RemoveBuffHudVisual(_visualBuff); unit.RemoveStatModifier(_statMod); diff --git a/Buffs/Silence/Silence.cs b/Buffs/Silence/Silence.cs index fff31a576..94d0fec15 100644 --- a/Buffs/Silence/Silence.cs +++ b/Buffs/Silence/Silence.cs @@ -1,6 +1,7 @@ +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; +using GameServerCore.Enums; using LeagueSandbox.GameServer.API; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Silence @@ -9,12 +10,12 @@ internal class Silence : IBuffGameScript { private UnitCrowdControl _crowd = new UnitCrowdControl(CrowdControlType.SILENCE); - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { unit.ApplyCrowdControl(_crowd); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveCrowdControl(_crowd); } diff --git a/Buffs/SummonerExhaustDebuff/SummonerExhaustDebuff.cs b/Buffs/SummonerExhaustDebuff/SummonerExhaustDebuff.cs index 0968abc5c..a5ab2b390 100644 --- a/Buffs/SummonerExhaustDebuff/SummonerExhaustDebuff.cs +++ b/Buffs/SummonerExhaustDebuff/SummonerExhaustDebuff.cs @@ -1,7 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -10,9 +10,9 @@ namespace SummonerExhaustDebuff internal class SummonerExhaustDebuff : IBuffGameScript { private StatsModifier _statMod; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.PercentBonus = -0.3f; @@ -23,7 +23,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) _visualBuff = AddBuffHudVisual("SummonerExhaustDebuff", 2.5f, 1, BuffType.COMBAT_DEHANCER, unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveStatModifier(_statMod); RemoveBuffHudVisual(_visualBuff); diff --git a/Buffs/SummonerHasteBuff/SummonerHasteBuff.cs b/Buffs/SummonerHasteBuff/SummonerHasteBuff.cs index a01ee21f4..0d9f56556 100644 --- a/Buffs/SummonerHasteBuff/SummonerHasteBuff.cs +++ b/Buffs/SummonerHasteBuff/SummonerHasteBuff.cs @@ -1,7 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -10,9 +10,9 @@ namespace SummonerHasteBuff internal class SummonerHasteBuff : IBuffGameScript { private StatsModifier _statMod; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.PercentBonus = 27 / 100.0f; @@ -20,7 +20,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) _visualBuff = AddBuffHudVisual("SummonerHaste", 10.0f, 1, BuffType.COMBAT_ENCHANCER, unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveStatModifier(_statMod); RemoveBuffHudVisual(_visualBuff); diff --git a/Buffs/SummonerReviveSpeedBoost/SummonerReviveSpeedBoost.cs b/Buffs/SummonerReviveSpeedBoost/SummonerReviveSpeedBoost.cs index 94077cdc5..95407fd42 100644 --- a/Buffs/SummonerReviveSpeedBoost/SummonerReviveSpeedBoost.cs +++ b/Buffs/SummonerReviveSpeedBoost/SummonerReviveSpeedBoost.cs @@ -1,7 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -10,9 +10,9 @@ namespace SummonerReviveSpeedBoost internal class SummonerReviveSpeedBoost : IBuffGameScript { private StatsModifier _statMod; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.PercentBonus = 1.25f; @@ -20,7 +20,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) _visualBuff = AddBuffHudVisual("SummonerReviveSpeedBoost", 12.0f, 1, BuffType.COMBAT_ENCHANCER, unit); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { unit.RemoveStatModifier(_statMod); RemoveBuffHudVisual(_visualBuff); diff --git a/Buffs/YoumuusGhostblade/YoumuusGhostblade.cs b/Buffs/YoumuusGhostblade/YoumuusGhostblade.cs index b33e3391a..49c30cb6a 100644 --- a/Buffs/YoumuusGhostblade/YoumuusGhostblade.cs +++ b/Buffs/YoumuusGhostblade/YoumuusGhostblade.cs @@ -1,7 +1,7 @@ -using GameServerCore.Enums; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; +using GameServerCore.Enums; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.GameObjects.Stats; using LeagueSandbox.GameServer.Scripting.CSharp; @@ -10,9 +10,9 @@ namespace YoumuusGhostblade internal class YoumuusGhostblade : IBuffGameScript { private StatsModifier _statMod; - private Buff _visualBuff; + private IBuff _visualBuff; - public void OnActivate(ObjAiBase unit, Spell ownerSpell) + public void OnActivate(IObjAiBase unit, ISpell ownerSpell) { _statMod = new StatsModifier(); _statMod.MoveSpeed.PercentBonus = 0.2f; @@ -21,7 +21,7 @@ public void OnActivate(ObjAiBase unit, Spell ownerSpell) unit.AddStatModifier(_statMod); } - public void OnDeactivate(ObjAiBase unit) + public void OnDeactivate(IObjAiBase unit) { RemoveBuffHudVisual(_visualBuff); unit.RemoveStatModifier(_statMod); diff --git a/Champions/Akali/E.cs b/Champions/Akali/E.cs index ebff47d98..8ef0d0d0e 100644 --- a/Champions/Akali/E.cs +++ b/Champions/Akali/E.cs @@ -1,30 +1,28 @@ using System.Linq; using GameServerCore; +using GameServerCore.Domain; +using GameServerCore.Domain.GameObjects; using GameServerCore.Enums; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class AkaliShadowSwipe : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var ap = owner.Stats.AbilityPower.Total * 0.3f; var ad = owner.Stats.AttackDamage.Total * 0.6f; @@ -36,12 +34,12 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) false); if (target.IsDead) { - spell.LowerCooldown(2, spell.CurrentCooldown * 0.6f); + spell.LowerCooldown(spell.CurrentCooldown * 0.6f); } } } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Akali/Passive.cs b/Champions/Akali/Passive.cs index 4cdcde46f..29ace07b4 100644 --- a/Champions/Akali/Passive.cs +++ b/Champions/Akali/Passive.cs @@ -1,32 +1,30 @@ -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain.GameObjects; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class AkaliTwinDisciplines : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { var bonusAd = owner.Stats.AttackDamage.Total - owner.Stats.AttackDamage.BaseValue; owner.Stats.SpellVamp.PercentBonus = 6 + bonusAd % 6; } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Akali/Q.cs b/Champions/Akali/Q.cs index a2f1f78ac..c8d81e5cc 100644 --- a/Champions/Akali/Q.cs +++ b/Champions/Akali/Q.cs @@ -1,29 +1,27 @@ using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class AkaliMota : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(target.X, target.Y) - current); @@ -32,7 +30,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("AkaliMota", trueCoords.X, trueCoords.Y); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var ap = owner.Stats.AbilityPower.Total * 0.4f; var damage = 15 + spell.Level * 20 + ap; diff --git a/Champions/Akali/R.cs b/Champions/Akali/R.cs index 367d0dc50..7fe09fc41 100644 --- a/Champions/Akali/R.cs +++ b/Champions/Akali/R.cs @@ -1,29 +1,28 @@ using System.Numerics; using GameServerCore.Enums; +using LeagueSandbox.GameServer.API; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class AkaliShadowDance : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(target.X, target.Y) - current); @@ -31,12 +30,12 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) var trueCoords = current + range; - //TODO: Dash to the correct location (in front of the enemy champion) instead of far behind or inside them + //TODO: Dash to the correct location (in front of the enemy IChampion) instead of far behind or inside them DashToLocation(owner, trueCoords.X, trueCoords.Y, 2200, false, "Attack1"); AddParticleTarget(owner, "akali_shadowDance_tar.troy", target, 1, ""); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var bonusAd = owner.Stats.AttackDamage.Total - owner.Stats.AttackDamage.BaseValue; var ap = owner.Stats.AbilityPower.Total * 0.9f; diff --git a/Champions/Akali/W.cs b/Champions/Akali/W.cs index 3017014a2..dcb326b11 100644 --- a/Champions/Akali/W.cs +++ b/Champions/Akali/W.cs @@ -1,27 +1,25 @@ +using GameServerCore.Domain.GameObjects; +using GameServerCore.Domain; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class AkaliSmokeBomb : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var smokeBomb = AddParticle(owner, "akali_smoke_bomb_tar.troy", owner.X, owner.Y); /* @@ -41,7 +39,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) }); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Annie/Q.cs b/Champions/Annie/Q.cs index b1e09b2f6..03ae59b88 100644 --- a/Champions/Annie/Q.cs +++ b/Champions/Annie/Q.cs @@ -1,32 +1,32 @@ using GameServerCore.Enums; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class Disintegrate : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { spell.AddProjectileTarget("Disintegrate", target, false); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var ap = owner.Stats.AbilityPower.Total * 0.8f; var damage = 45 + spell.Level * 35 + ap; @@ -36,7 +36,7 @@ public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Pro false); if (target.IsDead) { - spell.LowerCooldown(0, spell.GetCooldown()); + spell.LowerCooldown(spell.GetCooldown()); float manaToRecover = 55 + spell.Level * 5; var newMana = owner.Stats.CurrentMana + manaToRecover; var maxMana = owner.Stats.ManaPoints.Total; diff --git a/Champions/Annie/W.cs b/Champions/Annie/W.cs index 8f123283c..bb10d8212 100644 --- a/Champions/Annie/W.cs +++ b/Champions/Annie/W.cs @@ -1,9 +1,7 @@ using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; using System.Numerics; @@ -11,19 +9,19 @@ namespace Spells { public class Incinerate : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -37,7 +35,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) AddParticleTarget(owner, "Incinerate_cas.troy", owner); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var ap = owner.Stats.AbilityPower.Total * 0.8f; var damage = 70 + spell.Level * 45 + ap; diff --git a/Champions/Blitzcrank/Q.cs b/Champions/Blitzcrank/Q.cs index 2fd0a8558..cad0faa7f 100644 --- a/Champions/Blitzcrank/Q.cs +++ b/Champions/Blitzcrank/Q.cs @@ -1,30 +1,29 @@ using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class RocketGrab : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { spell.SpellAnimation("SPELL1", owner); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -33,7 +32,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("RocketGrabMissile", trueCoords.X, trueCoords.Y); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var ap = owner.Stats.AbilityPower.Total; var damage = 25 + spell.Level * 55 + ap; diff --git a/Champions/Blitzcrank/W.cs b/Champions/Blitzcrank/W.cs index a32fdb998..3a26801da 100644 --- a/Champions/Blitzcrank/W.cs +++ b/Champions/Blitzcrank/W.cs @@ -1,24 +1,22 @@ -using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class Overdrive : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var p = AddParticleTarget(owner, "Overdrive_buf.troy", target, 1); ((ObjAiBase) target).AddBuffGameScript("Overdrive", "Overdrive", spell, 8.0f); @@ -28,11 +26,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) }); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Caitlyn/E.cs b/Champions/Caitlyn/E.cs index 440f3e216..357fd2056 100644 --- a/Champions/Caitlyn/E.cs +++ b/Champions/Caitlyn/E.cs @@ -1,21 +1,20 @@ using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class CaitlynEntrapment : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } @@ -24,11 +23,11 @@ public void OnUpdate(double diff) } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { // Calculate net coords var current = new Vector2(owner.X, owner.Y); @@ -43,7 +42,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("CaitlynEntrapmentMissile", trueCoords.X, trueCoords.Y); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var ap = owner.Stats.AbilityPower.Total * 0.8f; var damage = 80 + (spell.Level - 1) * 50 + ap; diff --git a/Champions/Caitlyn/Q.cs b/Champions/Caitlyn/Q.cs index 705b681b5..919b125eb 100644 --- a/Champions/Caitlyn/Q.cs +++ b/Champions/Caitlyn/Q.cs @@ -1,29 +1,29 @@ using System; using System.Numerics; using GameServerCore.Enums; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class CaitlynPiltoverPeacemaker : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -32,7 +32,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("CaitlynPiltoverPeacemaker", trueCoords.X, trueCoords.Y, true); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var reduc = Math.Min(projectile.ObjectsHit.Count, 5); var baseDamage = new[] {20, 60, 100, 140, 180}[spell.Level - 1] + diff --git a/Champions/Caitlyn/R.cs b/Champions/Caitlyn/R.cs index 815a10e12..f4ef52620 100644 --- a/Champions/Caitlyn/R.cs +++ b/Champions/Caitlyn/R.cs @@ -1,32 +1,32 @@ using GameServerCore.Enums; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class CaitlynAceintheHole : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { spell.AddProjectileTarget("CaitlynAceintheHoleMissile", target); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { if (target != null && !target.IsDead) { diff --git a/Champions/Evelynn/Passive.cs b/Champions/Evelynn/Passive.cs index c95dcb2bb..92b26e2c5 100644 --- a/Champions/Evelynn/Passive.cs +++ b/Champions/Evelynn/Passive.cs @@ -1,15 +1,15 @@ using LeagueSandbox.GameServer.API; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class EvelynnPassive : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { ApiEventManager.OnChampionDamageTaken.AddListener(this, owner, SelfWasDamaged); } @@ -18,20 +18,20 @@ private void SelfWasDamaged() { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { //Listeners are automatically removed when GameScripts deactivate } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Ezreal/E.cs b/Champions/Ezreal/E.cs index 3a84555db..8a2bf4ab2 100644 --- a/Champions/Ezreal/E.cs +++ b/Champions/Ezreal/E.cs @@ -3,29 +3,29 @@ using GameServerCore.Enums; using static LeagueSandbox.GameServer.API.ApiFunctionManager; using LeagueSandbox.GameServer.GameObjects; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class EzrealArcaneShift : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = new Vector2(spell.X, spell.Y) - current; @@ -63,14 +63,14 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) if (target2 != null) { - if (!((GameObject) target2 is BaseTurret)) + if (!(target2 is IBaseTurret)) { - spell.AddProjectileTarget("EzrealArcaneShiftMissile", (AttackableUnit)target2); + spell.AddProjectileTarget("EzrealArcaneShiftMissile", target2); } } } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { target.TakeDamage(owner, 25f + spell.Level * 50f + owner.Stats.AbilityPower.Total * 0.75f, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); diff --git a/Champions/Ezreal/Passive.cs b/Champions/Ezreal/Passive.cs index 308085bfd..3632d661d 100644 --- a/Champions/Ezreal/Passive.cs +++ b/Champions/Ezreal/Passive.cs @@ -1,31 +1,31 @@ -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class EzrealRisingSpellForce : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Ezreal/Q.cs b/Champions/Ezreal/Q.cs index 48e1c4711..f0f259ba4 100644 --- a/Champions/Ezreal/Q.cs +++ b/Champions/Ezreal/Q.cs @@ -1,30 +1,28 @@ using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class EzrealMysticShot : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { AddParticleTarget(owner, "ezreal_bow.troy", owner, 1, "L_HAND"); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -33,7 +31,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("EzrealMysticShotMissile", trueCoords.X, trueCoords.Y); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var ad = owner.Stats.AttackDamage.Total * 1.1f; var ap = owner.Stats.AbilityPower.Total * 0.4f; @@ -41,7 +39,7 @@ public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Pro target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_ATTACK, false); for (byte i = 0; i < 4; i++) { - spell.LowerCooldown(i, 1); + owner.Spells[i].LowerCooldown(1); } projectile.SetToRemove(); diff --git a/Champions/Ezreal/R.cs b/Champions/Ezreal/R.cs index 3c265be0d..376e2d5b6 100644 --- a/Champions/Ezreal/R.cs +++ b/Champions/Ezreal/R.cs @@ -1,31 +1,29 @@ using System; using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class EzrealTrueshotBarrage : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { AddParticleTarget(owner, "Ezreal_bow_huge.troy", owner, 1, "L_HAND"); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -35,7 +33,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("EzrealTrueshotBarrage", trueCoords.X, trueCoords.Y, true); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var reduc = Math.Min(projectile.ObjectsHit.Count, 7); var bonusAd = owner.Stats.AttackDamage.Total - owner.Stats.AttackDamage.BaseValue; diff --git a/Champions/Ezreal/W.cs b/Champions/Ezreal/W.cs index dd254d8f9..b883b1640 100644 --- a/Champions/Ezreal/W.cs +++ b/Champions/Ezreal/W.cs @@ -1,29 +1,27 @@ using System.Numerics; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class EzrealEssenceFlux : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { AddParticleTarget(owner, "ezreal_bow_yellow.troy", owner, 1, "L_HAND"); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -32,7 +30,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("EzrealEssenceFluxMissile", trueCoords.X, trueCoords.Y); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Gangplank/Q.cs b/Champions/Gangplank/Q.cs index 394ba9bac..7829198e6 100644 --- a/Champions/Gangplank/Q.cs +++ b/Champions/Gangplank/Q.cs @@ -1,33 +1,33 @@ using System; using GameServerCore.Enums; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class Parley : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { spell.AddProjectileTarget("pirate_parley_mis", target); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var isCrit = new Random().Next(0, 100) < owner.Stats.CriticalChance.Total; var baseDamage = new[] {20, 45, 70, 95, 120}[spell.Level - 1] + owner.Stats.AttackDamage.Total; diff --git a/Champions/Garen/E.cs b/Champions/Garen/E.cs index 76fcc43c9..19097f94d 100644 --- a/Champions/Garen/E.cs +++ b/Champions/Garen/E.cs @@ -1,24 +1,23 @@ using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class GarenE : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var p = AddParticleTarget(owner, "Garen_Base_E_Spin.troy", owner, 1); var visualBuff = AddBuffHudVisual("GarenE", 3.0f, 1, @@ -33,7 +32,7 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) } } - private void ApplySpinDamage(Champion owner, Spell spell, AttackableUnit target) + private void ApplySpinDamage(IChampion owner, ISpell spell, IAttackableUnit target) { var units = GetUnitsInRange(owner, 500, true); foreach (var unit in units) @@ -45,17 +44,17 @@ private void ApplySpinDamage(Champion owner, Spell spell, AttackableUnit target) 0.5f; var damage = new[] {20, 45, 70, 95, 120}[spell.Level - 1] * 0.5f + ad; if (unit is Minion) damage *= 0.75f; - target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_SPELL, + unit.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); } } } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Global/DeathfireGrasp.cs b/Champions/Global/DeathfireGrasp.cs index da8d39a98..4309f45d4 100644 --- a/Champions/Global/DeathfireGrasp.cs +++ b/Champions/Global/DeathfireGrasp.cs @@ -1,9 +1,9 @@ using LeagueSandbox.GameServer.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; using LeagueSandbox.GameServer.Scripting.CSharp; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.GameObjects.Missiles; using GameServerCore.Enums; @@ -11,7 +11,7 @@ namespace Spells { public class DeathfireGrasp : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { spell.AddProjectileTarget("DeathfireGraspSpell",target); var p1 = AddParticleTarget(owner, "deathFireGrasp_tar.troy", target); @@ -24,11 +24,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) }); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var damage = target.Stats.HealthPoints.Total * 0.15f; target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SUMMONER_SPELL, false); @@ -39,11 +39,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/Recall.cs b/Champions/Global/Recall.cs index 776dd5973..2ffd9d5fa 100644 --- a/Champions/Global/Recall.cs +++ b/Champions/Global/Recall.cs @@ -1,30 +1,25 @@ using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class Recall : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var visualBuff = AddBuffHudVisual("Recall", 8.0f, 1, BuffType.COUNTER, owner, 8.0f); var addParticle = AddParticleTarget(owner, "TeleportHome.troy", owner); - CreateTimer(8.0f, () => - { - owner.Recall(owner); - }); + CreateTimer(8.0f, owner.Recall); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -32,11 +27,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/SummonerDot.cs b/Champions/Global/SummonerDot.cs index 82b1d2185..e0050d4b4 100644 --- a/Champions/Global/SummonerDot.cs +++ b/Champions/Global/SummonerDot.cs @@ -1,16 +1,15 @@ using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class SummonerDot : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var visualBuff = AddBuffHudVisual("SummonerDot", 4.0f, 1, BuffType.COMBAT_DEHANCER, (ObjAiBase) target, 4.0f); var p = AddParticleTarget(owner, "Global_SS_Ignite.troy", target, 1); @@ -30,11 +29,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) }); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -42,11 +41,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/SummonerExhaust.cs b/Champions/Global/SummonerExhaust.cs index c62238d5d..a9486644f 100644 --- a/Champions/Global/SummonerExhaust.cs +++ b/Champions/Global/SummonerExhaust.cs @@ -1,19 +1,18 @@ -using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; +using static LeagueSandbox.GameServer.API.ApiFunctionManager; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class SummonerExhaust : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var ai = target as ObjAiBase; if (ai != null) @@ -23,7 +22,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) } } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -31,11 +30,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/SummonerFlash.cs b/Champions/Global/SummonerFlash.cs index d3973b600..646fb6c4f 100644 --- a/Champions/Global/SummonerFlash.cs +++ b/Champions/Global/SummonerFlash.cs @@ -1,20 +1,18 @@ using System.Numerics; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class SummonerFlash : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = new Vector2(spell.X, spell.Y) - current; @@ -36,7 +34,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) AddParticleTarget(owner, "global_ss_flash_02.troy", owner); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -44,11 +42,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/SummonerHaste.cs b/Champions/Global/SummonerHaste.cs index 2637ffd2e..335a74b8d 100644 --- a/Champions/Global/SummonerHaste.cs +++ b/Champions/Global/SummonerHaste.cs @@ -1,15 +1,13 @@ +using GameServerCore.Domain.GameObjects; +using GameServerCore.Domain; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class SummonerHaste : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { owner.AddBuffGameScript("SummonerHasteBuff", "SummonerHasteBuff", spell, 10.0f, true); var p1 = AddParticleTarget(owner, "Global_SS_Ghost.troy", target); @@ -21,11 +19,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) }); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -33,11 +31,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/SummonerHeal.cs b/Champions/Global/SummonerHeal.cs index 395ed33fb..5c196a9fd 100644 --- a/Champions/Global/SummonerHeal.cs +++ b/Champions/Global/SummonerHeal.cs @@ -1,25 +1,22 @@ using System; using GameServerCore.Domain.GameObjects; +using GameServerCore.Domain; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class SummonerHeal : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var units = GetChampionsInRange(owner, 850, true); units.Remove(owner); - IChampion mostWoundedAlliedChampion = null; + IChampion mostWoundedAlliedIChampion = null; float lowestHealthPercentage = 100; float maxHealth; foreach(var value in units) { @@ -30,24 +27,24 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) if (currentHealth * 100 / maxHealth < lowestHealthPercentage && owner != value) { lowestHealthPercentage = currentHealth * 100 / maxHealth; - mostWoundedAlliedChampion = value; + mostWoundedAlliedIChampion = value; } } } - if (mostWoundedAlliedChampion != null) + if (mostWoundedAlliedIChampion != null) { - PerformHeal(owner, spell, mostWoundedAlliedChampion); + PerformHeal(owner, spell, mostWoundedAlliedIChampion); } PerformHeal(owner, spell, owner); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } - private void PerformHeal(Champion owner, Spell spell, IChampion target) + private void PerformHeal(IChampion owner, ISpell spell, IChampion target) { float healthGain = 75 + (target.Stats.Level * 15); if (target.HasBuffGameScriptActive("HealCheck", "HealCheck")) @@ -66,11 +63,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/SummonerMana.cs b/Champions/Global/SummonerMana.cs index 185e289a5..a1f4b926b 100644 --- a/Champions/Global/SummonerMana.cs +++ b/Champions/Global/SummonerMana.cs @@ -1,9 +1,7 @@ using GameServerCore.Domain.GameObjects; +using LeagueSandbox.GameServer.API; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells @@ -12,11 +10,11 @@ public class SummonerMana : IGameScript { private const float PERCENT_MAX_MANA_HEAL = 0.40f; - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { foreach (var unit in GetChampionsInRange(owner, 600, true)) { @@ -29,6 +27,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) private void RestoreMana(IChampion target) { + var maxMp = target.Stats.ManaPoints.Total; var newMp = target.Stats.CurrentMana + (maxMp * PERCENT_MAX_MANA_HEAL); if (newMp < maxMp) @@ -38,7 +37,7 @@ private void RestoreMana(IChampion target) AddParticleTarget(target, "global_ss_clarity_02.troy", target); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -46,11 +45,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/SummonerRevive.cs b/Champions/Global/SummonerRevive.cs index a538db77e..a7adf3222 100644 --- a/Champions/Global/SummonerRevive.cs +++ b/Champions/Global/SummonerRevive.cs @@ -1,19 +1,17 @@ +using GameServerCore.Domain.GameObjects; +using GameServerCore.Domain; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class SummonerRevive : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { if (!owner.IsDead) { @@ -25,7 +23,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) owner.AddBuffGameScript("SummonerReviveSpeedBoost", "SummonerReviveSpeedBoost", spell, 12.0f, true); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -33,11 +31,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/SummonerSmite.cs b/Champions/Global/SummonerSmite.cs index b4d24cde6..a38e1d1df 100644 --- a/Champions/Global/SummonerSmite.cs +++ b/Champions/Global/SummonerSmite.cs @@ -1,16 +1,14 @@ using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class SummonerSmite : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { AddParticleTarget(owner, "Global_SS_Smite.troy", target, 1); var damage = new float[] {390, 410, 430, 450, 480, 510, 540, 570, 600, 640, 680, 420, @@ -18,11 +16,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -30,11 +28,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Global/YoumusBlade.cs b/Champions/Global/YoumusBlade.cs index b9e662f31..0aed33cce 100644 --- a/Champions/Global/YoumusBlade.cs +++ b/Champions/Global/YoumusBlade.cs @@ -1,19 +1,17 @@ +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class YoumusBlade : IGameScript { - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { owner.AddBuffGameScript("YoumuusGhostblade", "YoumuusGhostblade", spell, 6.0f, true); var p = AddParticleTarget(owner, "spectral_fury_activate_speed.troy", owner, 2); @@ -23,7 +21,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) }); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } @@ -31,11 +29,11 @@ public void OnUpdate(double diff) { } - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } } diff --git a/Champions/Graves/E.cs b/Champions/Graves/E.cs index 2c81322a9..2501b181e 100644 --- a/Champions/Graves/E.cs +++ b/Champions/Graves/E.cs @@ -1,28 +1,26 @@ using System.Numerics; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class GravesMove : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -38,7 +36,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) }); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Karthus/R.cs b/Champions/Karthus/R.cs index 40a670234..8b953fb28 100644 --- a/Champions/Karthus/R.cs +++ b/Champions/Karthus/R.cs @@ -1,26 +1,24 @@ using System.Linq; using GameServerCore; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class FallenOne : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { foreach (var enemyTarget in GetChampionsInRange(owner, 20000, true) .Where(x => x.Team == CustomConvert.GetEnemyTeam(owner.Team))) @@ -29,7 +27,7 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) } } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var ap = owner.Stats.AbilityPower.Total; var damage = 100 + spell.Level * 150 + ap * 0.6f; @@ -41,7 +39,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) } } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Kassadin/Q.cs b/Champions/Kassadin/Q.cs index 462729c51..804ec496c 100644 --- a/Champions/Kassadin/Q.cs +++ b/Champions/Kassadin/Q.cs @@ -1,34 +1,32 @@ using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class NullLance : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { AddParticleTarget(owner, "Kassadin_Base_cas.troy", owner, 1, "L_HAND"); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { spell.AddProjectileTarget("NullLance", target, true); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var ap = owner.Stats.AbilityPower.Total * 0.7f; var damage = 30 + spell.Level * 50 + ap; diff --git a/Champions/Lucian/E.cs b/Champions/Lucian/E.cs index 809301e60..ca38937c6 100644 --- a/Champions/Lucian/E.cs +++ b/Champions/Lucian/E.cs @@ -1,28 +1,26 @@ using System.Numerics; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class LucianE : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -32,7 +30,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) DashToLocation(owner, trueCoords.X, trueCoords.Y, 1500, false, "SPELL3"); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Lucian/Q.cs b/Champions/Lucian/Q.cs index 3b83f78cf..499a7fc12 100644 --- a/Champions/Lucian/Q.cs +++ b/Champions/Lucian/Q.cs @@ -1,25 +1,23 @@ using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class LucianQ : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -32,11 +30,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) AddParticleTarget(owner, "Lucian_Q_cas.troy", owner); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var damage = owner.Stats.AttackDamage.Total * (0.45f + spell.Level * 0.15f) + (50 + spell.Level * 30); target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_SPELL, diff --git a/Champions/Lucian/W.cs b/Champions/Lucian/W.cs index 6943ea299..7c4f95da5 100644 --- a/Champions/Lucian/W.cs +++ b/Champions/Lucian/W.cs @@ -1,27 +1,27 @@ using System.Numerics; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; +using GameServerCore.Domain.GameObjects; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class LucianW : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -31,7 +31,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("LucianWMissile", trueCoords.X, trueCoords.Y); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { //float damage = 20 + (spellLevel * 40) + owner.GetStats().AbilityPower.Total * 0.9; //dealMagicalDamage(damage); diff --git a/Champions/Lulu/R.cs b/Champions/Lulu/R.cs index 566881084..2220303da 100644 --- a/Champions/Lulu/R.cs +++ b/Champions/Lulu/R.cs @@ -1,24 +1,22 @@ -using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class LuluR : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var p = AddParticleTarget(owner, "Lulu_R_cas.troy", target, 1); ((ObjAiBase) target).AddBuffGameScript("LuluR", "LuluR", spell, 7.0f); @@ -29,11 +27,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) }); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Lulu/W.cs b/Champions/Lulu/W.cs index 3f08e6c8f..d9a0c9971 100644 --- a/Champions/Lulu/W.cs +++ b/Champions/Lulu/W.cs @@ -1,33 +1,30 @@ using GameServerCore.Domain.GameObjects; -using GameServerCore.Enums; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class LuluW : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { spell.SpellAnimation("SPELL2", owner); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { - var champion = (Champion) target; - if (champion.Team != owner.Team) + var IChampion = (IChampion) target; + if (IChampion.Team != owner.Team) { spell.AddProjectileTarget("LuluWTwo", target); } @@ -45,10 +42,11 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) } } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { - // TODO: problematic code, if the target is only AttackableUnit crash will occure - var champion = (Champion) target; + var champion = target as IChampion; + if (champion == null) + return; var time = 1 + 0.25f * spell.Level; champion.AddBuffGameScript("LuluWDebuff", "LuluWDebuff", spell, time, true); var model = champion.Model; @@ -58,7 +56,7 @@ public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Pro CreateTimer(time, () => { RemoveParticle(p); - champion.Model = model; + champion.ChangeModel(model); }); projectile.SetToRemove(); } @@ -67,24 +65,24 @@ public void OnUpdate(double diff) { } - private void ChangeModel(int skinId, AttackableUnit target) + private void ChangeModel(int skinId, IAttackableUnit target) { switch (skinId) { case 0: - ((Champion) target).Model = "LuluSquill"; + target.ChangeModel("LuluSquill"); break; case 1: - ((Champion) target).Model = "LuluCupcake"; + target.ChangeModel("LuluCupcake"); break; case 2: - ((Champion) target).Model = "LuluKitty"; + target.ChangeModel("LuluKitty"); break; case 3: - ((Champion) target).Model = "LuluDragon"; + target.ChangeModel("LuluDragon"); break; case 4: - ((Champion) target).Model = "LuluSnowman"; + target.ChangeModel("LuluSnowman"); break; } } diff --git a/Champions/Lux/R.cs b/Champions/Lux/R.cs index 44ac57dd5..286bd3506 100644 --- a/Champions/Lux/R.cs +++ b/Champions/Lux/R.cs @@ -1,25 +1,23 @@ using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class LuxMaliceCannon : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -33,11 +31,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) AddParticleTarget(owner, "LuxMaliceCannon_cas.troy", owner); } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { target.TakeDamage(owner, 200f + spell.Level * 100f + owner.Stats.AbilityPower.Total * 0.75f, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); diff --git a/Champions/MasterYi/R.cs b/Champions/MasterYi/R.cs index 3203092eb..85c80cd68 100644 --- a/Champions/MasterYi/R.cs +++ b/Champions/MasterYi/R.cs @@ -1,29 +1,27 @@ -using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class MasterYiHighlander : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - private void ReduceCooldown(AttackableUnit unit, bool isCrit) + private void ReduceCooldown(IAttackableUnit unit, bool isCrit) { //No Cooldown reduction on the other skills yet } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var p = AddParticleTarget(owner, "Highlander_buf.troy", target, 1); ((ObjAiBase) target).AddBuffGameScript("Highlander", "Highlander", spell, 10.0f, true); @@ -34,11 +32,11 @@ public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) //No increased durations on kills and assists yet } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { } diff --git a/Champions/Olaf/Q.cs b/Champions/Olaf/Q.cs index bc8cc9e2a..354440200 100644 --- a/Champions/Olaf/Q.cs +++ b/Champions/Olaf/Q.cs @@ -1,29 +1,27 @@ using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class OlafAxeThrowCast : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = new Vector2(spell.X, spell.Y) - current; @@ -43,7 +41,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("OlafAxeThrowDamage", trueCoords.X, trueCoords.Y); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { AddParticleTarget(owner, "olaf_axeThrow_tar.troy", target, 1); var ad = owner.Stats.AttackDamage.Total * 1.1f; diff --git a/Champions/Teemo/Q.cs b/Champions/Teemo/Q.cs index b8ca92077..dc52a8cb3 100644 --- a/Champions/Teemo/Q.cs +++ b/Champions/Teemo/Q.cs @@ -1,29 +1,28 @@ using System.Numerics; using GameServerCore.Enums; +using GameServerCore.Domain.GameObjects; using static LeagueSandbox.GameServer.API.ApiFunctionManager; -using LeagueSandbox.GameServer.GameObjects.AttackableUnits; using LeagueSandbox.GameServer.GameObjects.AttackableUnits.AI; -using LeagueSandbox.GameServer.GameObjects.Missiles; -using LeagueSandbox.GameServer.GameObjects.Spells; +using GameServerCore.Domain; using LeagueSandbox.GameServer.Scripting.CSharp; namespace Spells { public class BlindingDart : IGameScript { - public void OnActivate(Champion owner) + public void OnActivate(IChampion owner) { } - public void OnDeactivate(Champion owner) + public void OnDeactivate(IChampion owner) { } - public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target) { } - public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) + public void OnFinishCasting(IChampion owner, ISpell spell, IAttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); @@ -33,7 +32,7 @@ public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) spell.AddProjectile("ToxicShot", trueCoords.X, trueCoords.Y); } - public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) + public void ApplyEffects(IChampion owner, IAttackableUnit target, ISpell spell, IProjectile projectile) { var ap = owner.Stats.AbilityPower.Total * 0.8f; var damage = 35 + spell.Level * 45 + ap;