private void ReturnToSpawn() { AI.Debugger?.SendClientMessage("[MR]: Retreating to the spawnpoint."); if (_unit.IsInstanceSpawn()) { InstanceSpawn npc = (InstanceSpawn)_unit; npc.BuffInterface.RemoveAllBuffs(); npc.ReceiveHeal(null, npc.MaxHealth); npc.SetPosition((ushort)npc.SpawnPoint.X, (ushort)npc.SpawnPoint.Y, (ushort)npc.SpawnPoint.Z, npc.SpawnHeading, npc.Spawn.ZoneId, true); } else { Creature npc = (Creature)_unit; npc.BuffInterface.RemoveAllBuffs(); npc.ReceiveHeal(null, npc.MaxHealth); npc.SetPosition((ushort)npc.SpawnPoint.X, (ushort)npc.SpawnPoint.Y, (ushort)npc.SpawnPoint.Z, npc.SpawnHeading, npc.Spawn.ZoneId, true); } }