some more cleanup
Port From (https://github.com/TrinityCore/TrinityCore/commit/f29644efd5cf430c321ad68122c385b4535069da)
This commit is contained in:
@@ -590,11 +590,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
if (RegenTimer == 0)
|
if (RegenTimer == 0)
|
||||||
{
|
{
|
||||||
bool bInCombat = IsEngaged() && (!GetVictim() || // if IsInCombat() is true and this has no victim
|
if (!IsInEvadeMode() && (!IsEngaged() || IsPolymorphed() || CanNotReachTarget())) // regenerate health if not in combat or if polymorphed
|
||||||
!GetVictim().GetCharmerOrOwnerPlayerOrPlayerItself() || // or the victim/owner/charmer is not a player
|
|
||||||
!GetVictim().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
|
|
||||||
RegenerateHealth();
|
RegenerateHealth();
|
||||||
|
|
||||||
if (GetPowerType() == PowerType.Energy)
|
if (GetPowerType() == PowerType.Energy)
|
||||||
|
|||||||
Reference in New Issue
Block a user