forked from pvpgn/d2gs109
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd2cs_d2gs_character.h
63 lines (54 loc) · 1.44 KB
/
d2cs_d2gs_character.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
#ifndef INCLUDED_D2CS_D2GS_CHARACTER_H
#define INCLUDED_D2CS_D2GS_CHARACTER_H
#ifdef D2CS
# include "common/bn_type.h"
#endif
#ifdef D2GS
# include "bn_types.h"
#pragma pack(push, pack01, 1)
#endif
#define D2CHARINFO_MAGICWORD 0x12345678
#define D2CHARINFO_VERSION 0x00010000
#define D2CHARINFO_PORTRAIT_PADSIZE 30
typedef struct
{
bn_int magicword; /* static for check */
bn_int version; /* charinfo file version */
bn_int create_time; /* character creation time */
bn_int last_time; /* character last access time */
bn_int checksum;
bn_int reserved[7];
unsigned char charname[MAX_CHARNAME_LEN];
unsigned char account[MAX_ACCTNAME_LEN];
unsigned char realmname[MAX_REALMNAME_LEN];
} t_d2charinfo_header;
typedef struct
{
bn_int experience;
bn_int charstatus;
bn_int charlevel;
bn_int charclass;
} t_d2charinfo_summary;
typedef struct
{
bn_short header; /* 0x84 0x80 */
bn_byte gfx[11];
bn_byte class;
bn_byte color[11];
bn_byte level;
bn_byte status;
bn_byte u1[3];
bn_byte u2[3];
bn_byte end; /* 0x00 */
} t_d2charinfo_portrait;
typedef struct
{
t_d2charinfo_header header;
t_d2charinfo_portrait portrait;
bn_byte pad[D2CHARINFO_PORTRAIT_PADSIZE];
t_d2charinfo_summary summary;
} t_d2charinfo_file;
#ifdef D2GS
#pragma pack(pop, pack01)
#endif
#endif