Core/Combat: reset the ThreatManager update interval upon engaging the creature and move ThreatClear packet sending into the update cycle to mimic retail behavior

Port From (https://github.com/TrinityCore/TrinityCore/commit/24bda9c73dcd89d4da4e871e00fd83a24b8275d2)
This commit is contained in:
Hondacrx
2024-08-19 19:11:25 -04:00
parent a534824bd0
commit fceaff3444
2 changed files with 24 additions and 4 deletions
+4 -2
View File
@@ -466,6 +466,8 @@ namespace Game.Entities
UpdateMovementCapabilities();
GetThreatManager().Update(diff);
switch (m_deathState)
{
case DeathState.JustRespawned:
@@ -541,8 +543,6 @@ namespace Game.Entities
if (!IsAlive())
break;
GetThreatManager().Update(diff);
if (_spellFocusInfo.Delay != 0)
{
if (_spellFocusInfo.Delay <= diff)
@@ -1071,6 +1071,8 @@ namespace Game.Entities
{
base.AtEngage(target);
GetThreatManager().ResetUpdateTimer();
if (!HasFlag(CreatureStaticFlags2.AllowMountedCombat))
Dismount();