Fix an issue where temp summons were ignoring m_regenHealth.

Port From (https://github.com/TrinityCore/TrinityCore/commit/ec9fbaceb057e5beb8dda066b2c4773abe3dba7e)
This commit is contained in:
hondacrx
2020-07-24 16:29:29 -04:00
parent 8e46ddaba5
commit 87b4c91319
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -3059,7 +3059,7 @@ namespace Game.Entities
m_combatPulseTime = delay;
}
bool IsRegeneratingHealth() { return m_regenHealth; }
public bool IsRegeneratingHealth() { return m_regenHealth; }
public void SetRegeneratingHealth(bool regenHealth) { m_regenHealth = regenHealth; }
public void SetHomePosition(float x, float y, float z, float o)
@@ -47,7 +47,11 @@ namespace Game.AI
owner.SetWalk(true);
owner.LoadCreaturesAddon();
owner.GetAI().JustReachedHome();
owner.SetSpawnHealth();
if (owner.IsRegeneratingHealth())
{
owner.SetFullHealth();
owner.SetPower(PowerType.Mana, owner.GetMaxPower(PowerType.Mana));
}
}
}