mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +00:00
fix(Scripts/Naxxramas): properly handle Thaddius' polarity stacks (#7030)
- Closes #6929
This commit is contained in:
@@ -186,6 +186,11 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POSITIVE_POLARITY);
|
||||||
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POSITIVE_CHARGE_STACK);
|
||||||
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_NEGATIVE_POLARITY);
|
||||||
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_NEGATIVE_CHARGE_STACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* who) override
|
void KilledUnit(Unit* who) override
|
||||||
@@ -206,8 +211,10 @@ public:
|
|||||||
Talk(SAY_DEATH);
|
Talk(SAY_DEATH);
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(28059);
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POSITIVE_POLARITY);
|
||||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(28084);
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POSITIVE_CHARGE_STACK);
|
||||||
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_NEGATIVE_POLARITY);
|
||||||
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_NEGATIVE_CHARGE_STACK);
|
||||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_THADDIUS_GATE)))
|
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_THADDIUS_GATE)))
|
||||||
{
|
{
|
||||||
go->SetGoState(GO_STATE_ACTIVE);
|
go->SetGoState(GO_STATE_ACTIVE);
|
||||||
@@ -610,10 +617,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
uint32 spellId = 0;
|
uint32 spellId = GetSpellInfo()->Id == SPELL_POSITIVE_CHARGE ? SPELL_POSITIVE_CHARGE_STACK : SPELL_NEGATIVE_CHARGE_STACK;
|
||||||
spellId = GetSpellInfo()->Id == SPELL_POSITIVE_CHARGE ? SPELL_NEGATIVE_CHARGE_STACK : SPELL_NEGATIVE_CHARGE_STACK;
|
|
||||||
GetCaster()->SetAuraStack(spellId, GetCaster(), count);
|
GetCaster()->SetAuraStack(spellId, GetCaster(), count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -669,6 +676,8 @@ public:
|
|||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
{
|
{
|
||||||
|
target->RemoveAurasDueToSpell(SPELL_POSITIVE_CHARGE_STACK);
|
||||||
|
target->RemoveAurasDueToSpell(SPELL_NEGATIVE_CHARGE_STACK);
|
||||||
target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, nullptr, nullptr, caster->GetGUID());
|
target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, nullptr, nullptr, caster->GetGUID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user