Exemplo n.º 1
0
 private static void EventStoneGump_Command(CommandEventArgs e)
 {
     if (e.Mobile is PlayerMobile && e.Mobile.AccessLevel == AccessLevel.Player)
     {
         PlayerMobile player = e.Mobile as PlayerMobile;
         if (player.CurrentEvent != null)
         {
             player.CurrentEvent.SendPlayerGump(player);
         }
         if (player.GameInfoGumpType == GameInfoGumpType.Disabled)
         {
             player.GameInfoGumpType = GameInfoGumpType.Extended;
         }
     }
     else if (e.Mobile.AccessLevel >= AccessLevel.Counselor)
     {
         BaseGame game = BaseGame.FindRunningGame(e.Mobile);
         if (game != null)
         {
             game.OnDoubleClick(e.Mobile);
         }
         else
         {
             e.Mobile.SendMessage("You are not hosting an event.");
         }
     }
 }
Exemplo n.º 2
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            switch (info.ButtonID)
            {
            case 1:
            {
                from.SendGump(new PropertiesGump(m_User, m_Game));
                m_Game.OnDoubleClick(m_User);
                break;
            }

            case 2:
            {
                from.SendGump(new PropertiesGump(m_User, m_Game.Supplier));
                m_Game.OnDoubleClick(m_User);
                break;
            }

            case 3:
            {
                m_Game.Supplier.OnDoubleClick(m_User);
                m_Game.OnDoubleClick(m_User);
                break;
            }

            case 4:
            {
                m_Game.Open = true;
                m_Game.OnDoubleClick(m_User);
                break;
            }

            case 5:
            {
                m_Game.Open = false;
                m_Game.OnDoubleClick(m_User);
                break;
            }

            case 6:
            {
                m_Game.StartCommand(m_User);
                m_Game.OnDoubleClick(m_User);
                break;
            }

            case 7:
            {
                m_Game.EndGameCommand();
                m_Game.OnDoubleClick(m_User);
                break;
            }

            case 8:
            {
                from.SendGump(new GameAdminGump(from, m_Game));
                m_Game.OnDoubleClick(m_User);
                break;
            }
            }
        }