[6813] Allow have team dependent graveyards at entrance map for instances.
[getmangos.git] / src / shared / Database / DBCStructure.h
blobb45f9c9776e6c90404281b14e09b1b63f38e4563
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 struct CharTitlesEntry
89 uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()
90 //uint32 unk1; // 1 flags?
91 //char* name[16]; // 2-17, unused
92 // 18 string flag, unused
93 //char* name2[16]; // 19-34, unused
94 // 35 string flag, unused
95 uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
98 struct ChatChannelsEntry
100 uint32 ChannelID; // 0
101 uint32 flags; // 1
102 char* pattern[16]; // 3-18
103 // 19 string flags, unused
104 //char* name[16]; // 20-35 unused
105 // 36 string flag, unused
108 struct ChrClassesEntry
110 uint32 ClassID; // 0
111 // 1-2, unused
112 uint32 powerType; // 3
113 // 4, unused
114 //char* name[16]; // 5-20 unused
115 // 21 string flag, unused
116 //char* string1[16]; // 21-36 unused
117 // 37 string flag, unused
118 //char* string2[16]; // 38-53 unused
119 // 54 string flag, unused
120 // 55, unused
121 uint32 spellfamily; // 56
122 // 57, unused
125 struct ChrRacesEntry
127 uint32 RaceID; // 0
128 // 1 unused
129 uint32 FactionID; // 2 facton template id
130 // 3 unused
131 uint32 model_m; // 4
132 uint32 model_f; // 5
133 // 6-7 unused
134 uint32 TeamID; // 8 (7-Alliance 1-Horde)
135 // 9-12 unused
136 uint32 startmovie; // 13 id from CinematicCamera.dbc
137 char* name[16]; // 14-29 used for DBC language detection/selection
138 // 30 string flags, unused
139 //char* string1[16]; // 31-46 used for DBC language detection/selection
140 // 47 string flags, unused
141 //char* string2[16]; // 48-63 used for DBC language detection/selection
142 // 64 string flags, unused
143 // 65-67 unused
144 uint32 addon; // 68 (0 - original race, 1 - tbc addon, ...)
147 struct CreatureDisplayInfoEntry
149 uint32 Displayid; // 0
150 // 1-3,unused
151 float scale; // 4
152 // 5-13,unused
155 struct CreatureFamilyEntry
157 uint32 ID; // 0
158 float minScale; // 1
159 uint32 minScaleLevel; // 2 0/1
160 float maxScale; // 3
161 uint32 maxScaleLevel; // 4 0/60
162 uint32 skillLine[2]; // 5-6
163 uint32 petFoodMask; // 7
164 char* Name[16]; // 8-23
165 // 24 string flags, unused
166 // 25 icon, unused
169 struct CreatureSpellDataEntry
171 uint32 ID; // 0
172 //uint32 spellId[4]; // 1-4 hunter pet learned spell (for later use)
175 struct DurabilityCostsEntry
177 uint32 Itemlvl; // 0
178 uint32 multiplier[29]; // 1-29
181 struct DurabilityQualityEntry
183 uint32 Id; // 0
184 float quality_mod; // 1
187 struct EmotesTextEntry
189 uint32 Id;
190 uint32 textid;
193 struct FactionEntry
195 uint32 ID; // 0
196 int32 reputationListID; // 1
197 uint32 BaseRepRaceMask[4]; // 2-5 Base reputation race masks (see enum Races)
198 uint32 BaseRepClassMask[4]; // 6-9 Base reputation class masks (see enum Classes)
199 int32 BaseRepValue[4]; // 10-13 Base reputation values
200 uint32 ReputationFlags[4]; // 14-17 Default flags to apply
201 uint32 team; // 18 enum Team
202 char* name[16]; // 19-34
203 // 35 string flags, unused
204 //char* description[16]; // 36-51 unused
205 // 52 string flags, unused
208 struct FactionTemplateEntry
210 uint32 ID; // 0
211 uint32 faction; // 1
212 uint32 factionFlags; // 2 specific flags for that faction
213 uint32 ourMask; // 3 if mask set (see FactionMasks) then faction included in masked team
214 uint32 friendlyMask; // 4 if mask set (see FactionMasks) then faction friendly to masked team
215 uint32 hostileMask; // 5 if mask set (see FactionMasks) then faction hostile to masked team
216 uint32 enemyFaction1; // 6
217 uint32 enemyFaction2; // 7
218 uint32 enemyFaction3; // 8
219 uint32 enemyFaction4; // 9
220 uint32 friendFaction1; // 10
221 uint32 friendFaction2; // 11
222 uint32 friendFaction3; // 12
223 uint32 friendFaction4; // 13
224 //------------------------------------------------------- end structure
226 // helpers
227 bool IsFriendlyTo(FactionTemplateEntry const& entry) const
229 if(enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction )
230 return false;
231 if(friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction )
232 return true;
233 return (friendlyMask & entry.ourMask) || (ourMask & entry.friendlyMask);
235 bool IsHostileTo(FactionTemplateEntry const& entry) const
237 if(enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction )
238 return true;
239 if(friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction )
240 return false;
241 return (hostileMask & entry.ourMask) != 0;
243 bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) !=0; }
244 bool IsNeutralToAll() const { return hostileMask == 0 && friendlyMask == 0 && enemyFaction1==0 && enemyFaction2==0 && enemyFaction3==0 && enemyFaction4==0; }
245 bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD)!=0; }
248 struct GemPropertiesEntry
250 uint32 ID;
251 uint32 spellitemenchantement;
252 uint32 color;
255 #define GT_MAX_LEVEL 100
257 struct GtCombatRatingsEntry
259 float ratio;
262 struct GtChanceToMeleeCritBaseEntry
264 float base;
267 struct GtChanceToMeleeCritEntry
269 float ratio;
272 struct GtChanceToSpellCritBaseEntry
274 float base;
277 struct GtChanceToSpellCritEntry
279 float ratio;
282 struct GtOCTRegenHPEntry
284 float ratio;
287 //struct GtOCTRegenMPEntry
289 // float ratio;
290 //};
292 struct GtRegenHPPerSptEntry
294 float ratio;
297 struct GtRegenMPPerSptEntry
299 float ratio;
302 struct ItemEntry
304 uint32 ID;
305 uint32 DisplayId;
306 uint32 InventoryType;
307 uint32 Sheath;
310 struct ItemDisplayInfoEntry
312 uint32 ID;
313 uint32 randomPropertyChance;
316 //struct ItemCondExtCostsEntry
318 // uint32 ID;
319 // uint32 condExtendedCost; // ItemPrototype::CondExtendedCost
320 // uint32 itemextendedcostentry; // ItemPrototype::ExtendedCost
321 // uint32 arenaseason; // arena season number(1-4)
322 //};
324 struct ItemExtendedCostEntry
326 uint32 ID; // 0 extended-cost entry id
327 uint32 reqhonorpoints; // 1 required honor points
328 uint32 reqarenapoints; // 2 required arena points
329 uint32 reqitem[5]; // 3-7 required item id
330 uint32 reqitemcount[5]; // 8-12 required count of 1st item
331 uint32 reqpersonalarenarating; // 13 required personal arena rating
334 struct ItemRandomPropertiesEntry
336 uint32 ID; // 0
337 //char* internalName // 1 unused
338 uint32 enchant_id[3]; // 2-4
339 // 5-6 unused, 0 only values, reserved for additional enchantments?
340 //char* nameSuffix[16] // 7-22, unused
341 // 23 nameSufix flags, unused
344 struct ItemRandomSuffixEntry
346 uint32 ID; // 0
347 //char* name[16] // 1-16 unused
348 // 17, name flags, unused
349 // 18 unused
350 uint32 enchant_id[3]; // 19-21
351 uint32 prefix[3]; // 22-24
354 struct ItemSetEntry
356 //uint32 id // 0 item set ID
357 char* name[16]; // 1-16
358 // 17 string flags, unused
359 // 18-28 items from set, but not have all items listed, use ItemPrototype::ItemSet instead
360 // 29-34 unused
361 uint32 spells[8]; // 35-42
362 uint32 items_to_triggerspell[8]; // 43-50
363 uint32 required_skill_id; // 51
364 uint32 required_skill_value; // 52
367 struct LockEntry
369 uint32 ID; // 0
370 uint32 keytype[5]; // 1-5
371 // 6-8, not used
372 uint32 key[5]; // 9-13
373 // 14-16, not used
374 uint32 requiredminingskill; // 17
375 uint32 requiredlockskill; // 18
376 // 19-32, not used
379 struct MailTemplateEntry
381 uint32 ID; // 0
382 //char* subject[16]; // 1-16
383 // 17 name flags, unused
384 //char* content[16]; // 18-33
387 struct MapEntry
389 uint32 MapID; // 0
390 //char* internalname; // 1 unused
391 uint32 map_type; // 2
392 // 3 unused
393 char* name[16]; // 4-19
394 // 20 name flags, unused
395 // 21-23 unused (something PvPZone related - levels?)
396 // 24-26
397 uint32 linked_zone; // 27 common zone for instance and continent map
398 //char* hordeIntro // 28-43 text for PvP Zones
399 // 44 intro text flags
400 //char* allianceIntro // 45-60 text for PvP Zones
401 // 46 intro text flags
402 // 47-61 not used
403 uint32 multimap_id; // 62
404 // 63-65 not used
405 //chat* unknownText1 // 66-81 unknown empty text fields, possible normal Intro text.
406 // 82 text flags
407 //chat* heroicIntroText // 83-98 heroic mode requirement text
408 // 99 text flags
409 //chat* unknownText2 // 100-115 unknown empty text fields
410 // 116 text flags
411 int32 entrance_map; // 117 map_id of entrance map
412 float entrance_x; // 118 entrance x coordinate (if exist single entry)
413 float entrance_y; // 119 entrance y coordinate (if exist single entry)
414 uint32 resetTimeRaid; // 120
415 uint32 resetTimeHeroic; // 121
416 // 122-123
417 uint32 addon; // 124 (0-original maps,1-tbc addon)
419 // Helpers
420 uint32 Expansion() const { return addon; }
421 bool Instanceable() const { return map_type == MAP_INSTANCE || map_type == MAP_RAID; }
422 // NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable
423 bool IsDungeon() const { return map_type == MAP_INSTANCE || map_type == MAP_RAID; }
424 bool IsRaid() const { return map_type == MAP_RAID; }
425 bool IsBattleGround() const { return map_type == MAP_BATTLEGROUND; }
426 bool IsBattleArena() const { return map_type == MAP_ARENA; }
427 bool IsBattleGroundOrArena() const { return map_type == MAP_BATTLEGROUND || map_type == MAP_ARENA; }
428 bool SupportsHeroicMode() const { return resetTimeHeroic && !resetTimeRaid; }
429 bool HasResetTime() const { return resetTimeHeroic || resetTimeRaid; }
431 bool IsMountAllowed() const
433 return !IsDungeon() ||
434 MapID==568 || MapID==309 || MapID==209 || MapID==534 ||
435 MapID==560 || MapID==509 || MapID==269;
439 struct QuestSortEntry
441 uint32 id; // 0, sort id
442 //char* name[16]; // 1-16, unused
443 // 17 name flags, unused
446 struct RandomPropertiesPointsEntry
448 //uint32 Id; // 0 hidden key
449 uint32 itemLevel; // 1
450 uint32 EpicPropertiesPoints[5]; // 2-6
451 uint32 RarePropertiesPoints[5]; // 7-11
452 uint32 UncommonPropertiesPoints[5]; // 12-16
455 //struct SkillLineCategoryEntry{
456 // uint32 id; // 0 hidden key
457 // char* name[16]; // 1 - 17 Category name
458 // // 18 string flag
459 // uint32 displayOrder; // Display order in character tab
460 //};
462 //struct SkillRaceClassInfoEntry{
463 // uint32 id; // 0
464 // uint32 skillId; // 1 present some refrences to unknown skill
465 // uint32 raceMask; // 2
466 // uint32 classMask; // 3
467 // uint32 flags; // 4 mask for some thing
468 // uint32 reqLevel; // 5
469 // uint32 skillTierId; // 6
470 // uint32 skillCostID; // 7
471 //};
473 //struct SkillTiersEntry{
474 // uint32 id; // 0
475 // uint32 skillValue[16]; // 1-17 unknown possibly add value on learn?
476 // uint32 maxSkillValue[16]; // Max value for rank
477 //};
479 struct SkillLineEntry
481 uint32 id; // 0
482 uint32 categoryId; // 1 (index from SkillLineCategory.dbc)
483 //uint32 skillCostID; // 2 not used
484 char* name[16]; // 3-18
485 // 19 string flags, not used
486 //char* description[16]; // 20-35, not used
487 // 36 string flags, not used
488 uint32 spellIcon; // 37
491 struct SkillLineAbilityEntry
493 uint32 id; // 0, INDEX
494 uint32 skillId; // 1
495 uint32 spellId; // 2
496 uint32 racemask; // 3
497 uint32 classmask; // 4
498 //uint32 racemaskNot; // 5 always 0 in 2.4.2
499 //uint32 classmaskNot; // 6 always 0 in 2.4.2
500 uint32 req_skill_value; // 7 for trade skill.not for training.
501 uint32 forward_spellid; // 8
502 uint32 learnOnGetSkill; // 9 can be 1 or 2 for spells learned on get skill
503 uint32 max_value; // 10
504 uint32 min_value; // 11
505 // 12-13, unknown, always 0
506 uint32 reqtrainpoints; // 14
509 struct SoundEntriesEntry
511 uint32 Id; // 0, sound id
512 //uint32 Type; // 1, sound type (10 generally for creature, etc)
513 //char* InternalName; // 2, internal name, for use in lookup command for example
514 //char* FileName[10]; // 3-12, file names
515 //uint32 Unk13[10]; // 13-22, linked with file names?
516 //char* Path; // 23
517 // 24-28, unknown
520 struct SpellEntry
522 uint32 Id; // 0 normally counted from 0 field (but some tools start counting from 1, check this before tool use for data view!)
523 uint32 Category; // 1
524 //uint32 castUI // 2 not used
525 uint32 Dispel; // 3
526 uint32 Mechanic; // 4
527 uint32 Attributes; // 5
528 uint32 AttributesEx; // 6
529 uint32 AttributesEx2; // 7
530 uint32 AttributesEx3; // 8
531 uint32 AttributesEx4; // 9
532 uint32 AttributesEx5; // 10
533 //uint32 AttributesEx6; // 11 not used
534 uint32 Stances; // 12
535 uint32 StancesNot; // 13
536 uint32 Targets; // 14
537 uint32 TargetCreatureType; // 15
538 uint32 RequiresSpellFocus; // 16
539 uint32 FacingCasterFlags; // 17
540 uint32 CasterAuraState; // 18
541 uint32 TargetAuraState; // 19
542 uint32 CasterAuraStateNot; // 20
543 uint32 TargetAuraStateNot; // 21
544 uint32 CastingTimeIndex; // 22
545 uint32 RecoveryTime; // 23
546 uint32 CategoryRecoveryTime; // 24
547 uint32 InterruptFlags; // 25
548 uint32 AuraInterruptFlags; // 26
549 uint32 ChannelInterruptFlags; // 27
550 uint32 procFlags; // 28
551 uint32 procChance; // 29
552 uint32 procCharges; // 30
553 uint32 maxLevel; // 31
554 uint32 baseLevel; // 32
555 uint32 spellLevel; // 33
556 uint32 DurationIndex; // 34
557 uint32 powerType; // 35
558 uint32 manaCost; // 36
559 uint32 manaCostPerlevel; // 37
560 uint32 manaPerSecond; // 38
561 uint32 manaPerSecondPerLevel; // 39
562 uint32 rangeIndex; // 40
563 float speed; // 41
564 //uint32 modalNextSpell; // 42
565 uint32 StackAmount; // 43
566 uint32 Totem[2]; // 44-45
567 int32 Reagent[8]; // 46-53
568 uint32 ReagentCount[8]; // 54-61
569 int32 EquippedItemClass; // 62 (value)
570 int32 EquippedItemSubClassMask; // 63 (mask)
571 int32 EquippedItemInventoryTypeMask; // 64 (mask)
572 uint32 Effect[3]; // 65-67
573 int32 EffectDieSides[3]; // 68-70
574 uint32 EffectBaseDice[3]; // 71-73
575 float EffectDicePerLevel[3]; // 74-76
576 float EffectRealPointsPerLevel[3]; // 77-79
577 int32 EffectBasePoints[3]; // 80-82 (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
578 uint32 EffectMechanic[3]; // 83-85
579 uint32 EffectImplicitTargetA[3]; // 86-88
580 uint32 EffectImplicitTargetB[3]; // 89-91
581 uint32 EffectRadiusIndex[3]; // 92-94 - spellradius.dbc
582 uint32 EffectApplyAuraName[3]; // 95-97
583 uint32 EffectAmplitude[3]; // 98-100
584 float EffectMultipleValue[3]; // 101-103
585 uint32 EffectChainTarget[3]; // 104-106
586 uint32 EffectItemType[3]; // 107-109
587 int32 EffectMiscValue[3]; // 110-112
588 int32 EffectMiscValueB[3]; // 113-115
589 uint32 EffectTriggerSpell[3]; // 116-118
590 float EffectPointsPerComboPoint[3]; // 119-121
591 uint32 SpellVisual; // 122
592 // 123 not used
593 uint32 SpellIconID; // 124
594 uint32 activeIconID; // 125
595 //uint32 spellPriority; // 126
596 char* SpellName[16]; // 127-142
597 //uint32 SpellNameFlag; // 143
598 char* Rank[16]; // 144-159
599 //uint32 RankFlags; // 160
600 //char* Description[16]; // 161-176 not used
601 //uint32 DescriptionFlags; // 177 not used
602 //char* ToolTip[16]; // 178-193 not used
603 //uint32 ToolTipFlags; // 194 not used
604 uint32 ManaCostPercentage; // 195
605 uint32 StartRecoveryCategory; // 196
606 uint32 StartRecoveryTime; // 197
607 uint32 MaxTargetLevel; // 198
608 uint32 SpellFamilyName; // 199
609 uint64 SpellFamilyFlags; // 200+201
610 uint32 MaxAffectedTargets; // 202
611 uint32 DmgClass; // 203 defenseType
612 uint32 PreventionType; // 204
613 //uint32 StanceBarOrder; // 205 not used
614 float DmgMultiplier[3]; // 206-208
615 //uint32 MinFactionId; // 209 not used, and 0 in 2.4.2
616 //uint32 MinReputation; // 210 not used, and 0 in 2.4.2
617 //uint32 RequiredAuraVision; // 211 not used
618 uint32 TotemCategory[2]; // 212-213
619 uint32 AreaId; // 214
620 uint32 SchoolMask; // 215 school mask
622 private:
623 // prevent creating custom entries (copy data from original in fact)
624 SpellEntry(SpellEntry const&); // DON'T must have implementation
627 typedef std::set<uint32> SpellCategorySet;
628 typedef std::map<uint32,SpellCategorySet > SpellCategoryStore;
629 typedef std::set<uint32> PetFamilySpellsSet;
630 typedef std::map<uint32,PetFamilySpellsSet > PetFamilySpellsStore;
632 struct SpellCastTimesEntry
634 uint32 ID; // 0
635 int32 CastTime; // 1
636 //float CastTimePerLevel; // 2 unsure / per skill?
637 //int32 MinCastTime; // 3 unsure
640 struct SpellFocusObjectEntry
642 uint32 ID; // 0
643 //char* Name[16]; // 1-15 unused
644 // 16 string flags, unused
647 // stored in SQL table
648 struct SpellThreatEntry
650 uint32 spellId;
651 int32 threat;
654 struct SpellRadiusEntry
656 uint32 ID;
657 float Radius;
658 float Radius2;
661 struct SpellRangeEntry
663 uint32 ID;
664 float minRange;
665 float maxRange;
668 struct SpellShapeshiftEntry
670 uint32 ID; // 0
671 //uint32 buttonPosition; // 1 unused
672 //char* Name[16]; // 2-17 unused
673 //uint32 NameFlags; // 18 unused
674 uint32 flags1; // 19
675 int32 creatureType; // 20 <=0 humanoid, other normal creature types
676 //uint32 unk1; // 21 unused
677 uint32 attackSpeed; // 22
678 //uint32 modelID; // 23 unused, alliance modelid (where horde case?)
679 //uint32 unk2; // 24 unused
680 //uint32 unk3; // 25 unused
681 //uint32 unk4; // 26 unused
682 //uint32 unk5; // 27 unused
683 //uint32 unk6; // 28 unused
684 //uint32 unk7; // 29 unused
685 //uint32 unk8; // 30 unused
686 //uint32 unk9; // 31 unused
687 //uint32 unk10; // 32 unused
688 //uint32 unk11; // 33 unused
689 //uint32 unk12; // 34 unused
692 struct SpellDurationEntry
694 uint32 ID;
695 int32 Duration[3];
698 struct SpellItemEnchantmentEntry
700 uint32 ID; // 0
701 uint32 type[3]; // 1-3
702 uint32 amount[3]; // 4-6
703 //uint32 amount2[3] // 7-9 always same as similar `amount` value
704 uint32 spellid[3]; // 10-12
705 char* description[16]; // 13-29
706 // 30 description flags
707 uint32 aura_id; // 31
708 uint32 slot; // 32
709 uint32 GemID; // 33
710 uint32 EnchantmentCondition; // 34
713 struct SpellItemEnchantmentConditionEntry
715 uint32 ID;
716 uint8 Color[5];
717 uint8 Comparator[5];
718 uint8 CompareColor[5];
719 uint32 Value[5];
722 struct StableSlotPricesEntry
724 uint32 Slot;
725 uint32 Price;
728 struct TalentEntry
730 uint32 TalentID; // 0
731 uint32 TalentTab; // 1 index in TalentTab.dbc (TalentTabEntry)
732 uint32 Row; // 2
733 uint32 Col; // 3
734 uint32 RankID[5]; // 4-8
735 // 9-12 not used, always 0, maybe not used high ranks
736 uint32 DependsOn; // 13 index in Talent.dbc (TalentEntry)
737 // 14-15 not used
738 uint32 DependsOnRank; // 16
739 // 17-19 not used
740 uint32 DependsOnSpell; // 20 req.spell
743 struct TalentTabEntry
745 uint32 TalentTabID; // 0
746 //char* name[16]; // 1-16, unused
747 //uint32 nameFlags; // 17, unused
748 //unit32 spellicon; // 18
749 // 19 not used
750 uint32 ClassMask; // 20
751 uint32 tabpage; // 21
752 //char* internalname; // 22
755 struct TaxiNodesEntry
757 uint32 ID; // 0
758 uint32 map_id; // 1
759 float x; // 2
760 float y; // 3
761 float z; // 4
762 //char* name[16]; // 5-21
763 // 22 string flags, unused
764 uint32 horde_mount_type; // 23
765 uint32 alliance_mount_type; // 24
768 struct TaxiPathEntry
770 uint32 ID;
771 uint32 from;
772 uint32 to;
773 uint32 price;
776 struct TaxiPathNodeEntry
778 uint32 path;
779 uint32 index;
780 uint32 mapid;
781 float x;
782 float y;
783 float z;
784 uint32 actionFlag;
785 uint32 delay;
788 struct TotemCategoryEntry
790 uint32 ID; // 0
791 //char* name[16]; // 1-16
792 // 17 string flags, unused
793 uint32 categoryType; // 18 (one for specialization)
794 uint32 categoryMask; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods)
797 struct WorldMapAreaEntry
799 //uint32 ID; // 0
800 uint32 map_id; // 1
801 uint32 area_id; // 2 index (continent 0 areas ignored)
802 //char* internal_name // 3
803 float y1; // 4
804 float y2; // 5
805 float x1; // 6
806 float x2; // 7
807 int32 virtual_map_id; // 8 -1 (map_id have correct map) other: virtual map where zone show (map_id - where zone in fact internally)
810 struct WorldSafeLocsEntry
812 uint32 ID; // 0
813 uint32 map_id; // 1
814 float x; // 2
815 float y; // 3
816 float z; // 4
817 //char* name[16] // 5-20 name, unused
818 // 21 name flags, unused
821 // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
822 #if defined( __GNUC__ )
823 #pragma pack()
824 #else
825 #pragma pack(pop)
826 #endif
828 // Structures not used for casting to loaded DBC data and not required then packing
829 struct TalentSpellPos
831 TalentSpellPos() : talent_id(0), rank(0) {}
832 TalentSpellPos(uint16 _talent_id, uint8 _rank) : talent_id(_talent_id), rank(_rank) {}
834 uint16 talent_id;
835 uint8 rank;
838 typedef std::map<uint32,TalentSpellPos> TalentSpellPosMap;
840 struct TaxiPathBySourceAndDestination
842 TaxiPathBySourceAndDestination() : ID(0),price(0) {}
843 TaxiPathBySourceAndDestination(uint32 _id,uint32 _price) : ID(_id),price(_price) {}
845 uint32 ID;
846 uint32 price;
848 typedef std::map<uint32,TaxiPathBySourceAndDestination> TaxiPathSetForSource;
849 typedef std::map<uint32,TaxiPathSetForSource> TaxiPathSetBySource;
851 struct TaxiPathNode
853 TaxiPathNode() : mapid(0), x(0),y(0),z(0),actionFlag(0),delay(0) {}
854 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) {}
856 uint32 mapid;
857 float x;
858 float y;
859 float z;
860 uint32 actionFlag;
861 uint32 delay;
863 typedef std::vector<TaxiPathNode> TaxiPathNodeList;
864 typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
866 #define TaxiMaskSize 16
867 typedef uint32 TaxiMask[TaxiMaskSize];
868 #endif