Beispiel #1
0
        public void Spin(MoneyType moneyType, int roomId, string lines)
        {
            if (!_checker.CheckMoneyType(moneyType))
            {
                return;
            }

            if (!_checker.CheckRoom(roomId))
            {
                return;
            }

            if (!_checker.CheckLines(lines))
            {
                return;
            }

            try
            {
                var accountId   = AccountSession.AccountID;
                var accountName = AccountSession.AccountName;
                if (accountId < 1)
                {
                    return;
                }
                var spinResult = GameHandler.Instance.Spin(accountId, accountName, roomId, moneyType, lines);
                if (spinResult.ResponseStatus > 0)
                {
                    Clients.Caller.SpinResult(spinResult);
                }
            }
            catch (Exception e)
            {
                NLogManager.PublishException(e);
            }
        }