Core/Creatures: Do not regenerate the health of evading creatures, it should happen only while normal pathing or at home

--HG--
branch : trunk
This commit is contained in:
linencloth
2010-11-14 04:20:32 +01:00
parent c48b74e2bb
commit 6b3204e441
@@ -559,14 +559,13 @@ void Creature::Update(uint32 diff)
if (m_regenTimer != 0)
break;
bool bIsPolymorphed = IsPolymorphed();
bool bInCombat = isInCombat() && (!getVictim() || // if isInCombat() is true and this has no victim
!getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself() || // or the victim/owner/charmer is not a player
!getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()->isGameMaster()); // or the victim/owner/charmer is not a GameMaster
/*if (m_regenTimer <= diff)
{*/
if (!bInCombat || bIsPolymorphed) // regenerate health if not in combat or if polymorphed
if (!IsInEvadeMode() && (!bInCombat || IsPolymorphed())) // regenerate health if not in combat or if polymorphed
RegenerateHealth();
if (getPowerType() == POWER_ENERGY)