mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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.
(No apologies for charm AI though. You deserve that one.)
(cherry picked from commit 013d4560c7)
This commit is contained in:
@@ -615,8 +615,11 @@ void ThreatManager::ForwardThreatForAssistingMe(Unit* assistant, float baseAmoun
|
||||
{
|
||||
if (spell && spell->HasAttribute(SPELL_ATTR1_NO_THREAT)) // shortcut, none of the calls would do anything
|
||||
return;
|
||||
if (_threatenedByMe.empty())
|
||||
return;
|
||||
float const perTarget = baseAmount / _threatenedByMe.size(); // Threat is divided evenly among all targets (LibThreat sourced)
|
||||
for (auto const& pair : _threatenedByMe)
|
||||
pair.second->GetOwner()->GetThreatManager().AddThreat(assistant, baseAmount, spell, ignoreModifiers);
|
||||
pair.second->GetOwner()->GetThreatManager().AddThreat(assistant, perTarget, spell, ignoreModifiers);
|
||||
}
|
||||
|
||||
void ThreatManager::RemoveMeFromThreatLists()
|
||||
|
||||
Reference in New Issue
Block a user