Some fields comments for ChrClass and ChrRace. Also optimize code (set MAX_RACES...
[getmangos.git] / src / shared / Database / DBCStructure.h
blob1d32bfd3565d77b30ee48f9e25df4fd5af0e2efb
1 /*
2 * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef DBCSTRUCTURE_H
20 #define DBCSTRUCTURE_H
22 #include "DBCEnums.h"
23 #include "Platform/Define.h"
25 #include <map>
26 #include <set>
27 #include <vector>
29 // Structures using to access raw DBC data and required packing to portability
31 // 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
32 #if defined( __GNUC__ )
33 #pragma pack(1)
34 #else
35 #pragma pack(push,1)
36 #endif
38 struct AreaTableEntry
40 uint32 ID; // 0
41 uint32 mapid; // 1
42 uint32 zone; // 2 if 0 then it's zone, else it's zone id of this area
43 uint32 exploreFlag; // 3, main index
44 uint32 flags; // 4, unknown value but 312 for all cities
45 // 5-9 unused
46 int32 area_level; // 10
47 char* area_name[16]; // 11-26
48 // 27, string flags, unused
49 uint32 team; // 28
52 struct AreaTriggerEntry
54 uint32 id; // 0
55 uint32 mapid; // 1
56 float x; // 2
57 float y; // 3
58 float z; // 4
59 float radius; // 5
60 float box_x; // 6 extent x edge
61 float box_y; // 7 extent y edge
62 float box_z; // 8 extent z edge
63 float box_orientation; // 9 extent rotation by about z axis
66 struct BankBagSlotPricesEntry
68 uint32 ID;
69 uint32 price;
72 struct BattlemasterListEntry
74 uint32 id; // 0
75 uint32 mapid[3]; // 1-3 mapid
76 // 4-8 unused
77 uint32 type; // 9 (3 - BG, 4 - arena)
78 uint32 minlvl; // 10
79 uint32 maxlvl; // 11
80 uint32 maxplayersperteam; // 12
81 // 13-14 unused
82 char* name[16]; // 15-30
83 // 31 string flag, unused
84 // 32 unused
87 #define MAX_OUTFIT_ITEMS 12
88 // #define MAX_OUTFIT_ITEMS 24 // 12->24 in 3.0.x
90 struct CharStartOutfitEntry
92 //uint32 Id; // 0
93 uint32 RaceClassGender; // 1 (UNIT_FIELD_BYTES_0 & 0x00FFFFFF) comparable (0 byte = race, 1 byte = class, 2 byte = gender)
94 int32 ItemId[MAX_OUTFIT_ITEMS]; // 2-13
95 //int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 14-25 not required at server side
96 //int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 26-37 not required at server side
97 //uint32 Unknown1; // 38, unique values (index-like with gaps ordered in other way as ids)
98 //uint32 Unknown2; // 39
99 //uint32 Unknown3; // 40
102 struct CharTitlesEntry
104 uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()
105 //uint32 unk1; // 1 flags?
106 //char* name[16]; // 2-17, unused
107 // 18 string flag, unused
108 //char* name2[16]; // 19-34, unused
109 // 35 string flag, unused
110 uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
113 struct ChatChannelsEntry
115 uint32 ChannelID; // 0
116 uint32 flags; // 1
117 char* pattern[16]; // 3-18
118 // 19 string flags, unused
119 //char* name[16]; // 20-35 unused
120 // 36 string flag, unused
123 struct ChrClassesEntry
125 uint32 ClassID; // 0
126 // 1-2, unused
127 uint32 powerType; // 3
128 // 4, unused
129 //char* name[16]; // 5-20 unused
130 // 21 string flag, unused
131 //char* nameFemale[16]; // 21-36 unused, if different from base (male) case
132 // 37 string flag, unused
133 //char* nameNeutralGender[16]; // 38-53 unused, if different from base (male) case
134 // 54 string flag, unused
135 // 55, unused
136 uint32 spellfamily; // 56
137 // 57, unused
140 struct ChrRacesEntry
142 uint32 RaceID; // 0
143 // 1 unused
144 uint32 FactionID; // 2 facton template id
145 // 3 unused
146 uint32 model_m; // 4
147 uint32 model_f; // 5
148 // 6-7 unused
149 uint32 TeamID; // 8 (7-Alliance 1-Horde)
150 // 9-12 unused
151 uint32 startmovie; // 13 id from CinematicCamera.dbc
152 char* name[16]; // 14-29 used for DBC language detection/selection
153 // 30 string flags, unused
154 //char* nameFemale[16]; // 31-46, if different from base (male) case
155 // 47 string flags, unused
156 //char* nameNeutralGender[16]; // 48-63, if different from base (male) case
157 // 64 string flags, unused
158 // 65-67 unused
159 uint32 addon; // 68 (0 - original race, 1 - tbc addon, ...)
162 struct CreatureDisplayInfoEntry
164 uint32 Displayid; // 0
165 // 1-3,unused
166 float scale; // 4
167 // 5-13,unused
170 struct CreatureFamilyEntry
172 uint32 ID; // 0
173 float minScale; // 1
174 uint32 minScaleLevel; // 2 0/1
175 float maxScale; // 3
176 uint32 maxScaleLevel; // 4 0/60
177 uint32 skillLine[2]; // 5-6
178 uint32 petFoodMask; // 7
179 char* Name[16]; // 8-23
180 // 24 string flags, unused
181 // 25 icon, unused
184 struct CreatureSpellDataEntry
186 uint32 ID; // 0
187 //uint32 spellId[4]; // 1-4 hunter pet learned spell (for later use)
190 struct DurabilityCostsEntry
192 uint32 Itemlvl; // 0
193 uint32 multiplier[29]; // 1-29
196 struct DurabilityQualityEntry
198 uint32 Id; // 0
199 float quality_mod; // 1
202 struct EmotesTextEntry
204 uint32 Id;
205 uint32 textid;
208 struct FactionEntry
210 uint32 ID; // 0
211 int32 reputationListID; // 1
212 uint32 BaseRepRaceMask[4]; // 2-5 Base reputation race masks (see enum Races)
213 uint32 BaseRepClassMask[4]; // 6-9 Base reputation class masks (see enum Classes)
214 int32 BaseRepValue[4]; // 10-13 Base reputation values
215 uint32 ReputationFlags[4]; // 14-17 Default flags to apply
216 uint32 team; // 18 enum Team
217 char* name[16]; // 19-34
218 // 35 string flags, unused
219 //char* description[16]; // 36-51 unused
220 // 52 string flags, unused
223 struct FactionTemplateEntry
225 uint32 ID; // 0
226 uint32 faction; // 1
227 uint32 factionFlags; // 2 specific flags for that faction
228 uint32 ourMask; // 3 if mask set (see FactionMasks) then faction included in masked team
229 uint32 friendlyMask; // 4 if mask set (see FactionMasks) then faction friendly to masked team
230 uint32 hostileMask; // 5 if mask set (see FactionMasks) then faction hostile to masked team
231 uint32 enemyFaction1; // 6
232 uint32 enemyFaction2; // 7
233 uint32 enemyFaction3; // 8
234 uint32 enemyFaction4; // 9
235 uint32 friendFaction1; // 10
236 uint32 friendFaction2; // 11
237 uint32 friendFaction3; // 12
238 uint32 friendFaction4; // 13
239 //------------------------------------------------------- end structure
241 // helpers
242 bool IsFriendlyTo(FactionTemplateEntry const& entry) const
244 if(enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction )
245 return false;
246 if(friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction )
247 return true;
248 return (friendlyMask & entry.ourMask) || (ourMask & entry.friendlyMask);
250 bool IsHostileTo(FactionTemplateEntry const& entry) const
252 if(enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction )
253 return true;
254 if(friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction )
255 return false;
256 return (hostileMask & entry.ourMask) != 0;
258 bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) !=0; }
259 bool IsNeutralToAll() const { return hostileMask == 0 && friendlyMask == 0 && enemyFaction1==0 && enemyFaction2==0 && enemyFaction3==0 && enemyFaction4==0; }
260 bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD)!=0; }
263 struct GemPropertiesEntry
265 uint32 ID;
266 uint32 spellitemenchantement;
267 uint32 color;
270 #define GT_MAX_LEVEL 100
272 struct GtCombatRatingsEntry
274 float ratio;
277 struct GtChanceToMeleeCritBaseEntry
279 float base;
282 struct GtChanceToMeleeCritEntry
284 float ratio;
287 struct GtChanceToSpellCritBaseEntry
289 float base;
292 struct GtChanceToSpellCritEntry
294 float ratio;
297 struct GtOCTRegenHPEntry
299 float ratio;
302 //struct GtOCTRegenMPEntry
304 // float ratio;
305 //};
307 struct GtRegenHPPerSptEntry
309 float ratio;
312 struct GtRegenMPPerSptEntry
314 float ratio;
317 struct ItemEntry
319 uint32 ID;
320 uint32 DisplayId;
321 uint32 InventoryType;
322 uint32 Sheath;
325 struct ItemDisplayInfoEntry
327 uint32 ID;
328 uint32 randomPropertyChance;
331 //struct ItemCondExtCostsEntry
333 // uint32 ID;
334 // uint32 condExtendedCost; // ItemPrototype::CondExtendedCost
335 // uint32 itemextendedcostentry; // ItemPrototype::ExtendedCost
336 // uint32 arenaseason; // arena season number(1-4)
337 //};
339 struct ItemExtendedCostEntry
341 uint32 ID; // 0 extended-cost entry id
342 uint32 reqhonorpoints; // 1 required honor points
343 uint32 reqarenapoints; // 2 required arena points
344 uint32 reqitem[5]; // 3-7 required item id
345 uint32 reqitemcount[5]; // 8-12 required count of 1st item
346 uint32 reqpersonalarenarating; // 13 required personal arena rating
349 struct ItemRandomPropertiesEntry
351 uint32 ID; // 0
352 //char* internalName // 1 unused
353 uint32 enchant_id[3]; // 2-4
354 // 5-6 unused, 0 only values, reserved for additional enchantments?
355 //char* nameSuffix[16] // 7-22, unused
356 // 23 nameSufix flags, unused
359 struct ItemRandomSuffixEntry
361 uint32 ID; // 0
362 //char* name[16] // 1-16 unused
363 // 17, name flags, unused
364 // 18 unused
365 uint32 enchant_id[3]; // 19-21
366 uint32 prefix[3]; // 22-24
369 struct ItemSetEntry
371 //uint32 id // 0 item set ID
372 char* name[16]; // 1-16
373 // 17 string flags, unused
374 // 18-28 items from set, but not have all items listed, use ItemPrototype::ItemSet instead
375 // 29-34 unused
376 uint32 spells[8]; // 35-42
377 uint32 items_to_triggerspell[8]; // 43-50
378 uint32 required_skill_id; // 51
379 uint32 required_skill_value; // 52
382 struct LockEntry
384 uint32 ID; // 0
385 uint32 keytype[5]; // 1-5
386 // 6-8, not used
387 uint32 key[5]; // 9-13
388 // 14-16, not used
389 uint32 requiredminingskill; // 17
390 uint32 requiredlockskill; // 18
391 // 19-32, not used
394 struct MailTemplateEntry
396 uint32 ID; // 0
397 //char* subject[16]; // 1-16
398 // 17 name flags, unused
399 //char* content[16]; // 18-33
402 struct MapEntry
404 uint32 MapID; // 0
405 //char* internalname; // 1 unused
406 uint32 map_type; // 2
407 // 3 unused
408 char* name[16]; // 4-19
409 // 20 name flags, unused
410 // 21-23 unused (something PvPZone related - levels?)
411 // 24-26
412 uint32 linked_zone; // 27 common zone for instance and continent map
413 //char* hordeIntro // 28-43 text for PvP Zones
414 // 44 intro text flags
415 //char* allianceIntro // 45-60 text for PvP Zones
416 // 46 intro text flags
417 // 47-61 not used
418 uint32 multimap_id; // 62
419 // 63-65 not used
420 //chat* unknownText1 // 66-81 unknown empty text fields, possible normal Intro text.
421 // 82 text flags
422 //chat* heroicIntroText // 83-98 heroic mode requirement text
423 // 99 text flags
424 //chat* unknownText2 // 100-115 unknown empty text fields
425 // 116 text flags
426 int32 entrance_map; // 117 map_id of entrance map
427 float entrance_x; // 118 entrance x coordinate (if exist single entry)
428 float entrance_y; // 119 entrance y coordinate (if exist single entry)
429 uint32 resetTimeRaid; // 120
430 uint32 resetTimeHeroic; // 121
431 // 122-123
432 uint32 addon; // 124 (0-original maps,1-tbc addon)
434 // Helpers
435 uint32 Expansion() const { return addon; }
436 bool Instanceable() const { return map_type == MAP_INSTANCE || map_type == MAP_RAID; }
437 // NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable
438 bool IsDungeon() const { return map_type == MAP_INSTANCE || map_type == MAP_RAID; }
439 bool IsRaid() const { return map_type == MAP_RAID; }
440 bool IsBattleGround() const { return map_type == MAP_BATTLEGROUND; }
441 bool IsBattleArena() const { return map_type == MAP_ARENA; }
442 bool IsBattleGroundOrArena() const { return map_type == MAP_BATTLEGROUND || map_type == MAP_ARENA; }
443 bool SupportsHeroicMode() const { return resetTimeHeroic && !resetTimeRaid; }
444 bool HasResetTime() const { return resetTimeHeroic || resetTimeRaid; }
446 bool IsMountAllowed() const
448 return !IsDungeon() ||
449 MapID==568 || MapID==309 || MapID==209 || MapID==534 ||
450 MapID==560 || MapID==509 || MapID==269;
454 struct QuestSortEntry
456 uint32 id; // 0, sort id
457 //char* name[16]; // 1-16, unused
458 // 17 name flags, unused
461 struct RandomPropertiesPointsEntry
463 //uint32 Id; // 0 hidden key
464 uint32 itemLevel; // 1
465 uint32 EpicPropertiesPoints[5]; // 2-6
466 uint32 RarePropertiesPoints[5]; // 7-11
467 uint32 UncommonPropertiesPoints[5]; // 12-16
470 //struct SkillLineCategoryEntry{
471 // uint32 id; // 0 hidden key
472 // char* name[16]; // 1 - 17 Category name
473 // // 18 string flag
474 // uint32 displayOrder; // Display order in character tab
475 //};
477 //struct SkillRaceClassInfoEntry{
478 // uint32 id; // 0
479 // uint32 skillId; // 1 present some refrences to unknown skill
480 // uint32 raceMask; // 2
481 // uint32 classMask; // 3
482 // uint32 flags; // 4 mask for some thing
483 // uint32 reqLevel; // 5
484 // uint32 skillTierId; // 6
485 // uint32 skillCostID; // 7
486 //};
488 //struct SkillTiersEntry{
489 // uint32 id; // 0
490 // uint32 skillValue[16]; // 1-17 unknown possibly add value on learn?
491 // uint32 maxSkillValue[16]; // Max value for rank
492 //};
494 struct SkillLineEntry
496 uint32 id; // 0
497 uint32 categoryId; // 1 (index from SkillLineCategory.dbc)
498 //uint32 skillCostID; // 2 not used
499 char* name[16]; // 3-18
500 // 19 string flags, not used
501 //char* description[16]; // 20-35, not used
502 // 36 string flags, not used
503 uint32 spellIcon; // 37
506 struct SkillLineAbilityEntry
508 uint32 id; // 0, INDEX
509 uint32 skillId; // 1
510 uint32 spellId; // 2
511 uint32 racemask; // 3
512 uint32 classmask; // 4
513 //uint32 racemaskNot; // 5 always 0 in 2.4.2
514 //uint32 classmaskNot; // 6 always 0 in 2.4.2
515 uint32 req_skill_value; // 7 for trade skill.not for training.
516 uint32 forward_spellid; // 8
517 uint32 learnOnGetSkill; // 9 can be 1 or 2 for spells learned on get skill
518 uint32 max_value; // 10
519 uint32 min_value; // 11
520 // 12-13, unknown, always 0
521 uint32 reqtrainpoints; // 14
524 struct SoundEntriesEntry
526 uint32 Id; // 0, sound id
527 //uint32 Type; // 1, sound type (10 generally for creature, etc)
528 //char* InternalName; // 2, internal name, for use in lookup command for example
529 //char* FileName[10]; // 3-12, file names
530 //uint32 Unk13[10]; // 13-22, linked with file names?
531 //char* Path; // 23
532 // 24-28, unknown
535 struct SpellEntry
537 uint32 Id; // 0 normally counted from 0 field (but some tools start counting from 1, check this before tool use for data view!)
538 uint32 Category; // 1
539 //uint32 castUI // 2 not used
540 uint32 Dispel; // 3
541 uint32 Mechanic; // 4
542 uint32 Attributes; // 5
543 uint32 AttributesEx; // 6
544 uint32 AttributesEx2; // 7
545 uint32 AttributesEx3; // 8
546 uint32 AttributesEx4; // 9
547 uint32 AttributesEx5; // 10
548 //uint32 AttributesEx6; // 11 not used
549 uint32 Stances; // 12
550 uint32 StancesNot; // 13
551 uint32 Targets; // 14
552 uint32 TargetCreatureType; // 15
553 uint32 RequiresSpellFocus; // 16
554 uint32 FacingCasterFlags; // 17
555 uint32 CasterAuraState; // 18
556 uint32 TargetAuraState; // 19
557 uint32 CasterAuraStateNot; // 20
558 uint32 TargetAuraStateNot; // 21
559 uint32 CastingTimeIndex; // 22
560 uint32 RecoveryTime; // 23
561 uint32 CategoryRecoveryTime; // 24
562 uint32 InterruptFlags; // 25
563 uint32 AuraInterruptFlags; // 26
564 uint32 ChannelInterruptFlags; // 27
565 uint32 procFlags; // 28
566 uint32 procChance; // 29
567 uint32 procCharges; // 30
568 uint32 maxLevel; // 31
569 uint32 baseLevel; // 32
570 uint32 spellLevel; // 33
571 uint32 DurationIndex; // 34
572 uint32 powerType; // 35
573 uint32 manaCost; // 36
574 uint32 manaCostPerlevel; // 37
575 uint32 manaPerSecond; // 38
576 uint32 manaPerSecondPerLevel; // 39
577 uint32 rangeIndex; // 40
578 float speed; // 41
579 //uint32 modalNextSpell; // 42
580 uint32 StackAmount; // 43
581 uint32 Totem[2]; // 44-45
582 int32 Reagent[8]; // 46-53
583 uint32 ReagentCount[8]; // 54-61
584 int32 EquippedItemClass; // 62 (value)
585 int32 EquippedItemSubClassMask; // 63 (mask)
586 int32 EquippedItemInventoryTypeMask; // 64 (mask)
587 uint32 Effect[3]; // 65-67
588 int32 EffectDieSides[3]; // 68-70
589 uint32 EffectBaseDice[3]; // 71-73
590 float EffectDicePerLevel[3]; // 74-76
591 float EffectRealPointsPerLevel[3]; // 77-79
592 int32 EffectBasePoints[3]; // 80-82 (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
593 uint32 EffectMechanic[3]; // 83-85
594 uint32 EffectImplicitTargetA[3]; // 86-88
595 uint32 EffectImplicitTargetB[3]; // 89-91
596 uint32 EffectRadiusIndex[3]; // 92-94 - spellradius.dbc
597 uint32 EffectApplyAuraName[3]; // 95-97
598 uint32 EffectAmplitude[3]; // 98-100
599 float EffectMultipleValue[3]; // 101-103
600 uint32 EffectChainTarget[3]; // 104-106
601 uint32 EffectItemType[3]; // 107-109
602 int32 EffectMiscValue[3]; // 110-112
603 int32 EffectMiscValueB[3]; // 113-115
604 uint32 EffectTriggerSpell[3]; // 116-118
605 float EffectPointsPerComboPoint[3]; // 119-121
606 uint32 SpellVisual; // 122
607 // 123 not used
608 uint32 SpellIconID; // 124
609 uint32 activeIconID; // 125
610 //uint32 spellPriority; // 126
611 char* SpellName[16]; // 127-142
612 //uint32 SpellNameFlag; // 143
613 char* Rank[16]; // 144-159
614 //uint32 RankFlags; // 160
615 //char* Description[16]; // 161-176 not used
616 //uint32 DescriptionFlags; // 177 not used
617 //char* ToolTip[16]; // 178-193 not used
618 //uint32 ToolTipFlags; // 194 not used
619 uint32 ManaCostPercentage; // 195
620 uint32 StartRecoveryCategory; // 196
621 uint32 StartRecoveryTime; // 197
622 uint32 MaxTargetLevel; // 198
623 uint32 SpellFamilyName; // 199
624 uint64 SpellFamilyFlags; // 200+201
625 uint32 MaxAffectedTargets; // 202
626 uint32 DmgClass; // 203 defenseType
627 uint32 PreventionType; // 204
628 //uint32 StanceBarOrder; // 205 not used
629 float DmgMultiplier[3]; // 206-208
630 //uint32 MinFactionId; // 209 not used, and 0 in 2.4.2
631 //uint32 MinReputation; // 210 not used, and 0 in 2.4.2
632 //uint32 RequiredAuraVision; // 211 not used
633 uint32 TotemCategory[2]; // 212-213
634 uint32 AreaId; // 214
635 uint32 SchoolMask; // 215 school mask
637 private:
638 // prevent creating custom entries (copy data from original in fact)
639 SpellEntry(SpellEntry const&); // DON'T must have implementation
642 typedef std::set<uint32> SpellCategorySet;
643 typedef std::map<uint32,SpellCategorySet > SpellCategoryStore;
644 typedef std::set<uint32> PetFamilySpellsSet;
645 typedef std::map<uint32,PetFamilySpellsSet > PetFamilySpellsStore;
647 struct SpellCastTimesEntry
649 uint32 ID; // 0
650 int32 CastTime; // 1
651 //float CastTimePerLevel; // 2 unsure / per skill?
652 //int32 MinCastTime; // 3 unsure
655 struct SpellFocusObjectEntry
657 uint32 ID; // 0
658 //char* Name[16]; // 1-15 unused
659 // 16 string flags, unused
662 // stored in SQL table
663 struct SpellThreatEntry
665 uint32 spellId;
666 int32 threat;
669 struct SpellRadiusEntry
671 uint32 ID;
672 float Radius;
673 float Radius2;
676 struct SpellRangeEntry
678 uint32 ID;
679 float minRange;
680 float maxRange;
683 struct SpellShapeshiftEntry
685 uint32 ID; // 0
686 //uint32 buttonPosition; // 1 unused
687 //char* Name[16]; // 2-17 unused
688 //uint32 NameFlags; // 18 unused
689 uint32 flags1; // 19
690 int32 creatureType; // 20 <=0 humanoid, other normal creature types
691 //uint32 unk1; // 21 unused
692 uint32 attackSpeed; // 22
693 //uint32 modelID; // 23 unused, alliance modelid (where horde case?)
694 //uint32 unk2; // 24 unused
695 //uint32 unk3; // 25 unused
696 //uint32 unk4; // 26 unused
697 //uint32 unk5; // 27 unused
698 //uint32 unk6; // 28 unused
699 //uint32 unk7; // 29 unused
700 //uint32 unk8; // 30 unused
701 //uint32 unk9; // 31 unused
702 //uint32 unk10; // 32 unused
703 //uint32 unk11; // 33 unused
704 //uint32 unk12; // 34 unused
707 struct SpellDurationEntry
709 uint32 ID;
710 int32 Duration[3];
713 struct SpellItemEnchantmentEntry
715 uint32 ID; // 0
716 uint32 type[3]; // 1-3
717 uint32 amount[3]; // 4-6
718 //uint32 amount2[3] // 7-9 always same as similar `amount` value
719 uint32 spellid[3]; // 10-12
720 char* description[16]; // 13-29
721 // 30 description flags
722 uint32 aura_id; // 31
723 uint32 slot; // 32
724 uint32 GemID; // 33
725 uint32 EnchantmentCondition; // 34
728 struct SpellItemEnchantmentConditionEntry
730 uint32 ID;
731 uint8 Color[5];
732 uint8 Comparator[5];
733 uint8 CompareColor[5];
734 uint32 Value[5];
737 struct StableSlotPricesEntry
739 uint32 Slot;
740 uint32 Price;
743 struct TalentEntry
745 uint32 TalentID; // 0
746 uint32 TalentTab; // 1 index in TalentTab.dbc (TalentTabEntry)
747 uint32 Row; // 2
748 uint32 Col; // 3
749 uint32 RankID[5]; // 4-8
750 // 9-12 not used, always 0, maybe not used high ranks
751 uint32 DependsOn; // 13 index in Talent.dbc (TalentEntry)
752 // 14-15 not used
753 uint32 DependsOnRank; // 16
754 // 17-19 not used
755 uint32 DependsOnSpell; // 20 req.spell
758 struct TalentTabEntry
760 uint32 TalentTabID; // 0
761 //char* name[16]; // 1-16, unused
762 //uint32 nameFlags; // 17, unused
763 //unit32 spellicon; // 18
764 // 19 not used
765 uint32 ClassMask; // 20
766 uint32 tabpage; // 21
767 //char* internalname; // 22
770 struct TaxiNodesEntry
772 uint32 ID; // 0
773 uint32 map_id; // 1
774 float x; // 2
775 float y; // 3
776 float z; // 4
777 //char* name[16]; // 5-21
778 // 22 string flags, unused
779 uint32 horde_mount_type; // 23
780 uint32 alliance_mount_type; // 24
783 struct TaxiPathEntry
785 uint32 ID;
786 uint32 from;
787 uint32 to;
788 uint32 price;
791 struct TaxiPathNodeEntry
793 uint32 path;
794 uint32 index;
795 uint32 mapid;
796 float x;
797 float y;
798 float z;
799 uint32 actionFlag;
800 uint32 delay;
803 struct TotemCategoryEntry
805 uint32 ID; // 0
806 //char* name[16]; // 1-16
807 // 17 string flags, unused
808 uint32 categoryType; // 18 (one for specialization)
809 uint32 categoryMask; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods)
812 struct WorldMapAreaEntry
814 //uint32 ID; // 0
815 uint32 map_id; // 1
816 uint32 area_id; // 2 index (continent 0 areas ignored)
817 //char* internal_name // 3
818 float y1; // 4
819 float y2; // 5
820 float x1; // 6
821 float x2; // 7
822 int32 virtual_map_id; // 8 -1 (map_id have correct map) other: virtual map where zone show (map_id - where zone in fact internally)
825 struct WorldSafeLocsEntry
827 uint32 ID; // 0
828 uint32 map_id; // 1
829 float x; // 2
830 float y; // 3
831 float z; // 4
832 //char* name[16] // 5-20 name, unused
833 // 21 name flags, unused
836 // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
837 #if defined( __GNUC__ )
838 #pragma pack()
839 #else
840 #pragma pack(pop)
841 #endif
843 // Structures not used for casting to loaded DBC data and not required then packing
844 struct TalentSpellPos
846 TalentSpellPos() : talent_id(0), rank(0) {}
847 TalentSpellPos(uint16 _talent_id, uint8 _rank) : talent_id(_talent_id), rank(_rank) {}
849 uint16 talent_id;
850 uint8 rank;
853 typedef std::map<uint32,TalentSpellPos> TalentSpellPosMap;
855 struct TaxiPathBySourceAndDestination
857 TaxiPathBySourceAndDestination() : ID(0),price(0) {}
858 TaxiPathBySourceAndDestination(uint32 _id,uint32 _price) : ID(_id),price(_price) {}
860 uint32 ID;
861 uint32 price;
863 typedef std::map<uint32,TaxiPathBySourceAndDestination> TaxiPathSetForSource;
864 typedef std::map<uint32,TaxiPathSetForSource> TaxiPathSetBySource;
866 struct TaxiPathNode
868 TaxiPathNode() : mapid(0), x(0),y(0),z(0),actionFlag(0),delay(0) {}
869 TaxiPathNode(uint32 _mapid, float _x, float _y, float _z, uint32 _actionFlag, uint32 _delay) : mapid(_mapid), x(_x),y(_y),z(_z),actionFlag(_actionFlag),delay(_delay) {}
871 uint32 mapid;
872 float x;
873 float y;
874 float z;
875 uint32 actionFlag;
876 uint32 delay;
878 typedef std::vector<TaxiPathNode> TaxiPathNodeList;
879 typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
881 #define TaxiMaskSize 16
882 typedef uint32 TaxiMask[TaxiMaskSize];
883 #endif