fix(Scripts/Spells): killing with Victory Rush grants Victory Rush (#22514)
This commit is contained in:
parent
10a22aba9c
commit
e28ea50766
2 changed files with 4 additions and 22 deletions
|
|
@ -102,23 +102,15 @@ class spell_warr_victory_rush : public SpellScript
|
|||
{
|
||||
PrepareSpellScript(spell_warr_victory_rush);
|
||||
|
||||
void VictoryRushHit()
|
||||
void HandleCast()
|
||||
{
|
||||
if (Unit* player = GetCaster())
|
||||
{
|
||||
if (Unit* victim = GetHitUnit())
|
||||
{
|
||||
if (victim->isDead())
|
||||
{
|
||||
player->CastSpell(player, SPELL_VICTORIOUS, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->RemoveAurasDueToSpell(SPELL_VICTORIOUS);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_warr_victory_rush::VictoryRushHit);
|
||||
OnCast += SpellCastFn(spell_warr_victory_rush::HandleCast);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue