User.h
资源名称:1731.rar [点击查看]
上传用户:swkcbjrc
上传日期:2016-04-02
资源大小:45277k
文件大小:10k
源码类别:
游戏
开发平台:
Visual C++
- // User.h: interface for the CUser class.
- //功能描述:该类是用户信息类
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_USER_H__27D452BD_FDF9_46EC_A73C_0957F86341BF__INCLUDED_)
- #define AFX_USER_H__27D452BD_FDF9_46EC_A73C_0957F86341BF__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #define N_MAXLEVEL 5
- #define N_DEFAULTROOM 1
- #define N_MAXROOMCOUNT 255
- //用户状态分类
- enum
- {
- ENUM_NOTHING, //什么也没有做
- ENUM_WAITFRIEND, //等待同伴
- ENUM_PLAY, //打牌
- ENUM_WAITSTART, //等待开始
- ENUM_LOOK, //旁观
- ENUM_SUDDENBREAK,//突然断线
- ENUM_EXIT
- };
- //当前方向分类,东,南,西,北
- enum
- {
- ENUM_NODIRECT,
- ENUM_EAST,//1
- ENUM_SOUTH,//2
- ENUM_WEST,//3
- ENUM_NORTH//4
- };
- #include <winsock2.h>
- //##ModelId=3B394DFF0181
- class CUser : public CObject
- {
- public:
- //##ModelId=3B394DFF01B3
- CUser();
- //##ModelId=3B394DFF01C7
- CUser(CString strUserName,CString strPassWord,CString strSessionId,
- CString strSex,CString strUserId,CString strRoomIndex);
- //##ModelId=3B394DFF0203
- virtual ~CUser();
- //##ModelId=3B394DFF0221
- void InitUserInfo(void);
- private:
- //##ModelId=3B394DFF0235
- BOOL m_bInLine;
- //##ModelId=3B394DFF025D
- ULONG m_dwSitTime;//入桌时间
- //##ModelId=3B394DFF0271
- CString m_strUserName;//用户名称
- //##ModelId=3B394DFF0285
- CString m_strPassWord;//用户密码
- //##ModelId=3B394DFF0299
- BYTE m_nLevel;//级别
- //##ModelId=3B394DFF02B7
- CString m_strRoomIndex;//所在房屋索引
- //##ModelId=3B394DFF02CB
- CString m_strTableIndex;//所在桌子索引
- //##ModelId=3B394E000056
- CString m_strUserId;//用户ID
- //##ModelId=3B394E00009C
- CString m_strSessionId;//用户在线的临时ID
- //##ModelId=3B394E0000BA
- CString m_strSex;//性别
- //##ModelId=3B394E0000D8
- CString m_strIp;//当前IP
- //##ModelId=3B394E0000F6
- USHORT m_nPort;//端口
- //##ModelId=3B394E000182
- SOCKET m_hConnect;//连接该用户端口
- //##ModelId=3B394E0001F0
- int m_nUserScore;//用户积分
- //##ModelId=3B394E000204
- int m_nBreakNetCount;//用户断线次数
- //##ModelId=3B394E000222
- int m_nVictoryCount;//用户赢的次数
- //##ModelId=3B394E000236
- int m_nEqualCount;//用户平的次数
- //##ModelId=3B394E00024A
- int m_nLossCount;//用户输的次数
- //##ModelId=3B394E00025E
- int m_nTotalCardCount;
- //##ModelId=3B394E00027C
- int m_nNetSpeed;
- //##ModelId=3B394E000290
- BYTE m_byteNowState;//当前状态
- //##ModelId=3B394E0002A4
- BYTE m_byteDirection;//当前方向
- //##ModelId=3B394E0002B8
- CString m_strEnterText;//进入语
- //##ModelId=3B394E0002E0
- CString m_strExitText;//退出语
- //##ModelId=3B394E0002F5
- BOOL m_bShowRegardText;//是否显示其他玩家的问候语
- //##ModelId=3B394E000309
- BOOL m_bShowMoveText;//是否显示其他玩家转移的语言
- //##ModelId=3B394E00031D
- BOOL m_bShowEnemyText;//是否显示敌人的语言
- //##ModelId=3B394E00033B
- BOOL m_bShowSysInfo;//是否显示所有系统提示语言
- //##ModelId=3B394E00034F
- float m_fRoomBreakRate;//创建房间的断线率
- //##ModelId=3B394E00036D
- int m_nRoomNetSpeed;//创建房间的网速
- //##ModelId=3B394E000381
- int m_nRoomPlayNum;//创建房间的最多人数
- //##ModelId=3B394E0003A9
- int m_nRoomTableNum;//创建房间的桌子数量
- //##ModelId=3B394E0003D1
- CString m_strRoomName;//房间名称
- //##ModelId=3B394E0003E5
- CString m_strRoomPwd;//房间密码
- //##ModelId=3B394E010011
- BOOL m_bTableBreakRate;//牌桌设置断线率
- //##ModelId=3B394E010039
- BOOL m_bTableDislike;//牌桌设置不喜欢用户是否可以同桌
- //##ModelId=3B394E01004D
- BOOL m_bTableNetRate;//桌网速是否同桌
- //##ModelId=3B394E010061
- float m_fTableBreakRate;//断弦率
- //##ModelId=3B394E01007F
- int m_nTableNetRate;//桌网速
- //##ModelId=3B394E01009D
- CString m_strTablePassWord;//桌密码
- //##ModelId=3B394E0100B1
- CString m_strAllFriend;//朋友列表
- //##ModelId=3B394E0100C5
- CString m_strAllEnemy;//敌人列表
- //##ModelId=3B394E0100D9
- int m_nSuddenBreakCount;//突然吊线的次数
- //##ModelId=3B394E0100F7
- BOOL m_bLookInitOverFlag;//旁观用户初始游戏结束标志
- //##ModelId=3B394E010115
- BOOL m_bAgreeLook;//允许旁观标志
- public:
- //##ModelId=3B394E010129
- void SetLookInitOverFlag(BOOL bLookInitOverFlag)
- {m_bLookInitOverFlag=bLookInitOverFlag;};
- //##ModelId=3B394E010148
- BOOL GetLookInitOverFlag(void)
- {return m_bLookInitOverFlag;};
- //##ModelId=3B394E01015B
- void SetInLine(BOOL bInLine)
- {m_bInLine=bInLine;}
- //##ModelId=3B394E010170
- BOOL GetInLine(void)
- {return m_bInLine;}
- //##ModelId=3B394E01018E
- BOOL GetAgreeLook(void)
- {return m_bAgreeLook;}
- //##ModelId=3B394E0101A1
- void SetAgreeLook(BOOL bAgreeLook)
- {m_bAgreeLook=bAgreeLook;}
- //##ModelId=3B394E0101B5
- void SetSitTime(ULONG dwSitTime);
- //##ModelId=3B394E0101D4
- DWORD GetSitTime(void);
- //##ModelId=3B394E0101E8
- BOOL GetShowRegardText(void);
- //##ModelId=3B394E0101F3
- BOOL GetShowMoveText(void);
- //##ModelId=3B394E010206
- BOOL SearchFriend(CString strFriendId);
- //##ModelId=3B394E01021A
- BOOL SearchEnemy(CString strEnemyId);
- //##ModelId=3B394E01022E
- void AddFriend(CString strFriendId);
- //##ModelId=3B394E010242
- void AddEnemy(CString strEnemyId);
- //##ModelId=3B394E010260
- void SetAllEnemy(CString strAllEnemy);
- //##ModelId=3B394E010274
- void SetAllFriend(CString strAllFriend);
- //##ModelId=3B394E010288
- void DeleteFriend(CString strFriendId);
- //##ModelId=3B394E01029C
- void DeleteEnemy(CString strEnemyId);
- //##ModelId=3B394E0102B0
- CString GetAllFriend(void);
- //##ModelId=3B394E0102D8
- CString GetAllEnemy(void);
- //##ModelId=3B394E0102E2
- void SetSuddenBreakCount(int nSuddenBreakCount);
- //##ModelId=3B394E0102F6
- int GetSuddenBreakCount(void);
- //##ModelId=3B394E01030A
- void SetBreakNetCount(int nBreakNetCount);
- //##ModelId=3B394E010315
- int GetBreakNetCount(void);
- //##ModelId=3B394E010328
- void SetVictoryCount(int nVictoryCount);
- //##ModelId=3B394E01033C
- int GetVictoryCount(void);
- //##ModelId=3B394E01035A
- void SetBoolTableBreakRate(BOOL bTableBreakRate);
- //##ModelId=3B394E01036E
- void SetBoolTableDislike(BOOL bTableDislike);
- //##ModelId=3B394E01038C
- void SetBoolTableNetRate(BOOL bTableNetRate);
- //##ModelId=3B394E0103A0
- void SetTableBreakRate(float fTableBreakRate);
- //##ModelId=3B394E0103B4
- void SetTableNetRate(int nTableNetRate);
- //##ModelId=3B394E0103C8
- void SetTablePassWord(CString strTablePassWord);
- //##ModelId=3B394E020008
- BOOL GetBoolTableBreakRate(void);
- //##ModelId=3B394E020013
- BOOL GetBoolTableDislike(void);
- //##ModelId=3B394E02003A
- BOOL GetBoolTableNetRate(void);
- //##ModelId=3B394E02004E
- float GetTableBreakRate(void);
- //##ModelId=3B394E020062
- int GetTableNetRate(void);
- //##ModelId=3B394E020095
- CString GetTablePassWord(void);
- //##ModelId=3B394E0200A9
- void SetRoomBreakRate(float fRoomBreakRate);
- //##ModelId=3B394E0200BD
- void SetRoomNetSpeed(int nNetSpeed);
- //##ModelId=3B394E0200D1
- void SetRoomPlayNum(int nPlayNum);
- //##ModelId=3B394E0200EF
- void SetRoomTableNum(int nTableNum);
- //##ModelId=3B394E020103
- void SetRoomName(CString strRoomName);
- //##ModelId=3B394E020117
- void SetRoomPwd(CString strRoomPwd);
- //##ModelId=3B394E02012B
- float GetRoomBreakRate(void);
- //##ModelId=3B394E02013F
- int GetRoomNetSpeed(void);
- //##ModelId=3B394E020153
- int GetRoomPlayNum(void);
- //##ModelId=3B394E020167
- int GetRoomTableNum(void);
- //##ModelId=3B394E02017B
- CString GetRoomName(void);
- //##ModelId=3B394E02018F
- CString GetRoomPwd(void);
- //##ModelId=3B394E0201A3
- void SetEnterText(CString strEnterText);
- //##ModelId=3B394E0201B7
- void SetExitText(CString strExitText);
- //##ModelId=3B394E0201CB
- void SetShowRegardText(BOOL bShowRegardText);
- //##ModelId=3B394E0201DF
- void SetShowMoveText(BOOL bShowMoveText);
- //##ModelId=3B394E02021B
- void SetShowEnemyText(BOOL bShowEnemyText);
- //##ModelId=3B394E020239
- void SetShowSysInfo(BOOL bShowSysInfo);
- //##ModelId=3B394E020261
- BOOL GetShowSysInfo(void);
- //##ModelId=3B394E020275
- BOOL GetShowEnemyText(void);
- //##ModelId=3B394E020289
- CString GetEnterText(void);
- //##ModelId=3B394E02029D
- CString GetExitText(void);
- //##ModelId=3B394E0202B1
- void SetUserId(CString strUserId);
- //##ModelId=3B394E0202CF
- void SetUserName(CString strUserName);
- //##ModelId=3B394E0202E3
- void SetPassWord(CString strPassWord);
- //##ModelId=3B394E020301
- void SetLevel(BYTE nLevel);
- //##ModelId=3B394E02031F
- void SetRoomIndex(CString strRoomIndex);
- //##ModelId=3B394E020352
- void SetTableIndex(CString strTableIndex);
- //##ModelId=3B394E020370
- void SetIp(CString strIp);
- //##ModelId=3B394E02038E
- void SetPort(USHORT nPort);
- //##ModelId=3B394E0203A2
- void SetConnect(SOCKET hConnect);
- //##ModelId=3B394E0203C0
- void SetSex(CString strSex);
- //##ModelId=3B394E0203D4
- void SetSessionId(CString strSessionId);
- //##ModelId=3B394E03000A
- void SetUserScore(int nUserScore);
- //##ModelId=3B394E030032
- void SetTotalCardCount(int nTotalCardCount);
- //##ModelId=3B394E030046
- void SetNetSpeed(int nNetSpeed);
- //##ModelId=3B394E030064
- void SetNowState(BYTE byteNowState);
- //##ModelId=3B394E030078
- void SetDirection(BYTE byteDirection);
- //##ModelId=3B394E030096
- BYTE GetDirection(void);
- //##ModelId=3B394E0300AA
- BYTE GetNowState(void);
- //##ModelId=3B394E0300C8
- int GetNetSpeed(void);
- //##ModelId=3B394E0300DC
- int GetTotalCardCount(void);
- //##ModelId=3B394E0300F0
- int GetUserScore(void);
- //##ModelId=3B394E030104
- CString GetTableIndex(void);
- //##ModelId=3B394E03012C
- CString GetRoomIndex(void);
- //##ModelId=3B394E030140
- CString GetSessionId(void);
- //##ModelId=3B394E030154
- SOCKET GetConnect(void);
- //##ModelId=3B394E030172
- CString GetUserId(void);
- //##ModelId=3B394E030186
- CString GetUserName(void);
- //##ModelId=3B394E0301A4
- CString GetPassWord(void);
- //##ModelId=3B394E0301B8
- BYTE GetLevel(void);
- //##ModelId=3B394E0301D6
- CString GetIp(void);
- //##ModelId=3B394E0301F4
- USHORT GetPort(void);
- //##ModelId=3B394E030208
- CString GetSex(void);
- //##ModelId=3B394E03021D
- int GetEqualCount(void);
- //##ModelId=3B394E030231
- int GetLossCount(void);
- //##ModelId=3B394E03023C
- void SetEqualCount(int nEqualCount);
- //##ModelId=3B394E03024F
- void SetLossCount(int nLossCount);
- //##ModelId=3B394E030263
- float GetBreakNetRate(void);
- };
- #endif // !defined(AFX_USER_H__27D452BD_FDF9_46EC_A73C_0957F86341BF__INCLUDED_)