public GroupDungeonRegion(GroupDungeonStone stone, Map map, string name, Rectangle2D area)
     : base(name, map, 0, area)
 {
     //Link the region to a control stone, and vise-versa.
     m_Stone           = stone; stone.IRegion = this;
     m_PlayerMovements = new List <PlayerMovementEntry>();
     m_AFKTimer        = new AFKTimer(this);
 }
Esempio n. 2
0
        public static void DungeonCleared(object state)
        {
            object[]          args  = (object[])state; // Get the parameters.. mobile and dungeon stone.
            Mobile            m     = (Mobile)args[0];
            GroupDungeonStone stone = (GroupDungeonStone)args[1];

            //we decided everyone was dead, so grab every player, tell them the news, bless corpses,
            //then delay the kick method.
            if (m.Player && m.AccessLevel == AccessLevel.Player)
            {
                PlayerMobile pm = (PlayerMobile)m;
                pm.SendMessage(34, "Your group has conquered {0}! You will be telported out of the instance in {1} minutes, {2} seconds.", stone.DungeonName, m_KickTimer.Minutes, m_KickTimer.Seconds);
                Timer.DelayCall(m_KickTimer, new TimerStateCallback(KickCallBack), new object[] { m, stone });
            }
        }
Esempio n. 3
0
        public static void KickCallBack(object state)
        {
            object[]          args  = (object[])state; // Get the parameters.. mobile and dungeon stone.
            Mobile            m     = (Mobile)args[0];
            GroupDungeonStone stone = (GroupDungeonStone)args[1];

            // If the corpse still exists and the player is still a player,
            // And is still in the region
            // then move them both to the entrance point.
            if (m.Player)
            {
                Point3D pt  = stone.EntrancePoint;
                Map     map = stone.EntranceMap;
                Region  reg = Region.Find(m.Location, m.Map);



                if (map != Map.Internal && pt != Point3D.Zero)
                {
                    // Only move if they are still there.
                    if (reg == stone.IRegion)
                    {
                        //Kick any corpses
                        if (m.Corpse != null)
                        {
                            m.Corpse.MoveToWorld(pt, map);
                        }

                        // Kick any pets
                        ArrayList petlist = new ArrayList();
                        foreach (Mobile pet in stone.GetMobilesInRange(stone.Size))
                        {
                            if (pet is BaseCreature && ((BaseCreature)pet).ControlMaster == m)
                            {
                                petlist.Add(pet);
                            }
                        }
                        foreach (Mobile pet in petlist)
                        {
                            pet.MoveToWorld(pt, map);
                        }

                        //kick player
                        m.MoveToWorld(pt, map);
                    }
                }
            }
        }
Esempio n. 4
0
        public static void GroupWipe(object state)
        {
            object[]          args  = (object[])state; // Get the parameters.. mobile and dungeon stone.
            Mobile            m     = (Mobile)args[0];
            GroupDungeonStone stone = (GroupDungeonStone)args[1];

            //we decided everyone was dead, so grab every player, tell them the news, bless corpses,
            //then delay the kick method.
            if (m.Player && m.AccessLevel == AccessLevel.Player)
            {
                PlayerMobile pm = (PlayerMobile)m;
                pm.SendMessage(34, "Your group has been defeated. You, any pets, and your corpse will be telported out of the instance in {0} minutes, {1} seconds.", m_RezTimer.Minutes, m_RezTimer.Seconds);

                if (m_BlessCorpses) // if global flag is true, bless the corpse
                {
                    pm.Corpse.LootType = LootType.Blessed;
                }

                Timer.DelayCall(m_RezTimer, new TimerStateCallback(KickCallBack), new object[] { m, stone });
            }
        }
Esempio n. 5
0
 public GroupDungeonRegion(GroupDungeonStone stone, Map map, string name, Rectangle2D area) : base(name, map, 0, area)
 {
     //Link the region to a control stone, and vise-versa.
     m_Stone       = stone;
     stone.IRegion = this;
 }