Core/Auras: Remove m_effIndex member of AuraEffect and always take it from SpellEffectInfo

This commit is contained in:
Shauren
2021-03-11 10:32:03 +01:00
parent f4ff0489ca
commit efdca47aff
11 changed files with 27 additions and 31 deletions

View File

@@ -1512,7 +1512,7 @@ class spell_halion_combustion_consumption_periodic : public SpellScriptLoader
if (!caster)
return;
uint32 triggerSpell = GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->TriggerSpell;
uint32 triggerSpell = aurEff->GetSpellEffectInfo()->TriggerSpell;
int32 radius = caster->GetObjectScale() * M_PI * 10000 / 3;
caster->CastCustomSpell(triggerSpell, SPELLVALUE_RADIUS_MOD, radius, nullptr, TRIGGERED_FULL_MASK, nullptr, aurEff, caster->GetGUID());

View File

@@ -1308,7 +1308,7 @@ class spell_putricide_mutated_plague : public SpellScriptLoader
if (!caster)
return;
uint32 triggerSpell = GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->TriggerSpell;
uint32 triggerSpell = aurEff->GetSpellEffectInfo()->TriggerSpell;
SpellInfo const* spell = sSpellMgr->AssertSpellInfo(triggerSpell, GetCastDifficulty());
int32 damage = spell->GetEffect(EFFECT_0)->CalcValue(caster);

View File

@@ -201,7 +201,7 @@ class spell_grobbulus_poison_cloud : public SpellScriptLoader
{
PreventDefaultAction();
uint32 triggerSpell = GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->TriggerSpell;
uint32 triggerSpell = aurEff->GetSpellEffectInfo()->TriggerSpell;
int32 mod = int32(((float(aurEff->GetTickNumber()) / aurEff->GetTotalTicks()) * 0.9f + 0.1f) * 10000 * 2 / 3);
GetTarget()->CastCustomSpell(triggerSpell, SPELLVALUE_RADIUS_MOD, mod, nullptr, TRIGGERED_FULL_MASK, nullptr, aurEff);
}

View File

@@ -269,7 +269,7 @@ class spell_mother_shahraz_saber_lash : public AuraScript
{
PreventDefaultAction();
uint32 triggerSpell = GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->TriggerSpell;
uint32 triggerSpell = aurEff->GetSpellEffectInfo()->TriggerSpell;
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 0))
GetUnitOwner()->CastSpell(target, triggerSpell, true);
}
@@ -297,7 +297,7 @@ class spell_mother_shahraz_generic_periodic : public AuraScript
{
PreventDefaultAction();
uint32 triggerSpell = GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->TriggerSpell;
uint32 triggerSpell = aurEff->GetSpellEffectInfo()->TriggerSpell;
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 0))
GetUnitOwner()->CastSpell(target, triggerSpell, true);
}

View File

@@ -179,7 +179,7 @@ class spell_broggok_poison_cloud : public SpellScriptLoader
{
PreventDefaultAction();
uint32 triggerSpell = GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->TriggerSpell;
uint32 triggerSpell = aurEff->GetSpellEffectInfo()->TriggerSpell;
int32 mod = int32(((float(aurEff->GetTickNumber()) / aurEff->GetTotalTicks()) * 0.9f + 0.1f) * 10000 * 2 / 3);
GetTarget()->CastCustomSpell(triggerSpell, SPELLVALUE_RADIUS_MOD, mod, nullptr, TRIGGERED_FULL_MASK, nullptr, aurEff);
}

View File

@@ -519,7 +519,7 @@ public:
spellMod->op = SPELLMOD_DOT;
spellMod->type = SPELLMOD_FLAT;
spellMod->spellId = GetId();
spellMod->mask = GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->SpellClassMask;
spellMod->mask = aurEff->GetSpellEffectInfo()->SpellClassMask;
}
spellMod->value = aurEff->GetAmount() / 7;
}

View File

@@ -2215,7 +2215,7 @@ class spell_q12619_emblazon_runeblade : public SpellScriptLoader
{
PreventDefaultAction();
if (Unit* caster = GetCaster())
caster->CastSpell(caster, GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->TriggerSpell, true, nullptr, aurEff);
caster->CastSpell(caster, aurEff->GetSpellEffectInfo()->TriggerSpell, true, nullptr, aurEff);
}
void Register() override