OregonCore  revision fb2a440-git
Your Favourite TBC server
DBCStructure.h
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef DBCSTRUCTURE_H
19 #define DBCSTRUCTURE_H
20 
21 #include "DBCEnums.h"
22 #include "Platform/Define.h"
23 #include "Path.h"
24 #include "SharedDefines.h"
25 
26 #include <map>
27 #include <set>
28 #include <vector>
29 
30 // Structures using to access raw DBC data and required packing to portability
31 
32 // 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
33 #if defined( __GNUC__)
34 #pragma pack(1)
35 #else
36 #pragma pack(push,1)
37 #endif
38 
40 {
41  uint32 ID; // 0
42  uint32 mapid; // 1
43  uint32 zone; // 2 if 0 then it's zone, else it's zone id of this area
44  uint32 exploreFlag; // 3, main index
45  uint32 flags; // 4, unknown value but 312 for all cities
46  // 5-9 unused
48  char* area_name[16]; // 11-26
49  // 27, string flags, unused
50  uint32 team; // 28
51  uint32 LiquidTypeOverride; // 29 m_liquidTypeID override for water type
52  // 30-32 uknown/unused
53 };
54 
56 {
57  uint32 id; // 0 m_ID
58  uint32 mapid; // 1 m_ContinentID
59  float x; // 2 m_x
60  float y; // 3 m_y
61  float z; // 4 m_z
62  float radius; // 5 m_radius
63  float box_x; // 6 m_box_length
64  float box_y; // 7 m_box_width
65  float box_z; // 8 m_box_heigh
66  float box_orientation; // 9 m_box_yaw
67 };
68 
70 {
71  uint32 houseId; // 0 index
72  uint32 faction; // 1 id of faction.dbc for player factions associated with city
73  uint32 depositPercent; // 2 1/3 from real
75  //char* name[16]; // 4-19
76  // 20 string flag, unused
77 };
78 
80 {
83 };
84 
86 {
87  uint32 id; // 0
88  uint32 mapid[3]; // 1-3 mapid
89  // 4-8 unused
90  uint32 type; // 9 (3 - BG, 4 - arena)
91  uint32 minlvl; // 10
92  uint32 maxlvl; // 11
94  // 13-14 unused
95  char* name[16]; // 15-30
96  // 31 string flag, unused
97  // 32 unused
98 };
99 
100 #define MAX_OUTFIT_ITEMS 12
101 
103 {
104  //uint32 Id; // 0
105  uint32 RaceClassGender; // 1 (UNIT_FIELD_BYTES_0 & 0x00FFFFFF) comparable (0 byte = race, 1 byte = class, 2 byte = gender)
106  int32 ItemId[MAX_OUTFIT_ITEMS]; // 2-13
107  //int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 14-25 not required at server side
108  //int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 26-37 not required at server side
109  //uint32 Unknown1; // 38, unique values (index-like with gaps ordered in other way as ids)
110  //uint32 Unknown2; // 39
111  //uint32 Unknown3; // 40
112 };
113 
115 {
116  uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()
117  //uint32 unk1; // 1 flags?
118  char* name[16]; // 2-17
119  // 18 string flag, unused
120  //char* name2[16]; // 19-34, unused
121  // 35 string flag, unused
122  uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
123 };
124 
126 {
128  uint32 flags; // 1
129  char* pattern[16]; // 3-18
130  // 19 string flags, unused
131  //char* name[16]; // 20-35 unused
132  // 36 string flag, unused
133 };
134 
136 {
138  // 1-2, unused
140  // 4, unused
141  char* name[16]; // 5-20 unused
142  // 21 string flag, unused
143  //char* nameFemale[16]; // 21-36 unused, if different from base (male) case
144  // 37 string flag, unused
145  //char* nameNeutralGender[16]; // 38-53 unused, if different from base (male) case
146  // 54 string flag, unused
147  // 55, unused
149  // 57, unused
150 };
151 
153 {
155  // 1 unused
156  uint32 FactionID; // 2 facton template id
157  // 3 unused
160  // 6-7 unused
161  uint32 TeamID; // 8 (7-Alliance 1-Horde)
162  // 9-12 unused
163  uint32 CinematicSequence; // 13 id from CinematicCamera.dbc
164  char* name[16]; // 14-29 used for DBC language detection/selection
165  // 30 string flags, unused
166  //char* nameFemale[16]; // 31-46, if different from base (male) case
167  // 47 string flags, unused
168  //char* nameNeutralGender[16]; // 48-63, if different from base (male) case
169  // 64 string flags, unused
170  // 65-67 unused
171  uint32 addon; // 68 (0 - original race, 1 - tbc addon, ...)
172 };
173 
174 /* not used
175 struct CinematicCameraEntry
176 {
177  uint32 id; // 0 index
178  char* filename; // 1
179  uint32 soundid; // 2 in SoundEntries.dbc or 0
180  float start_x; // 3
181  float start_y; // 4
182  float start_z; // 5
183  float unk6; // 6 speed?
184 };
185 */
186 
188 {
189  uint32 ID; // 0
190  char const* Model; // 1 Model filename (translate .mdx to .m2)
191  uint32 SoundID; // 2 Sound ID (voiceover for cinematic)
192  DBCPosition3D Origin; // 3-5 Position in map used for basis for M2 co-ordinates
193  float OriginFacing; // 4 Orientation in map used for basis for M2 co-ordinates
194 };
195 
197 {
198  uint32 Id; // 0 index
199  //uint32 unk1; // 1 always 0
200  uint32 cinematicCamera; // 2 id in CinematicCamera.dbc
201  // 3-9 always 0
202 };
203 
205 {
207  // 1-3,unused
208  float scale; // 4
209  // 5-13,unused
210 };
211 
213 {
214  uint32 ID; // 0
215  float minScale; // 1
217  float maxScale; // 3
219  uint32 skillLine[2]; // 5-6
221  char* Name[16]; // 8-23
222  // 24 string flags, unused
223  // 25 icon, unused
224 };
225 
227 {
228  uint32 ID; // 0
229  //uint32 spellId[4]; // 1-4 hunter pet learned spell (for later use)
230 };
231 
233 {
235  uint32 multiplier[29]; // 1-29
236 };
237 
239 {
240  uint32 Id; // 0
241  float quality_mod; // 1
242 };
243 
245 {
246  uint32 Id; // 0
247  //char* Name; // 1, internal name
248  //uint32 AnimationId; // 2, ref to animationData
249  uint32 Flags; // 3, bitmask, may be unit_flags
250  uint32 EmoteType; // 4, Can be 0, 1 or 2 (determine how emote are shown)
251  uint32 UnitStandState; // 5, uncomfirmed, may be enum UnitStandStateType
252  //uint32 SoundId; // 6, ref to soundEntries
253 };
254 
256 {
259 };
260 
262 {
263  uint32 ID; // 0 m_ID
264  int32 reputationListID; // 1 m_reputationIndex
265  uint32 BaseRepRaceMask[4]; // 2-5 m_reputationRaceMask
266  uint32 BaseRepClassMask[4]; // 6-9 m_reputationClassMask
267  int32 BaseRepValue[4]; // 10-13 m_reputationBase
268  uint32 ReputationFlags[4]; // 14-17 m_reputationFlags
269  uint32 team; // 18 m_parentFactionID
270  char* name[16]; // 19-34 m_name_lang
271  // 35 string flags, unused
272  //char* description[16]; // 36-51 m_description_lang
273  // 52 string flags, unused
274 
275  // helpers
276 
277  bool CanHaveReputation() const
278  {
279  return reputationListID >= 0;
280  }
281 
282  int GetIndexFitTo(uint32 raceMask, uint32 classMask) const
283  {
284  for (int i = 0; i < 4; ++i)
285  {
286  if ((BaseRepRaceMask[i] == 0 || (BaseRepRaceMask[i] & raceMask)) &&
287  (BaseRepClassMask[i] == 0 || (BaseRepClassMask[i] & classMask)))
288  return i;
289  }
290 
291  return -1;
292  }
293 };
294 
296 {
297  uint32 ID; // 0
299  uint32 factionFlags; // 2 specific flags for that faction
300  uint32 ourMask; // 3 if mask set (see FactionMasks) then faction included in masked team
301  uint32 friendlyMask; // 4 if mask set (see FactionMasks) then faction friendly to masked team
302  uint32 hostileMask; // 5 if mask set (see FactionMasks) then faction hostile to masked team
311  //------------------------------------------------------- end structure
312 
313  // helpers
314  bool IsFriendlyTo(FactionTemplateEntry const& entry) const
315  {
316  if (enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction)
317  return false;
318  if (friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction)
319  return true;
320  return (friendlyMask & entry.ourMask) || (ourMask & entry.friendlyMask);
321  }
322  bool IsHostileTo(FactionTemplateEntry const& entry) const
323  {
324  if (enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction)
325  return true;
326  if (friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction)
327  return false;
328  return (hostileMask & entry.ourMask) != 0;
329  }
330  bool IsHostileToPlayers() const
331  {
332  return (hostileMask & FACTION_MASK_PLAYER) != 0;
333  }
334  bool IsNeutralToAll() const
335  {
336  return hostileMask == 0 && friendlyMask == 0 && enemyFaction1 == 0 && enemyFaction2 == 0 && enemyFaction3 == 0 && enemyFaction4 == 0;
337  }
339  {
340  return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0;
341  }
342 };
343 
345 {
346  uint32 Displayid; // 0 m_ID
347  char* filename; // 1
348  //uint32 unk1[10]; //2-11
349  float minX;
350  float minY;
351  float minZ;
352  float maxX;
353  float maxY;
354  float maxZ;
355  //uint32 transport; //18
356 };
357 
359 {
363 };
364 
365 // All Gt* DBC store data for 100 levels, some by 100 per class/race
366 #define GT_MAX_LEVEL 100
367 
369 {
370  float ratio;
371 };
372 
374 {
375  float base;
376 };
377 
379 {
380  float ratio;
381 };
382 
384 {
385  float base;
386 };
387 
389 {
390  float ratio;
391 };
392 
394 {
395  float ratio;
396 };
397 
399 {
400  float ratio;
401 };
402 
403 //struct GtOCTRegenMPEntry
404 //{
405 // float ratio;
406 //};
407 
409 {
410  float ratio;
411 };
412 
414 {
415  float ratio;
416 };
417 
418 struct ItemEntry
419 {
424 };
425 
427 {
430 };
431 
432 //struct ItemCondExtCostsEntry
433 //{
434 // uint32 ID;
435 // uint32 condExtendedCost; // ItemTemplate::CondExtendedCost
436 // uint32 itemextendedcostentry; // ItemTemplate::ExtendedCost
437 // uint32 arenaseason; // arena season number(1-4)
438 //};
439 
441 {
442  uint32 ID; // 0 extended-cost entry id
443  uint32 reqhonorpoints; // 1 required honor points
444  uint32 reqarenapoints; // 2 required arena points
445  uint32 reqitem[5]; // 3-7 required item id
446  uint32 reqitemcount[5]; // 8-12 required count of 1st item
447  uint32 reqpersonalarenarating; // 13 required personal arena rating
448 };
449 
451 {
452  uint32 ID; // 0
453  //char* internalName // 1 unused
454  uint32 enchant_id[3]; // 2-4
455  // 5-6 unused, 0 only values, reserved for additional enchantments?
456  //char* nameSuffix[16] // 7-22, unused
457  // 23 nameSufix flags, unused
458 };
459 
461 {
462  uint32 ID; // 0
463  //char* name[16] // 1-16 unused
464  // 17, name flags, unused
465  // 18 unused
466  uint32 enchant_id[3]; // 19-21
467  uint32 prefix[3]; // 22-24
468 };
469 
471 {
472  //uint32 id // 0 item set ID
473  char* name[16]; // 1-16
474  // 17 string flags, unused
475  // 18-28 items from set, but not have all items listed, use ItemTemplate::ItemSet instead
476  // 29-34 unused
477  uint32 spells[8]; // 35-42
478  uint32 items_to_triggerspell[8]; // 43-50
481 };
482 
484 {
486  //char* Name;
487  //uint32 Flags;
490 };
491 
492 struct LockEntry
493 {
494  uint32 ID; // 0
495  uint32 keytype[5]; // 1-5
496  // 6-8, not used
497  uint32 key[5]; // 9-13
498  // 14-16, not used
501  // 19-32, not used
502 };
503 
505 {
506  uint32 ID; // 0
507  //char* subject[16]; // 1-16
508  // 17 name flags, unused
509  //char* content[16]; // 18-33
510 };
511 
512 struct MapEntry
513 {
514  uint32 MapID; // 0
515  //char* internalname; // 1 unused
517  // 3 unused
518  char* name[16]; // 4-19
519  // 20 name flags, unused
520  // 21-23 unused (something PvPZone related - levels?)
521  // 24-26
522  uint32 linked_zone; // 27 common zone for instance and continent map
523  //char* hordeIntro // 28-43 text for PvP Zones
524  // 44 intro text flags
525  //char* allianceIntro // 45-60 text for PvP Zones
526  // 46 intro text flags
527  // 47-61 not used
529  // 63-65 not used
530  //chat* unknownText1 // 66-81 unknown empty text fields, possible normal Intro text.
531  // 82 text flags
532  char* heroicIntroText[16]; // 83-98 heroic mode requirement text
533  // 99 text flags
534  //chat* unknownText2 // 100-115 unknown empty text fields
535  // 116 text flags
536  int32 entrance_map; // 117 map_id of entrance map
537  float entrance_x; // 118 entrance x coordinate (if exist single entry)
538  float entrance_y; // 119 entrance y coordinate (if exist single entry)
541  // 122-123
542  uint32 addon; // 124 (0-original maps,1-tbc addon)
543 
544  // Helpers
546  {
547  return addon;
548  }
549 
550  bool IsDungeon() const
551  {
552  return map_type == MAP_INSTANCE || map_type == MAP_RAID;
553  }
554  bool Instanceable() const
555  {
556  return map_type == MAP_INSTANCE || map_type == MAP_RAID || map_type == MAP_BATTLEGROUND || map_type == MAP_ARENA;
557  }
558  bool IsRaid() const
559  {
560  return map_type == MAP_RAID;
561  }
562  bool IsBattleground() const
563  {
564  return map_type == MAP_BATTLEGROUND;
565  }
566  bool IsBattleArena() const
567  {
568  return map_type == MAP_ARENA;
569  }
571  {
572  return map_type == MAP_BATTLEGROUND || map_type == MAP_ARENA;
573  }
574  bool SupportsHeroicMode() const
575  {
576  return resetTimeHeroic && !resetTimeRaid;
577  }
578  bool HasResetTime() const
579  {
580  return resetTimeHeroic || resetTimeRaid;
581  }
582 
583  bool IsContinent() const
584  {
585  return MapID == 0 || MapID == 1 || MapID == 530;
586  }
587 };
588 
590 {
591  uint32 id; // 0 m_ID
592  //char* name[16]; // 1-16 m_SortName_lang
593  // 17 name flags
594 };
595 
597 {
598  //uint32 Id; // 0 hidden key
600  uint32 EpicPropertiesPoints[5]; // 2-6
601  uint32 RarePropertiesPoints[5]; // 7-11
602  uint32 UncommonPropertiesPoints[5]; // 12-16
603 };
604 
605 //struct SkillLineCategoryEntry{
606 // uint32 id; // 0 hidden key
607 // char* name[16]; // 1 - 17 Category name
608 // // 18 string flag
609 // uint32 displayOrder; // Display order in character tab
610 //};
611 
612 //struct SkillRaceClassInfoEntry{
613 // uint32 id; // 0
614 // uint32 skillId; // 1 present some refrences to unknown skill
615 // uint32 raceMask; // 2
616 // uint32 classMask; // 3
617 // uint32 flags; // 4 mask for some thing
618 // uint32 reqLevel; // 5
619 // uint32 skillTierId; // 6
620 // uint32 skillCostID; // 7
621 //};
622 
623 //struct SkillTiersEntry{
624 // uint32 id; // 0
625 // uint32 skillValue[16]; // 1-17 unknown possibly add value on learn?
626 // uint32 maxSkillValue[16]; // Max value for rank
627 //};
628 
630 {
631  uint32 id; // 0
632  uint32 categoryId; // 1 (index from SkillLineCategory.dbc)
633  //uint32 skillCostID; // 2 not used
634  char* name[16]; // 3-18
635  // 19 string flags, not used
636  //char* description[16]; // 20-35, not used
637  // 36 string flags, not used
639 };
640 
642 {
643  uint32 id; // 0, INDEX
648  //uint32 racemaskNot; // 5 always 0 in 2.4.2
649  //uint32 classmaskNot; // 6 always 0 in 2.4.2
650  uint32 req_skill_value; // 7 for trade skill.not for training.
652  uint32 learnOnGetSkill; // 9 can be 1 or 2 for spells learned on get skill
655  // 12-13, unknown, always 0
657 };
658 
660 {
661  uint32 Id; // 0, sound id
662  //uint32 Type; // 1, sound type (10 generally for creature, etc)
663  //char* InternalName; // 2, internal name, for use in lookup command for example
664  //char* FileName[10]; // 3-12, file names
665  //uint32 Unk13[10]; // 13-22, linked with file names?
666  //char* Path; // 23
667  // 24-28, unknown
668 };
669 
670 #define MAX_SPELL_EFFECTS 3
671 
673 {
674  uint32 Id; // 0
676  //uint32 castUI // 2 not used
715  float speed; // 41
716  //uint32 modalNextSpell; // 42
718  uint32 Totem[2]; // 44-45
719  int32 Reagent[8]; // 46-53
720  uint32 ReagentCount[8]; // 54-61
721  int32 EquippedItemClass; // 62 (value)
724  uint32 Effect[MAX_SPELL_EFFECTS]; // 65-67
725  int32 EffectDieSides[MAX_SPELL_EFFECTS]; // 68-70
726  int32 EffectBaseDice[MAX_SPELL_EFFECTS]; // 71-73
727  float EffectDicePerLevel[MAX_SPELL_EFFECTS]; // 74-76
728  float EffectRealPointsPerLevel[MAX_SPELL_EFFECTS]; // 77-79
729  int32 EffectBasePoints[MAX_SPELL_EFFECTS]; // 80-82 (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
730  uint32 EffectMechanic[MAX_SPELL_EFFECTS]; // 83-85
731  uint32 EffectImplicitTargetA[MAX_SPELL_EFFECTS]; // 86-88
732  uint32 EffectImplicitTargetB[MAX_SPELL_EFFECTS]; // 89-91
733  uint32 EffectRadiusIndex[MAX_SPELL_EFFECTS]; // 92-94 - spellradius.dbc
734  uint32 EffectApplyAuraName[MAX_SPELL_EFFECTS]; // 95-97
735  uint32 EffectAmplitude[MAX_SPELL_EFFECTS]; // 98-100
736  float EffectMultipleValue[MAX_SPELL_EFFECTS]; // 101-103
737  uint32 EffectChainTarget[MAX_SPELL_EFFECTS]; // 104-106
738  uint32 EffectItemType[MAX_SPELL_EFFECTS]; // 107-109
739  int32 EffectMiscValue[MAX_SPELL_EFFECTS]; // 110-112
740  int32 EffectMiscValueB[MAX_SPELL_EFFECTS]; // 113-115
741  uint32 EffectTriggerSpell[MAX_SPELL_EFFECTS]; // 116-118
742  float EffectPointsPerComboPoint[MAX_SPELL_EFFECTS]; // 119-121
744  // 123 not used
747  //uint32 spellPriority; // 126
748  char* SpellName[16]; // 127-142
749  //uint32 SpellNameFlag; // 143
750  char* Rank[16]; // 144-159
751  //uint32 RankFlags; // 160
752  //char* Description[16]; // 161-176 not used
753  //uint32 DescriptionFlags; // 177 not used
754  char* ToolTip[16]; // 178-193
755  //uint32 ToolTipFlags; // 194 not used
763  uint32 DmgClass; // 203 defenseType
765  //uint32 StanceBarOrder; // 205 not used
766  float DmgMultiplier[3]; // 206-208
767  //uint32 MinFactionId; // 209 not used, and 0 in 2.4.2
768  //uint32 MinReputation; // 210 not used, and 0 in 2.4.2
769  //uint32 RequiredAuraVision; // 211 not used
770  uint32 TotemCategory[2]; // 212-213
771  uint32 AreaId; // 214
772  uint32 SchoolMask; // 215 school mask
773 
774  inline bool HasAttribute(SpellAttributes attribute) const { return Attributes & attribute; }
775  inline bool HasAttribute(SpellAttributesEx attribute) const { return AttributesEx & attribute; }
776  inline bool HasAttribute(SpellAttributesEx2 attribute) const { return AttributesEx2 & attribute; }
777  inline bool HasAttribute(SpellAttributesEx3 attribute) const { return AttributesEx3 & attribute; }
778  inline bool HasAttribute(SpellAttributesEx4 attribute) const { return AttributesEx4 & attribute; }
779  inline bool HasAttribute(SpellAttributesEx5 attribute) const { return AttributesEx5 & attribute; }
780  inline bool HasAttribute(SpellAttributesEx6 attribute) const { return AttributesEx6 & attribute; }
781 
782  // Helpers
783  bool HasEffect(uint8 effect) const
784  {
785  for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
786  if (Effect[i] == effect)
787  return true;
788  return false;
789  }
790  bool HasEffect(uint8 effIndex, uint8 effect) const
791  {
792  if (Effect[effIndex] == effect)
793  return true;
794  return false;
795  }
796 
798  {
799  uint32 mask = 0;
800  if (Mechanic)
801  mask |= 1 << Mechanic;
802  if (IsEffect(effIndex) && Mechanic)
803  mask |= 1 << Mechanic;
804  return mask;
805  }
806 
808  {
809  uint32 mask = 0;
810  if (Mechanic)
811  mask |= 1 << Mechanic;
812  for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
813  if (IsEffect(i) && EffectMechanic[i])
814  mask |= 1 << EffectMechanic[i];
815  return mask;
816  }
817 
818  bool IsEffect(uint8 effIndex) const
819  {
820  return Effect[effIndex] != 0;
821  }
822 
823  private:
824  // prevent creating custom entries (copy data from original in fact)
825  SpellEntry(SpellEntry const&); // DON'T must have implementation
826 };
827 
828 typedef std::set<uint32> SpellCategorySet;
829 typedef std::map<uint32, SpellCategorySet > SpellCategoryStore;
830 typedef std::set<uint32> PetFamilySpellsSet;
831 typedef std::map<uint32, PetFamilySpellsSet > PetFamilySpellsStore;
832 
834 {
835  uint32 ID; // 0
837  //float CastTimePerLevel; // 2 unsure / per skill?
838  //int32 MinCastTime; // 3 unsure
839 };
840 
842 {
843  uint32 ID; // 0
844  //char* Name[16]; // 1-15 unused
845  // 16 string flags, unused
846 };
847 
849 {
853 };
854 
856 {
858  float minRange;
859  float maxRange;
861 };
862 
863 #define MAX_SHAPESHIFT_SPELLS 8
864 
866 {
867  uint32 ID; // 0
868  //uint32 buttonPosition; // 1 unused
869  //char* Name[16]; // 2-17 unused
870  //uint32 NameFlags; // 18 unused
871  uint32 flags1; // 19
872  int32 creatureType; // 20 <= 0 humanoid, other normal creature types
873  //uint32 unk1; // 21 unused
875  uint32 modelID_A; // 23 alliance modelid
876  //uint32 modelID_H; // 24 horde modelid
877  //uint32 unk3; // 25 unused
878  //uint32 unk4; // 26 unused
879  //uint32 stanceSpell[MAX_SHAPESHIFT_SPELLS]; // @todo Implement this 27 - 34 unused
880 };
881 
883 {
885  int32 Duration[3];
886 };
887 
889 {
890  uint32 ID; // 0
891  uint32 type[3]; // 1-3
892  uint32 amount[3]; // 4-6
893  //uint32 amount2[3] // 7-9 always same as similar `amount` value
894  uint32 spellid[3]; // 10-12
895  char* description[16]; // 13-29
896  // 30 description flags
898  uint32 slot; // 32
899  uint32 GemID; // 33
901 };
902 
904 {
906  uint8 Color[5];
907  uint8 Comparator[5];
908  uint8 CompareColor[5];
909  uint32 Value[5];
910 };
911 
913 {
916 };
917 
919 {
920  uint32 Id; // 0
921  uint32 Category; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount?
922  uint32 Faction; // 2, 14 rows > 0
923  uint32 Type; // 3, see enum
924  uint32 Slot; // 4, 0-6
925  uint32 Flags; // 5
926 };
927 
929 {
931  uint32 TalentTab; // 1 index in TalentTab.dbc (TalentTabEntry)
932  uint32 Row; // 2
933  uint32 Col; // 3
934  uint32 RankID[5]; // 4-8
935  // 9-12 not used, always 0, maybe not used high ranks
936  uint32 DependsOn; // 13 index in Talent.dbc (TalentEntry)
937  // 14-15 not used
939  // 17-19 not used
940  uint32 DependsOnSpell; // 20 req.spell
941 };
942 
944 {
946  //char* name[16]; // 1-16, unused
947  //uint32 nameFlags; // 17, unused
948  //unit32 spellicon; // 18
949  // 19 not used
952  //char* internalname; // 22
953 };
954 
956 {
957  uint32 ID; // 0
959  float x; // 2
960  float y; // 3
961  float z; // 4
962  //char* name[16]; // 5-21
963  // 22 string flags, unused
966 };
967 
969 {
974 };
975 
977 {
978  // 0 m_ID
979  uint32 path; // 1 m_PathID
980  uint32 index; // 2 m_NodeIndex
981  uint32 mapid; // 3 m_ContinentID
982  float x; // 4 m_LocX
983  float y; // 5 m_LocY
984  float z; // 6 m_LocZ
985  uint32 actionFlag; // 7 m_flags
986  uint32 delay; // 8 m_delay
987  uint32 arrivalEventID; // 9 m_arrivalEventID
988  uint32 departureEventID; // 10 m_departureEventID
989 };
990 
992 {
993  uint32 ID; // 0
994  //char* name[16]; // 1-16
995  // 17 string flags, unused
996  uint32 categoryType; // 18 (one for specialization)
997  uint32 categoryMask; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods)
998 };
999 
1001 {
1002  uint32 Id; // 0 index
1003  int32 rootId; // 1 used in root WMO
1004  int32 adtId; // 2 used in adt file
1005  int32 groupId; // 3 used in group WMO
1006  //uint32 field4;
1007  //uint32 field5;
1008  //uint32 field6;
1009  //uint32 field7;
1010  //uint32 field8;
1011  uint32 Flags; // 9 used for indoor/outdoor determination
1012  uint32 areaId; // 10 link to AreaTableEntry.ID
1013  //char *Name[16];
1014  //uint32 nameFlags;
1015 };
1016 
1018 {
1019  //uint32 ID; // 0
1021  uint32 area_id; // 2 index (continent 0 areas ignored)
1022  //char* internal_name // 3
1023  float y1; // 4
1024  float y2; // 5
1025  float x1; // 6
1026  float x2; // 7
1027  int32 virtual_map_id; // 8 -1 (map_id have correct map) other: virtual map where zone show (map_id - where zone in fact internally)
1028 };
1029 
1031 {
1032  uint32 ID; // 0
1034  float x; // 2
1035  float y; // 3
1036  float z; // 4
1037  //char* name[16] // 5-20 name, unused
1038  // 21 name flags, unused
1039 };
1040 
1041 // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
1042 #if defined( __GNUC__)
1043 #pragma pack()
1044 #else
1045 #pragma pack(pop)
1046 #endif
1047 
1048 // Structures not used for casting to loaded DBC data and not required then packing
1050 {
1051  TalentSpellPos() : talent_id(0), rank(0) {}
1052  TalentSpellPos(uint16 _talent_id, uint8 _rank) : talent_id(_talent_id), rank(_rank) {}
1053 
1056 };
1057 
1058 typedef std::map<uint32, TalentSpellPos> TalentSpellPosMap;
1059 
1061 {
1063  TaxiPathBySourceAndDestination(uint32 _id, uint32 _price) : ID(_id), price(_price) {}
1064 
1067 };
1068 typedef std::map<uint32, TaxiPathBySourceAndDestination> TaxiPathSetForSource;
1069 typedef std::map<uint32, TaxiPathSetForSource> TaxiPathSetBySource;
1070 
1072 {
1073  TaxiPathNodePtr() : i_ptr(NULL) {}
1074  TaxiPathNodePtr(TaxiPathNodeEntry const* ptr) : i_ptr(ptr) {}
1076  operator TaxiPathNodeEntry const& () const
1077  {
1078  return *i_ptr;
1079  }
1080 };
1081 
1083 typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
1084 
1085 #define TaxiMaskSize 16
1087 #endif
1088 
TaxiPathNodeEntry const * i_ptr
uint32 DependsOnRank
Definition: DBCStructure.h:938
uint32 AuraInterruptFlags
Definition: DBCStructure.h:700
uint32 Category
Definition: DBCStructure.h:675
uint32 spellLevel
Definition: DBCStructure.h:707
TaxiPathBySourceAndDestination(uint32 _id, uint32 _price)
uint32 alliance_mount_type
Definition: DBCStructure.h:965
uint32 CasterAuraStateNot
Definition: DBCStructure.h:694
uint32 AttributesEx
Definition: DBCStructure.h:680
uint32 AttributesEx6
Definition: DBCStructure.h:685
TalentSpellPos(uint16 _talent_id, uint8 _rank)
bool IsBattleArena() const
Definition: DBCStructure.h:566
uint32 resetTimeRaid
Definition: DBCStructure.h:539
uint32 MaxAffectedTargets
Definition: DBCStructure.h:762
uint32 TalentTabID
Definition: DBCStructure.h:945
uint32 TaxiMask[TaxiMaskSize]
uint32 MapID
Definition: DBCStructure.h:514
uint32 DisplayId
Definition: DBCStructure.h:421
uint32 manaCostPerlevel
Definition: DBCStructure.h:711
uint32 FacingCasterFlags
Definition: DBCStructure.h:691
uint32 MaxTargetLevel
Definition: DBCStructure.h:759
uint32 requiredlockskill
Definition: DBCStructure.h:500
uint32 SpellVisual
Definition: DBCStructure.h:743
uint32 DependsOnSpell
Definition: DBCStructure.h:940
uint32 Stances
Definition: DBCStructure.h:686
uint32 CasterAuraState
Definition: DBCStructure.h:692
bool IsNeutralToAll() const
Definition: DBCStructure.h:334
std::set< uint32 > SpellCategorySet
Definition: DBCStructure.h:828
std::map< uint32, TaxiPathSetForSource > TaxiPathSetBySource
bool HasAttribute(SpellAttributesEx6 attribute) const
Definition: DBCStructure.h:780
SpellAttributesEx3
float entrance_x
Definition: DBCStructure.h:537
uint32 required_skill_id
Definition: DBCStructure.h:479
uint32 linked_zone
Definition: DBCStructure.h:522
uint32 TargetCreatureType
Definition: DBCStructure.h:689
bool HasAttribute(SpellAttributesEx attribute) const
Definition: DBCStructure.h:775
uint32 DependsOn
Definition: DBCStructure.h:936
bool Instanceable() const
Definition: DBCStructure.h:554
uint32 manaPerSecondPerLevel
Definition: DBCStructure.h:713
uint32 Flags
Definition: DBCStructure.h:249
bool IsContinent() const
Definition: DBCStructure.h:583
uint32 AttributesEx2
Definition: DBCStructure.h:681
uint32 ChannelInterruptFlags
Definition: DBCStructure.h:701
uint32 procCharges
Definition: DBCStructure.h:704
uint32 InterruptFlags
Definition: DBCStructure.h:699
uint32 procChance
Definition: DBCStructure.h:703
bool HasAttribute(SpellAttributesEx5 attribute) const
Definition: DBCStructure.h:779
uint32 baseLevel
Definition: DBCStructure.h:706
Path< TaxiPathNodePtr, TaxiPathNodeEntry const > TaxiPathNodeList
ACE_INT32 int32
Definition: Define.h:67
int32 EquippedItemClass
Definition: DBCStructure.h:721
uint32 powerType
Definition: DBCStructure.h:709
uint32 resetTimeHeroic
Definition: DBCStructure.h:540
uint32 DmgClass
Definition: DBCStructure.h:763
int GetIndexFitTo(uint32 raceMask, uint32 classMask) const
Definition: DBCStructure.h:282
bool HasEffect(uint8 effect) const
Definition: DBCStructure.h:783
std::map< uint32, SpellCategorySet > SpellCategoryStore
Definition: DBCStructure.h:829
uint32 FactionID
Definition: DBCStructure.h:156
uint32 addon
Definition: DBCStructure.h:542
SpellAttributesEx2
std::map< uint32, TaxiPathBySourceAndDestination > TaxiPathSetForSource
TotemCategory
SpellAttributes
uint32 rangeIndex
Definition: DBCStructure.h:714
uint32 procFlags
Definition: DBCStructure.h:702
uint32 ID
Definition: DBCStructure.h:494
uint32 multimap_id
Definition: DBCStructure.h:528
SpellAttributesEx5
uint32 RequiresSpellFocus
Definition: DBCStructure.h:690
std::map< uint32, PetFamilySpellsSet > PetFamilySpellsStore
Definition: DBCStructure.h:831
uint32 CastingTimeIndex
Definition: DBCStructure.h:696
Definition: Totem.h:31
uint32 horde_mount_type
Definition: DBCStructure.h:964
uint32 Attributes
Definition: DBCStructure.h:679
bool HasAttribute(SpellAttributes attribute) const
Definition: DBCStructure.h:774
uint32 TalentID
Definition: DBCStructure.h:930
int32 EquippedItemSubClassMask
Definition: DBCStructure.h:722
uint32 Dispel
Definition: DBCStructure.h:677
uint32 required_skill_value
Definition: DBCStructure.h:480
bool IsEffect(uint8 effIndex) const
Definition: DBCStructure.h:818
SpellAttributesEx4
ACE_UINT8 uint8
Definition: Define.h:73
uint32 manaPerSecond
Definition: DBCStructure.h:712
uint32 AttributesEx3
Definition: DBCStructure.h:682
Definition: Path.h:32
std::map< uint32, TalentSpellPos > TalentSpellPosMap
bool IsFriendlyTo(FactionTemplateEntry const &entry) const
Definition: DBCStructure.h:314
uint32 AttributesEx4
Definition: DBCStructure.h:683
bool IsBattleground() const
Definition: DBCStructure.h:562
uint32 spellitemenchantement
Definition: DBCStructure.h:361
bool IsHostileToPlayers() const
Definition: DBCStructure.h:330
uint32 StancesNot
Definition: DBCStructure.h:687
DBCPosition3D Origin
Definition: DBCStructure.h:192
uint32 EmoteType
Definition: DBCStructure.h:250
uint32 TalentTab
Definition: DBCStructure.h:931
int32 reputationListID
Definition: DBCStructure.h:264
uint32 Targets
Definition: DBCStructure.h:688
uint32 maxLevel
Definition: DBCStructure.h:705
uint32 StackAmount
Definition: DBCStructure.h:717
float entrance_y
Definition: DBCStructure.h:538
uint64 SpellFamilyFlags
Definition: DBCStructure.h:761
uint32 SpellIconID
Definition: DBCStructure.h:745
uint32 TargetAuraStateNot
Definition: DBCStructure.h:695
#define MAX_OUTFIT_ITEMS
Definition: DBCStructure.h:100
bool IsDungeon() const
Definition: DBCStructure.h:550
bool HasAttribute(SpellAttributesEx4 attribute) const
Definition: DBCStructure.h:778
uint32 SchoolMask
Definition: DBCStructure.h:772
uint32 ID
Definition: DBCStructure.h:420
SpellAttributesEx6
uint32 PreventionType
Definition: DBCStructure.h:764
bool IsRaid() const
Definition: DBCStructure.h:558
uint32 DurationIndex
Definition: DBCStructure.h:708
uint32 TargetAuraState
Definition: DBCStructure.h:693
ACE_UINT64 uint64
Definition: Define.h:70
uint32 CategoryRecoveryTime
Definition: DBCStructure.h:698
uint32 map_type
Definition: DBCStructure.h:516
uint32 GetAllEffectsMechanicMask() const
Definition: DBCStructure.h:807
uint32 UnitStandState
Definition: DBCStructure.h:251
uint32 RecoveryTime
Definition: DBCStructure.h:697
bool IsBattlegroundOrArena() const
Definition: DBCStructure.h:570
uint32 exploreFlag
Definition: DBCStructure.h:44
bool IsContestedGuardFaction() const
Definition: DBCStructure.h:338
int32 EquippedItemInventoryTypeMask
Definition: DBCStructure.h:723
uint32 LiquidTypeOverride
Definition: DBCStructure.h:51
uint32 AreaId
Definition: DBCStructure.h:771
bool HasAttribute(SpellAttributesEx3 attribute) const
Definition: DBCStructure.h:777
TaxiPathNodePtr(TaxiPathNodeEntry const *ptr)
uint32 SpellFamilyName
Definition: DBCStructure.h:760
uint32 Expansion() const
Definition: DBCStructure.h:545
int32 entrance_map
Definition: DBCStructure.h:536
SpellAttributesEx
char * area_name[16]
Definition: DBCStructure.h:48
uint32 InventoryType
Definition: DBCStructure.h:422
uint32 Mechanic
Definition: DBCStructure.h:678
#define MAX_SPELL_EFFECTS
Definition: DBCStructure.h:670
bool HasAttribute(SpellAttributesEx2 attribute) const
Definition: DBCStructure.h:776
uint32 requiredminingskill
Definition: DBCStructure.h:499
uint32 StartRecoveryTime
Definition: DBCStructure.h:758
std::vector< TaxiPathNodeList > TaxiPathNodesByPath
bool HasEffect(uint8 effIndex, uint8 effect) const
Definition: DBCStructure.h:790
bool HasResetTime() const
Definition: DBCStructure.h:578
uint32 ManaCostPercentage
Definition: DBCStructure.h:756
ACE_UINT16 uint16
Definition: Define.h:72
uint32 CinematicSequence
Definition: DBCStructure.h:163
ACE_UINT32 uint32
Definition: Define.h:71
uint32 activeIconID
Definition: DBCStructure.h:746
char const * Model
Definition: DBCStructure.h:190
std::set< uint32 > PetFamilySpellsSet
Definition: DBCStructure.h:830
uint32 Sheath
Definition: DBCStructure.h:423
uint32 AttributesEx5
Definition: DBCStructure.h:684
bool SupportsHeroicMode() const
Definition: DBCStructure.h:574
bool CanHaveReputation() const
Definition: DBCStructure.h:277
bool IsHostileTo(FactionTemplateEntry const &entry) const
Definition: DBCStructure.h:322
#define TaxiMaskSize
uint32 GetEffectMechanicMask(uint8 effIndex) const
Definition: DBCStructure.h:797
uint32 manaCost
Definition: DBCStructure.h:710
uint32 StartRecoveryCategory
Definition: DBCStructure.h:757