-
Notifications
You must be signed in to change notification settings - Fork 1
/
enums.h
265 lines (237 loc) · 4.99 KB
/
enums.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
#ifndef _ENUMS_H
#define _ENUMS_H
#include <string>
using namespace std;
#include <SFML/Network.hpp>
#include <SFML/System.hpp>
typedef signed long long int64_t;
typedef unsigned long uint32_t;
typedef signed long int32_t;
typedef unsigned short uint16_t;
typedef signed short int16_t;
typedef unsigned char uint8_t;
typedef signed char int8_t;
#define SLOTP_NONE 0 //special
#define SLOTP_LEARRING 1 //1
#define SLOTP_HEAD 2 //2
#define SLOTP_REARRING 4 //3
#define SLOTP_NECKLACE 8 //4
#define SLOTP_ARMOR 16 //5
#define SLOTP_BACKPACK 32 //6
#define SLOTP_WEAPON 64 //7
#define SLOTP_BELT 128 //8
#define SLOTP_SHIELD 256 //9
#define SLOTP_LRING 512 //10
#define SLOTP_LEGS 1024 //11
#define SLOTP_RRING 2048 //12
#define SLOTP_GLOVES 4096 //13
#define SLOTP_BOOTS 8192 //14
#define SLOTP_ARROWS 16384 //15
#define SLOTP_TWOHAND 32768 //special
#define TILETYPE_NONE 0
#define TILETYPE_PZ 1
#define TILETYPE_HOUSE 2
#define TILE_TELEPORT 2
#define TILE_FLOOR_CHANGE_DOWN 3
#define TILE_FLOOR_CHANGE_DOWN_NORTH 4
#define TILE_FLOOR_CHANGE_DOWN_SOUTH 5
#define TILE_FLOOR_CHANGE_DOWN_EAST 6
#define TILE_FLOOR_CHANGE_DOWN_WEST 7
#define TILE_FLOOR_CHANGE_NORTH 8
#define TILE_FLOOR_CHANGE_SOUTH 9
#define TILE_FLOOR_CHANGE_EAST 10
#define TILE_FLOOR_CHANGE_WEST 11
class Player;
class Game;
class Item;
enum MagicEffectClasses
{
NM_ME_DRAW_BLOOD = 1,
NM_ME_PUFF = 2,
NM_ME_BLOCKHIT = 3,
NM_ME_FIRE = 4,
NM_ME_ICE = 5,
NM_ME_ENERGY = 6,
NM_ME_EARTH = 7,
NM_ME_WATER = 8,
NM_ME_HOLY = 9,
NM_ME_DEATH = 10,
NM_ME_TELEPORT = 11,
NM_ME_STUN = 12,
NM_ME_NONE = 0
};
enum ShootType
{
NM_SHOOT_BOLT = 1,
NM_SHOOT_ARROW = 2,
NM_SHOOT_FIRE = 3,
NM_SHOOT_ICE = 4,
NM_SHOOT_ENERGY = 5,
NM_SHOOT_EARTH = 6,
NM_SHOOT_WATER = 7,
NM_SHOOT_HOLY = 8,
NM_SHOOT_DEATH = 9,
NM_SHOOT_POISONARROW = 10,
NM_SHOOT_BURSTARROW = 11,
NM_SHOOT_STONE = 12,
NM_SHOOT_POWERBOLT = 13,
NM_SHOOT_POWERARROW = 14,
NM_SHOOT_WHIRLWINDSWORD = 15,
NM_SHOOT_WHIRLWINDAXE = 16,
NM_SHOOT_WHIRLWINDCLUB = 17,
NM_SHOOT_NONE = 0
};
enum AmmoType
{
AMMO_NONE = 0,
AMMO_BOLT = 1,
AMMO_ARROW = 2,
AMMO_STONE = 3
};
enum AmmoAction
{
AMMOACTION_NONE = 0,
AMMOACTION_REMOVECOUNT = 1,
AMMOACTION_REMOVECHARGE = 2
};
enum CombatType
{
COMBAT_NONE = 0,
COMBAT_PHYSICALDAMAGE = 1,
COMBAT_FIREDAMAGE = 2,
COMBAT_ICEDAMAGE = 4,
COMBAT_ENERGYDAMAGE = 8,
COMBAT_EARTHDAMAGE = 16,
COMBAT_WATERDAMAGE = 32,
COMBAT_HOLYDAMAGE = 64,
COMBAT_DEATHDAMAGE = 128,
COMBAT_LIFEDRAIN = 256,
COMBAT_MANADRAIN = 512,
COMBAT_HEALING = 1024,
};
enum RaceType
{
RACE_NONE = 0,
RACE_BLOOD = 1,
RACE_UNDEAD = 2,
RACE_FIRE = 3,
RACE_ENERGY = 4,
RACE_WATER = 5,
};
enum BlockType
{
BLOCK_NONE = 0,
BLOCK_DEFENSE = 1,
BLOCK_ARMOR = 2,
BLOCK_IMMUNITY = 3
};
enum Vocation
{
VOCATION_NONE = 0,
VOCATION_WARRIOR = 1,
VOCATION_ROGUE = 2,
VOCATION_MAGE = 3,
VOCATION_PRIEST = 4
};
enum Playersex
{
PLAYERSEX_MALE = 0,
PLAYERSEX_FEMALE = 1
};
enum ItemGroup{
ITEM_GROUP_NONE = 0,
ITEM_GROUP_GROUND = 1,
ITEM_GROUP_CONTAINER = 2,
ITEM_GROUP_WEAPON = 3,
ITEM_GROUP_AMMUNITION = 4,
ITEM_GROUP_ARMOR = 5,
ITEM_GROUP_RUNE = 6,
ITEM_GROUP_TELEPORT = 7,
ITEM_GROUP_MAGICFIELD = 8,
ITEM_GROUP_WRITEABLE = 9,
ITEM_GROUP_KEY = 10,
ITEM_GROUP_SPLASH = 11,
ITEM_GROUP_FLUID = 12,
ITEM_GROUP_DOOR = 13,
ITEM_GROUP_LAST = 14
};
enum WeaponType
{
WEAPON_NONE = 0,
WEAPON_SWORD = 1,
WEAPON_CLUB = 2,
WEAPON_AXE = 3,
WEAPON_SHIELD = 4,
WEAPON_DIST = 5,
WEAPON_STAFF = 6,
WEAPON_DAGGER = 6,
WEAPON_AMMO = 7
};
enum WieldInfo
{
WIELDINFO_NONE = 0,
WIELDINFO_DEX = 1,
WIELDINFO_STR = 2,
WIELDINFO_INT = 4,
WIELDINFO_MPW = 8,
};
struct Position
{
unsigned int x;
unsigned int y;
unsigned char z;
};
enum BanType_t
{
BAN_IPADDRESS = 1,
BAN_PLAYER = 2,
BAN_ACCOUNT = 3
};
struct ClientContext
{
sf::TcpSocket *socket;
unsigned int id;
std::string accountName;
Player *player;
bool lostPlayer;
sf::Packet toSend, toReceive;
int sendId, recvId;
string sendMsg, recvMsg;
};
struct PlayerEquipment
{
Item *lRingEar;
Item *rRingEar;
Item *head;
Item *necklace;
Item *backpack;
Item *armor;
Item *shield;
Item *weapon;
Item *belt;
Item *legs;
Item *boots;
Item *lRing;
Item *rRing;
Item *gloves;
Item *arrows;
};
struct ReceivedDamageFrom
{
std::string dealer;
unsigned int damage;
};
struct UniqueValue
{
unsigned int key;
int value;
};
struct MonsterSpell
{
unsigned char spellID;
unsigned int damage;
unsigned int chance;
unsigned int cooldown;
time_t lastUsed;
};
#endif