mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Scripts/Spells): killing with Victory Rush grants Victory Rush (#22514)
This commit is contained in:
@@ -7205,16 +7205,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||||||
}
|
}
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
{
|
{
|
||||||
switch (dummySpell->Id)
|
|
||||||
{
|
|
||||||
// Victorious
|
|
||||||
case 32216:
|
|
||||||
{
|
|
||||||
RemoveAura(dummySpell->Id);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Second Wind
|
// Second Wind
|
||||||
if (dummySpell->SpellIconID == 1697)
|
if (dummySpell->SpellIconID == 1697)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -102,23 +102,15 @@ class spell_warr_victory_rush : public SpellScript
|
|||||||
{
|
{
|
||||||
PrepareSpellScript(spell_warr_victory_rush);
|
PrepareSpellScript(spell_warr_victory_rush);
|
||||||
|
|
||||||
void VictoryRushHit()
|
void HandleCast()
|
||||||
{
|
{
|
||||||
if (Unit* player = GetCaster())
|
if (Unit* caster = GetCaster())
|
||||||
{
|
caster->RemoveAurasDueToSpell(SPELL_VICTORIOUS);
|
||||||
if (Unit* victim = GetHitUnit())
|
|
||||||
{
|
|
||||||
if (victim->isDead())
|
|
||||||
{
|
|
||||||
player->CastSpell(player, SPELL_VICTORIOUS, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
AfterHit += SpellHitFn(spell_warr_victory_rush::VictoryRushHit);
|
OnCast += SpellCastFn(spell_warr_victory_rush::HandleCast);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user