public virtual void OnExitDungeon(Mobile m) { if (m == null) { return; } if (MobileSpawns.Remove(m)) { OnSpawnDeactivate(m); } if (m.Deleted) { return; } if (m is PlayerMobile) { var pm = (PlayerMobile)m; ActiveGroup.Remove(pm); if (ActiveGroup.Count > 0 && ActiveLeader == pm) { ActiveLeader = ActiveGroup[0]; } pm.CloseGump(typeof(DungeonUI)); pm.CloseGump(typeof(DungeonLootUI)); if (pm.Map == null || pm.Map == Server.Map.Internal) { StablePets(pm); } else { SummonPets(pm); } } m.Delta(MobileDelta.Noto); m.ProcessDelta(); }