fix(Scripts/BlackTemple): Gathios Judgment spell should consume seals (#19640)

This commit is contained in:
Andrew
2024-08-18 05:57:32 -03:00
committed by GitHub
parent adc9f4e7ab
commit 167e06e287
@@ -659,13 +659,14 @@ class spell_illidari_council_judgement : public SpellScript
void HandleScriptEffect(SpellEffIndex /*effIndex*/) void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{ {
Unit::AuraEffectList const& auras = GetCaster()->GetAuraEffectsByType(SPELL_AURA_DUMMY); auto const& auras = GetCaster()->GetAuraEffectsByType(SPELL_AURA_DUMMY);
for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i) for (auto i = auras.begin(); i != auras.end(); ++i)
{ {
if ((*i)->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_SEAL && (*i)->GetEffIndex() == EFFECT_2) if ((*i)->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_SEAL && (*i)->GetEffIndex() == EFFECT_2)
if (sSpellMgr->GetSpellInfo((*i)->GetAmount())) if (sSpellMgr->GetSpellInfo((*i)->GetAmount()))
{ {
GetCaster()->CastSpell(GetHitUnit(), (*i)->GetAmount(), true); GetCaster()->CastSpell(GetHitUnit(), (*i)->GetAmount(), true);
GetCaster()->RemoveAurasDueToSpell((*i)->GetSpellInfo()->Id);
break; break;
} }
} }