Core/Creature: Attach out-of-combat health regen to the Engaged system, not the Combat flag. Closes #21571.

This commit is contained in:
Treeston
2019-06-23 13:27:29 +02:00
parent 632a300dd2
commit a5f8c0d30c

View File

@@ -799,7 +799,7 @@ void Creature::Update(uint32 diff)
if (m_regenTimer == 0)
{
bool bInCombat = IsInCombat() && (!GetVictim() || // if IsInCombat() is true and this has no victim
bool bInCombat = IsEngaged() && (!GetVictim() || // if IsInCombat() is true and this has no victim
!EnsureVictim()->GetCharmerOrOwnerPlayerOrPlayerItself() || // or the victim/owner/charmer is not a player
!EnsureVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()->IsGameMaster()); // or the victim/owner/charmer is not a GameMaster