176 lines
8.7 KiB
C
176 lines
8.7 KiB
C
|
|
#ifndef SERVER_RULE_HEAD_FILE
|
|||
|
|
#define SERVER_RULE_HEAD_FILE
|
|||
|
|
|
|||
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_FORFEND_GAME_CHAT 0x00000001 //<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_FORFEND_ROOM_CHAT 0x00000002 //<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_FORFEND_WISPER_CHAT 0x00000004 //<2F><>ֹ˽<D6B9><CBBD>
|
|||
|
|
#define SR_FORFEND_WISPER_ON_GAME 0x00000008 //<2F><>ֹ˽<D6B9><CBBD>
|
|||
|
|
|
|||
|
|
//<2F><EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_ALLOW_DYNAMIC_JOIN 0x00000010 //<2F><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_ALLOW_OFFLINE_TRUSTEE 0x00000020 //<2F><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>
|
|||
|
|
#define SR_ALLOW_AVERT_CHEAT_MODE 0x00000040 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
|
|
|||
|
|
//<2F><>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_RECORD_GAME_SCORE 0x00000100 //<2F><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_RECORD_GAME_TRACK 0x00000200 //<2F><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_DYNAMIC_CELL_SCORE 0x00000400 //<2F><>̬<EFBFBD><EFBFBD>
|
|||
|
|
#define SR_IMMEDIATE_WRITE_SCORE 0x00000800 //<2F><>ʱд<CAB1><D0B4>
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_FORFEND_ROOM_ENTER 0x00001000 //<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_FORFEND_GAME_ENTER 0x00002000 //<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_FORFEND_GAME_LOOKON 0x00004000 //<2F><>ֹ<EFBFBD>Թ<EFBFBD>
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>й<EFBFBD><D0B9><EFBFBD>
|
|||
|
|
#define SR_FORFEND_TAKE_IN_ROOM 0x00010000 //<2F><>ֹȡ<D6B9><C8A1>
|
|||
|
|
#define SR_FORFEND_TAKE_IN_GAME 0x00020000 //<2F><>ֹȡ<D6B9><C8A1>
|
|||
|
|
#define SR_FORFEND_SAVE_IN_ROOM 0x00040000 //<2F><>ֹ<EFBFBD><D6B9>Ǯ
|
|||
|
|
#define SR_FORFEND_SAVE_IN_GAME 0x00080000 //<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_FORFEND_GAME_RULE 0x00100000 //<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_FORFEND_LOCK_TABLE 0x00200000 //<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_ALLOW_ANDROID_ATTEND 0x00400000 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define SR_ALLOW_ANDROID_SIMULATE 0x00800000 //<2F><><EFBFBD><EFBFBD>ռλ
|
|||
|
|
#define SR_FORFEND_GAME_START 0x01000000 //<2F><>ֹ<EFBFBD><D6B9>ʼ
|
|||
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
class CServerRule
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsForfendGameChat(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_GAME_CHAT)!=0; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsForfendRoomChat(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_ROOM_CHAT)!=0; }
|
|||
|
|
//<2F><>ֹ˽<D6B9><CBBD>
|
|||
|
|
static bool IsForfendWisperChat(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_WISPER_CHAT)!=0; }
|
|||
|
|
//<2F><>ֹ˽<D6B9><CBBD>
|
|||
|
|
static bool IsForfendWisperOnGame(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_WISPER_ON_GAME)!=0; }
|
|||
|
|
|
|||
|
|
//ģʽ<C4A3><CABD><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsAllowDynamicJoin(DWORD dwServerRule) { return (dwServerRule&SR_ALLOW_DYNAMIC_JOIN)!=0; }
|
|||
|
|
//<2F><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>
|
|||
|
|
static bool IsAllowOffLineTrustee(DWORD dwServerRule) { return (dwServerRule&SR_ALLOW_OFFLINE_TRUSTEE)!=0; }
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
|
static bool IsAllowAvertCheatMode(DWORD dwServerRule) { return (dwServerRule&SR_ALLOW_AVERT_CHEAT_MODE)!=0; }
|
|||
|
|
|
|||
|
|
//<2F><>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsRecordGameScore(DWORD dwServerRule) { return (dwServerRule&SR_RECORD_GAME_SCORE)!=0; }
|
|||
|
|
//<2F><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsRecordGameTrack(DWORD dwServerRule) { return (dwServerRule&SR_RECORD_GAME_TRACK)!=0; }
|
|||
|
|
//<2F><>̬<EFBFBD><EFBFBD>
|
|||
|
|
static bool IsDynamicCellScore(DWORD dwServerRule) { return (dwServerRule&SR_DYNAMIC_CELL_SCORE)!=0; }
|
|||
|
|
//<2F><>ʱд<CAB1><D0B4>
|
|||
|
|
static bool IsImmediateWriteScore(DWORD dwServerRule) { return (dwServerRule&SR_IMMEDIATE_WRITE_SCORE)!=0; }
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsForfendRoomEnter(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_ROOM_ENTER)!=0; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsForfendGameEnter(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_GAME_ENTER)!=0; }
|
|||
|
|
//<2F><>ֹ<EFBFBD>Թ<EFBFBD>
|
|||
|
|
static bool IsForfendGameLookon(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_GAME_LOOKON)!=0; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ
|
|||
|
|
static bool IsForfendGameStart(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_GAME_START) != 0; }
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>й<EFBFBD><D0B9><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>ֹȡ<D6B9><C8A1>
|
|||
|
|
static bool IsForfendTakeInRoom(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_TAKE_IN_ROOM)!=0; }
|
|||
|
|
//<2F><>ֹȡ<D6B9><C8A1>
|
|||
|
|
static bool IsForfendTakeInGame(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_TAKE_IN_GAME)!=0; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9>Ǯ
|
|||
|
|
static bool IsForfendSaveInRoom(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_SAVE_IN_ROOM)!=0; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9>Ǯ
|
|||
|
|
static bool IsForfendSaveInGame(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_SAVE_IN_GAME)!=0; }
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsForfendGameRule(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_GAME_RULE)!=0; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsForfendLockTable(DWORD dwServerRule) { return (dwServerRule&SR_FORFEND_LOCK_TABLE)!=0; }
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
static bool IsAllowAndroidAttend(DWORD dwServerRule) { return (dwServerRule&SR_ALLOW_ANDROID_ATTEND)!=0; }
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>ռλ
|
|||
|
|
static bool IsAllowAndroidSimulate(DWORD dwServerRule) { return (dwServerRule&SR_ALLOW_ANDROID_SIMULATE)!=0; }
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetForfendGameChat(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_GAME_CHAT:dwServerRule&=~SR_FORFEND_GAME_CHAT; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetForfendRoomChat(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_ROOM_CHAT:dwServerRule&=~SR_FORFEND_ROOM_CHAT; }
|
|||
|
|
//<2F><>ֹ˽<D6B9><CBBD>
|
|||
|
|
static VOID SetForfendWisperChat(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_WISPER_CHAT:dwServerRule&=~SR_FORFEND_WISPER_CHAT; }
|
|||
|
|
//<2F><>ֹ˽<D6B9><CBBD>
|
|||
|
|
static VOID SetForfendWisperOnGame(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_WISPER_ON_GAME:dwServerRule&=~SR_FORFEND_WISPER_ON_GAME; }
|
|||
|
|
|
|||
|
|
//ģʽ<C4A3><CABD><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetAllowDynamicJoin(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_ALLOW_DYNAMIC_JOIN:dwServerRule&=~SR_ALLOW_DYNAMIC_JOIN; }
|
|||
|
|
//<2F><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>
|
|||
|
|
static VOID SetAllowOffLineTrustee(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_ALLOW_OFFLINE_TRUSTEE:dwServerRule&=~SR_ALLOW_OFFLINE_TRUSTEE; }
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
|
static VOID SetAllowAvertCheatMode(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_ALLOW_AVERT_CHEAT_MODE:dwServerRule&=~SR_ALLOW_AVERT_CHEAT_MODE; }
|
|||
|
|
|
|||
|
|
//<2F><>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetRecordGameScore(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_RECORD_GAME_SCORE:dwServerRule&=~SR_RECORD_GAME_SCORE; }
|
|||
|
|
//<2F><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetRecordGameTrack(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_RECORD_GAME_TRACK:dwServerRule&=~SR_RECORD_GAME_TRACK; }
|
|||
|
|
//<2F><>̬<EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetDynamicCellScore(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_DYNAMIC_CELL_SCORE:dwServerRule&=~SR_DYNAMIC_CELL_SCORE; }
|
|||
|
|
//<2F><>ʱд<CAB1><D0B4>
|
|||
|
|
static VOID SetImmediateWriteScore(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_IMMEDIATE_WRITE_SCORE:dwServerRule&=~SR_IMMEDIATE_WRITE_SCORE; }
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetForfendRoomEnter(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_ROOM_ENTER:dwServerRule&=~SR_FORFEND_ROOM_ENTER; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetForfendGameEnter(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_GAME_ENTER:dwServerRule&=~SR_FORFEND_GAME_ENTER; }
|
|||
|
|
//<2F><>ֹ<EFBFBD>Թ<EFBFBD>
|
|||
|
|
static VOID SetForfendGameLookon(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_GAME_LOOKON:dwServerRule&=~SR_FORFEND_GAME_LOOKON; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ
|
|||
|
|
static VOID SetForfendGameStart(DWORD & dwServerRule, bool bEnable) { (bEnable == true) ? dwServerRule |= SR_FORFEND_GAME_START : dwServerRule &= ~SR_FORFEND_GAME_START; }
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>й<EFBFBD><D0B9><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>ֹȡ<D6B9><C8A1>
|
|||
|
|
static VOID SetForfendTakeInRoom(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_TAKE_IN_ROOM:dwServerRule&=~SR_FORFEND_TAKE_IN_ROOM; }
|
|||
|
|
//<2F><>ֹȡ<D6B9><C8A1>
|
|||
|
|
static VOID SetForfendTakeInGame(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_TAKE_IN_GAME:dwServerRule&=~SR_FORFEND_TAKE_IN_GAME; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9>Ǯ
|
|||
|
|
static VOID SetForfendSaveInRoom(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_SAVE_IN_ROOM:dwServerRule&=~SR_FORFEND_SAVE_IN_ROOM; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9>Ǯ
|
|||
|
|
static VOID SetForfendSaveInGame(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_SAVE_IN_GAME:dwServerRule&=~SR_FORFEND_SAVE_IN_GAME; }
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
public:
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetForfendGameRule(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_GAME_RULE:dwServerRule&=~SR_FORFEND_GAME_RULE; }
|
|||
|
|
//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetForfendLockTable(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_FORFEND_LOCK_TABLE:dwServerRule&=~SR_FORFEND_LOCK_TABLE; }
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
static VOID SetAllowAndroidAttend(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_ALLOW_ANDROID_ATTEND:dwServerRule&=~SR_ALLOW_ANDROID_ATTEND; }
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>ռλ
|
|||
|
|
static VOID SetAllowAndroidSimulate(DWORD & dwServerRule, bool bEnable) { (bEnable==true)?dwServerRule|=SR_ALLOW_ANDROID_SIMULATE:dwServerRule&=~SR_ALLOW_ANDROID_SIMULATE; }
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
#endif
|