forked from pvpgn/d2gs109
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhandle_s2s.h
67 lines (58 loc) · 2.53 KB
/
handle_s2s.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef INCLUDED_HANDLE_S2S_H
#define INCLUDED_HANDLE_S2S_H
/* structure */
typedef struct {
UCHAR realmname[MAX_REALMNAME_LEN];
DWORD sessionnum;
DWORD gsactive;
} D2GSPARAM, *PD2GSPARAM, *LPD2GAPARAM;
/* for check sum calculation */
#ifndef ROTL
#define ROTL(x,n,w) ( ((n)%(w)) ? (((x)<<((n)%(w))) | ((x)>>((w)-((n)%(w))))) : (x) )
#endif
/* functions */
int D2GSInitializeS2S(void);
void D2GSActive(int flag);
void str2lower(unsigned char *str);
DWORD D2GSGetSequence(void);
DWORD D2GSGetCheckSum(void);
void D2GSSendClassToD2CS(void);
void D2GSSendClassToD2DBS(void);
void D2GSHandleS2SPacket(D2GSPACKET *lpPacket);
void D2GSAuthreq(LPVOID *lpdata);
void D2GSAuthReply(LPVOID *lpdata);
void D2GSSetD2CSMaxGameNumber(DWORD maxgamenum);
void D2XSEchoReply(int peer);
void D2CSCreateEmptyGame(LPVOID *lpdata);
void D2CSClientJoinGameRequest(LPVOID *lpdata);
/* by callback function */
BOOL D2GSCBFindPlayerToken(LPCSTR lpCharName, DWORD dwToken, WORD wGameId,
LPSTR lpAccountName, LPPLAYERDATA lpPlayerData);
void D2GSCBEnterGame(WORD wGameId, LPCSTR lpCharName, WORD wCharClass,
DWORD dwCharLevel, DWORD dwReserved);
void D2GSCBLeaveGame(LPGAMEDATA lpGameData, WORD wGameId, WORD wCharClass,
DWORD dwCharLevel, DWORD dwExpLow, DWORD dwExpHigh,
WORD wCharStatus, LPCSTR lpCharName, LPCSTR lpCharPortrait,
BOOL bUnlock, DWORD dwZero1, DWORD dwZero2,
LPCSTR lpAccountName, PLAYERDATA PlayerData,
PLAYERMARK PlayerMark);
void D2GSCBCloseGame(WORD wGameId);
void D2GSCBUpdateGameInformation(WORD wGameId, LPCSTR lpCharName,
WORD wCharClass, DWORD dwCharLevel);
void D2GSCBGetDatabaseCharacter(LPGAMEDATA lpGameData, LPCSTR lpCharName,
DWORD dwClientId, LPCSTR lpAccountName);
void D2GSCBSaveDatabaseCharacter(LPGAMEDATA lpGameData, LPCSTR lpCharName,
LPCSTR lpAccountName, LPVOID lpSaveData,
DWORD dwSize, PLAYERDATA PlayerData);
void D2GSWriteCharInfoFile(LPCSTR lpAccountName, LPCSTR lpCharName,
WORD wCharClass, DWORD dwCharLevel, DWORD dwExpLow,
WORD wCharStatus, LPCSTR lpCharPortrait);
void D2GSUpdateCharacterLadder(LPCSTR lpCharName, WORD wCharClass, DWORD dwCharLevel,
DWORD dwCharExpLow, DWORD dwCharExpHigh, WORD wCharStatus);
void D2GSLoadComplete(WORD wGameId, LPCSTR lpCharName, BOOL bExpansion);
/* by d2dbs */
void D2DBSSaveDataReply(LPVOID *lpdata);
void D2DBSGetDataReply(LPVOID *lpdata);
void D2GSSetCharLockStatus(LPCSTR lpAccountName, LPCSTR lpCharName, UCHAR *RealmName, DWORD CharLockStatus);
void D2GSUnlockChar(LPCSTR lpAccountName, LPCSTR lpCharName);
#endif /* INCLUDED_HANDLE_S2S_H */