Core/Spells: Removed useless calls of Spell.GetEffect and SpellInfo.GetEffect

This commit is contained in:
hondacrx
2018-08-26 01:20:46 -04:00
parent 388c20a4cf
commit f87224ac3d
3 changed files with 11 additions and 13 deletions
+3 -3
View File
@@ -1203,7 +1203,7 @@ namespace Scripts.Spells.Generic
void HandleDummy(uint effIndex)
{
if (GetSpellInfo().GetEffect(effIndex).Effect == SpellEffectName.Dummy || GetSpellInfo().GetEffect(effIndex).Effect == SpellEffectName.ScriptEffect)
if (GetEffectInfo().IsEffect(SpellEffectName.Dummy) || GetEffectInfo().IsEffect(SpellEffectName.ScriptEffect))
GetCaster().ToCreature().DespawnOrUnsummon();
}
@@ -1922,8 +1922,8 @@ namespace Scripts.Spells.Generic
void HandleDummy(uint effIndex)
{
Player player = GetCaster().ToPlayer();
uint factionId = (uint)GetSpellInfo().GetEffect(effIndex).CalcValue();
int repChange = GetSpellInfo().GetEffect(1).CalcValue();
uint factionId = (uint)GetEffectInfo(effIndex).CalcValue();
int repChange = GetEffectInfo(1).CalcValue();
FactionRecord factionEntry = CliDB.FactionStorage.LookupByKey(factionId);
+1 -1
View File
@@ -626,7 +626,7 @@ namespace Scripts.Spells.Holiday
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(null, GetSpellInfo().GetEffect(effIndex).TriggerSpell, TriggerCastFlags.FullMask & ~TriggerCastFlags.IgnorePowerAndReagentCost);
GetHitUnit().CastSpell(null, GetEffectInfo().TriggerSpell, TriggerCastFlags.FullMask & ~TriggerCastFlags.IgnorePowerAndReagentCost);
}
public override void Register()