fix(Scripts/Spells): Fix Retaliation self-damage and charge loss on activation (#24868)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: Vincent-Michael <Vincent_Michael@gmx.de>
This commit is contained in:
blinkysc
2026-02-25 10:20:50 -06:00
committed by GitHub
parent d3a914d90f
commit f9fc202781

View File

@@ -47,7 +47,7 @@ enum WarriorSpells
SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_BUFF = 65156,
SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_TALENT = 64976,
SPELL_WARRIOR_LAST_STAND_TRIGGERED = 12976,
SPELL_WARRIOR_RETALIATION_DAMAGE = 22858,
SPELL_WARRIOR_RETALIATION_DAMAGE = 20240,
SPELL_WARRIOR_SLAM = 50783,
SPELL_WARRIOR_SUNDER_ARMOR = 58567,
SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_1 = 12723,
@@ -884,19 +884,14 @@ class spell_warr_retaliation : public AuraScript
bool CheckProc(ProcEventInfo& eventInfo)
{
if (!eventInfo.GetActor() || !eventInfo.GetProcTarget())
{
return false;
}
// check attack comes not from behind and warrior is not stunned
return GetTarget()->isInFront(eventInfo.GetActor(), M_PI) && !GetTarget()->HasUnitState(UNIT_STATE_STUNNED);
return eventInfo.GetActionTarget()->isInFront(eventInfo.GetActor(), float(M_PI)) && !GetTarget()->HasUnitState(UNIT_STATE_STUNNED);
}
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_WARRIOR_RETALIATION_DAMAGE, true, nullptr, aurEff);
eventInfo.GetActionTarget()->CastSpell(eventInfo.GetActor(), SPELL_WARRIOR_RETALIATION_DAMAGE, true, nullptr, aurEff);
}
void Register() override