mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Spells: kill unused parameter from Spell constructor
Added in1f2292af79(cherry picked from commit9fc732eb97)
This commit is contained in:
@@ -332,7 +332,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast)
|
||||
if (cast.Cast.MoveUpdate)
|
||||
HandleMovementOpcode(CMSG_MOVE_STOP, *cast.Cast.MoveUpdate);
|
||||
|
||||
Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false);
|
||||
Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE);
|
||||
|
||||
WorldPackets::Spells::SpellPrepare spellPrepare;
|
||||
spellPrepare.ClientCastID = cast.Cast.CastID;
|
||||
|
||||
@@ -81,7 +81,7 @@ void WorldSession::HandleUseToy(WorldPackets::Toy::UseToy& packet)
|
||||
|
||||
SpellCastTargets targets(_player, packet.Cast);
|
||||
|
||||
Spell* spell = new Spell(_player, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false);
|
||||
Spell* spell = new Spell(_player, spellInfo, TRIGGERED_NONE);
|
||||
|
||||
WorldPackets::Spells::SpellPrepare spellPrepare;
|
||||
spellPrepare.ClientCastID = packet.Cast.CastID;
|
||||
|
||||
@@ -521,12 +521,11 @@ protected:
|
||||
Spell* m_Spell;
|
||||
};
|
||||
|
||||
Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID, bool skipCheck) :
|
||||
Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID) :
|
||||
m_spellInfo(info), m_caster((info->HasAttribute(SPELL_ATTR6_CAST_BY_CHARMER) && caster->GetCharmerOrOwner()) ? caster->GetCharmerOrOwner() : caster),
|
||||
m_spellValue(new SpellValue(m_spellInfo, caster)), _spellEvent(nullptr)
|
||||
{
|
||||
m_customError = SPELL_CUSTOM_ERROR_NONE;
|
||||
m_skipCheck = skipCheck;
|
||||
m_fromClient = false;
|
||||
m_selfContainer = nullptr;
|
||||
m_referencedFromCurrentSpell = false;
|
||||
@@ -2130,11 +2129,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
|
||||
|
||||
// Calculate hit result
|
||||
if (m_originalCaster)
|
||||
{
|
||||
targetInfo.missCondition = m_originalCaster->SpellHitResult(target, m_spellInfo, m_canReflect && !(IsPositive() && m_caster->IsFriendlyTo(target)));
|
||||
if (m_skipCheck && targetInfo.missCondition != SPELL_MISS_IMMUNE)
|
||||
targetInfo.missCondition = SPELL_MISS_NONE;
|
||||
}
|
||||
else
|
||||
targetInfo.missCondition = SPELL_MISS_EVADE; //SPELL_MISS_NONE;
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ class TC_GAME_API Spell
|
||||
|
||||
typedef std::unordered_set<Aura*> UsedSpellMods;
|
||||
|
||||
Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID = ObjectGuid::Empty, bool skipCheck = false);
|
||||
Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags, ObjectGuid originalCasterGUID = ObjectGuid::Empty);
|
||||
~Spell();
|
||||
|
||||
void InitExplicitTargets(SpellCastTargets const& targets);
|
||||
@@ -897,7 +897,6 @@ class TC_GAME_API Spell
|
||||
// and in same time need aura data and after aura deleting.
|
||||
SpellInfo const* m_triggeredByAuraSpell;
|
||||
|
||||
bool m_skipCheck;
|
||||
std::unique_ptr<PathGenerator> m_preGeneratedPath;
|
||||
|
||||
std::vector<SpellLogEffectPowerDrainParams> _powerDrainTargets[MAX_SPELL_EFFECTS];
|
||||
|
||||
Reference in New Issue
Block a user