mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
fix(Scripts): Victory rush killing blow (#6349)
This commit is contained in:
@@ -93,6 +93,41 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_warr_victory_rush : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_warr_victory_rush() : SpellScriptLoader("spell_warr_victory_rush") { }
|
||||
|
||||
class spell_warr_victory_rush_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_warr_victory_rush_SpellScript);
|
||||
|
||||
void VictoryRushHit()
|
||||
{
|
||||
if (Unit* player = GetCaster())
|
||||
{
|
||||
if (Unit* victim = GetHitUnit())
|
||||
{
|
||||
if (victim->isDead())
|
||||
{
|
||||
player->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_warr_victory_rush_SpellScript::VictoryRushHit);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_warr_victory_rush_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_warr_intervene : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -963,6 +998,7 @@ void AddSC_warrior_spell_scripts()
|
||||
new spell_warr_intervene();
|
||||
new spell_warr_improved_spell_reflection();
|
||||
new spell_warr_improved_spell_reflection_trigger();
|
||||
new spell_warr_victory_rush();
|
||||
|
||||
// Theirs
|
||||
new spell_warr_bloodthirst();
|
||||
|
||||
Reference in New Issue
Block a user