forked from pvpgn/d2gs109
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd2dbs_d2gs_protocol.h
109 lines (85 loc) · 2.15 KB
/
d2dbs_d2gs_protocol.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef INCLUDED_D2DBS_D2GS_PROTOCOL_H
#define INCLUDED_D2DBS_D2GS_PROTOCOL_H
#include "bn_types.h"
#pragma pack(push, pack02, 1)
/* packet */
typedef struct {
bn_short size;
bn_short type;
bn_int seqno; /* seqno, set by the sender */
} t_d2dbs_d2gs_header;
typedef struct {
t_d2dbs_d2gs_header h;
} t_d2dbs_d2gs_generic;
#define D2GS_D2DBS_SAVE_DATA_REQUEST 0x30
typedef struct {
t_d2dbs_d2gs_header h;
bn_short datatype;
bn_short datalen;
/* AccountName */
/* CharName */
/* RealmName */
/* data, length = datalen */
} t_d2gs_d2dbs_save_data_request;
#define D2GS_DATA_CHARSAVE 0x01 /* charsave */
#define D2GS_DATA_PORTRAIT 0x02 /* charinfo */
#define D2DBS_D2GS_SAVE_DATA_REPLY 0x30
typedef struct {
t_d2dbs_d2gs_header h;
bn_int result;
bn_short datatype;
/* CharName */
} t_d2dbs_d2gs_save_data_reply;
#define D2DBS_SAVE_DATA_SUCCESS 0
#define D2DBS_SAVE_DATA_FAILED 1
#define D2GS_D2DBS_GET_DATA_REQUEST 0x31
typedef struct {
t_d2dbs_d2gs_header h;
bn_short datatype;
/* AccountName */
/* CharName */
/* RealmName */
} t_d2gs_d2dbs_get_data_request;
#define D2DBS_D2GS_GET_DATA_REPLY 0x31
typedef struct {
t_d2dbs_d2gs_header h;
bn_int result;
bn_int charcreatetime;
bn_int allowladder;
bn_short datatype;
bn_short datalen;
/* CharName */
/* data, length = datalen */
} t_d2dbs_d2gs_get_data_reply;
#define D2DBS_GET_DATA_SUCCESS 0
#define D2DBS_GET_DATA_FAILED 1
#define D2DBS_GET_DATA_CHARLOCKED 2
#define D2GS_D2DBS_UPDATE_LADDER 0x32
typedef struct {
t_d2dbs_d2gs_header h;
bn_int charlevel;
bn_int charexplow;
bn_int charexphigh;
bn_short charclass;
bn_short charstatus;
/* CharName */
/* RealmName */
} t_d2gs_d2dbs_update_ladder;
#define D2GS_D2DBS_CHAR_LOCK 0x33
typedef struct {
t_d2dbs_d2gs_header h;
bn_int lockstatus;
/* AccountName */
/* CharName */
/* RealmName */
} t_d2gs_d2dbs_char_lock;
#define D2DBS_D2GS_ECHOREQUEST 0x34
typedef struct {
t_d2dbs_d2gs_header h;
} t_d2dbs_d2gs_echoreq;
#define D2GS_D2DBS_ECHOREPLY 0x34
typedef struct {
t_d2dbs_d2gs_header h;
} t_d2gs_d2dbs_echoreply;
#pragma pack(pop, pack02)
#endif /* INCLUDED_D2DBS_D2GS_PROTOCOL_H */