mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Spells: kill unused parameter from Spell constructor
Added in 1f2292af79
This commit is contained in:
@@ -407,7 +407,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
||||
spellInfo = actualSpellInfo;
|
||||
}
|
||||
|
||||
Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false);
|
||||
Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE);
|
||||
spell->m_cast_count = castCount; // set count of casts
|
||||
spell->prepare(targets);
|
||||
}
|
||||
|
||||
@@ -538,13 +538,12 @@ class TC_GAME_API SpellEvent : public BasicEvent
|
||||
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(sSpellMgr->GetSpellForDifficultyFromSpell(info, caster)),
|
||||
m_caster((info->HasAttribute(SPELL_ATTR6_CAST_BY_CHARMER) && caster->GetCharmerOrOwner()) ? caster->GetCharmerOrOwner() : caster)
|
||||
, m_spellValue(new SpellValue(m_spellInfo)), _spellEvent(nullptr)
|
||||
{
|
||||
m_customError = SPELL_CUSTOM_ERROR_NONE;
|
||||
m_skipCheck = skipCheck;
|
||||
m_selfContainer = nullptr;
|
||||
m_referencedFromCurrentSpell = false;
|
||||
m_executedCurrently = false;
|
||||
@@ -2084,11 +2083,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;
|
||||
|
||||
|
||||
@@ -374,7 +374,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);
|
||||
@@ -738,7 +738,6 @@ class TC_GAME_API Spell
|
||||
// and in same time need aura data and after aura deleting.
|
||||
SpellInfo const* m_triggeredByAuraSpell;
|
||||
|
||||
bool m_skipCheck;
|
||||
uint8 m_auraScaleMask;
|
||||
std::unique_ptr<PathGenerator> m_preGeneratedPath;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user