1239 lines
29 KiB
C++
1239 lines
29 KiB
C++
#ifndef STRUCT_HEAD_FILE
|
|
#define STRUCT_HEAD_FILE
|
|
|
|
#include "datastream.h"
|
|
|
|
#pragma pack(1)
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
//游戏列表
|
|
|
|
//游戏类型
|
|
struct tagGameType
|
|
{
|
|
WORD wJoinID; //挂接索引
|
|
WORD wSortID; //排序索引
|
|
WORD wTypeID; //类型索引
|
|
TCHAR szTypeName[LEN_TYPE]; //种类名字
|
|
};
|
|
|
|
//游戏种类
|
|
struct tagGameKind
|
|
{
|
|
WORD wTypeID; //类型索引
|
|
WORD wJoinID; //挂接索引
|
|
WORD wSortID; //排序索引
|
|
WORD wKindID; //类型索引
|
|
WORD wGameID; //模块索引
|
|
DWORD dwOnLineCount; //在线人数
|
|
DWORD dwFullCount; //满员人数
|
|
TCHAR szKindName[LEN_KIND]; //游戏名字
|
|
TCHAR szProcessName[LEN_PROCESS]; //进程名字
|
|
};
|
|
|
|
//游戏节点
|
|
struct tagGameNode
|
|
{
|
|
WORD wKindID; //名称索引
|
|
WORD wJoinID; //挂接索引
|
|
WORD wSortID; //排序索引
|
|
WORD wNodeID; //节点索引
|
|
TCHAR szNodeName[LEN_NODE]; //节点名称
|
|
};
|
|
|
|
//定制类型
|
|
struct tagGamePage
|
|
{
|
|
WORD wPageID; //页面索引
|
|
WORD wKindID; //名称索引
|
|
WORD wNodeID; //节点索引
|
|
WORD wSortID; //排序索引
|
|
WORD wOperateType; //控制类型
|
|
TCHAR szDisplayName[LEN_PAGE]; //显示名称
|
|
};
|
|
|
|
//游戏房间
|
|
struct tagGameServer
|
|
{
|
|
WORD wKindID; //名称索引
|
|
WORD wNodeID; //节点索引
|
|
WORD wSortID; //排序索引
|
|
WORD wServerID; //房间索引
|
|
//WORD wServerKind; //房间类型
|
|
WORD wServerType; //房间类型
|
|
WORD wServerPort; //房间端口
|
|
SCORE lCellScore; //单元积分
|
|
SCORE lEnterScore; //进入积分
|
|
DWORD dwServerRule; //房间规则
|
|
DWORD dwOnLineCount; //在线人数
|
|
DWORD dwAndroidCount; //机器人数
|
|
DWORD dwFullCount; //满员人数
|
|
TCHAR szServerAddr[32]; //房间名称
|
|
TCHAR szServerName[LEN_SERVER]; //房间名称
|
|
};
|
|
|
|
//比赛报名
|
|
struct tagSignupMatchInfo
|
|
{
|
|
WORD wServerID; //房间标识
|
|
DWORD dwMatchID; //比赛标识
|
|
DWORD dwMatchNO; //比赛场次
|
|
};
|
|
|
|
//比赛信息
|
|
struct tagGameMatch
|
|
{
|
|
//基本信息
|
|
WORD wServerID; //房间标识
|
|
DWORD dwMatchID; //比赛标识
|
|
DWORD dwMatchNO; //比赛场次
|
|
BYTE cbMatchType; //比赛类型
|
|
TCHAR szMatchName[32]; //比赛名称
|
|
|
|
//比赛信息
|
|
BYTE cbMemberOrder; //会员等级
|
|
BYTE cbMatchFeeType; //扣费类型
|
|
SCORE lMatchFee; //比赛费用
|
|
SCORE lMatchEnterScore; //准入金币
|
|
|
|
//比赛信息
|
|
WORD wStartUserCount; //开赛人数
|
|
WORD wMatchPlayCount; //比赛局数
|
|
|
|
//比赛奖励
|
|
WORD wRewardCount; //奖励人数
|
|
|
|
DWORD dwQuality; //比赛性质;
|
|
DWORD dwCycle; //周期类型;
|
|
DWORD dwInviteCode; //邀请码;
|
|
DWORD dwChannelID; //渠道ID;
|
|
|
|
|
|
//比赛时间
|
|
SYSTEMTIME MatchStartTime; //开始时间
|
|
SYSTEMTIME MatchEndTime; //结束时间
|
|
SYSTEMTIME SignupStartTime; //报名开始;
|
|
SYSTEMTIME SignupEndTime; //报名截止;
|
|
};
|
|
|
|
//视频配置
|
|
struct tagAVServerOption
|
|
{
|
|
WORD wAVServerPort; //视频端口
|
|
DWORD dwAVServerAddr; //视频地址
|
|
};
|
|
|
|
//在线信息
|
|
struct tagOnLineInfoKind
|
|
{
|
|
WORD wKindID; //类型标识
|
|
DWORD dwOnLineCount; //在线人数
|
|
};
|
|
|
|
//在线信息
|
|
struct tagOnLineInfoServer
|
|
{
|
|
WORD wServerID; //房间标识
|
|
DWORD dwOnLineCount; //在线人数
|
|
};
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
//用户信息
|
|
|
|
//桌子状态
|
|
struct tagTableStatus
|
|
{
|
|
BYTE cbTableLock; //锁定标志
|
|
BYTE cbPlayStatus; //游戏标志
|
|
};
|
|
|
|
//用户状态
|
|
struct tagUserStatus
|
|
{
|
|
WORD wTableID; //桌子索引
|
|
WORD wChairID; //椅子位置
|
|
BYTE cbUserStatus; //用户状态
|
|
};
|
|
|
|
//用户属性
|
|
struct tagUserAttrib
|
|
{
|
|
BYTE cbCompanion; //用户关系
|
|
};
|
|
|
|
//用户积分
|
|
struct tagUserScore
|
|
{
|
|
//积分信息
|
|
SCORE lScore; //用户分数
|
|
SCORE lGrade; //用户成绩
|
|
SCORE lInsure; //用户银行
|
|
|
|
//输赢信息
|
|
DWORD dwWinCount; //胜利盘数
|
|
DWORD dwLostCount; //失败盘数
|
|
DWORD dwDrawCount; //和局盘数
|
|
DWORD dwFleeCount; //逃跑盘数
|
|
|
|
//全局信息
|
|
DWORD dwUserMedal; //用户奖牌
|
|
DWORD dwExperience; //用户经验
|
|
LONG lLoveLiness; //用户魅力
|
|
};
|
|
|
|
//用户积分
|
|
struct tagMobileUserScore
|
|
{
|
|
//积分信息
|
|
SCORE lScore; //用户分数
|
|
|
|
//输赢信息
|
|
DWORD dwWinCount; //胜利盘数
|
|
DWORD dwLostCount; //失败盘数
|
|
DWORD dwDrawCount; //和局盘数
|
|
DWORD dwFleeCount; //逃跑盘数
|
|
|
|
//全局信息
|
|
DWORD dwExperience; //用户经验
|
|
};
|
|
|
|
|
|
//道具使用
|
|
struct tagUsePropertyInfo
|
|
{
|
|
WORD wPropertyCount; //道具数目
|
|
WORD dwValidNum; //有效数字
|
|
DWORD dwEffectTime; //生效时间
|
|
};
|
|
|
|
|
|
//用户道具
|
|
struct tagUserProperty
|
|
{
|
|
WORD wPropertyUseMark; //道具标示
|
|
tagUsePropertyInfo PropertyInfo[MAX_PT_MARK]; //使用信息
|
|
};
|
|
|
|
//道具包裹
|
|
struct tagPropertyPackage
|
|
{
|
|
WORD wTrumpetCount; //小喇叭数
|
|
WORD wTyphonCount; //大喇叭数
|
|
};
|
|
|
|
//时间信息
|
|
struct tagTimeInfo
|
|
{
|
|
DWORD dwEnterTableTimer; //进出桌子时间
|
|
DWORD dwLeaveTableTimer; //离开桌子时间
|
|
DWORD dwStartGameTimer; //开始游戏时间
|
|
DWORD dwEndGameTimer; //离开游戏时间
|
|
};
|
|
|
|
//用户信息
|
|
struct tagUserInfo
|
|
{
|
|
//基本属性
|
|
DWORD dwUserID; //用户 I D
|
|
DWORD dwGameID; //游戏 I D
|
|
DWORD dwGroupID; //社团 I D
|
|
TCHAR szNickName[LEN_NICKNAME]; //用户昵称
|
|
TCHAR szGroupName[LEN_GROUP_NAME]; //社团名字
|
|
TCHAR szUnderWrite[LEN_UNDER_WRITE]; //个性签名
|
|
TCHAR szHeadHttp[LEN_USER_NOTE]; //登录IP
|
|
|
|
//头像信息
|
|
WORD wFaceID; //头像索引
|
|
DWORD dwCustomID; //自定标识
|
|
|
|
//用户资料
|
|
BYTE cbGender; //用户性别
|
|
BYTE cbMemberOrder; //会员等级
|
|
BYTE cbMasterOrder; //管理等级
|
|
|
|
//用户状态
|
|
WORD wTableID; //桌子索引
|
|
WORD wChairID; //椅子索引
|
|
BYTE cbUserStatus; //用户状态
|
|
|
|
//积分信息
|
|
SCORE lScore; //用户分数
|
|
SCORE lGrade; //用户成绩
|
|
SCORE lInsure; //用户银行
|
|
|
|
//游戏信息
|
|
BYTE cbScoreMultiple; //积分倍数
|
|
DWORD dwWinCount; //胜利盘数
|
|
DWORD dwLostCount; //失败盘数
|
|
DWORD dwDrawCount; //和局盘数
|
|
DWORD dwFleeCount; //逃跑盘数
|
|
DWORD dwUserMedal; //用户奖牌
|
|
DWORD dwExperience; //用户经验
|
|
LONG lLoveLiness; //用户魅力
|
|
|
|
//时间信息
|
|
tagTimeInfo TimerInfo; //时间信息;
|
|
|
|
SCORE lAccuracy; //精度;
|
|
SCORE lLatitude; //经度;
|
|
SCORE lLongitude; //纬度;
|
|
TCHAR szAddress[LEN_DWELLING_PLACE]; //地理位置;
|
|
};
|
|
|
|
//用户信息
|
|
struct tagUserInfoHead
|
|
{
|
|
//用户属性
|
|
DWORD dwGameID; //游戏 I D
|
|
DWORD dwUserID; //用户 I D
|
|
DWORD dwLogonIp; //登录IP
|
|
|
|
//头像信息
|
|
WORD wFaceID; //头像索引
|
|
DWORD dwCustomID; //自定标识
|
|
|
|
//用户属性
|
|
BYTE cbGender; //用户性别
|
|
BYTE cbMemberOrder; //会员等级
|
|
BYTE cbMasterOrder; //管理等级
|
|
|
|
//用户状态
|
|
WORD wTableID; //桌子索引
|
|
WORD wChairID; //椅子索引
|
|
BYTE cbUserStatus; //用户状态
|
|
|
|
//积分信息
|
|
SCORE lScore; //用户分数
|
|
SCORE lGrade; //用户成绩
|
|
SCORE lInsure; //用户银行
|
|
|
|
//游戏信息
|
|
DWORD dwWinCount; //胜利盘数
|
|
DWORD dwLostCount; //失败盘数
|
|
DWORD dwDrawCount; //和局盘数
|
|
DWORD dwFleeCount; //逃跑盘数
|
|
DWORD dwUserMedal; //用户奖牌
|
|
DWORD dwExperience; //用户经验
|
|
LONG lLoveLiness; //用户魅力
|
|
};
|
|
|
|
//头像信息
|
|
struct tagCustomFaceInfo
|
|
{
|
|
DWORD dwDataSize; //数据大小
|
|
DWORD dwCustomFace[FACE_CX*FACE_CY]; //图片信息
|
|
};
|
|
|
|
//用户信息
|
|
struct tagUserRemoteInfo
|
|
{
|
|
//用户信息
|
|
DWORD dwUserID; //用户标识
|
|
DWORD dwGameID; //游戏标识
|
|
TCHAR szNickName[LEN_NICKNAME]; //用户昵称
|
|
|
|
//等级信息
|
|
BYTE cbGender; //用户性别
|
|
BYTE cbMemberOrder; //会员等级
|
|
BYTE cbMasterOrder; //管理等级
|
|
|
|
//位置信息
|
|
WORD wKindID; //类型标识
|
|
WORD wServerID; //房间标识
|
|
TCHAR szGameServer[LEN_SERVER]; //房间位置
|
|
};
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//广场子项
|
|
struct tagGamePlaza
|
|
{
|
|
WORD wPlazaID; //广场标识
|
|
TCHAR szServerAddr[32]; //服务地址
|
|
TCHAR szServerName[32]; //服务器名
|
|
};
|
|
|
|
//级别子项
|
|
struct tagLevelItem
|
|
{
|
|
LONG lLevelScore; //级别积分
|
|
TCHAR szLevelName[16]; //级别描述
|
|
};
|
|
|
|
//会员子项
|
|
struct tagMemberItem
|
|
{
|
|
BYTE cbMemberOrder; //等级标识
|
|
TCHAR szMemberName[16]; //等级名字
|
|
};
|
|
|
|
//管理子项
|
|
struct tagMasterItem
|
|
{
|
|
BYTE cbMasterOrder; //等级标识
|
|
TCHAR szMasterName[16]; //等级名字
|
|
};
|
|
|
|
//列表子项
|
|
struct tagColumnItem
|
|
{
|
|
BYTE cbColumnWidth; //列表宽度
|
|
BYTE cbDataDescribe; //字段类型
|
|
TCHAR szColumnName[16]; //列表名字
|
|
};
|
|
|
|
//地址信息
|
|
struct tagAddressInfo
|
|
{
|
|
TCHAR szAddress[32]; //服务地址
|
|
};
|
|
|
|
//数据信息
|
|
struct tagDataBaseParameter
|
|
{
|
|
WORD wDataBasePort; //数据库端口
|
|
TCHAR szDataBaseAddr[32]; //数据库地址
|
|
TCHAR szDataBaseUser[32]; //数据库用户
|
|
TCHAR szDataBasePass[32]; //数据库密码
|
|
TCHAR szDataBaseName[32]; //数据库名字
|
|
};
|
|
|
|
//房间配置
|
|
struct tagServerOptionInfo
|
|
{
|
|
//挂接属性
|
|
WORD wKindID; //挂接类型
|
|
WORD wNodeID; //挂接节点
|
|
WORD wSortID; //排列标识
|
|
|
|
//税收配置
|
|
WORD wRevenueRatio; //税收比例
|
|
SCORE lServiceScore; //服务费用
|
|
|
|
//房间配置
|
|
SCORE lRestrictScore; //限制积分
|
|
SCORE lMinTableScore; //最低积分
|
|
SCORE lMinEnterScore; //最低积分
|
|
SCORE lMaxEnterScore; //最高积分
|
|
|
|
//会员限制
|
|
BYTE cbMinEnterMember; //最低会员
|
|
BYTE cbMaxEnterMember; //最高会员
|
|
|
|
//房间属性
|
|
DWORD dwServerRule; //房间规则
|
|
TCHAR szServerName[LEN_SERVER]; //房间名称
|
|
};
|
|
|
|
//用户信息
|
|
struct tagMobileUserInfoHead
|
|
{
|
|
//用户属性
|
|
DWORD dwGameID; //游戏 I D
|
|
DWORD dwUserID; //用户 I D
|
|
|
|
//头像信息
|
|
WORD wFaceID; //头像索引
|
|
DWORD dwCustomID; //自定标识
|
|
|
|
//用户属性
|
|
BYTE cbGender; //用户性别
|
|
BYTE cbMemberOrder; //会员等级
|
|
|
|
//用户状态
|
|
WORD wTableID; //桌子索引
|
|
WORD wChairID; //椅子索引
|
|
BYTE cbUserStatus; //用户状态
|
|
|
|
//积分信息
|
|
SCORE lScore; //用户分数
|
|
|
|
//游戏信息
|
|
DWORD dwWinCount; //胜利盘数
|
|
DWORD dwLostCount; //失败盘数
|
|
DWORD dwDrawCount; //和局盘数
|
|
DWORD dwFleeCount; //逃跑盘数
|
|
DWORD dwExperience; //用户经验
|
|
};
|
|
|
|
|
|
//获得用户在那些比赛中;
|
|
struct tagQueryInMatch
|
|
{
|
|
BYTE cbListNum; //dwServerIDLists的ID的个数;
|
|
DWORD dwUserID; //用户ID;
|
|
BYTE cbServerIDStatus[32]; //在比赛中的状态;
|
|
DWORD dwServerIDLists[32]; //在那些比赛中;
|
|
};
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
//用户一盘输赢
|
|
struct tagPrivateRandRecordChild
|
|
{
|
|
DWORD dwKindID;
|
|
DWORD dwVersion;
|
|
int iRecordID;
|
|
int iRecordChildID;
|
|
std::vector<int> kScore;
|
|
SYSTEMTIME kPlayTime;
|
|
DataStream kRecordGame;
|
|
std::string kUserDefine;
|
|
tagPrivateRandRecordChild()
|
|
{
|
|
dwKindID = 0;
|
|
dwVersion = 0;
|
|
iRecordID = 0;
|
|
iRecordChildID = 0;
|
|
|
|
kScore.clear();
|
|
kRecordGame.clear();
|
|
kUserDefine.clear();
|
|
}
|
|
|
|
tagPrivateRandRecordChild(const tagPrivateRandRecordChild& refInfo)
|
|
{
|
|
dwKindID = refInfo.dwKindID;
|
|
dwVersion = refInfo.dwVersion;
|
|
iRecordID = refInfo.iRecordID;
|
|
iRecordChildID = refInfo.iRecordChildID;
|
|
kScore.assign(refInfo.kScore.begin(), refInfo.kScore.end());
|
|
kPlayTime = refInfo.kPlayTime;
|
|
kRecordGame.assign(refInfo.kRecordGame.begin(), refInfo.kRecordGame.end());
|
|
kUserDefine = refInfo.kUserDefine;
|
|
}
|
|
|
|
tagPrivateRandRecordChild& operator=(const tagPrivateRandRecordChild& refInfo)
|
|
{
|
|
if ( this == &refInfo )
|
|
{
|
|
return *this;
|
|
}
|
|
dwKindID = refInfo.dwKindID;
|
|
dwVersion = refInfo.dwVersion;
|
|
iRecordID = refInfo.iRecordID;
|
|
iRecordChildID = refInfo.iRecordChildID;
|
|
kScore.assign(refInfo.kScore.begin(), refInfo.kScore.end());
|
|
kPlayTime = refInfo.kPlayTime;
|
|
kRecordGame.assign(refInfo.kRecordGame.begin(), refInfo.kRecordGame.end());
|
|
kUserDefine = refInfo.kUserDefine;
|
|
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
Stream_VALUE(dwKindID);
|
|
Stream_VALUE(dwVersion);
|
|
Stream_VALUE(iRecordID);
|
|
Stream_VALUE(iRecordChildID);
|
|
StructVecotr(int, kScore);
|
|
Stream_VALUE_SYSTEMTIME(kPlayTime);
|
|
Stream_VALUE(kRecordGame);
|
|
Stream_VALUE(kUserDefine);
|
|
}
|
|
};
|
|
|
|
//用户一轮总输赢
|
|
struct tagPrivateRandTotalRecord
|
|
{
|
|
tagPrivateRandTotalRecord()
|
|
{
|
|
dwKindID = 0;
|
|
dwVersion = 0;
|
|
iRoomNum = 0;
|
|
iRecordID = 0;
|
|
cbGameCount = 0;
|
|
|
|
kScore.clear();
|
|
kUserID.clear();
|
|
kNickName.clear();
|
|
kHeadHttp.clear();
|
|
|
|
kUserDefine.clear();
|
|
}
|
|
DWORD dwKindID; // 游戏ID;
|
|
DWORD dwVersion; // 版本号;
|
|
int iRoomNum; // 房间号;
|
|
int iRecordID; // 记录ID;
|
|
BYTE cbGameCount; // 游戏局数;
|
|
std::vector<int> kScore; // 玩家积分;
|
|
std::vector<int> kUserID; // 玩家ID;
|
|
std::vector<std::string> kNickName; // 玩家昵称;
|
|
std::vector<std::string> kHeadHttp; // 微信头像;
|
|
SYSTEMTIME kPlayTime; // 游戏时间;
|
|
std::string kUserDefine; // 其他信息;
|
|
|
|
std::vector<tagPrivateRandRecordChild> kRecordChild;
|
|
|
|
tagPrivateRandTotalRecord(const tagPrivateRandTotalRecord& refInfo)
|
|
{
|
|
dwKindID = refInfo.dwKindID;
|
|
dwVersion = refInfo.dwVersion;
|
|
iRoomNum = refInfo.iRoomNum;
|
|
iRecordID = refInfo.iRecordID;
|
|
cbGameCount = refInfo.cbGameCount;
|
|
|
|
kScore.assign(refInfo.kScore.begin(), refInfo.kScore.end());
|
|
kUserID.assign(refInfo.kUserID.begin(), refInfo.kUserID.end());
|
|
kNickName.assign(refInfo.kNickName.begin(), refInfo.kNickName.end());
|
|
kHeadHttp.assign(refInfo.kHeadHttp.begin(), refInfo.kHeadHttp.end());
|
|
|
|
kPlayTime = refInfo.kPlayTime;
|
|
kUserDefine = refInfo.kUserDefine;
|
|
|
|
kRecordChild.assign(refInfo.kRecordChild.begin(), refInfo.kRecordChild.end());
|
|
}
|
|
tagPrivateRandTotalRecord& operator=(const tagPrivateRandTotalRecord& refInfo)
|
|
{
|
|
if ( this == &refInfo )
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
dwKindID = refInfo.dwKindID;
|
|
dwVersion = refInfo.dwVersion;
|
|
iRoomNum = refInfo.iRoomNum;
|
|
iRecordID = refInfo.iRecordID;
|
|
cbGameCount = refInfo.cbGameCount;
|
|
|
|
kScore.assign(refInfo.kScore.begin(), refInfo.kScore.end());
|
|
kUserID.assign(refInfo.kUserID.begin(), refInfo.kUserID.end());
|
|
kNickName.assign(refInfo.kNickName.begin(), refInfo.kNickName.end());
|
|
kHeadHttp.assign(refInfo.kHeadHttp.begin(), refInfo.kHeadHttp.end());
|
|
|
|
kPlayTime = refInfo.kPlayTime;
|
|
kUserDefine = refInfo.kUserDefine;
|
|
|
|
kRecordChild.assign(refInfo.kRecordChild.begin(), refInfo.kRecordChild.end());
|
|
return *this;
|
|
}
|
|
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
Stream_VALUE(dwKindID);
|
|
Stream_VALUE(dwVersion);
|
|
Stream_VALUE(iRoomNum);
|
|
Stream_VALUE(iRecordID);
|
|
Stream_VALUE(cbGameCount);
|
|
StructVecotr(int, kScore);
|
|
StructVecotr(int, kUserID);
|
|
Stream_VALUE(kNickName);
|
|
Stream_VALUE(kHeadHttp);
|
|
Stream_VALUE_SYSTEMTIME(kPlayTime);
|
|
Stream_VALUE(kUserDefine);
|
|
StructVecotrMember(tagPrivateRandRecordChild,kRecordChild);
|
|
}
|
|
};
|
|
|
|
struct tagPrivateRandTotalRecordList
|
|
{
|
|
DWORD dwUserID;
|
|
std::vector<tagPrivateRandTotalRecord> kList;
|
|
|
|
tagPrivateRandTotalRecordList()
|
|
{
|
|
dwUserID = 0;
|
|
kList.clear();
|
|
}
|
|
|
|
tagPrivateRandTotalRecordList(const tagPrivateRandTotalRecordList& refInfo)
|
|
{
|
|
dwUserID = refInfo.dwUserID;
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
}
|
|
|
|
tagPrivateRandTotalRecordList& operator=(const tagPrivateRandTotalRecordList& refInfo)
|
|
{
|
|
if ( this == &refInfo)
|
|
{
|
|
return *this;
|
|
}
|
|
dwUserID = refInfo.dwUserID;
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
Stream_VALUE(dwUserID);
|
|
StructVecotrMember(tagPrivateRandTotalRecord,kList);
|
|
}
|
|
};
|
|
|
|
// 游戏录像;
|
|
struct tagGameRecordPlayer
|
|
{
|
|
DWORD dwUserID; //用户ID;
|
|
DWORD dwGameID; //游戏标识;
|
|
WORD wChairID; //游戏标识;
|
|
BYTE cbSex; //性别;
|
|
SCORE lScore; //当前分数;
|
|
std::string strHead; //头像url;
|
|
std::string strNickName; //昵称;
|
|
std::vector<BYTE> cbCardData; //牌值数据;
|
|
|
|
tagGameRecordPlayer()
|
|
{
|
|
dwUserID = 0;
|
|
dwGameID = 0;
|
|
wChairID = 0;
|
|
cbSex = 0;
|
|
lScore = 0;
|
|
strHead.clear();
|
|
strNickName.clear();
|
|
cbCardData.clear();
|
|
}
|
|
|
|
tagGameRecordPlayer(const tagGameRecordPlayer& refInfo)
|
|
{
|
|
dwUserID = refInfo.dwUserID;
|
|
dwGameID = refInfo.dwGameID;
|
|
wChairID = refInfo.wChairID;
|
|
cbSex = refInfo.cbSex;
|
|
lScore = refInfo.lScore;
|
|
strHead = refInfo.strHead;
|
|
strNickName = refInfo.strNickName;
|
|
cbCardData.assign( refInfo.cbCardData.begin(), refInfo.cbCardData.end() );
|
|
}
|
|
|
|
tagGameRecordPlayer& operator=(const tagGameRecordPlayer& refInfo)
|
|
{
|
|
if ( this == &refInfo )
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
dwUserID = refInfo.dwUserID;
|
|
dwGameID = refInfo.dwGameID;
|
|
wChairID = refInfo.wChairID;
|
|
cbSex = refInfo.cbSex;
|
|
lScore = refInfo.lScore;
|
|
strHead = refInfo.strHead;
|
|
strNickName = refInfo.strNickName;
|
|
cbCardData.assign(refInfo.cbCardData.begin(), refInfo.cbCardData.end());
|
|
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
Stream_VALUE(dwUserID);
|
|
Stream_VALUE(dwGameID);
|
|
Stream_VALUE(wChairID);
|
|
Stream_VALUE(cbSex);
|
|
Stream_VALUE(lScore);
|
|
Stream_VALUE(strHead);
|
|
Stream_VALUE(strNickName);
|
|
Stream_VALUE(cbCardData);
|
|
}
|
|
};
|
|
|
|
struct tagGameRecordOperateResult
|
|
{
|
|
WORD wSubCmdID; //消息类型;
|
|
DataStream subMessageData; //消息内容;
|
|
|
|
tagGameRecordOperateResult()
|
|
{
|
|
wSubCmdID = 0;
|
|
subMessageData.clear();
|
|
}
|
|
tagGameRecordOperateResult(const tagGameRecordOperateResult& refInfo)
|
|
{
|
|
wSubCmdID = refInfo.wSubCmdID;
|
|
subMessageData.assign(refInfo.subMessageData.begin(), refInfo.subMessageData.end());
|
|
}
|
|
|
|
tagGameRecordOperateResult& operator=(const tagGameRecordOperateResult& refInfo)
|
|
{
|
|
if ( this == &refInfo )
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
wSubCmdID = refInfo.wSubCmdID;
|
|
subMessageData.assign(refInfo.subMessageData.begin(), refInfo.subMessageData.end());
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
Stream_VALUE(wSubCmdID);
|
|
Stream_VALUE(subMessageData);
|
|
}
|
|
};
|
|
|
|
//私人场房间信息
|
|
struct CMD_GF_Private_Room_Info
|
|
{
|
|
BYTE bPlayCoutIdex; //玩家局数
|
|
BYTE bGameTypeIdex; //游戏类型
|
|
DWORD bGameRuleIdex; //游戏规则
|
|
|
|
BYTE bStartGame;
|
|
DWORD dwPlayCout; //游戏局数
|
|
DWORD dwRoomNum;
|
|
DWORD dwCreateUserID;
|
|
DWORD dwUnionCode;
|
|
DWORD dwPlayTotal; //总局数
|
|
DWORD dwPlayCost; // 消耗点数
|
|
|
|
BYTE cbRoomType;
|
|
|
|
// 工会开房欢乐场;
|
|
BYTE cbUnionGoldOpen; //是否开启欢乐场
|
|
SCORE lScoreMultiple; //倍数
|
|
SCORE lGameGold; //佣金
|
|
|
|
BYTE cbBaseScore; //底分
|
|
|
|
std::vector<int> kWinLoseScore;
|
|
|
|
CMD_GF_Private_Room_Info()
|
|
{
|
|
bPlayCoutIdex = 0;
|
|
bGameTypeIdex = 0;
|
|
bGameRuleIdex = 0;
|
|
|
|
bStartGame = 0;
|
|
dwPlayCout = 0;
|
|
dwRoomNum = 0;
|
|
dwCreateUserID = 0;
|
|
dwPlayTotal = 0;
|
|
dwPlayCost = 0;
|
|
cbRoomType = 0;
|
|
|
|
cbUnionGoldOpen = 0;
|
|
lScoreMultiple = 0;
|
|
lGameGold = 0;
|
|
cbBaseScore = 0;
|
|
|
|
kWinLoseScore.clear();
|
|
}
|
|
|
|
CMD_GF_Private_Room_Info(const CMD_GF_Private_Room_Info& refInfo)
|
|
{
|
|
bPlayCoutIdex = refInfo.bPlayCoutIdex;
|
|
bGameTypeIdex = refInfo.bGameTypeIdex;
|
|
bGameRuleIdex = refInfo.bGameRuleIdex;
|
|
|
|
bStartGame = refInfo.bStartGame;
|
|
dwPlayCout = refInfo.dwPlayCout;
|
|
dwRoomNum = refInfo.dwRoomNum;
|
|
dwCreateUserID = refInfo.dwCreateUserID;
|
|
dwPlayTotal = refInfo.dwPlayTotal;
|
|
dwPlayCost = refInfo.dwPlayCost;
|
|
|
|
cbRoomType = refInfo.cbRoomType;
|
|
|
|
cbUnionGoldOpen = refInfo.cbUnionGoldOpen;
|
|
lScoreMultiple = refInfo.lScoreMultiple;
|
|
lGameGold = refInfo.lGameGold;
|
|
cbBaseScore = refInfo.cbBaseScore;
|
|
|
|
kWinLoseScore.assign(refInfo.kWinLoseScore.begin(), refInfo.kWinLoseScore.end());
|
|
}
|
|
|
|
CMD_GF_Private_Room_Info& operator=(const CMD_GF_Private_Room_Info& refInfo)
|
|
{
|
|
if ( this == &refInfo)
|
|
{
|
|
return *this;
|
|
}
|
|
bPlayCoutIdex = refInfo.bPlayCoutIdex;
|
|
bGameTypeIdex = refInfo.bGameTypeIdex;
|
|
bGameRuleIdex = refInfo.bGameRuleIdex;
|
|
|
|
bStartGame = refInfo.bStartGame;
|
|
dwPlayCout = refInfo.dwPlayCout;
|
|
dwRoomNum = refInfo.dwRoomNum;
|
|
dwCreateUserID = refInfo.dwCreateUserID;
|
|
dwPlayTotal = refInfo.dwPlayTotal;
|
|
dwPlayCost = refInfo.dwPlayCost;
|
|
|
|
cbRoomType = refInfo.cbRoomType;
|
|
|
|
cbUnionGoldOpen = refInfo.cbUnionGoldOpen;
|
|
lScoreMultiple = refInfo.lScoreMultiple;
|
|
lGameGold = refInfo.lGameGold;
|
|
cbBaseScore = refInfo.cbBaseScore;
|
|
|
|
kWinLoseScore.assign(refInfo.kWinLoseScore.begin(), refInfo.kWinLoseScore.end());
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
Stream_VALUE(bPlayCoutIdex);
|
|
Stream_VALUE(bGameTypeIdex);
|
|
Stream_VALUE(bGameRuleIdex);
|
|
Stream_VALUE(bStartGame);
|
|
Stream_VALUE(dwPlayCout);
|
|
Stream_VALUE(dwRoomNum);
|
|
Stream_VALUE(dwCreateUserID);
|
|
Stream_VALUE(dwPlayTotal);
|
|
Stream_VALUE(dwPlayCost);
|
|
Stream_VALUE(cbRoomType);
|
|
Stream_VALUE(cbUnionGoldOpen);
|
|
Stream_VALUE(lScoreMultiple);
|
|
Stream_VALUE(lGameGold);
|
|
Stream_VALUE(cbBaseScore);
|
|
StructVecotr(int, kWinLoseScore);
|
|
}
|
|
};
|
|
|
|
//欢乐场积分信息
|
|
struct CMD_GF_Private_Score_Info
|
|
{
|
|
BYTE cbPlayerCount; //玩家数
|
|
std::vector<SCORE> kScoreInfoArray; //欢乐积分
|
|
|
|
CMD_GF_Private_Score_Info()
|
|
{
|
|
cbPlayerCount = 0;
|
|
kScoreInfoArray.clear();
|
|
}
|
|
|
|
CMD_GF_Private_Score_Info(const CMD_GF_Private_Score_Info& refInfo)
|
|
{
|
|
cbPlayerCount = refInfo.cbPlayerCount;
|
|
kScoreInfoArray.assign(refInfo.kScoreInfoArray.begin(), refInfo.kScoreInfoArray.end());
|
|
}
|
|
|
|
CMD_GF_Private_Score_Info& operator=(const CMD_GF_Private_Score_Info& refInfo)
|
|
{
|
|
if (this == &refInfo)
|
|
{
|
|
return *this;
|
|
}
|
|
cbPlayerCount = refInfo.cbPlayerCount;
|
|
kScoreInfoArray.assign(refInfo.kScoreInfoArray.begin(), refInfo.kScoreInfoArray.end());
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
Stream_VALUE(cbPlayerCount);
|
|
StructVecotr(SCORE, kScoreInfoArray);
|
|
}
|
|
};
|
|
|
|
struct tagGameRecord
|
|
{
|
|
WORD wBankerUser; //庄家用户;
|
|
WORD wEastUser; //首次东家;
|
|
CMD_GF_Private_Room_Info roomInfo; //游戏基本信息;
|
|
std::vector<tagGameRecordPlayer> playersVec; //每个玩家的基本信息;
|
|
std::vector<tagGameRecordOperateResult> actionVec; //用户操作;
|
|
|
|
tagGameRecord()
|
|
{
|
|
wBankerUser = 0;
|
|
wEastUser = 0;
|
|
|
|
playersVec.clear();
|
|
actionVec.clear();
|
|
}
|
|
|
|
tagGameRecord(const tagGameRecord& refGameRecord)
|
|
{
|
|
wBankerUser = refGameRecord.wBankerUser;
|
|
wEastUser = refGameRecord.wEastUser;
|
|
|
|
roomInfo = refGameRecord.roomInfo;
|
|
|
|
playersVec.assign(refGameRecord.playersVec.begin(), refGameRecord.playersVec.end());
|
|
actionVec.assign(refGameRecord.actionVec.begin(), refGameRecord.actionVec.end());
|
|
}
|
|
|
|
bool StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
try
|
|
{
|
|
Stream_VALUE(wBankerUser);
|
|
Stream_VALUE(wEastUser);
|
|
roomInfo.StreamValue(kData, bSend);
|
|
StructVecotrMember(tagGameRecordPlayer, playersVec);
|
|
StructVecotrMember(tagGameRecordOperateResult, actionVec);
|
|
|
|
return true;
|
|
}
|
|
catch (...)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
};
|
|
|
|
//工会列表;
|
|
struct tagUnionItem
|
|
{
|
|
DWORD dwUserID; //会长ID;
|
|
DWORD dwUnionCode; //工会码;
|
|
BYTE cbUnionGoldOpen; //1开启欢乐豆模式,0不开启;
|
|
BYTE cbUnionOpen; //是否有开房权限 0 无 1 有;
|
|
SCORE lPeople; //工会人数;
|
|
SCORE lUnionCard; //工会房卡;
|
|
TCHAR szUnionName[32]; //工会名称;
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
if (bSend)
|
|
{
|
|
kData.pushValue(this, sizeof(tagUnionItem));
|
|
}
|
|
else
|
|
{
|
|
kData.popValue(this, sizeof(tagUnionItem));
|
|
}
|
|
}
|
|
};
|
|
|
|
struct tagUnionItemList
|
|
{
|
|
std::vector<tagUnionItem> kList;
|
|
|
|
tagUnionItemList()
|
|
{
|
|
kList.clear();
|
|
}
|
|
|
|
tagUnionItemList(const tagUnionItemList& refInfo)
|
|
{
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
}
|
|
|
|
tagUnionItemList& operator=(const tagUnionItemList& refInfo)
|
|
{
|
|
if (this == &refInfo)
|
|
{
|
|
return *this;
|
|
}
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
StructVecotrMember(tagUnionItem, kList);
|
|
}
|
|
};
|
|
|
|
struct tagUnionGameItem
|
|
{
|
|
DWORD dwUnionCode; //工会码;
|
|
WORD wKindID; //游戏ID;
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
if (bSend)
|
|
{
|
|
kData.pushValue(this, sizeof(tagUnionGameItem));
|
|
}
|
|
else
|
|
{
|
|
kData.popValue(this, sizeof(tagUnionGameItem));
|
|
}
|
|
}
|
|
};
|
|
|
|
struct tagUnionGameList
|
|
{
|
|
std::vector<tagUnionGameItem> kList;
|
|
|
|
tagUnionGameList()
|
|
{
|
|
kList.clear();
|
|
}
|
|
|
|
tagUnionGameList(const tagUnionGameList& refInfo)
|
|
{
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
}
|
|
|
|
tagUnionGameList& operator=(const tagUnionGameList& refInfo)
|
|
{
|
|
if (this == &refInfo)
|
|
{
|
|
return *this;
|
|
}
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
StructVecotrMember(tagUnionGameItem, kList);
|
|
}
|
|
};
|
|
|
|
struct tagUnionAndGameList
|
|
{
|
|
std::vector<tagUnionItem> kUnionList;
|
|
//std::vector<tagUnionGameItem> kGameList;
|
|
|
|
tagUnionAndGameList()
|
|
{
|
|
kUnionList.clear();
|
|
//kGameList.clear();
|
|
}
|
|
|
|
tagUnionAndGameList(const tagUnionAndGameList& refInfo)
|
|
{
|
|
kUnionList.assign(refInfo.kUnionList.begin(), refInfo.kUnionList.end());
|
|
//kGameList.assign(refInfo.kGameList.begin(), refInfo.kGameList.end());
|
|
}
|
|
|
|
tagUnionAndGameList& operator=(const tagUnionAndGameList& refInfo)
|
|
{
|
|
if (this == &refInfo)
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
kUnionList.assign(refInfo.kUnionList.begin(), refInfo.kUnionList.end());
|
|
//kGameList.assign(refInfo.kGameList.begin(), refInfo.kGameList.end());
|
|
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
StructVecotrMember(tagUnionItem, kUnionList);
|
|
//StructVecotrMember(tagUnionGameItem, kGameList);
|
|
}
|
|
};
|
|
|
|
//房间列表;
|
|
struct tagRoomItem
|
|
{
|
|
WORD wKindID; //游戏ID;
|
|
DWORD dwUnionCode; //工会码;
|
|
BYTE cbUnionGoldOpen; //1开启欢乐豆模式,0不开启;
|
|
BYTE cbGameOK; //房间状态 1 初始 2 游戏中 8结束
|
|
DWORD dwRoomID; //房间ID;
|
|
DWORD dwGameRule; //游戏规则;
|
|
BYTE cbPlayCout; //已游戏局数;
|
|
BYTE cbPlayCoutIdex; //游戏局数;
|
|
BYTE cbBaseScore; //底分;
|
|
DWORD dwUserIDs[5];
|
|
SYSTEMTIME InsertTime; //开始时间
|
|
char szUnionName[32]; //工会名称;
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
if (bSend)
|
|
{
|
|
kData.pushValue(this, sizeof(tagRoomItem));
|
|
}
|
|
else
|
|
{
|
|
kData.popValue(this, sizeof(tagRoomItem));
|
|
}
|
|
}
|
|
};
|
|
|
|
struct tagRoomItemList
|
|
{
|
|
BYTE cbPlayRoomCount;
|
|
std::vector<tagRoomItem> kList;
|
|
|
|
tagRoomItemList()
|
|
{
|
|
cbPlayRoomCount = 0;
|
|
kList.clear();
|
|
}
|
|
|
|
tagRoomItemList(const tagRoomItemList& refInfo)
|
|
{
|
|
cbPlayRoomCount = refInfo.cbPlayRoomCount;
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
}
|
|
|
|
tagRoomItemList& operator=(const tagRoomItemList& refInfo)
|
|
{
|
|
if (this == &refInfo)
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
cbPlayRoomCount = refInfo.cbPlayRoomCount;
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
Stream_VALUE(cbPlayRoomCount);
|
|
StructVecotrMember(tagRoomItem, kList);
|
|
}
|
|
};
|
|
|
|
//自动房间列表;
|
|
struct tagAutoRoomItem
|
|
{
|
|
DWORD dwIndex;
|
|
WORD wKindID; //游戏ID;
|
|
WORD wServerID;
|
|
DWORD dwUnionCode; //工会码;
|
|
BYTE cbUnionGoldOpen; //1开启欢乐豆模式,0不开启;
|
|
DWORD dwGameRule; //游戏规则;
|
|
BYTE cbPlayCoutIdex; //游戏局数;
|
|
BYTE cbPlayCout; //游戏局数;
|
|
BYTE cbBaseScore; //底分;
|
|
char szUnionName[32]; //工会名称;
|
|
char szCreateTime[32]; //创建时间;
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
if (bSend)
|
|
{
|
|
kData.pushValue(this, sizeof(tagAutoRoomItem));
|
|
}
|
|
else
|
|
{
|
|
kData.popValue(this, sizeof(tagAutoRoomItem));
|
|
}
|
|
}
|
|
};
|
|
|
|
struct tagAutoRoomItemList
|
|
{
|
|
std::vector<tagAutoRoomItem> kList;
|
|
|
|
tagAutoRoomItemList()
|
|
{
|
|
kList.clear();
|
|
}
|
|
|
|
tagAutoRoomItemList(const tagAutoRoomItemList& refInfo)
|
|
{
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
}
|
|
|
|
tagAutoRoomItemList& operator=(const tagAutoRoomItemList& refInfo)
|
|
{
|
|
if (this == &refInfo)
|
|
{
|
|
return *this;
|
|
}
|
|
kList.assign(refInfo.kList.begin(), refInfo.kList.end());
|
|
return *this;
|
|
}
|
|
|
|
void StreamValue(DataStream& kData, bool bSend)
|
|
{
|
|
StructVecotrMember(tagAutoRoomItem, kList);
|
|
}
|
|
};
|
|
|
|
// 自由模式玩家准备开始状态;
|
|
struct tagAutoUserStatus
|
|
{
|
|
bool bStartGame; // 桌子上人状态;
|
|
};
|
|
|
|
#pragma pack()
|
|
|
|
#endif |