fix(Scripts): Victory rush killing blow (#6349)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1623660631649831200');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 34428;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (34428, 'spell_warr_victory_rush');
|
||||||
@@ -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
|
class spell_warr_intervene : public SpellScriptLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -963,6 +998,7 @@ void AddSC_warrior_spell_scripts()
|
|||||||
new spell_warr_intervene();
|
new spell_warr_intervene();
|
||||||
new spell_warr_improved_spell_reflection();
|
new spell_warr_improved_spell_reflection();
|
||||||
new spell_warr_improved_spell_reflection_trigger();
|
new spell_warr_improved_spell_reflection_trigger();
|
||||||
|
new spell_warr_victory_rush();
|
||||||
|
|
||||||
// Theirs
|
// Theirs
|
||||||
new spell_warr_bloodthirst();
|
new spell_warr_bloodthirst();
|
||||||
|
|||||||
Reference in New Issue
Block a user