diff options
author | Shauren <shauren.trinity@gmail.com> | 2021-09-04 14:21:02 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-09-04 14:21:02 +0200 |
commit | 325bdc0ab0707895abb1effa7044c3f168513344 (patch) | |
tree | f52f46e6992d696aeb1260f0fff67f1b4c8ce990 /src/server/scripts/Commands | |
parent | 0e12e23f7784b4a80d3515cb094342cb677e35b2 (diff) |
Core/Spells: Remove remaining direct accesses to SpellInfo::Effects
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 8876eb961b0..b14bc9661c9 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -966,9 +966,11 @@ public: } bool known = target && target->HasSpell(id); - bool learn = (spellInfo->Effects[0].Effect == SPELL_EFFECT_LEARN_SPELL); - SpellInfo const* learnSpellInfo = sSpellMgr->GetSpellInfo(spellInfo->Effects[0].TriggerSpell); + SpellEffectInfo const& spellEffectInfo = spellInfo->GetEffect(EFFECT_0); + bool learn = spellEffectInfo.IsEffect(SPELL_EFFECT_LEARN_SPELL); + + SpellInfo const* learnSpellInfo = sSpellMgr->GetSpellInfo(spellEffectInfo.TriggerSpell); uint32 talentCost = GetTalentSpellCost(id); @@ -1041,9 +1043,11 @@ public: } bool known = target && target->HasSpell(id); - bool learn = (spellInfo->Effects[0].Effect == SPELL_EFFECT_LEARN_SPELL); - SpellInfo const* learnSpellInfo = sSpellMgr->GetSpellInfo(spellInfo->Effects[0].TriggerSpell); + SpellEffectInfo const& spellEffectInfo = spellInfo->GetEffect(EFFECT_0); + bool learn = spellEffectInfo.IsEffect(SPELL_EFFECT_LEARN_SPELL); + + SpellInfo const* learnSpellInfo = sSpellMgr->GetSpellInfo(spellEffectInfo.TriggerSpell); uint32 talentCost = GetTalentSpellCost(id); |