public void GetJackpot(byte betType, byte roomID) { try { long accountId = AccountSession.AccountID; string accountName = AccountSession.AccountName; if (CacheCounter.CheckIpPostFrequency(10, "GetJackpot") > 50) { NLogManager.LogMessage(string.Format("BlockGetJackpot=>{0},{1}", accountId, IPAddressHelper.GetClientIP())); return; } if ((accountId < 1 || string.IsNullOrEmpty(accountName))) { throw new NotAuthorizedException(NOT_LOGIN_MESSAGE); } if ((betType < 1 || betType > 2 || roomID < 1 || roomID > 4)) { throw new InvalidOperationException(INVALID_DATA_MESSAGE); } MiniPokerHandler.Instance.AddPlayer(accountId); MiniPokerHandler.Instance.MpGetJackpot(betType, roomID, base.Context.ConnectionId); } catch (Exception exception) { NLogManager.PublishException(exception); } }
public void HideSlot() { try { long accountId = AccountSession.AccountID; string accountName = AccountSession.AccountName; if (CacheCounter.CheckIpPostFrequency(10, "HideSlot") > 30) { NLogManager.LogMessage(string.Format("BlockHideSlot=>{0},{1}", accountId, IPAddressHelper.GetClientIP())); return; } if ((accountId < 1 || string.IsNullOrEmpty(accountName))) { throw new NotAuthorizedException(NOT_LOGIN_MESSAGE); } MiniPokerHandler.Instance.RemovePlayer(accountId); MiniPokerHandler.Instance.MpHideSlot(base.Context.ConnectionId); } catch (Exception exception) { NLogManager.PublishException(exception); } }