From b0125170799a19522d54751d66ece4ef2c1c4d91 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 23 Jun 2021 15:37:52 -0400 Subject: [PATCH] Core/Spells: kill unused parameter from Spell constructor Port From (https://github.com/TrinityCore/TrinityCore/commit/01d9306854618bb66f79e1f0f5d9781ff48ab019) --- Source/Game/Handlers/SpellHandler.cs | 2 +- Source/Game/Handlers/ToyHandler.cs | 2 +- Source/Game/Spells/Spell.cs | 9 +-------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Source/Game/Handlers/SpellHandler.cs b/Source/Game/Handlers/SpellHandler.cs index b810a0367..d42d8b9ee 100644 --- a/Source/Game/Handlers/SpellHandler.cs +++ b/Source/Game/Handlers/SpellHandler.cs @@ -330,7 +330,7 @@ namespace Game if (cast.Cast.MoveUpdate.HasValue) HandleMovementOpcode(ClientOpcodes.MoveStop, cast.Cast.MoveUpdate.Value); - Spell spell = new(caster, spellInfo, TriggerCastFlags.None, ObjectGuid.Empty, false); + Spell spell = new(caster, spellInfo, TriggerCastFlags.None); SpellPrepare spellPrepare = new(); spellPrepare.ClientCastID = cast.Cast.CastID; diff --git a/Source/Game/Handlers/ToyHandler.cs b/Source/Game/Handlers/ToyHandler.cs index cc4fa10f6..7ebf1ab13 100644 --- a/Source/Game/Handlers/ToyHandler.cs +++ b/Source/Game/Handlers/ToyHandler.cs @@ -79,7 +79,7 @@ namespace Game SpellCastTargets targets = new(_player, packet.Cast); - Spell spell = new(_player, spellInfo, TriggerCastFlags.None, ObjectGuid.Empty, false); + Spell spell = new(_player, spellInfo, TriggerCastFlags.None); SpellPrepare spellPrepare = new(); spellPrepare.ClientCastID = packet.Cast.CastID; diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 1c37d201a..6ea9153e5 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -36,7 +36,7 @@ namespace Game.Spells { public partial class Spell : IDisposable { - public Spell(Unit caster, SpellInfo info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID = default, bool skipcheck = false) + public Spell(Unit caster, SpellInfo info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID = default) { m_spellInfo = info; m_caster = (info.HasAttribute(SpellAttr6.CastByCharmer) && caster.GetCharmerOrOwner() != null ? caster.GetCharmerOrOwner() : caster); @@ -47,7 +47,6 @@ namespace Game.Spells m_SpellVisual.SpellXSpellVisualID = caster.GetCastSpellXSpellVisualId(m_spellInfo); m_customError = SpellCustomErrors.None; - m_skipCheck = skipcheck; m_fromClient = false; m_needComboPoints = m_spellInfo.NeedsComboPoints(); @@ -1613,11 +1612,7 @@ namespace Game.Spells // Calculate hit result if (m_originalCaster != null) - { targetInfo.missCondition = m_originalCaster.SpellHitResult(target, m_spellInfo, m_canReflect && !(IsPositive() && m_caster.IsFriendlyTo(target))); - if (m_skipCheck && targetInfo.missCondition != SpellMissInfo.Immune) - targetInfo.missCondition = SpellMissInfo.None; - } else targetInfo.missCondition = SpellMissInfo.Evade; @@ -7580,8 +7575,6 @@ namespace Game.Spells // we can't store original aura link to prevent access to deleted auras // and in same time need aura data and after aura deleting. public SpellInfo m_triggeredByAuraSpell; - - bool m_skipCheck; #endregion }