Ejemplo n.º 1
0
        /**
         *      Send the bluff decision gump to the next player, and send a callBluff gump to the user
         */
        public void PlayBluffDecisionTurn(MobileDiceStstatus prevPlayer, MobileDiceStstatus currPlayer)
        {
            RemoveGumps(prevPlayer);
            int prevRollOrBluff = prevPlayer.GetPrevRollOrBluff();

            cbg = new CallBluffGump(this, prevRollOrBluff);
            try{
                currPlayer.getMobile().SendGump(cbg);
            }catch {
                SendMessageAllPlayers("Player " + currPlayer.getMobile().Name + " was disconnected");
                RemovePlayer(currPlayer.getMobile(), true);
            }
            //do timer checking, since timer is a thread, when the callback occurs we just look at the "previous" player
            SetTimerAction(prevPlayer, currPlayer);
        }
Ejemplo n.º 2
0
 public DiceState(int _goldPerGame, int _gameBalanceMin, int _gameBalanceMax, int _playerToActSeconds, int _maxNumberOfPlayers)
 {
     this.goldPerGame        = _goldPerGame;
     this.gameBalanceMin     = _gameBalanceMin;
     this.gameBalanceMax     = _gameBalanceMax;
     this.playerToActSeconds = _playerToActSeconds;
     this.maxNumberOfPlayers = _maxNumberOfPlayers;
     gdg  = new GameDiceGump(this);
     sdg  = new StatusDiceGump(this);
     cbg  = new CallBluffGump(this);
     edg  = new ExitDiceGump(this);
     ndgg = new NewDiceGameGump(this, 0);
     //setup timer to kick player if applicable, really only applies to frozen character when you log off.
     statusGumpTimer = Timer.DelayCall(TimeSpan.FromSeconds(15), new TimerCallback(StatusTimerCheck));
     // Register event disconnect handler
     EventSink.Disconnected += new DisconnectedEventHandler(EventSink_Disconnected);
     //register crashed handler. -- Not sure this will actually do anything, unless a save takes place before full crash
     EventSink.Crashed += new CrashedEventHandler(EventSink_ServerCrashed);
 }