Core/Creatures: Implemented CREATURE_STATIC_FLAG_5_NO_LEAVECOMBAT_STATE_RESTORE

Port From (https://github.com/TrinityCore/TrinityCore/commit/be3dc89c32e5b60df4c026d8b19505e529e199b6)
This commit is contained in:
hondacrx
2024-02-27 13:49:15 -05:00
parent ecf2ddeb5f
commit dcfcbd779a
3 changed files with 13 additions and 6 deletions
@@ -63,11 +63,14 @@ namespace Game.AI
if (!owner.HasCanSwimFlagOutOfCombat())
owner.RemoveUnitFlag(UnitFlags.CanSwim);
owner.SetSpawnHealth();
owner.LoadCreaturesAddon();
owner.LoadCreaturesSparringHealth();
if (owner.IsVehicle())
owner.GetVehicleKit().Reset(true);
if (owner.IsStateRestoredOnEvade())
{
owner.SetSpawnHealth();
owner.LoadCreaturesAddon();
owner.LoadCreaturesSparringHealth();
if (owner.IsVehicle())
owner.GetVehicleKit().Reset(true);
}
CreatureAI ai = owner.GetAI();
if (ai != null)