diff options
author | joschiwald <joschiwald.trinity@gmail.com> | 2018-08-11 15:08:57 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2018-08-25 20:01:27 +0200 |
commit | 652f9302b7178a4a2be6dcae161ab96dbb769f53 (patch) | |
tree | 17cf2e421caaecac2dc7a32ac7572ab6765c616d /src/server/scripts | |
parent | 3cc42d76924221a70dab916a930cf30a90f1e365 (diff) |
Core/Spells: Removed useless calls of Spell::GetEffect and SpellInfo::GetEffect
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 8 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_holiday.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index f9b0d575b3d..c8689e0057b 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1291,9 +1291,9 @@ class spell_gen_despawn_self : public SpellScriptLoader return GetCaster()->GetTypeId() == TYPEID_UNIT; } - void HandleDummy(SpellEffIndex effIndex) + void HandleDummy(SpellEffIndex /*effIndex*/) { - if (GetSpellInfo()->GetEffect(effIndex)->Effect == SPELL_EFFECT_DUMMY || GetSpellInfo()->GetEffect(effIndex)->Effect == SPELL_EFFECT_SCRIPT_EFFECT) + if (GetEffectInfo()->IsEffect(SPELL_EFFECT_DUMMY) || GetEffectInfo()->IsEffect(SPELL_EFFECT_SCRIPT_EFFECT)) GetCaster()->ToCreature()->DespawnOrUnsummon(); } @@ -2457,8 +2457,8 @@ class spell_gen_oracle_wolvar_reputation : public SpellScriptLoader void HandleDummy(SpellEffIndex effIndex) { Player* player = GetCaster()->ToPlayer(); - uint32 factionId = GetSpellInfo()->GetEffect(effIndex)->CalcValue(); - int32 repChange = GetSpellInfo()->GetEffect(EFFECT_1)->CalcValue(); + uint32 factionId = GetEffectInfo(effIndex)->CalcValue(); + int32 repChange = GetEffectInfo(EFFECT_1)->CalcValue(); FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); if (!factionEntry) diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp index aae56b9b9a7..d6de36e6b52 100644 --- a/src/server/scripts/Spells/spell_holiday.cpp +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -1315,7 +1315,7 @@ class spell_brewfest_relay_race_intro_force_player_to_throw : public SpellScript PreventHitDefaultEffect(effIndex); // All this spells trigger a spell that requires reagents; if the // triggered spell is cast as "triggered", reagents are not consumed - GetHitUnit()->CastSpell((Unit*)NULL, GetSpellInfo()->GetEffect(effIndex)->TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST)); + GetHitUnit()->CastSpell(nullptr, GetEffectInfo()->TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST)); } void Register() override |