-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.h
804 lines (725 loc) · 21.1 KB
/
const.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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
/**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
*
* 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef FS_CONST_H_0A49B5996F074465BF44B90F4F780E8B
#define FS_CONST_H_0A49B5996F074465BF44B90F4F780E8B
static constexpr int32_t NETWORKMESSAGE_MAXSIZE = 65500;
enum MagicEffectClasses : uint8_t {
CONST_ME_NONE,
CONST_ME_DRAWBLOOD = 1,
CONST_ME_LOSEENERGY = 2,
CONST_ME_POFF = 3,
CONST_ME_BLOCKHIT = 4,
CONST_ME_EXPLOSIONAREA = 5,
CONST_ME_EXPLOSIONHIT = 6,
CONST_ME_FIREAREA = 7,
CONST_ME_YELLOW_RINGS = 8,
CONST_ME_GREEN_RINGS = 9,
CONST_ME_HITAREA = 10,
CONST_ME_TELEPORT = 11,
CONST_ME_ENERGYHIT = 12,
CONST_ME_MAGIC_BLUE = 13,
CONST_ME_MAGIC_RED = 14,
CONST_ME_MAGIC_GREEN = 15,
CONST_ME_HITBYFIRE = 16,
CONST_ME_HITBYPOISON = 17,
CONST_ME_MORTAREA = 18,
CONST_ME_SOUND_GREEN = 19,
CONST_ME_SOUND_RED = 20,
CONST_ME_POISONAREA = 21,
CONST_ME_SOUND_YELLOW = 22,
CONST_ME_SOUND_PURPLE = 23,
CONST_ME_SOUND_BLUE = 24,
CONST_ME_SOUND_WHITE = 25,
CONST_ME_BUBBLES = 26,
CONST_ME_CRAPS = 27,
CONST_ME_GIFT_WRAPS = 28,
CONST_ME_FIREWORK_YELLOW = 29,
CONST_ME_FIREWORK_RED = 30,
CONST_ME_FIREWORK_BLUE = 31,
CONST_ME_STUN = 32,
CONST_ME_SLEEP = 33,
CONST_ME_WATERCREATURE = 34,
CONST_ME_GROUNDSHAKER = 35,
CONST_ME_HEARTS = 36,
CONST_ME_FIREATTACK = 37,
CONST_ME_ENERGYAREA = 38,
CONST_ME_SMALLCLOUDS = 39,
CONST_ME_HOLYDAMAGE = 40,
CONST_ME_BIGCLOUDS = 41,
CONST_ME_ICEAREA = 42,
CONST_ME_ICETORNADO = 43,
CONST_ME_ICEATTACK = 44,
CONST_ME_STONES = 45,
CONST_ME_SMALLPLANTS = 46,
CONST_ME_CARNIPHILA = 47,
CONST_ME_PURPLEENERGY = 48,
CONST_ME_YELLOWENERGY = 49,
CONST_ME_HOLYAREA = 50,
CONST_ME_BIGPLANTS = 51,
CONST_ME_CAKE = 52,
CONST_ME_GIANTICE = 53,
CONST_ME_WATERSPLASH = 54,
CONST_ME_PLANTATTACK = 55,
CONST_ME_TUTORIALARROW = 56,
CONST_ME_TUTORIALSQUARE = 57,
CONST_ME_MIRRORHORIZONTAL = 58,
CONST_ME_MIRRORVERTICAL = 59,
CONST_ME_SKULLHORIZONTAL = 60,
CONST_ME_SKULLVERTICAL = 61,
CONST_ME_ASSASSIN = 62,
CONST_ME_STEPSHORIZONTAL = 63,
CONST_ME_BLOODYSTEPS = 64,
CONST_ME_STEPSVERTICAL = 65,
CONST_ME_YALAHARIGHOST = 66,
CONST_ME_BATS = 67,
CONST_ME_SMOKE = 68,
CONST_ME_INSECTS = 69,
CONST_ME_DRAGONHEAD = 70,
CONST_ME_ORCSHAMAN = 71,
CONST_ME_ORCSHAMAN_FIRE = 72,
CONST_ME_THUNDER = 73,
CONST_ME_FERUMBRAS = 74,
CONST_ME_CONFETTI_HORIZONTAL = 75,
CONST_ME_CONFETTI_VERTICAL = 76,
MAGIC_EFFECT_BLACKSMOKE = 76,
MAGIC_EFFECT_NEW_SUDDENDEATH = 77,
MAGIC_EFFECT_SKULLRX = 78,
MAGIC_EFFECT_POGCHAMP = 79,
MAGIC_EFFECT_KAPPA = 80,
MAGIC_EFFECT_SADCAT = 81,
MAGIC_EFFECT_PEPEGA = 82,
MAGIC_EFFECT_LUL = 83,
MAGIC_EFFECT_HUNTED = 84,
MAGIC_EFFECT_HARAMBE = 85,
MAGIC_EFFECT_ADDDD = 86,
MAGIC_EFFECT_ADDDD3 = 87,
MAGIC_EFFECT_ADDDD4 = 88,
MAGIC_EFFECT_ADDDD5 = 89,
// 77-157 are empty
CONST_ME_BLACKSMOKE = 158,
// 159-166 are empty
CONST_ME_REDSMOKE = 167,
CONST_ME_YELLOWSMOKE = 168,
CONST_ME_GREENSMOKE = 169,
CONST_ME_PURPLESMOKE = 170,
CONST_ME_EARLY_THUNDER = 171,
CONST_ME_RAGIAZ_BONECAPSULE = 172,
CONST_ME_CRITICAL_DAMAGE = 173,
// 174 is empty
CONST_ME_PLUNGING_FISH = 175,
};
enum ShootType_t : uint8_t {
CONST_ANI_NONE,
CONST_ANI_SPEAR = 1,
CONST_ANI_BOLT = 2,
CONST_ANI_ARROW = 3,
CONST_ANI_FIRE = 4,
CONST_ANI_ENERGY = 5,
CONST_ANI_POISONARROW = 6,
CONST_ANI_BURSTARROW = 7,
CONST_ANI_THROWINGSTAR = 8,
CONST_ANI_THROWINGKNIFE = 9,
CONST_ANI_SMALLSTONE = 10,
CONST_ANI_DEATH = 11,
CONST_ANI_LARGEROCK = 12,
CONST_ANI_SNOWBALL = 13,
CONST_ANI_POWERBOLT = 14,
CONST_ANI_POISON = 15,
CONST_ANI_INFERNALBOLT = 16,
CONST_ANI_HUNTINGSPEAR = 17,
CONST_ANI_ENCHANTEDSPEAR = 18,
CONST_ANI_REDSTAR = 19,
CONST_ANI_GREENSTAR = 20,
CONST_ANI_ROYALSPEAR = 21,
CONST_ANI_SNIPERARROW = 22,
CONST_ANI_ONYXARROW = 23,
CONST_ANI_PIERCINGBOLT = 24,
CONST_ANI_WHIRLWINDSWORD = 25,
CONST_ANI_WHIRLWINDAXE = 26,
CONST_ANI_WHIRLWINDCLUB = 27,
CONST_ANI_ETHEREALSPEAR = 28,
CONST_ANI_ICE = 29,
CONST_ANI_EARTH = 30,
CONST_ANI_HOLY = 31,
CONST_ANI_SUDDENDEATH = 32,
CONST_ANI_FLASHARROW = 33,
CONST_ANI_FLAMMINGARROW = 34,
CONST_ANI_SHIVERARROW = 35,
CONST_ANI_ENERGYBALL = 36,
CONST_ANI_SMALLICE = 37,
CONST_ANI_SMALLHOLY = 38,
CONST_ANI_SMALLEARTH = 39,
CONST_ANI_EARTHARROW = 40,
CONST_ANI_EXPLOSION = 41,
CONST_ANI_CAKE = 42,
CONST_ANI_TARSALARROW = 44,
CONST_ANI_VORTEXBOLT = 45,
CONST_ANI_PRISMATICBOLT = 48,
CONST_ANI_CRYSTALLINEARROW = 49,
CONST_ANI_DRILLBOLT = 50,
CONST_ANI_ENVENOMEDARROW = 51,
CONST_ANI_GLOOTHSPEAR = 53,
CONST_ANI_SIMPLEARROW = 54,
// for internal use, don't send to client
CONST_ANI_WEAPONTYPE = 0xFE, // 254
};
/*
enum SpeakClasses : uint8_t {
TALKTYPE_SAY = 1,
TALKTYPE_WHISPER = 2,
TALKTYPE_YELL = 3,
TALKTYPE_PRIVATE_FROM = 4,
TALKTYPE_PRIVATE_TO = 5,
TALKTYPE_CHANNEL_Y = 7,
TALKTYPE_CHANNEL_O = 8,
TALKTYPE_PRIVATE_NP = 10,
TALKTYPE_PRIVATE_PN = 12,
TALKTYPE_BROADCAST = 13,
TALKTYPE_CHANNEL_R1 = 14, //red - #c text
TALKTYPE_PRIVATE_RED_FROM = 15, //@name@text
TALKTYPE_PRIVATE_RED_TO = 16, //@name@text
TALKTYPE_MONSTER_SAY = 36,
TALKTYPE_MONSTER_YELL = 37,
};
enum MessageClasses : uint8_t {
MESSAGE_STATUS_CONSOLE_BLUE = 4, //FIXME Blue message in the console
MESSAGE_STATUS_CONSOLE_RED = 13, //Red message in the console
MESSAGE_STATUS_DEFAULT = 17, //White message at the bottom of the game window and in the console
MESSAGE_STATUS_WARNING = 18, //Red message in game window and in the console
MESSAGE_EVENT_ADVANCE = 19, //White message in game window and in the console
MESSAGE_STATUS_SMALL = 21, /*White message at the bottom of the game window"
MESSAGE_INFO_DESCR = 22, /*Green message in game window and in the console
MESSAGE_DAMAGE_DEALT = 23,
MESSAGE_DAMAGE_RECEIVED = 24,
MESSAGE_HEALED = 25,
MESSAGE_EXPERIENCE = 26,
MESSAGE_DAMAGE_OTHERS = 27,
MESSAGE_HEALED_OTHERS = 28,
MESSAGE_EXPERIENCE_OTHERS = 29,
MESSAGE_EVENT_DEFAULT = 30, //White message at the bottom of the game window and in the console
MESSAGE_LOOT = 31,
MESSAGE_GUILD = 33, //White message in channel (+ channelId)
MESSAGE_PARTY_MANAGEMENT = 34, //White message in channel (+ channelId)
MESSAGE_PARTY = 35, //White message in channel (+ channelId)
MESSAGE_EVENT_ORANGE = 36, //Orange message in the console
MESSAGE_STATUS_CONSOLE_ORANGE = 37, //Orange message in the console
};
*/
enum SpeakClasses : uint8_t {
TALKTYPE_SAY = 1,
TALKTYPE_WHISPER = 2,
TALKTYPE_YELL = 3,
TALKTYPE_PRIVATE = 4,
TALKTYPE_CHANNEL_Y = 5,
TALKTYPE_RVR_CHANNEL = 6,
TALKTYPE_RVR_ANSWER = 7,
TALKTYPE_RVR_CONTINUE = 8,
TALKTYPE_BROADCAST = 9,
TALKTYPE_CHANNEL_R1 = 10, //red - #c text
TALKTYPE_PRIVATE_RED = 11, //@name@text
TALKTYPE_CHANNEL_O = 12, //@name@text
TALKTYPE_CHANNEL_R2 = 14, //#d
TALKTYPE_MONSTER_SAY = 17,
TALKTYPE_MONSTER_YELL = 17,
};
enum MessageClasses : uint8_t {
MESSAGE_STATUS_CONSOLE_YELLOW = 1, /*Yellow message in the console*/
MESSAGE_STATUS_CONSOLE_LIGHTBLUE = 4, /*Light blue message in the console*/
MESSAGE_STATUS_CONSOLE_ORANGE = 17, /*Orange message in the console*/
MESSAGE_STATUS_WARNING = 18, /*Red message in game window and in the console*/
MESSAGE_EVENT_ADVANCE = 19, /*White message in game window and in the console*/
MESSAGE_EVENT_DEFAULT = 20, /*White message at the bottom of the game window and in the console*/
MESSAGE_STATUS_DEFAULT = 21, /*White message at the bottom of the game window and in the console*/
MESSAGE_INFO_DESCR = 22, /*Green message in game window and in the console*/
MESSAGE_STATUS_SMALL = 23, /*White message at the bottom of the game window"*/
MESSAGE_STATUS_CONSOLE_BLUE = 24, /*Blue message in the console*/
MESSAGE_STATUS_CONSOLE_RED = 25, /*Red message in the console*/
};
enum FluidColors_t : uint8_t {
FLUID_EMPTY,
FLUID_BLUE,
FLUID_RED,
FLUID_BROWN,
FLUID_GREEN,
FLUID_YELLOW,
FLUID_WHITE,
FLUID_PURPLE,
};
enum FluidTypes_t : uint8_t {
FLUID_NONE = FLUID_EMPTY,
FLUID_WATER = FLUID_BLUE,
FLUID_BLOOD = FLUID_RED,
FLUID_BEER = FLUID_BROWN,
FLUID_SLIME = FLUID_GREEN,
FLUID_LEMONADE = FLUID_YELLOW,
FLUID_MILK = FLUID_WHITE,
FLUID_MANA = FLUID_PURPLE,
FLUID_LIFE = FLUID_RED + 8,
FLUID_OIL = FLUID_BROWN + 8,
FLUID_URINE = FLUID_YELLOW + 8,
FLUID_COCONUTMILK = FLUID_WHITE + 8,
FLUID_WINE = FLUID_PURPLE + 8,
FLUID_MUD = FLUID_BROWN + 16,
FLUID_FRUITJUICE = FLUID_YELLOW + 16,
FLUID_LAVA = FLUID_RED + 24,
FLUID_RUM = FLUID_BROWN + 24,
FLUID_SWAMP = FLUID_GREEN + 24,
FLUID_TEA = FLUID_BROWN + 32,
FLUID_MEAD = FLUID_BROWN + 40,
};
const uint8_t reverseFluidMap[] = {
FLUID_EMPTY,
FLUID_WATER,
FLUID_MANA,
FLUID_BEER,
FLUID_EMPTY,
FLUID_BLOOD,
FLUID_SLIME,
FLUID_EMPTY,
FLUID_LEMONADE,
FLUID_MILK,
};
const uint8_t clientToServerFluidMap[] = {
FLUID_EMPTY,
FLUID_WATER,
FLUID_MANA,
FLUID_BEER,
FLUID_MUD,
FLUID_BLOOD,
FLUID_SLIME,
FLUID_RUM,
FLUID_LEMONADE,
FLUID_MILK,
FLUID_WINE,
FLUID_LIFE,
FLUID_URINE,
FLUID_OIL,
FLUID_FRUITJUICE,
FLUID_COCONUTMILK,
FLUID_TEA,
FLUID_MEAD,
};
enum ClientFluidTypes_t : uint8_t {
CLIENTFLUID_EMPTY = 0,
CLIENTFLUID_BLUE = 1,
CLIENTFLUID_PURPLE = 2,
CLIENTFLUID_BROWN_1 = 3,
CLIENTFLUID_BROWN_2 = 4,
CLIENTFLUID_RED = 5,
CLIENTFLUID_GREEN = 6,
CLIENTFLUID_BROWN = 7,
CLIENTFLUID_YELLOW = 8,
CLIENTFLUID_WHITE = 9,
};
const uint8_t fluidMap[] = {
CLIENTFLUID_EMPTY,
CLIENTFLUID_BLUE,
CLIENTFLUID_RED,
CLIENTFLUID_BROWN_1,
CLIENTFLUID_GREEN,
CLIENTFLUID_YELLOW,
CLIENTFLUID_WHITE,
CLIENTFLUID_PURPLE,
};
enum SquareColor_t : uint8_t {
SQ_COLOR_BLACK = 0,
};
enum TextColor_t : uint8_t {
TEXTCOLOR_BLUE = 5,
TEXTCOLOR_LIGHTGREEN = 30,
TEXTCOLOR_LIGHTBLUE = 35,
TEXTCOLOR_MAYABLUE = 95,
TEXTCOLOR_DARKRED = 108,
TEXTCOLOR_LIGHTGREY = 129,
TEXTCOLOR_SKYBLUE = 143,
//TEXTCOLOR_PURPLE = 154,
TEXTCOLOR_PURPLE = 155,
TEXTCOLOR_ELECTRICPURPLE = 155,
TEXTCOLOR_RED = 180,
TEXTCOLOR_PASTELRED = 194,
TEXTCOLOR_ORANGE = 198,
TEXTCOLOR_YELLOW = 210,
TEXTCOLOR_WHITE_EXP = 215,
TEXTCOLOR_NONE = 255,
};
enum Icons_t {
ICON_POISON = 1 << 0,
ICON_BURN = 1 << 1,
ICON_ENERGY = 1 << 2,
ICON_DRUNK = 1 << 3,
ICON_MANASHIELD = 1 << 4,
ICON_PARALYZE = 1 << 5,
ICON_HASTE = 1 << 6,
ICON_SWORDS = 1 << 7,
ICON_DROWNING = 1 << 8,
ICON_FREEZING = 1 << 9,
ICON_DAZZLED = 1 << 10,
ICON_CURSED = 1 << 11,
ICON_PARTY_BUFF = 1 << 12,
ICON_REDSWORDS = 1 << 13,
ICON_PIGEON = 1 << 14,
ICON_BLEEDING = 1 << 15,
};
enum WeaponType_t : uint8_t {
WEAPON_NONE,
WEAPON_SWORD,
WEAPON_CLUB,
WEAPON_AXE,
WEAPON_SHIELD,
WEAPON_DISTANCE,
WEAPON_WAND,
WEAPON_AMMO,
};
enum Ammo_t : uint8_t {
AMMO_NONE,
AMMO_BOLT,
AMMO_ARROW,
AMMO_SPEAR,
AMMO_THROWINGSTAR,
AMMO_THROWINGKNIFE,
AMMO_STONE,
AMMO_SNOWBALL,
};
enum WeaponAction_t : uint8_t {
WEAPONACTION_NONE,
WEAPONACTION_REMOVECOUNT,
WEAPONACTION_REMOVECHARGE,
WEAPONACTION_MOVE,
};
enum WieldInfo_t {
WIELDINFO_NONE = 0 << 0,
WIELDINFO_LEVEL = 1 << 0,
WIELDINFO_MAGLV = 1 << 1,
WIELDINFO_VOCREQ = 1 << 2,
WIELDINFO_PREMIUM = 1 << 3,
};
enum Skulls_t : uint8_t {
SKULL_NONE = 0,
SKULL_YELLOW = 1,
SKULL_GREEN = 2,
SKULL_WHITE = 3,
SKULL_RED = 4,
SKULL_BLACK = 5,
SKULL_ORANGE = 6,
};
enum PartyShields_t : uint8_t {
SHIELD_NONE = 0,
SHIELD_WHITEYELLOW = 1,
SHIELD_WHITEBLUE = 2,
SHIELD_BLUE = 3,
SHIELD_YELLOW = 4,
SHIELD_BLUE_SHAREDEXP = 5,
SHIELD_YELLOW_SHAREDEXP = 6,
SHIELD_BLUE_NOSHAREDEXP_BLINK = 7,
SHIELD_YELLOW_NOSHAREDEXP_BLINK = 8,
SHIELD_BLUE_NOSHAREDEXP = 9,
SHIELD_YELLOW_NOSHAREDEXP = 10,
SHIELD_GRAY = 11,
};
enum GuildEmblems_t : uint8_t {
GUILDEMBLEM_NONE = 0,
GUILDEMBLEM_ALLY = 1,
GUILDEMBLEM_ENEMY = 2,
GUILDEMBLEM_NEUTRAL = 3,
GUILDEMBLEM_MEMBER = 4,
GUILDEMBLEM_OTHER = 5,
};
enum item_t : uint16_t {
ITEM_BROWSEFIELD = 460, // for internal use
ITEM_FIREFIELD_PVP_FULL = 1487,
ITEM_FIREFIELD_PVP_MEDIUM = 1488,
ITEM_FIREFIELD_PVP_SMALL = 1489,
ITEM_FIREFIELD_PERSISTENT_FULL = 1492,
ITEM_FIREFIELD_PERSISTENT_MEDIUM = 1493,
ITEM_FIREFIELD_PERSISTENT_SMALL = 1494,
ITEM_FIREFIELD_NOPVP = 1500,
ITEM_POISONFIELD_PVP = 1490,
ITEM_POISONFIELD_PERSISTENT = 1496,
ITEM_POISONFIELD_NOPVP = 1503,
ITEM_ENERGYFIELD_PVP = 1491,
ITEM_ENERGYFIELD_PERSISTENT = 1495,
ITEM_ENERGYFIELD_NOPVP = 1504,
ITEM_MAGICWALL = 1497,
ITEM_MAGICWALL_PERSISTENT = 1498,
ITEM_MAGICWALL_SAFE = 1497,
ITEM_MAGICWALL_NOPVP = 1497,
ITEM_WILDGROWTH = 1499,
ITEM_WILDGROWTH_PERSISTENT = 2721,
ITEM_WILDGROWTH_SAFE = 1499,
ITEM_WILDGROWTH_NOPVP = 1499,
ITEM_BAG = 1987,
//ITEM_SHOPPING_BAG = 23782,
ITEM_GOLD_COIN = 2148,
ITEM_PLATINUM_COIN = 2152,
ITEM_CRYSTAL_COIN = 2160,
ITEM_STORE_COIN = 24774, // in-game store currency
ITEM_DEPOT = 2594,
ITEM_LOCKER1 = 2589,
/*ITEM_INBOX = 14404,
ITEM_MARKET = 14405,
ITEM_STORE_INBOX = 26052,
ITEM_DEPOT_BOX_I = 25453,
ITEM_DEPOT_BOX_II = 25454,
ITEM_DEPOT_BOX_III = 25455,
ITEM_DEPOT_BOX_IV = 25456,
ITEM_DEPOT_BOX_V = 25457,
ITEM_DEPOT_BOX_VI = 25458,
ITEM_DEPOT_BOX_VII = 25459,
ITEM_DEPOT_BOX_VIII = 25460,
ITEM_DEPOT_BOX_IX = 25461,
ITEM_DEPOT_BOX_X = 25462,
ITEM_DEPOT_BOX_XI = 25463,
ITEM_DEPOT_BOX_XII = 25464,
ITEM_DEPOT_BOX_XIII = 25465,
ITEM_DEPOT_BOX_XIV = 25466,
ITEM_DEPOT_BOX_XV = 25467,
ITEM_DEPOT_BOX_XVI = 25468,
ITEM_DEPOT_BOX_XVII = 25469,*/
ITEM_MALE_CORPSE = 3058,
ITEM_FEMALE_CORPSE = 3065,
ITEM_FULLSPLASH = 2016,
ITEM_SMALLSPLASH = 2019,
ITEM_PARCEL = 2595,
ITEM_LETTER = 2597,
ITEM_LETTER_STAMPED = 2598,
ITEM_LABEL = 2599,
ITEM_AMULETOFLOSS = 2173,
ITEM_DOCUMENT_RO = 1968, //read-only
};
enum PlayerFlags : uint64_t {
PlayerFlag_CannotUseCombat = 1 << 0,
PlayerFlag_CannotAttackPlayer = 1 << 1,
PlayerFlag_CannotAttackMonster = 1 << 2,
PlayerFlag_CannotBeAttacked = 1 << 3,
PlayerFlag_CanConvinceAll = 1 << 4,
PlayerFlag_CanSummonAll = 1 << 5,
PlayerFlag_CanIllusionAll = 1 << 6,
PlayerFlag_CanSenseInvisibility = 1 << 7,
PlayerFlag_IgnoredByMonsters = 1 << 8,
PlayerFlag_NotGainInFight = 1 << 9,
PlayerFlag_HasInfiniteMana = 1 << 10,
PlayerFlag_HasInfiniteSoul = 1 << 11,
PlayerFlag_HasNoExhaustion = 1 << 12,
PlayerFlag_CannotUseSpells = 1 << 13,
PlayerFlag_CannotPickupItem = 1 << 14,
PlayerFlag_CanAlwaysLogin = 1 << 15,
PlayerFlag_CanBroadcast = 1 << 16,
PlayerFlag_CanEditHouses = 1 << 17,
PlayerFlag_CannotBeBanned = 1 << 18,
PlayerFlag_CannotBePushed = 1 << 19,
PlayerFlag_HasInfiniteCapacity = 1 << 20,
PlayerFlag_CanPushAllCreatures = 1 << 21,
PlayerFlag_CanTalkRedPrivate = 1 << 22,
PlayerFlag_CanTalkRedChannel = 1 << 23,
PlayerFlag_TalkOrangeHelpChannel = 1 << 24,
PlayerFlag_NotGainExperience = 1 << 25,
PlayerFlag_NotGainMana = 1 << 26,
PlayerFlag_NotGainHealth = 1 << 27,
PlayerFlag_NotGainSkill = 1 << 28,
PlayerFlag_SetMaxSpeed = 1 << 29,
PlayerFlag_SpecialVIP = 1 << 30,
PlayerFlag_NotGenerateLoot = static_cast<uint64_t>(1) << 31,
// PlayerFlag with exponent 32 existed but was deprecated (feature dropped from client).
PlayerFlag_IgnoreProtectionZone = static_cast<uint64_t>(1) << 33,
PlayerFlag_IgnoreSpellCheck = static_cast<uint64_t>(1) << 34,
PlayerFlag_IgnoreWeaponCheck = static_cast<uint64_t>(1) << 35,
PlayerFlag_CannotBeMuted = static_cast<uint64_t>(1) << 36,
PlayerFlag_IsAlwaysPremium = static_cast<uint64_t>(1) << 37,
PlayerFlag_IgnoreYellCheck = static_cast<uint64_t>(1) << 38,
PlayerFlag_IgnoreSendPrivateCheck = static_cast<uint64_t>(1) << 39,
};
enum ReloadTypes_t : uint8_t {
RELOAD_TYPE_ALL,
RELOAD_TYPE_ACTIONS,
RELOAD_TYPE_AURAS,
RELOAD_TYPE_SHADERS,
RELOAD_TYPE_WINGS,
RELOAD_TYPE_CHAT,
RELOAD_TYPE_CONFIG,
RELOAD_TYPE_CREATURESCRIPTS,
RELOAD_TYPE_EVENTS,
RELOAD_TYPE_GLOBAL,
RELOAD_TYPE_GLOBALEVENTS,
RELOAD_TYPE_ITEMS,
RELOAD_TYPE_MONSTERS,
RELOAD_TYPE_MOUNTS,
RELOAD_TYPE_MOVEMENTS,
RELOAD_TYPE_NPCS,
RELOAD_TYPE_QUESTS,
RELOAD_TYPE_RAIDS,
RELOAD_TYPE_SCRIPTS,
RELOAD_TYPE_SPELLS,
RELOAD_TYPE_TALKACTIONS,
RELOAD_TYPE_WEAPONS,
};
// OTCv8 features (from src/client/const.h)
enum GameFeature {
GameProtocolChecksum = 1,
GameAccountNames = 2,
GameChallengeOnLogin = 3,
GamePenalityOnDeath = 4,
GameNameOnNpcTrade = 5,
GameDoubleFreeCapacity = 6,
GameDoubleExperience = 7,
GameTotalCapacity = 8,
GameSkillsBase = 9,
GamePlayerRegenerationTime = 10,
GameChannelPlayerList = 11,
GamePlayerMounts = 12,
GameEnvironmentEffect = 13,
GameCreatureEmblems = 14,
GameItemAnimationPhase = 15,
GameMagicEffectU16 = 16,
GamePlayerMarket = 17,
GameSpritesU32 = 18,
GameTileAddThingWithStackpos = 19,
GameOfflineTrainingTime = 20,
GamePurseSlot = 21,
GameFormatCreatureName = 22,
GameSpellList = 23,
GameClientPing = 24,
GameExtendedClientPing = 25,
GameDoubleHealth = 28,
GameDoubleSkills = 29,
GameChangeMapAwareRange = 30,
GameMapMovePosition = 31,
GameAttackSeq = 32,
GameBlueNpcNameColor = 33,
GameDiagonalAnimatedText = 34,
GameLoginPending = 35,
GameNewSpeedLaw = 36,
GameForceFirstAutoWalkStep = 37,
GameMinimapRemove = 38,
GameDoubleShopSellAmount = 39,
GameContainerPagination = 40,
GameThingMarks = 41,
GameLooktypeU16 = 42,
GamePlayerStamina = 43,
GamePlayerAddons = 44,
GameMessageStatements = 45,
GameMessageLevel = 46,
GameNewFluids = 47,
GamePlayerStateU16 = 48,
GameNewOutfitProtocol = 49,
GamePVPMode = 50,
GameWritableDate = 51,
GameAdditionalVipInfo = 52,
GameBaseSkillU16 = 53,
GameCreatureIcons = 54,
GameHideNpcNames = 55,
GameSpritesAlphaChannel = 56,
GamePremiumExpiration = 57,
GameBrowseField = 58,
GameEnhancedAnimations = 59,
GameOGLInformation = 60,
GameMessageSizeCheck = 61,
GamePreviewState = 62,
GameLoginPacketEncryption = 63,
GameClientVersion = 64,
GameContentRevision = 65,
GameExperienceBonus = 66,
GameAuthenticator = 67,
GameUnjustifiedPoints = 68,
GameSessionKey = 69,
GameDeathType = 70,
GameIdleAnimations = 71,
GameKeepUnawareTiles = 72,
GameIngameStore = 73,
GameIngameStoreHighlights = 74,
GameIngameStoreServiceType = 75,
GameAdditionalSkills = 76,
GameDistanceEffectU16 = 77,
GamePrey = 78,
GameDoubleMagicLevel = 79,
GameExtendedOpcode = 80,
GameMinimapLimitedToSingleFloor = 81,
GameSendWorldName = 82,
GameDoubleLevel = 83,
GameDoubleSoul = 84,
GameDoublePlayerGoodsMoney = 85,
GameCreatureWalkthrough = 86,
GameDoubleTradeMoney = 87,
GameSequencedPackets = 88,
GameTibia12Protocol = 89,
// 90-99 otclientv8 features
GameNewWalking = 90,
GameSlowerManualWalking = 91,
GameItemTooltip = 93,
GameBot = 95,
GameBiggerMapCache = 96,
GameForceLight = 97,
GameNoDebug = 98,
GameBotProtection = 99,
// Custom features for customer
GameFasterAnimations = 101,
GameCenteredOutfits = 102,
GameSendIdentifiers = 103,
GameWingsAndAura = 104,
GamePlayerStateU32 = 105,
GameOutfitShaders = 106,
// advanced features
GamePacketSizeU32 = 110,
GamePacketCompression = 111,
// OTCv8-dev features
GameOldInformationBar = 112,
GameHealthInfoBackground = 113,
GameWingOffset = 114,
GameAuraFrontAndBack = 115,
GameMapDrawGroundFirst = 116,
GameMapIgnoreCorpseCorrection = 117,
GameDontCacheFiles = 118,
GameBigAurasCenter = 119,
GameNewUpdateWalk = 120,
GameNewCreatureStacking = 121,
GameCreaturesMana = 122,
GameQuickLootFlags = 123,
GameDontMergeAnimatedText = 124,
GameMissionId = 125,
GameItemCustomAttributes = 126,
GameAnimatedTextCustomFont = 127,
LastGameFeature = 130
};
static constexpr int32_t CHANNEL_GUILD = 0x00;
static constexpr int32_t CHANNEL_PARTY = 0x01;
static constexpr int32_t CHANNEL_PRIVATE = 0xFFFF;
//Reserved player storage key ranges;
//[10000000 - 20000000];
static constexpr int32_t PSTRG_RESERVED_RANGE_START = 10000000;
static constexpr int32_t PSTRG_RESERVED_RANGE_SIZE = 10000000;
//[1000 - 1500];
static constexpr int32_t PSTRG_OUTFITS_RANGE_START = (PSTRG_RESERVED_RANGE_START + 1000);
static constexpr int32_t PSTRG_OUTFITS_RANGE_SIZE = 500;
//[2001 - 2011];
static constexpr int32_t PSTRG_MOUNTS_RANGE_START = (PSTRG_RESERVED_RANGE_START + 2001);
static constexpr int32_t PSTRG_MOUNTS_RANGE_SIZE = 10;
static constexpr int32_t PSTRG_MOUNTS_CURRENTMOUNT = (PSTRG_MOUNTS_RANGE_START + 10);
//[2012 - 2022];
static constexpr int32_t PSTRG_WINGS_RANGE_START = (PSTRG_RESERVED_RANGE_START + 2012);
static constexpr int32_t PSTRG_WINGS_RANGE_SIZE = 10;
static constexpr int32_t PSTRG_WINGS_CURRENTWINGS = (PSTRG_WINGS_RANGE_START + 10);
//[2023 - 2033];
static constexpr int32_t PSTRG_AURAS_RANGE_START = (PSTRG_RESERVED_RANGE_START + 2023);
static constexpr int32_t PSTRG_AURAS_RANGE_SIZE = 10;
static constexpr int32_t PSTRG_AURAS_CURRENTAURA = (PSTRG_AURAS_RANGE_START + 10);
//[2034 - 2044];
static constexpr int32_t PSTRG_SHADERS_RANGE_START = (PSTRG_RESERVED_RANGE_START + 2034);
static constexpr int32_t PSTRG_SHADERS_RANGE_SIZE = 10;
static constexpr int32_t PSTRG_SHADERS_CURRENTSHADER = (PSTRG_SHADERS_RANGE_START + 10);
#define IS_IN_KEYRANGE(key, range) (key >= PSTRG_##range##_START && ((key - PSTRG_##range##_START) <= PSTRG_##range##_SIZE))
#endif