SkyFire_548
SkyFire_548 copied to clipboard
Victory rush not working as intended
Description:
Victory Rush does not heal, and does not consume the Victory Rush buff.
Current behaviour:
Kill a target worth experience or honor for Victory Rush buff. Casting Victory Rush deals damage, but does not heal you, and does not consume the Victory Rush buff.
Expected behaviour:
Kill a target worth experience or honor for Victory Rush buff. Cast Victory Rush. Does damage, heals for 20% max hp, and consumes Victory Rush buff.
Steps to reproduce the problem:
- Cast Victory Rush
- Does damage, does not heal, nor consume buff.
SF rev. hash/commit:
5.x.x rev 6c707a4d746d 2018-06-01 13:20:44 +0200 (master branch) (Unix, Release)
SFDB version: SFDB 15
Operating system: Ubuntu 14.06
DELETE FROM spell_script_names WHERE ScriptName='spell_warr_victory_rush';
DELETE FROM spell_script_names WHERE spell_id = 34428;
INSERT INTO spell_script_names (spell_id,ScriptName) VALUES
(34428,'spell_warr_victory_rush');
add this to spell_warrior.cpp warriorspells enum -> WARRIOR_SPELL_VICTORY_RUSH_DAMAGE = 34428, SPELL_WARRIOR_VICTORY_RUSH_HEAL = 118779, // 34428 - Victory Rush 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);
bool Validate(SpellInfo const* /*SpellEntry*/)
{
if (!sSpellMgr->GetSpellInfo(WARRIOR_SPELL_VICTORY_RUSH_DAMAGE))
return false;
return true;
}
void HandleHeal()
{
Unit* caster = GetCaster();
caster->CastSpell(caster, SPELL_WARRIOR_VICTORY_RUSH_HEAL, true);
caster->RemoveAurasDueToSpell(SPELL_WARRIOR_VICTORIOUS);
}
void Register() override
{
AfterCast += SpellCastFn(spell_warr_victory_rush_SpellScript::HandleHeal);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_victory_rush_SpellScript();
}
}; AddSC_warrior_spell_scripts -> new spell_warr_victory_rush(); enjoy!! @iamreyne
could be fixed in spell_linked_spells db table
I know but i don't have to much exp working with db, so 2 sql lines? 1 to heal, 1 to remove aura? @AriDEV
@AriDEV Isn't spell_linked_spells hack in 99.99% cases?
There are 2 versions of victory rush 34428 and 146993 in theyr dummy effect they should spell link 122979 which does the DMG and uses SPELLEFFECT_TRIGGER_SPELL to cast 118779 that contains SPELL_EFFECT_HEAL_PCT @PlasticLunatic now tell me into which case does it belong.
Looks like I didn't research It thoroughly. My bad.