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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user