Example #1
0
    //游戏配置
    private void Cmd_Gf_GameOption(byte[] tmpBuf)
    {
        CMD_GF_GameOption gameOption = NetUtil.BytesToStruct <CMD_GF_GameOption>(tmpBuf);

        if (GlobalDataScript.Instance.roomInfo == null)
        {
            GlobalDataScript.Instance.roomInfo = new GameRoomInfo();
        }

        GlobalDataScript.Instance.roomInfo.playerNum = gameOption.cb_game_rule[2];
        GlobalDataScript.Instance.roomInfo.payType   = (int)gameOption.cb_game_rule[4];
        GlobalDataScript.Instance.roomInfo.gameMode  = (int)gameOption.cb_game_rule[1];
        // GlobalDataScript.Instance.roomInfo.maPaiId = NetUtil.PuCardChange((PU_KE)gameOption.cb_game_rule[5]);
    }
Example #2
0
    public void GetGameOption()
    {
        CMD_GF_GameOption GameOption = new CMD_GF_GameOption();

        ;
        //构造数据
        GameOption.dwFrameVersion  = 9; //LoginData.DwProcessVersion;
        GameOption.cbAllowLookon   = 0;
        GameOption.dwClientVersion = 9; // LoginData.DwProcessVersion;
        byte[] temp = NetUtil.StructToBytes(GameOption);
        //发送数据
        //Instance.SendData((int) GameServer.MDM_GF_FRAME, (int) MDM_GF_FRAME.SUB_GF_GAME_OPTION, temp,
        //    Marshal.SizeOf(GameOption));
    }