Exemplo n.º 1
0
    //处理函数
    public bool OnHandleRoleJoinTable(NetCmdBase obj)
    {
        LC_Cmd_CarRoleJoinTable ncb = (LC_Cmd_CarRoleJoinTable)obj;

        if (ncb.Result)
        {
            //赋值 将消息里携带的数据 赋值到结构里面去
            TableStates = (CarTableStates)ncb.TableStates;
            TableUpdateInfo.SetInfo(ncb.TableBetAreaGlobel);
            TableBankerUserInfo.SetInfo(ncb.TableBankerInfo, ncb.TableBankerUseGameSum);
            TableWriteBankerList.SetInfo(0xffffffff, ncb.TableWriteBankerList);
            TableVipSeatInfo.SetInfo(ncb.VipSeatList);
            for (Byte i = 0; i < FishDataInfo.MAX_Car_ClientSum; ++i)
            {
                TableGlobelSum[i]    = 0;
                LogTableGlobelSum[i] = 0;
            }
            IsInBankerList       = false;
            TableResult          = ncb.TableResultIndex;
            TableGameLog.GameLog = ncb.TableResultLog;
            TableGameLog.GameSum = ncb.TableGameSum;

            tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Car_JoinRoom_Sucess);
            MsgEventHandle.HandleMsg(pUOM);

            tagCarJoin pEvent = new tagCarJoin(ncb.TableStatesUpdateSec, TableStates, TableUpdateInfo, TableBankerUserInfo, TableWriteBankerList, TableVipSeatInfo, TableGameLog, TableResult);
            MsgEventHandle.HandleMsg(pEvent);
        }
        else
        {
            //进入房间失败了
            tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Car_JoinRoom_Failed_2);
            MsgEventHandle.HandleMsg(pUOM);
        }
        return(true);
    }
Exemplo n.º 2
0
    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);
    }