Ejemplo n.º 1
0
        public virtual void OnEnterDungeon(Mobile m)
        {
            if (m == null || m.Deleted)
            {
                return;
            }

            if (m is PlayerMobile)
            {
                var pm = (PlayerMobile)m;

                ActiveGroup.AddOrReplace(pm);

                if (ActiveGroup.Count > 0 && ActiveLeader == null)
                {
                    ActiveLeader = pm;
                }

                DungeonUI.DisplayTo(pm, false, this);
            }

            if (m.Player)
            {
                CheckDismount(m);

                if (!Options.Rules.AllowPets && m is PlayerMobile)
                {
                    StablePets((PlayerMobile)m);
                }
            }

            m.Delta(MobileDelta.Noto);
        }
Ejemplo n.º 2
0
 public virtual void OnEnter(DungeonZone zone, Mobile m)
 {
     if (m is PlayerMobile)
     {
         DungeonUI.DisplayTo((PlayerMobile)m, false, this);
     }
 }
Ejemplo n.º 3
0
        public static void DisplayTo(PlayerMobile user, bool refreshOnly, Dungeon dungeon)
        {
            var info = EnumerateInstances <DungeonUI>(user).FirstOrDefault(g => g != null && !g.IsDisposed && g.IsOpen);

            if (info == null)
            {
                if (refreshOnly)
                {
                    return;
                }

                info = new DungeonUI(user, dungeon);
            }

            if (dungeon != null && !dungeon.Deleted)
            {
                info.Dungeon = dungeon;
            }

            info.Refresh(true);
        }