mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Spells: Removed useless calls of Spell::GetEffect and SpellInfo::GetEffect
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user