mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/Auras: Remove m_effIndex member of AuraEffect and always take it from SpellEffectInfo
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user