some more cleanup, a5f8c0d follow-up

(cherry picked from commit 00728cef15)
This commit is contained in:
Treeston
2019-06-23 13:28:45 +02:00
committed by Shauren
parent e3411b4740
commit f29644efd5

View File

@@ -863,11 +863,7 @@ void Creature::Update(uint32 diff)
if (m_regenTimer == 0)
{
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
if (!IsInEvadeMode() && (!bInCombat || IsPolymorphed() || CanNotReachTarget())) // regenerate health if not in combat or if polymorphed
if (!IsInEvadeMode() && (!IsEngaged() || IsPolymorphed() || CanNotReachTarget())) // regenerate health if not in combat or if polymorphed
RegenerateHealth();
if (GetPowerType() == POWER_ENERGY)