-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitemloader.h
150 lines (134 loc) · 3.37 KB
/
itemloader.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
//////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
//////////////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////////
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////////////////////////////////////////////
#ifndef __OTSERV_ITEMLOADER_H__
#define __OTSERV_ITEMLOADER_H__
#include "fileloader.h"
#include "definitions.h"
typedef uint8_t attribute_t;
typedef uint16_t datasize_t;
typedef uint32_t flags_t;
enum itemgroup_t{
ITEM_GROUP_NONE = 0,
ITEM_GROUP_GROUND,
ITEM_GROUP_CONTAINER,
ITEM_GROUP_WEAPON,
ITEM_GROUP_AMMUNITION,
ITEM_GROUP_ARMOR,
ITEM_GROUP_RUNE,
ITEM_GROUP_TELEPORT,
ITEM_GROUP_MAGICFIELD,
ITEM_GROUP_WRITEABLE,
ITEM_GROUP_KEY,
ITEM_GROUP_SPLASH,
ITEM_GROUP_FLUID,
ITEM_GROUP_DOOR,
ITEM_GROUP_DEPRECATED,
ITEM_GROUP_LAST
};
/////////OTB specific//////////////
enum clientVersion_t
{
CLIENT_VERSION_750 = 1,
CLIENT_VERSION_755 = 2,
CLIENT_VERSION_760 = 3,
CLIENT_VERSION_770 = 3,
CLIENT_VERSION_780 = 4,
CLIENT_VERSION_790 = 5,
CLIENT_VERSION_792 = 6
};
enum rootattrib_
{
ROOT_ATTR_VERSION = 0x01
};
enum itemattrib_t
{
ITEM_ATTR_FIRST = 0x10,
ITEM_ATTR_SERVERID = ITEM_ATTR_FIRST,
ITEM_ATTR_CLIENTID,
ITEM_ATTR_NAME,
ITEM_ATTR_DESCR,
ITEM_ATTR_SPEED,
ITEM_ATTR_SLOT,
ITEM_ATTR_MAXITEMS,
ITEM_ATTR_WEIGHT,
ITEM_ATTR_WEAPON,
ITEM_ATTR_AMU,
ITEM_ATTR_ARMOR,
ITEM_ATTR_MAGLEVEL,
ITEM_ATTR_MAGFIELDTYPE,
ITEM_ATTR_WRITEABLE,
ITEM_ATTR_ROTATETO,
ITEM_ATTR_DECAY,
ITEM_ATTR_SPRITEHASH,
ITEM_ATTR_MINIMAPCOLOR,
ITEM_ATTR_07,
ITEM_ATTR_08,
ITEM_ATTR_LIGHT,
//1-byte aligned
ITEM_ATTR_DECAY2,
ITEM_ATTR_WEAPON2,
ITEM_ATTR_AMU2,
ITEM_ATTR_ARMOR2,
ITEM_ATTR_WRITEABLE2,
ITEM_ATTR_LIGHT2,
ITEM_ATTR_TOPORDER,
ITEM_ATTR_WRITEABLE3,
ITEM_ATTR_LAST
};
enum itemflags_t
{
FLAG_BLOCK_SOLID = 1,
FLAG_BLOCK_PROJECTILE = 2,
FLAG_BLOCK_PATHFIND = 4,
FLAG_HAS_HEIGHT = 8,
FLAG_USEABLE = 16,
FLAG_PICKUPABLE = 32,
FLAG_MOVEABLE = 64,
FLAG_STACKABLE = 128,
FLAG_FLOORCHANGEDOWN = 256,
FLAG_FLOORCHANGENORTH = 512,
FLAG_FLOORCHANGEEAST = 1024,
FLAG_FLOORCHANGESOUTH = 2048,
FLAG_FLOORCHANGEWEST = 4096,
FLAG_ALWAYSONTOP = 8192,
FLAG_READABLE = 16384,
FLAG_ROTABLE = 32768,
FLAG_HANGABLE = 65536,
FLAG_VERTICAL = 131072,
FLAG_HORIZONTAL = 262144,
FLAG_CANNOTDECAY = 524288,
FLAG_ALLOWDISTREAD = 1048576,
FLAG_UNUSED = 2097152
};
//1-byte aligned structs
#pragma pack(1)
struct VERSIONINFO{
uint32_t dwMajorVersion;
uint32_t dwMinorVersion;
uint32_t dwBuildNumber;
uint8_t CSDVersion[128];
};
struct lightBlock2{
uint16_t lightLevel;
uint16_t lightColor;
};
#pragma pack()
/////////OTB specific//////////////
#endif