-
Notifications
You must be signed in to change notification settings - Fork 294
/
DBCStructure.h
2222 lines (1992 loc) · 104 KB
/
DBCStructure.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
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* This file is part of the CMaNGOS Project. See AUTHORS file for Copyright information
*
* 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 MANGOS_DBCSTRUCTURE_H
#define MANGOS_DBCSTRUCTURE_H
#include "Common.h"
#include "DBCEnums.h"
#include "Path.h"
#include "Platform/Define.h"
#include "SharedDefines.h"
#include <map>
#include <set>
#include <vector>
// Structures using to access raw DBC data and required packing to portability
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform
#if defined( __GNUC__ )
#pragma pack(1)
#else
#pragma pack(push,1)
#endif
struct AchievementEntry
{
uint32 ID; // 0 m_ID
uint32 factionFlag; // 1 m_faction -1=all, 0=horde, 1=alliance
uint32 mapID; // 2 m_instance_id -1=none
// uint32 parentAchievement; // 3 m_supercedes its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin)
char* name[16]; // 4-19 m_title_lang
// uint32 name_flags; // 20 string flags
// char *description[16]; // 21-36 m_description_lang
// uint32 desc_flags; // 37 string flags
uint32 categoryId; // 38 m_category
uint32 points; // 39 m_points
// uint32 OrderInCategory; // 40 m_ui_order
uint32 flags; // 41 m_flags
// uint32 icon; // 42 m_iconID
// char *titleReward[16]; // 43-58 m_reward_lang
// uint32 titleReward_flags; // 59 string flags
uint32 count; // 60 m_minimum_criteria - need this count of completed criterias (own or referenced achievement criterias)
uint32 refAchievement; // 61 m_shares_criteria - referenced achievement (counting of all completed criterias)
};
struct AchievementCategoryEntry
{
uint32 ID; // 0 m_ID
uint32 parentCategory; // 1 m_parent -1 for main category
// char *name[16]; // 2-17 m_name_lang
// uint32 name_flags; // 18 string flags
// uint32 sortOrder; // 19 m_ui_order
};
struct AchievementCriteriaEntry
{
uint32 ID; // 0 m_ID
uint32 referredAchievement; // 1 m_achievement_id
uint32 requiredType; // 2 m_type
union
{
// ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0
// TODO: also used for player deaths..
struct
{
uint32 creatureID; // 3
uint32 creatureCount; // 4
} kill_creature;
// ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1
struct
{
uint32 bgMapID; // 3
uint32 winCount; // 4
uint32 additionalRequirement1_type; // 5
uint32 additionalRequirement1_value; // 6
uint32 additionalRequirement2_type; // 7
uint32 additionalRequirement2_value; // 8
} win_bg;
// ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5
struct
{
uint32 unused; // 3
uint32 level; // 4
} reach_level;
// ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7
struct
{
uint32 skillID; // 3
uint32 skillLevel; // 4
} reach_skill_level;
// ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8
struct
{
uint32 linkedAchievement; // 3
} complete_achievement;
// ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9
struct
{
uint32 unused; // 3
uint32 totalQuestCount; // 4
} complete_quest_count;
// ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10
struct
{
uint32 unused; // 3
uint32 numberOfDays; // 4
} complete_daily_quest_daily;
// ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11
struct
{
uint32 zoneID; // 3
uint32 questCount; // 4
} complete_quests_in_zone;
// ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST = 14
struct
{
uint32 unused; // 3
uint32 questCount; // 4
} complete_daily_quest;
// ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND = 15
struct
{
uint32 mapID; // 3
} complete_battleground;
// ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP = 16
struct
{
uint32 mapID; // 3
} death_at_map;
// ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18
struct
{
uint32 manLimit; // 3
} death_in_dungeon;
// ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19
struct
{
uint32 groupSize; // 3 can be 5, 10 or 25
} complete_raid;
// ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20
struct
{
uint32 creatureEntry; // 3
} killed_by_creature;
// ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING = 24
struct
{
uint32 unused; // 3
uint32 fallHeight; // 4
} fall_without_dying;
// ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26
struct
{
uint32 type; // 3, see enum EnviromentalDamage
} death_from;
// ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27
struct
{
uint32 questID; // 3
uint32 questCount; // 4
} complete_quest;
// ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28
// ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2 = 69
struct
{
uint32 spellID; // 3
uint32 spellCount; // 4
} be_spell_target;
// ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL = 29
// ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110
struct
{
uint32 spellID; // 3
uint32 castCount; // 4
} cast_spell;
// ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31
struct
{
uint32 areaID; // 3 Reference to AreaTable.dbc
uint32 killCount; // 4
} honorable_kill_at_area;
// ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32
struct
{
uint32 mapID; // 3 Reference to Map.dbc
} win_arena;
// ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33
struct
{
uint32 mapID; // 3 Reference to Map.dbc
} play_arena;
// ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34
struct
{
uint32 spellID; // 3 Reference to Map.dbc
} learn_spell;
// ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36
struct
{
uint32 itemID; // 3
uint32 itemCount; // 4
} own_item;
// ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37
struct
{
uint32 unused; // 3
uint32 count; // 4
uint32 flag; // 5 4=in a row
} win_rated_arena;
// ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38
struct
{
uint32 teamtype; // 3 {2,3,5}
} highest_team_rating;
// ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING= 39
struct
{
uint32 teamtype; // 3 {2,3,5}
uint32 teamrating; // 4
} highest_personal_rating;
// ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40
struct
{
uint32 skillID; // 3
uint32 skillLevel; // 4 apprentice=1, journeyman=2, expert=3, artisan=4, master=5, grand master=6
} learn_skill_level;
// ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41
struct
{
uint32 itemID; // 3
uint32 itemCount; // 4
} use_item;
// ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM = 42
struct
{
uint32 itemID; // 3
uint32 itemCount; // 4
} loot_item;
// ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43
struct
{
// TODO: This rank is _NOT_ the index from AreaTable.dbc
uint32 areaReference; // 3
} explore_area;
// ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK = 44
struct
{
// TODO: This rank is _NOT_ the index from CharTitles.dbc
uint32 rank; // 3
} own_rank;
// ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT = 45
struct
{
uint32 unused; // 3
uint32 numberOfSlots; // 4
} buy_bank_slot;
// ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION = 46
struct
{
uint32 factionID; // 3
uint32 reputationAmount; // 4 Total reputation amount, so 42000 = exalted
} gain_reputation;
// ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION= 47
struct
{
uint32 unused; // 3
uint32 numberOfExaltedFactions; // 4
} gain_exalted_reputation;
// ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP = 48
struct
{
uint32 unused; // 3
uint32 numberOfVisits; // 4
} visit_barber;
// ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49
// TODO: where is the required itemlevel stored?
struct
{
uint32 itemSlot; // 3
uint32 count; // 4
} equip_epic_item;
// ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50
struct
{
uint32 rollValue; // 3
uint32 count; // 4
} roll_need_on_loot;
// ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51
struct
{
uint32 rollValue; // 3
uint32 count; // 4
} roll_greed_on_loot;
// ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52
struct
{
uint32 classID; // 3
uint32 count; // 4
} hk_class;
// ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53
struct
{
uint32 raceID; // 3
uint32 count; // 4
} hk_race;
// ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54
// TODO: where is the information about the target stored?
struct
{
uint32 emoteID; // 3 enum TextEmotes
uint32 count; // 4 count of emotes, always required special target or requirements
} do_emote;
// ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13
// ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE = 55
// ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS = 56
struct
{
uint32 unused; // 3
uint32 count; // 4
uint32 flag; // 5 =3 for battleground healing
uint32 mapid; // 6
} healing_done;
// ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57
struct
{
uint32 itemID; // 3
uint32 count; // 4
} equip_item;
// ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD= 62
struct
{
uint32 unused; // 3
uint32 goldInCopper; // 4
} quest_reward_money;
// ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67
struct
{
uint32 unused; // 3
uint32 goldInCopper; // 4
} loot_money;
// ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68
struct
{
uint32 goEntry; // 3
uint32 useCount; // 4
} use_gameobject;
// ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL = 70
// TODO: are those special criteria stored in the dbc or do we have to add another sql table?
struct
{
uint32 unused; // 3
uint32 killCount; // 4
} special_pvp_kill;
// ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72
struct
{
uint32 goEntry; // 3
uint32 lootCount; // 4
} fish_in_gameobject;
// ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS = 75
struct
{
uint32 skillLine; // 3
uint32 spellCount; // 4
} learn_skillline_spell;
// ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL = 76
struct
{
uint32 unused; // 3
uint32 duelCount; // 4
} win_duel;
// ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96
struct
{
uint32 powerType; // 3 mana=0, 1=rage, 3=energy, 6=runic power
} highest_power;
// ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97
struct
{
uint32 statType; // 3 4=spirit, 3=int, 2=stamina, 1=agi, 0=strength
} highest_stat;
// ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98
struct
{
uint32 spellSchool; // 3
} highest_spellpower;
// ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING = 100
struct
{
uint32 ratingType; // 3
} highest_rating;
// ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109
struct
{
uint32 lootType; // 3 3=fishing, 2=pickpocket, 4=disentchant
uint32 lootTypeCount; // 4
} loot_type;
// ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE = 112
struct
{
uint32 skillLine; // 3
uint32 spellCount; // 4
} learn_skill_line;
// ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113
struct
{
uint32 unused; // 3
uint32 killCount; // 4
} honorable_kill;
struct
{
uint32 value; // 3 m_asset_id
uint32 count; // 4 m_quantity
uint32 additionalRequirement1_type; // 5 m_start_event
uint32 additionalRequirement1_value; // 6 m_start_asset
uint32 additionalRequirement2_type; // 7 m_fail_event
uint32 additionalRequirement2_value; // 8 m_fail_asset
} raw;
};
char* name[16]; // 9-24 m_description_lang
// uint32 name_flags; // 25
uint32 completionFlag; // 26 m_flags
// uint32 timedCriteriaStartType; // 27 m_timer_start_event Only appears with timed achievements, seems to be the type of starting a timed Achievement, only type 1 and some of type 6 need manual starting: 1: ByEventId(?) (serverside IDs), 2: ByQuestId, 5: ByCastSpellId(?), 6: BySpellIdTarget(some of these are unknown spells, some not, some maybe spells), 7: ByKillNpcId, 9: ByUseItemId
uint32 timedCriteriaMiscId; // 28 m_timer_asset_id Alway appears with timed events, used internally to start the achievement, store
uint32 timeLimit; // 29 m_timer_time
uint32 showOrder; // 30 m_ui_order also used in achievement shift-links as index in state bitmask
// helpers
bool IsExplicitlyStartedTimedCriteria() const
{
if (!timeLimit)
return false;
// in case raw.value == timedCriteriaMiscId in timedCriteriaMiscId stored spellid/itemids for cast/use, so repeating aura start at first cast/use until fails
return requiredType == ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST || raw.value != timedCriteriaMiscId;
}
};
struct AreaTableEntry
{
uint32 ID; // 0 m_ID
uint32 mapid; // 1 m_ContinentID
uint32 zone; // 2 m_ParentAreaID
uint32 exploreFlag; // 3 m_AreaBit
uint32 flags; // 4 m_flags
// 5 m_SoundProviderPref
// 6 m_SoundProviderPrefUnderwater
// 7 m_AmbienceID
// 8 m_ZoneMusic
// 9 m_IntroSound
int32 area_level; // 10 m_ExplorationLevel
char* area_name[16]; // 11-26 m_AreaName_lang
// 27 string flags
uint32 team; // 28 m_factionGroupMask
uint32 LiquidTypeOverride[4]; // 29-32 m_liquidTypeID[4]
// 33 m_minElevation
// 34 m_ambient_multiplier
// 35 m_lightid
};
struct AreaGroupEntry
{
uint32 AreaGroupId; // 0 m_ID
uint32 AreaId[6]; // 1-6 m_areaID
uint32 nextGroup; // 7 m_nextAreaID
};
struct AreaTriggerEntry
{
uint32 id; // 0 m_ID
uint32 mapid; // 1 m_ContinentID
float x; // 2 m_x
float y; // 3 m_y
float z; // 4 m_z
float radius; // 5 m_radius
float box_x; // 6 m_box_length
float box_y; // 7 m_box_width
float box_z; // 8 m_box_heigh
float box_orientation; // 9 m_box_yaw
};
struct AuctionHouseEntry
{
uint32 houseId; // 0 m_ID
uint32 faction; // 1 m_factionID
uint32 depositPercent; // 2 m_depositRate
uint32 cutPercent; // 3 m_consignmentRate
// char* name[16]; // 4-19 m_name_lang
// 20 string flags
};
struct BankBagSlotPricesEntry
{
uint32 ID; // 0 m_ID
uint32 price; // 1 m_Cost
};
struct BarberShopStyleEntry
{
uint32 Id; // 0 m_ID
uint32 type; // 1 m_type
// char* name[16]; // 2-17 m_DisplayName_lang
// uint32 name_flags; // 18 string flags
// uint32 unk_name[16]; // 19-34 m_Description_lang
// uint32 unk_flags; // 35 string flags
// float CostMultiplier; // 36 m_Cost_Modifier
uint32 race; // 37 m_race
uint32 gender; // 38 m_sex
uint32 hair_id; // 39 m_data (real ID to hair/facial hair)
};
struct BattlemasterListEntry
{
uint32 id; // 0 m_ID
int32 mapid[8]; // 1-8 m_mapID[8]
uint32 type; // 9 m_instanceType
// uint32 canJoinAsGroup; // 10 m_groupsAllowed
char* name[16]; // 11-26 m_name_lang
// uint32 nameFlags // 27 string flags
uint32 maxGroupSize; // 28 m_maxGroupSize
uint32 HolidayWorldStateId; // 29 m_holidayWorldState
uint32 minLevel; // 30 m_minlevel (sync with PvPDifficulty.dbc content)
uint32 maxLevel; // 31 m_maxlevel (sync with PvPDifficulty.dbc content)
};
/*struct Cfg_CategoriesEntry
{
uint32 Index; // m_ID categoryId (sent in RealmList packet)
uint32 Unk1; // m_localeMask
uint32 Unk2; // m_charsetMask
uint32 IsTournamentRealm; // m_flags
char *categoryName[16]; // m_name_lang
uint32 categoryNameFlags;
}*/
/*struct Cfg_ConfigsEntry
{
uint32 Id; // m_ID
uint32 Type; // m_realmType (sent in RealmList packet)
uint32 IsPvp; // m_playerKillingAllowed
uint32 IsRp; // m_roleplaying
};*/
#define MAX_OUTFIT_ITEMS 24
struct CharStartOutfitEntry
{
// uint32 Id; // 0 m_ID
uint32 RaceClassGender; // 1 m_raceID m_classID m_sexID m_outfitID (UNIT_FIELD_BYTES_0 & 0x00FFFFFF) comparable (0 byte = race, 1 byte = class, 2 byte = gender)
int32 ItemId[MAX_OUTFIT_ITEMS]; // 2-25 m_ItemID
// int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 26-29 m_DisplayItemID not required at server side
// int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 50-73 m_InventoryType not required at server side
// uint32 Unknown1; // 74 unique values (index-like with gaps ordered in other way as ids)
// uint32 Unknown2; // 75
// uint32 Unknown3; // 76
};
struct CharTitlesEntry
{
uint32 ID; // 0, m_ID
// uint32 unk1; // 1 m_Condition_ID
char* name[16]; // 2-17 m_name_lang
// 18 string flags
// char* name2[16]; // 19-34 m_name1_lang
// 35 string flags
uint32 bit_index; // 36 m_mask_ID used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
};
struct ChatChannelsEntry
{
uint32 ChannelID; // 0 m_ID
uint32 flags; // 1 m_flags
// 2 m_factionGroup
char* pattern[16]; // 3-18 m_name_lang
// 19 string flags
// char* name[16]; // 20-35 m_shortcut_lang
// 36 string flags
};
struct ChrClassesEntry
{
uint32 ClassID; // 0 m_ID
// uint32 flags; // 1 unknown
uint32 powerType; // 2 m_DisplayPower
// 3 m_petNameToken
char const* name[16]; // 4-19 m_name_lang
// 20 string flags
// char* nameFemale[16]; // 21-36 m_name_female_lang
// 37 string flags
// char* nameNeutralGender[16]; // 38-53 m_name_male_lang
// 54 string flags
// 55 m_filename
uint32 spellfamily; // 56 m_spellClassSet
// uint32 flags2; // 57 m_flags (0x08 HasRelicSlot)
uint32 CinematicSequence; // 58 m_cinematicSequenceID
uint32 expansion; // 59 m_required_expansion
};
struct ChrRacesEntry
{
uint32 RaceID; // 0 m_ID
// 1 m_flags
uint32 FactionID; // 2 m_factionID
// 3 m_ExplorationSoundID
uint32 model_m; // 4 m_MaleDisplayId
uint32 model_f; // 5 m_FemaleDisplayId
// 6 m_ClientPrefix
uint32 TeamID; // 7 m_BaseLanguage (7-Alliance 1-Horde)
// 8 m_creatureType
// 9 m_ResSicknessSpellID
// 10 m_SplashSoundID
// 11 m_clientFileString
uint32 CinematicSequence; // 12 m_cinematicSequenceID
// uint32 unk_322; // 13 m_alliance (0 alliance, 1 horde, 2 not available?)
char* name[16]; // 14-29 m_name_lang used for DBC language detection/selection
// 30 string flags
// char* nameFemale[16]; // 31-46 m_name_female_lang
// 47 string flags
// char* nameNeutralGender[16]; // 48-63 m_name_male_lang
// 64 string flags
// 65-66 m_facialHairCustomization[2]
// 67 m_hairCustomization
uint32 expansion; // 68 m_required_expansion
};
/*struct CinematicCameraEntry
{
uint32 id; // 0 m_ID
char* filename; // 1 m_model
uint32 soundid; // 2 m_soundID
float start_x; // 3 m_originX
float start_y; // 4 m_originY
float start_z; // 5 m_originZ
float unk6; // 6 m_originFacing
};*/
struct CinematicSequencesEntry
{
uint32 Id; // 0 m_ID
// uint32 unk1; // 1 m_soundID
// uint32 cinematicCamera; // 2 m_camera[8]
};
struct CreatureDisplayInfoEntry
{
uint32 Displayid; // 0 m_ID
uint32 ModelId;
// 2 m_soundID
uint32 ExtendedDisplayInfoID; // 3 m_extendedDisplayInfoID -> CreatureDisplayInfoExtraEntry::DisplayExtraId
float scale; // 4 m_creatureModelScale
// 5 m_creatureModelAlpha
// 6-8 m_textureVariation[3]
// 9 m_portraitTextureName
// 10 m_sizeClass
// 11 m_bloodID
// 12 m_NPCSoundID
// 13 m_particleColorID
// 14 m_creatureGeosetData
// 15 m_objectEffectPackageID
};
struct CreatureModelDataEntry
{
uint32 Id;
uint32 Flags;
// char* ModelPath[16]
// uint32 Unk1;
float Scale; // Used in calculation of unit collision data
// int32 Unk2
// int32 Unk3
// uint32 Unk4
// uint32 Unk5
// float Unk6
// uint32 Unk7
// float Unk8
// uint32 Unk9
// uint32 Unk10
// float CollisionWidth;
float CollisionHeight;
float MountHeight; // Used in calculation of unit collision data when mounted
// float Unks[11]
};
struct CreatureDisplayInfoExtraEntry
{
uint32 DisplayExtraId; // 0 m_ID CreatureDisplayInfoEntry::m_extendedDisplayInfoID
uint32 Race; // 1 m_DisplayRaceID
// uint32 Gender; // 2 m_DisplaySexID
// uint32 SkinColor; // 3 m_SkinID
// uint32 FaceType; // 4 m_FaceID
// uint32 HairType; // 5 m_HairStyleID
// uint32 HairStyle; // 6 m_HairColorID
// uint32 BeardStyle; // 7 m_FacialHairID
// uint32 Equipment[11]; // 8-18 m_NPCItemDisplay equipped static items EQUIPMENT_SLOT_HEAD..EQUIPMENT_SLOT_HANDS, client show its by self
// uint32 CanEquip; // 19 m_flags 0..1 Can equip additional things when used for players
// char* // 20 m_BakeName CreatureDisplayExtra-*.blp
};
struct CreatureFamilyEntry
{
uint32 ID; // 0 m_ID
float minScale; // 1 m_minScale
uint32 minScaleLevel; // 2 m_minScaleLevel
float maxScale; // 3 m_maxScale
uint32 maxScaleLevel; // 4 m_maxScaleLevel
uint32 skillLine[2]; // 5-6 m_skillLine
uint32 petFoodMask; // 7 m_petFoodMask
int32 petTalentType; // 8 m_petTalentType
// 9 m_categoryEnumID
char* Name[16]; // 10-25 m_name_lang
// 26 string flags
// 27 m_iconFile
};
#define MAX_CREATURE_SPELL_DATA_SLOT 4
struct CreatureSpellDataEntry
{
uint32 ID; // 0 m_ID
uint32 spellId[MAX_CREATURE_SPELL_DATA_SLOT]; // 1-4 m_spells[4]
// uint32 availability[MAX_CREATURE_SPELL_DATA_SLOT];// 4-7 m_availability[4]
};
struct CreatureTypeEntry
{
uint32 ID; // 0 m_ID
// char* Name[16]; // 1-16 m_name_lang
// 17 string flags
// uint32 no_expirience; // 18 m_flags
};
/* not used
struct CurrencyCategoryEntry
{
uint32 ID; // 0 m_ID
uint32 Unk1; // 1 m_flags 0 for known categories and 3 for unknown one (3.0.9)
char* Name[16]; // 2-17 m_name_lang
// // 18 string flags
};
*/
struct CurrencyTypesEntry
{
// uint32 ID; // 0 m_ID
uint32 ItemId; // 1 m_itemID used as real index
// uint32 Category; // 2 m_categoryID may be category
uint32 BitIndex; // 3 m_bitIndex bit index in PLAYER_FIELD_KNOWN_CURRENCIES (1 << (index-1))
};
struct DestructibleModelDataEntry
{
uint32 m_ID; // 0 m_ID
// uint32 unk1; // 1
// uint32 unk2; // 2
uint32 damagedDisplayId; // 3
// uint32 unk4; // 4
// uint32 unk5; // 5
// uint32 unk6; // 6
uint32 destroyedDisplayId; // 7
// uint32 unk8; // 8
// uint32 unk9; // 9
// uint32 unk10; // 10
uint32 rebuildingDisplayId; // 11 // Maybe rebuildingDisplayIdWhileDestroyed
// uint32 unk12; // 12
// uint32 unk13; // 13
// uint32 unk14; // 14
// uint32 unk15; // 15
// uint32 unk16; // 16
// uint32 unk17; // 17
// uint32 unk18; // 18
};
struct DungeonEncounterEntry
{
uint32 Id; // 0 m_ID
uint32 mapId; // 1 m_mapID
uint32 Difficulty; // 2 m_difficulty
uint32 encounterData; // 3 m_orderIndex
uint32 encounterIndex; // 4 m_Bit
char* encounterName[16]; // 5-20 m_name_lang
// uint32 nameLangFlags; // 21 m_name_lang_flags
// uint32 spellIconID; // 22 m_spellIconID
};
struct DurabilityCostsEntry
{
uint32 Itemlvl; // 0 m_ID
uint32 multiplier[29]; // 1-29 m_weaponSubClassCost m_armorSubClassCost
};
struct DurabilityQualityEntry
{
uint32 Id; // 0 m_ID
float quality_mod; // 1 m_data
};
struct EmotesEntry
{
uint32 Id; // 0 m_ID
// char* Name; // 1 m_EmoteSlashCommand
// uint32 AnimationId; // 2 m_AnimID
uint32 Flags; // 3 m_EmoteFlags
uint32 EmoteType; // 4 m_EmoteSpecProc (determine how emote are shown)
uint32 UnitStandState; // 5 m_EmoteSpecProcParam
// uint32 SoundId; // 6 m_EventSoundID
};
struct EmotesTextEntry
{
uint32 Id; // m_ID
// m_name
uint32 textid; // m_emoteID
// m_emoteText
};
struct FactionEntry
{
uint32 ID; // 0 m_ID
int32 reputationListID; // 1 m_reputationIndex
uint32 BaseRepRaceMask[4]; // 2-5 m_reputationRaceMask
uint32 BaseRepClassMask[4]; // 6-9 m_reputationClassMask
int32 BaseRepValue[4]; // 10-13 m_reputationBase
uint32 ReputationFlags[4]; // 14-17 m_reputationFlags
uint32 team; // 18 m_parentFactionID
float spilloverRateIn; // 19 m_parentFactionMod[2] Faction gains incoming rep * spilloverRateIn
float spilloverRateOut; // 20 Faction outputs rep * spilloverRateOut as spillover reputation
uint32 spilloverMaxRankIn; // 21 m_parentFactionCap[2] The highest rank the faction will profit from incoming spillover
// uint32 spilloverRank_unk; // 22 It does not seem to be the max standing at which a faction outputs spillover ...so no idea
char* name[16]; // 23-38 m_name_lang
// 39 string flags
// char* description[16]; // 40-55 m_description_lang
// 56 string flags
// helpers
int GetIndexFitTo(uint32 raceMask, uint32 classMask) const
{
for (int i = 0; i < 4; ++i)
{
if ((BaseRepRaceMask[i] == 0 || (BaseRepRaceMask[i] & raceMask)) &&
(BaseRepClassMask[i] == 0 || (BaseRepClassMask[i] & classMask)))
return i;
}
return -1;
}
};
struct FactionTemplateEntry
{
uint32 ID; // 0 m_ID
uint32 faction; // 1 m_faction
uint32 factionFlags; // 2 m_flags
uint32 ourMask; // 3 m_factionGroup
uint32 friendlyMask; // 4 m_friendGroup
uint32 hostileMask; // 5 m_enemyGroup
uint32 enemyFaction[4]; // 6 m_enemies[4]
uint32 friendFaction[4]; // 10 m_friend[4]
//------------------------------------------------------- end structure
// helpers
bool IsFriendlyTo(FactionTemplateEntry const& entry) const
{
if (entry.faction)
{
for (int i = 0; i < 4; ++i)
if (enemyFaction[i] == entry.faction)
return false;
for (int i = 0; i < 4; ++i)
if (friendFaction[i] == entry.faction)
return true;
}
return (friendlyMask & entry.ourMask) || (ourMask & entry.friendlyMask);
}
bool IsHostileTo(FactionTemplateEntry const& entry) const
{
if (entry.faction)
{
for (int i = 0; i < 4; ++i)
if (enemyFaction[i] == entry.faction)
return true;
for (int i = 0; i < 4; ++i)
if (friendFaction[i] == entry.faction)
return false;
}
return (hostileMask & entry.ourMask) != 0;
}
bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) != 0; }
bool IsNeutralToAll() const
{
for (int i = 0; i < 4; ++i)
if (enemyFaction[i] != 0)
return false;
return hostileMask == 0 && friendlyMask == 0;
}
bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; }
};
struct GameObjectDisplayInfoEntry
{
uint32 Displayid; // 0 m_ID
char* filename; // 1 m_modelName
// uint32 unknown2[10]; // 2-11 m_Sound
float geoBoxMinX; // 12 m_geoBoxMinX (use first value as interact dist, mostly in hacks way)
float geoBoxMinY; // 13 m_geoBoxMinY
float geoBoxMinZ; // 14 m_geoBoxMinZ
float geoBoxMaxX; // 15 m_geoBoxMaxX
float geoBoxMaxY; // 16 m_geoBoxMaxY
float geoBoxMaxZ; // 17 m_geoBoxMaxZ
// uint32 unknown18; // 18 m_objectEffectPackageID
};
struct GemPropertiesEntry
{
uint32 ID; // m_id
uint32 spellitemenchantement; // m_enchant_id
// m_maxcount_inv
// m_maxcount_item
uint32 color; // m_type
};
struct GlyphPropertiesEntry
{
uint32 Id; // m_id
uint32 SpellId; // m_spellID
uint32 TypeFlags; // m_glyphSlotFlags
uint32 Unk1; // m_spellIconID
};