public bool OnHandleTableJoinEnd(NetCmdBase obj) { LC_Cmd_CarTableJoinEnd ncb = (LC_Cmd_CarTableJoinEnd)obj; TableResult = ncb.TableResultIndex; TableUpdateInfo.SetInfo(ncb.TableBetAreaGlobel); TableStates = CarTableStates.CTS_End;//等待关闭状态 for (int i = 0; i < FishDataInfo.MAX_Car_ClientSum; ++i) { TableGlobelSum[i] = 0; } //金币变化 if (ncb.BankerUserGlobelInfo.dwUserID == TableBankerUserInfo.UserInfo.dwUserID) { TableBankerUserInfo.UserInfo.GlobelSum = ncb.BankerUserGlobelInfo.dwGlobelSum; } for (Byte i = 0; i < FishDataInfo.MAX_Car_BankerShowSum; ++i) { if (TableWriteBankerList.List[i] != null && ncb.BankerListGlobelInfo[i].dwUserID == TableWriteBankerList.List[i].dwUserID) { TableWriteBankerList.List[i].GlobelSum = ncb.BankerListGlobelInfo[i].dwGlobelSum; } } CarVipSeatList pOldlist = new CarVipSeatList(); for (Byte i = 0; i < FishDataInfo.MAX_Car_VipSeat; ++i) { if (TableVipSeatInfo.List[i] != null && ncb.VipGlobelInfo[i].dwUserID == TableVipSeatInfo.List[i].dwUserID) { pOldlist.List[i] = TableVipSeatInfo.List[i]; TableVipSeatInfo.List[i].GlobelSum = ncb.VipGlobelInfo[i].dwGlobelSum; } } TableGameLog.GameLog = ncb.TableResultLog; TableGameLog.GameSum = ncb.TableGameSum; LogMgr.Log(string.Format("玩家金币变化 {0}", ncb.AddGlobelSum)); //触发事件 tagCarStatesChange pEvent = new tagCarStatesChange(TableStates, TableUpdateInfo, pOldlist, TableVipSeatInfo, TableWriteBankerList, TableBankerUserInfo, TableGameLog, TableResult); MsgEventHandle.HandleMsg(pEvent); return(true); }
public bool OnHandleTableJoinBegin(NetCmdBase obj) { LC_Cmd_CarTableJoinBegin ncb = (LC_Cmd_CarTableJoinBegin)obj; TableStates = CarTableStates.CTS_Begin; TableUpdateInfo = new CarTableUpdateInfo(); UInt64[] BetGlobel = new UInt64[FishDataInfo.MAX_Car_ClientSum]; LogTableGlobelSum = TableGlobelSum;//记录上次押注的情况 for (int i = 0; i < FishDataInfo.MAX_Car_ClientSum; ++i) { TableGlobelSum[i] = 0; BetGlobel[i] = 0; } TableUpdateInfo.SetInfo(BetGlobel); TableBankerUserInfo.GameSum++; //触发事件 tagCarStatesChange pEvent = new tagCarStatesChange(TableStates, TableUpdateInfo, null, TableVipSeatInfo, TableWriteBankerList, TableBankerUserInfo, TableGameLog, 0); MsgEventHandle.HandleMsg(pEvent); return(true); }