Ejemplo n.º 1
0
    public bool OnHandleTableJoinEnd(NetCmdBase obj)
    {
        LC_Cmd_TableJoinEnd ncb = (LC_Cmd_TableJoinEnd)obj;

        BrandResult.SetInfo(ncb.TableBrandArray, ncb.TableBrandResult);
        TableUpdateInfo.SetInfo(ncb.TableBetAreaGlobel);
        TableStates = NiuNiuTableStates.NNTS_End;//等待关闭状态

        for (int i = 0; i < FishDataInfo.MAX_NIUNIU_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_NIUNIU_BankerShowSum; ++i)
        {
            if (TableWriteBankerList.List[i] != null && ncb.BankerListGlobelInfo[i].dwUserID == TableWriteBankerList.List[i].dwUserID)
            {
                TableWriteBankerList.List[i].GlobelSum = ncb.BankerListGlobelInfo[i].dwGlobelSum;
            }
        }
        VipSeatList pOldlist = new VipSeatList();

        for (Byte i = 0; i < FishDataInfo.MAX_NIUNIU_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;

        //触发事件
        tagNiuNiuStatesChange pEvent = new tagNiuNiuStatesChange(TableStates, TableUpdateInfo, BrandResult, pOldlist, TableVipSeatInfo, TableWriteBankerList, TableBankerUserInfo, TableGameLog);

        MsgEventHandle.HandleMsg(pEvent);

        //string str = string.Format("游戏记录 局数:{0} 数据:{1}", TableGameLog.GameSum, TableGameLog.GameLog);
        //LogMgr.Log(str);
        return(true);
    }
Ejemplo n.º 2
0
    public bool OnHandleTableJoinBegin(NetCmdBase obj)
    {
        TableStates     = NiuNiuTableStates.NNTS_Begin;
        TableUpdateInfo = new TableUpdateInfo();
        BrandResult     = new TableBrandResult();
        for (int i = 0; i < FishDataInfo.MAX_NIUNIU_ClientSum; ++i)
        {
            TableGlobelSum[i] = 0;
        }
        TableBankerUserInfo.GameSum++;
        //触发事件
        tagNiuNiuStatesChange pEvent = new tagNiuNiuStatesChange(TableStates, TableUpdateInfo, BrandResult, null, TableVipSeatInfo, TableWriteBankerList, TableBankerUserInfo, TableGameLog);

        MsgEventHandle.HandleMsg(pEvent);
        return(true);
    }