From f7e09403ec785daff1f317f52e22206c926d1535 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 23 Jun 2021 13:31:01 -0400 Subject: [PATCH] Core/Threat: Assistance threat (healing, buffs, etc.) is now properly split (instead of copied) between all creatures threatened by the action. Thanks to Foereaper for help with testing, and my apologies to healers everywhere. Port From (https://github.com/TrinityCore/TrinityCore/commit/73bf0e3a0b1f93d8dab719194b4aa5bf746cb969) --- Source/Game/Combat/ThreatManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Game/Combat/ThreatManager.cs b/Source/Game/Combat/ThreatManager.cs index ce5d791ae..20aa87a65 100644 --- a/Source/Game/Combat/ThreatManager.cs +++ b/Source/Game/Combat/ThreatManager.cs @@ -549,8 +549,13 @@ namespace Game.Combat if (spell != null && spell.HasAttribute(SpellAttr1.NoThreat)) // shortcut, none of the calls would do anything return; + if (_threatenedByMe.Empty()) + return; + + float perTarget = baseAmount / _threatenedByMe.Count; // Threat is divided evenly among all targets (LibThreat sourced) + foreach (var pair in _threatenedByMe) - pair.Value.GetOwner().GetThreatManager().AddThreat(assistant, baseAmount, spell, ignoreModifiers); + pair.Value.GetOwner().GetThreatManager().AddThreat(assistant, perTarget, spell, ignoreModifiers); } public void RemoveMeFromThreatLists()