From 00c41dda8c27cc02e139546d26f203a608c1de5f Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Wed, 2 Feb 2022 21:43:17 -0500 Subject: [PATCH] [Spells] Support for 'HateAdded' spell field to apply negative values to reduce hate. (#1953) * HateAdded field can be negative * [Spells] Support for 'HateAdded' spell field to apply negative values to reduce hate. --- zone/aggro.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 3d706efde..660bc95c9 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -1319,10 +1319,10 @@ int32 Mob::CheckAggroAmount(uint16 spell_id, Mob *target, bool isproc) if (dispel && target && target->GetHateAmount(this) < 100) AggroAmount += 50; - if (spells[spell_id].hate_added > 0) // overrides the hate (ex. tash) + if (spells[spell_id].hate_added != 0) // overrides the hate (ex. tash), can be negative. AggroAmount = spells[spell_id].hate_added; - if (GetOwner() && IsPet()) + if (GetOwner() && IsPet() && AggroAmount > 0) AggroAmount = AggroAmount * RuleI(Aggro, PetSpellAggroMod) / 100; // hate focus ignored on first action for some reason