Esempio n. 1
0
    public bool OnHandleTableJoinBegin(NetCmdBase obj)
    {
        LC_Cmd_DialTableJoinBegin ncb = (LC_Cmd_DialTableJoinBegin)obj;

        TableStates     = DialTableStates.DTS_Begin;
        TableUpdateInfo = new DialTableUpdateInfo();
        UInt64[] BetGlobel = new UInt64[FishDataInfo.MAX_Dial_ClientSum];
        //LogTableGlobelSum = TableGlobelSum;//记录上次押注的情况
        for (int i = 0; i < FishDataInfo.MAX_Dial_ClientSum; ++i)
        {
            TableGlobelSum[i] = 0;
            BetGlobel[i]      = 0;
        }
        TableUpdateInfo.SetInfo(BetGlobel);
        AreaData.SetInfo(ncb.TableAreaData, ncb.TableAreaDataRate);
        TableBankerUserInfo.GameSum++;
        //触发事件
        tagDialStatesChange pEvent = new tagDialStatesChange(TableStates, TableUpdateInfo, AreaData, null, TableVipSeatInfo, TableWriteBankerList, TableBankerUserInfo, TableGameLog, 0);

        MsgEventHandle.HandleMsg(pEvent);
        return(true);
    }
Esempio n. 2
0
    public bool OnHandleTableJoinEnd(NetCmdBase obj)
    {
        LC_Cmd_DialTableJoinEnd ncb = (LC_Cmd_DialTableJoinEnd)obj;

        TableResult = ncb.TableResultIndex;
        TableUpdateInfo.SetInfo(ncb.TableBetAreaGlobel);
        TableStates = DialTableStates.DTS_End;//等待关闭状态

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

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

        {
            Byte   Index1   = Convert.ToByte(TableResult >> 8);
            Byte   Index2   = (Byte)TableResult;
            Byte   Rank     = Convert.ToByte(AreaData.TableAreaData[Index1] / 4);
            Byte   Value    = Convert.ToByte(FishConfig.Instance.m_MiNiGameConfig.dialConfig.DialAreaData[Index2]);
            string strRank  = (Rank == 0 ? "红" : (Rank == 1 ? "黄" : "绿"));
            string strValue = (Value == 0 ? "熊猫" : (Value == 1 ? "猴子" : (Value == 2 ? "兔子" : "狮子")));
            string strInfo  = strValue + strRank;
            LogMgr.Log(strInfo);
        }

        //触发事件
        tagDialStatesChange pEvent = new tagDialStatesChange(TableStates, TableUpdateInfo, AreaData, pOldlist, TableVipSeatInfo, TableWriteBankerList, TableBankerUserInfo, TableGameLog, TableResult);

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