Updated to latest client build 9742
[getmangos.git] / src / game / DBCStructure.h
blob14acd6706351471ee654108e1fbd37ceb53308a5
1 /*
2 * Copyright (C) 2005-2009 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 MANGOS_DBCSTRUCTURE_H
20 #define MANGOS_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 AchievementEntry
40 uint32 ID; // 0
41 uint32 factionFlag; // 1 -1=all, 0=horde, 1=alliance
42 uint32 mapID; // 2 -1=none
43 //uint32 parentAchievement; // 3 its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin)
44 //char *name[16]; // 4-19
45 //uint32 name_flags; // 20
46 //char *description[16]; // 21-36
47 //uint32 desc_flags; // 37
48 uint32 categoryId; // 38
49 uint32 points; // 39 reward points
50 //uint32 OrderInCategory; // 40
51 uint32 flags; // 41
52 //uint32 icon; // 42 icon (from SpellIcon.dbc)
53 //char *titleReward[16]; // 43-58
54 //uint32 titleReward_flags; // 59
55 //uint32 count; // 60 - need this count Criteria for complete
56 uint32 refAchievement; // 61 - related achievement?
59 struct AchievementCategoryEntry
61 uint32 ID; // 0
62 uint32 parentCategory; // 1 -1 for main category
63 //char *name[16]; // 2-17
64 //uint32 name_flags; // 18
65 //uint32 sortOrder; // 19
68 struct AchievementCriteriaEntry
70 uint32 ID; // 0
71 uint32 referredAchievement; // 1
72 uint32 requiredType; // 2
73 union
75 // ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0
76 // TODO: also used for player deaths..
77 struct
79 uint32 creatureID; // 3
80 uint32 creatureCount; // 4
81 } kill_creature;
83 // ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1
84 // TODO: there are further criterias instead just winning
85 struct
87 uint32 bgMapID; // 3
88 uint32 winCount; // 4
89 } win_bg;
91 // ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5
92 struct
94 uint32 unused; // 3
95 uint32 level; // 4
96 } reach_level;
98 // ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7
99 struct
101 uint32 skillID; // 3
102 uint32 skillLevel; // 4
103 } reach_skill_level;
105 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8
106 struct
108 uint32 linkedAchievement; // 3
109 } complete_achievement;
111 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9
112 struct
114 uint32 unused; // 3
115 uint32 totalQuestCount; // 4
116 } complete_quest_count;
118 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10
119 struct
121 uint32 unused; // 3
122 uint32 numberOfDays; // 4
123 } complete_daily_quest_daily;
125 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11
126 struct
128 uint32 zoneID; // 3
129 uint32 questCount; // 4
130 } complete_quests_in_zone;
132 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST = 14
133 struct
135 uint32 unused; // 3
136 uint32 questCount; // 4
137 } complete_daily_quest;
139 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND = 15
140 struct
142 uint32 mapID; // 3
143 } complete_battleground;
145 // ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP = 16
146 struct
148 uint32 mapID; // 3
149 } death_at_map;
151 // ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18
152 struct
154 uint32 manLimit; // 3
155 } death_in_dungeon;
157 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19
158 struct
160 uint32 groupSize; // 3 can be 5, 10 or 25
161 } complete_raid;
163 // ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20
164 struct
166 uint32 creatureEntry; // 3
167 } killed_by_creature;
169 // ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING = 24
170 struct
172 uint32 unused; // 3
173 uint32 fallHeight; // 4
174 } fall_without_dying;
176 // ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26
177 struct
179 uint32 type; // 3, see enum EnviromentalDamage
180 } death_from;
182 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27
183 struct
185 uint32 questID; // 3
186 uint32 questCount; // 4
187 } complete_quest;
189 // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28
190 // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2 = 69
191 struct
193 uint32 spellID; // 3
194 uint32 spellCount; // 4
195 } be_spell_target;
197 // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL = 29
198 // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110
199 struct
201 uint32 spellID; // 3
202 uint32 castCount; // 4
203 } cast_spell;
205 // ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31
206 struct
208 uint32 areaID; // 3 Reference to AreaTable.dbc
209 uint32 killCount; // 4
210 } honorable_kill_at_area;
212 // ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32
213 struct
215 uint32 mapID; // 3 Reference to Map.dbc
216 } win_arena;
218 // ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33
219 struct
221 uint32 mapID; // 3 Reference to Map.dbc
222 } play_arena;
224 // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34
225 struct
227 uint32 spellID; // 3 Reference to Map.dbc
228 } learn_spell;
230 // ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36
231 struct
233 uint32 itemID; // 3
234 uint32 itemCount; // 4
235 } own_item;
237 // ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37
238 struct
240 uint32 unused; // 3
241 uint32 count; // 4
242 uint32 flag; // 5 4=in a row
243 } win_rated_arena;
245 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38
246 struct
248 uint32 teamtype; // 3 {2,3,5}
249 } highest_team_rating;
251 // ACHIEVEMENT_CRITERIA_TYPE_REACH_TEAM_RATING = 39
252 struct
254 uint32 teamtype; // 3 {2,3,5}
255 uint32 teamrating; // 4
256 } reach_team_rating;
258 // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40
259 struct
261 uint32 skillID; // 3
262 uint32 skillLevel; // 4 apprentice=1, journeyman=2, expert=3, artisan=4, master=5, grand master=6
263 } learn_skill_level;
265 // ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41
266 struct
268 uint32 itemID; // 3
269 uint32 itemCount; // 4
270 } use_item;
272 // ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM = 42
273 struct
275 uint32 itemID; // 3
276 uint32 itemCount; // 4
277 } loot_item;
279 // ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43
280 struct
282 // TODO: This rank is _NOT_ the index from AreaTable.dbc
283 uint32 areaReference; // 3
284 } explore_area;
286 // ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK = 44
287 struct
289 // TODO: This rank is _NOT_ the index from CharTitles.dbc
290 uint32 rank; // 3
291 } own_rank;
293 // ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT = 45
294 struct
296 uint32 unused; // 3
297 uint32 numberOfSlots; // 4
298 } buy_bank_slot;
300 // ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION = 46
301 struct
303 uint32 factionID; // 3
304 uint32 reputationAmount; // 4 Total reputation amount, so 42000 = exalted
305 } gain_reputation;
307 // ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION= 47
308 struct
310 uint32 unused; // 3
311 uint32 numberOfExaltedFactions; // 4
312 } gain_exalted_reputation;
314 // ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP = 48
315 struct
317 uint32 unused; // 3
318 uint32 numberOfVisits; // 4
319 } visit_barber;
321 // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49
322 // TODO: where is the required itemlevel stored?
323 struct
325 uint32 itemSlot; // 3
326 } equip_epic_item;
328 // ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50
329 struct
331 uint32 rollValue; // 3
332 uint32 count; // 4
333 } roll_need_on_loot;
334 // ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51
335 struct
337 uint32 rollValue; // 3
338 uint32 count; // 4
339 } roll_greed_on_loot;
341 // ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52
342 struct
344 uint32 classID; // 3
345 uint32 count; // 4
346 } hk_class;
348 // ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53
349 struct
351 uint32 raceID; // 3
352 uint32 count; // 4
353 } hk_race;
355 // ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54
356 // TODO: where is the information about the target stored?
357 struct
359 uint32 emoteID; // 3 enum TextEmotes
360 uint32 count; // 4 count of emotes, always required special target or requirements
361 } do_emote;
362 // ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13
363 // ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE = 55
364 // ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS = 56
365 struct
367 uint32 unused; // 3
368 uint32 count; // 4
369 uint32 flag; // 5 =3 for battleground healing
370 uint32 mapid; // 6
371 } healing_done;
373 // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57
374 struct
376 uint32 itemID; // 3
377 uint32 count; // 4
378 } equip_item;
380 // ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD= 62
381 struct
383 uint32 unused; // 3
384 uint32 goldInCopper; // 4
385 } quest_reward_money;
388 // ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67
389 struct
391 uint32 unused; // 3
392 uint32 goldInCopper; // 4
393 } loot_money;
395 // ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68
396 struct
398 uint32 goEntry; // 3
399 uint32 useCount; // 4
400 } use_gameobject;
402 // ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL = 70
403 // TODO: are those special criteria stored in the dbc or do we have to add another sql table?
404 struct
406 uint32 unused; // 3
407 uint32 killCount; // 4
408 } special_pvp_kill;
410 // ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72
411 struct
413 uint32 goEntry; // 3
414 uint32 lootCount; // 4
415 } fish_in_gameobject;
417 // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS = 75
418 struct
420 uint32 skillLine; // 3
421 uint32 spellCount; // 4
422 } learn_skilline_spell;
424 // ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL = 76
425 struct
427 uint32 unused; // 3
428 uint32 duelCount; // 4
429 } win_duel;
431 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96
432 struct
434 uint32 powerType; // 3 mana=0, 1=rage, 3=energy, 6=runic power
435 } highest_power;
437 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97
438 struct
440 uint32 statType; // 3 4=spirit, 3=int, 2=stamina, 1=agi, 0=strength
441 } highest_stat;
443 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98
444 struct
446 uint32 spellSchool; // 3
447 } highest_spellpower;
449 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING = 100
450 struct
452 uint32 ratingType; // 3
453 } highest_rating;
455 // ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109
456 struct
458 uint32 lootType; // 3 3=fishing, 2=pickpocket, 4=disentchant
459 uint32 lootTypeCount; // 4
460 } loot_type;
462 // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE = 112
463 struct
465 uint32 skillLine; // 3
466 uint32 spellCount; // 4
467 } learn_skill_line;
469 // ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113
470 struct
472 uint32 unused; // 3
473 uint32 killCount; // 4
474 } honorable_kill;
476 struct
478 uint32 field3; // 3 main requirement
479 uint32 field4; // 4 main requirement count
480 uint32 additionalRequirement1_type; // 5 additional requirement 1 type
481 uint32 additionalRequirement1_value; // 6 additional requirement 1 value
482 uint32 additionalRequirement2_type; // 7 additional requirement 2 type
483 uint32 additionalRequirement2_value; // 8 additional requirement 1 value
484 } raw;
486 //char* name[16]; // 9-24
487 //uint32 name_flags; // 25
488 uint32 completionFlag; // 26
489 uint32 groupFlag; // 27
490 //uint32 unk1; // 28
491 uint32 timeLimit; // 29 time limit in seconds
492 //uint32 showOrder; // 30 show order
495 struct AreaTableEntry
497 uint32 ID; // 0
498 uint32 mapid; // 1
499 uint32 zone; // 2 if 0 then it's zone, else it's zone id of this area
500 uint32 exploreFlag; // 3, main index
501 uint32 flags; // 4, unknown value but 312 for all cities
502 // 5-9 unused
503 int32 area_level; // 10
504 char* area_name[16]; // 11-26
505 // 27, string flags, unused
506 uint32 team; // 28
509 struct AreaGroupEntry
511 uint32 AreaGroupId; // 0
512 uint32 AreaId[7]; // 1-7
515 struct AreaTriggerEntry
517 uint32 id; // 0 m_ID
518 uint32 mapid; // 1 m_ContinentID
519 float x; // 2 m_x
520 float y; // 3 m_y
521 float z; // 4 m_z
522 float radius; // 5 m_radius
523 float box_x; // 6 m_box_length
524 float box_y; // 7 m_box_width
525 float box_z; // 8 m_box_heigh
526 float box_orientation; // 9 m_box_yaw
529 struct AuctionHouseEntry
531 uint32 houseId; // 0 index
532 uint32 faction; // 1 id of faction.dbc for player factions associated with city
533 uint32 depositPercent; // 2 1/3 from real
534 uint32 cutPercent; // 3
535 //char* name[16]; // 4-19
536 // 20 string flag, unused
539 struct BankBagSlotPricesEntry
541 uint32 ID;
542 uint32 price;
545 struct BarberShopStyleEntry
547 uint32 Id; // 0
548 uint32 type; // 1 value 0 -> hair, value 2 -> facialhair
549 //char* name[16]; // 2-17 name of hair style
550 //uint32 name_flags; // 18
551 //uint32 unk_name[16]; // 19-34, all empty
552 //uint32 unk_flags; // 35
553 //float CostMultiplier; // 36 values 1 and 0.75
554 uint32 race; // 37 race
555 uint32 gender; // 38 0 -> male, 1 -> female
556 uint32 hair_id; // 39 real ID to hair/facial hair
559 struct BattlemasterListEntry
561 uint32 id; // 0
562 int32 mapid[8]; // 1-8 mapid
563 uint32 type; // 9 (3 - BG, 4 - arena)
564 uint32 minlvl; // 10
565 uint32 maxlvl; // 11
566 uint32 maxplayersperteam; // 12
567 // 13 minplayers
568 // 14 0 or 9
569 // 15
570 char* name[16]; // 16-31
571 // 32 string flag, unused
572 // 33 unused
573 //uint32 unk; // 34 new 3.1
576 #define MAX_OUTFIT_ITEMS 24
578 struct CharStartOutfitEntry
580 //uint32 Id; // 0
581 uint32 RaceClassGender; // 1 (UNIT_FIELD_BYTES_0 & 0x00FFFFFF) comparable (0 byte = race, 1 byte = class, 2 byte = gender)
582 int32 ItemId[MAX_OUTFIT_ITEMS]; // 2-13
583 //int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 14-25 not required at server side
584 //int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 26-37 not required at server side
585 //uint32 Unknown1; // 38, unique values (index-like with gaps ordered in other way as ids)
586 //uint32 Unknown2; // 39
587 //uint32 Unknown3; // 40
590 struct CharTitlesEntry
592 uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()
593 //uint32 unk1; // 1 flags?
594 //char* name[16]; // 2-17, unused
595 // 18 string flag, unused
596 //char* name2[16]; // 19-34, unused
597 // 35 string flag, unused
598 uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
601 struct ChatChannelsEntry
603 uint32 ChannelID; // 0
604 uint32 flags; // 1
605 char* pattern[16]; // 3-18
606 // 19 string flags, unused
607 //char* name[16]; // 20-35 unused
608 // 36 string flag, unused
611 struct ChrClassesEntry
613 uint32 ClassID; // 0
614 // 1, unused
615 uint32 powerType; // 2
616 // 3-4, unused
617 //char* name[16]; // 5-20 unused
618 // 21 string flag, unused
619 //char* nameFemale[16]; // 21-36 unused, if different from base (male) case
620 // 37 string flag, unused
621 //char* nameNeutralGender[16]; // 38-53 unused, if different from base (male) case
622 // 54 string flag, unused
623 // 55, unused
624 uint32 spellfamily; // 56
625 // 57, unused
626 uint32 CinematicSequence; // 58 id from CinematicSequences.dbc
627 uint32 addon; // 59 (0 - original race, 1 - tbc addon, ...)
630 struct ChrRacesEntry
632 uint32 RaceID; // 0
633 // 1 unused
634 uint32 FactionID; // 2 facton template id
635 // 3 unused
636 uint32 model_m; // 4
637 uint32 model_f; // 5
638 // 6-7 unused
639 uint32 TeamID; // 8 (7-Alliance 1-Horde)
640 // 9-12 unused
641 uint32 CinematicSequence; // 13 id from CinematicSequences.dbc
642 char* name[16]; // 14-29 used for DBC language detection/selection
643 // 30 string flags, unused
644 //char* nameFemale[16]; // 31-46, if different from base (male) case
645 // 47 string flags, unused
646 //char* nameNeutralGender[16]; // 48-63, if different from base (male) case
647 // 64 string flags, unused
648 // 65-67 unused
649 uint32 addon; // 68 (0 - original race, 1 - tbc addon, ...)
652 struct CreatureDisplayInfoEntry
654 uint32 Displayid; // 0 m_ID
655 // 1 m_modelID
656 // 2 m_soundID
657 // 3 m_extendedDisplayInfoID
658 float scale; // 4 m_creatureModelScale
659 // 5 m_creatureModelAlpha
660 // 6-8 m_textureVariation[3]
661 // 9 m_portraitTextureName
662 // 10 m_sizeClass
663 // 11 m_bloodID
664 // 12 m_NPCSoundID
665 // 13 m_particleColorID
666 // 14 m_creatureGeosetData
667 // 15 m_objectEffectPackageID
670 struct CreatureFamilyEntry
672 uint32 ID; // 0 m_ID
673 float minScale; // 1 m_minScale
674 uint32 minScaleLevel; // 2 m_minScaleLevel
675 float maxScale; // 3 m_maxScale
676 uint32 maxScaleLevel; // 4 m_maxScaleLevel
677 uint32 skillLine[2]; // 5-6 m_skillLine
678 uint32 petFoodMask; // 7 m_petFoodMask
679 int32 petTalentType; // 8 m_petTalentType
680 // 9 m_categoryEnumID
681 char* Name[16]; // 10-25 m_name_lang
682 // 26 string flags
683 // 27 m_iconFile
686 struct CreatureSpellDataEntry
688 uint32 ID; // 0 m_ID
689 //uint32 spellId[4]; // 1-4 m_spells[4]
690 //uint32 availability[4]; // 4-7 m_availability[4]
693 struct CreatureTypeEntry
695 uint32 ID; // 0 m_ID
696 //char* Name[16]; // 1-16 name
697 // 17 string flags
698 //uint32 no_expirience; // 18 no exp? critters, non-combat pets, gas cloud.
701 /* not used
702 struct CurrencyCategoryEntry
704 uint32 ID; // 0
705 uint32 Unk1; // 1 0 for known categories and 3 for unknown one (3.0.9)
706 char* Name[16]; // 2-17 name
707 // // 18 string flags
711 struct CurrencyTypesEntry
713 //uint32 ID; // 0 not used
714 uint32 ItemId; // 1 used as real index
715 //uint32 Category; // 2 may be category
716 uint32 BitIndex; // 3 bit index in PLAYER_FIELD_KNOWN_CURRENCIES (1 << (index-1))
719 struct DurabilityCostsEntry
721 uint32 Itemlvl; // 0
722 uint32 multiplier[29]; // 1-29
725 struct DurabilityQualityEntry
727 uint32 Id; // 0
728 float quality_mod; // 1
731 struct EmotesTextEntry
733 uint32 Id;
734 uint32 textid;
737 struct FactionEntry
739 uint32 ID; // 0 m_ID
740 int32 reputationListID; // 1 m_reputationIndex
741 uint32 BaseRepRaceMask[4]; // 2-5 m_reputationRaceMask
742 uint32 BaseRepClassMask[4]; // 6-9 m_reputationClassMask
743 int32 BaseRepValue[4]; // 10-13 m_reputationBase
744 uint32 ReputationFlags[4]; // 14-17 m_reputationFlags
745 uint32 team; // 18 m_parentFactionID
746 char* name[16]; // 19-34 m_name_lang
747 // 35 string flags
748 //char* description[16]; // 36-51 m_description_lang
749 // 52 string flags
752 struct FactionTemplateEntry
754 uint32 ID; // 0 m_ID
755 uint32 faction; // 1 m_faction
756 uint32 factionFlags; // 2 m_flags
757 uint32 ourMask; // 3 m_factionGroup
758 uint32 friendlyMask; // 4 m_friendGroup
759 uint32 hostileMask; // 5 m_enemyGroup
760 uint32 enemyFaction[4]; // 6 m_enemies[4]
761 uint32 friendFaction[4]; // 10 m_friend[4]
762 //------------------------------------------------------- end structure
764 // helpers
765 bool IsFriendlyTo(FactionTemplateEntry const& entry) const
767 if(entry.faction)
769 for(int i = 0; i < 4; ++i)
770 if (enemyFaction[i] == entry.faction)
771 return false;
772 for(int i = 0; i < 4; ++i)
773 if (friendFaction[i] == entry.faction)
774 return true;
776 return (friendlyMask & entry.ourMask) || (ourMask & entry.friendlyMask);
778 bool IsHostileTo(FactionTemplateEntry const& entry) const
780 if(entry.faction)
782 for(int i = 0; i < 4; ++i)
783 if (enemyFaction[i] == entry.faction)
784 return true;
785 for(int i = 0; i < 4; ++i)
786 if (friendFaction[i] == entry.faction)
787 return false;
789 return (hostileMask & entry.ourMask) != 0;
791 bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) !=0; }
792 bool IsNeutralToAll() const
794 for(int i = 0; i < 4; ++i)
795 if (enemyFaction[i] != 0)
796 return false;
797 return hostileMask == 0 && friendlyMask == 0;
799 bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD)!=0; }
802 struct GemPropertiesEntry
804 uint32 ID;
805 uint32 spellitemenchantement;
806 uint32 color;
809 struct GlyphPropertiesEntry
811 uint32 Id;
812 uint32 SpellId;
813 uint32 TypeFlags;
814 uint32 Unk1; // GlyphIconId (SpellIcon.dbc)
817 struct GlyphSlotEntry
819 uint32 Id;
820 uint32 TypeFlags;
821 uint32 Order;
824 // All Gt* DBC store data for 100 levels, some by 100 per class/race
825 #define GT_MAX_LEVEL 100
827 struct GtBarberShopCostBaseEntry
829 float cost;
832 struct GtCombatRatingsEntry
834 float ratio;
837 struct GtChanceToMeleeCritBaseEntry
839 float base;
842 struct GtChanceToMeleeCritEntry
844 float ratio;
847 struct GtChanceToSpellCritBaseEntry
849 float base;
852 struct GtChanceToSpellCritEntry
854 float ratio;
857 struct GtOCTRegenHPEntry
859 float ratio;
862 //struct GtOCTRegenMPEntry
864 // float ratio;
865 //};
867 struct GtRegenHPPerSptEntry
869 float ratio;
872 struct GtRegenMPPerSptEntry
874 float ratio;
877 /* no used
878 struct HolidayDescriptionsEntry
880 uint32 ID; // 0, this is NOT holiday id
881 //char* name[16] // 1-16 m_name_lang
882 // 17 name flags
886 /* no used
887 struct HolidayNamesEntry
889 uint32 ID; // 0, this is NOT holiday id
890 //char* name[16] // 1-16 m_name_lang
891 // 17 name flags
895 struct HolidaysEntry
897 uint32 ID; // 0, holiday id
898 //uint32 unk1; // 1
899 //uint32 unk2; // 2
900 //uint32 unk3[8] // 3-10, empty fields
901 //uint32 unk11[13] // 11-23, some unknown data (bit strings?)
902 //uint32 unk11[13] // 24-36, some empty fields (continue prev?)
903 //uint32 unk11[12] // 37-48, counters?
904 //uint32 holidayNameId; // 49, id for HolidayNames.dbc
905 //uint32 holidayDescriptionId; // 50, id for HolidayDescriptions.dbc
906 //uint32 unk51; // 51
907 //uint32 unk52; // 52
908 //uint32 unk53; // 53
911 struct ItemEntry
913 uint32 ID; // 0
914 uint32 Class; // 1
915 //uint32 SubClass; // 2 some items have strnage subclasses
916 int32 Unk0; // 3
917 int32 Material; // 4
918 uint32 DisplayId; // 5
919 uint32 InventoryType; // 6
920 uint32 Sheath; // 7
923 struct ItemBagFamilyEntry
925 uint32 ID; // 0
926 //char* name[16] // 1-16 m_name_lang
927 // // 17 name flags
930 struct ItemDisplayInfoEntry
932 uint32 ID; // 0 m_ID
933 // 1 m_modelName[2]
934 // 2 m_modelTexture[2]
935 // 3 m_inventoryIcon
936 // 4 m_geosetGroup[3]
937 // 5 m_flags
938 // 6 m_spellVisualID
939 // 7 m_groupSoundIndex
940 // 8 m_helmetGeosetVis[2]
941 // 9 m_texture[2]
942 // 10 m_itemVisual[8]
943 // 11 m_particleColorID
946 //struct ItemCondExtCostsEntry
948 // uint32 ID;
949 // uint32 condExtendedCost; // ItemPrototype::CondExtendedCost
950 // uint32 itemextendedcostentry; // ItemPrototype::ExtendedCost
951 // uint32 arenaseason; // arena season number(1-4)
952 //};
954 struct ItemExtendedCostEntry
956 uint32 ID; // 0 extended-cost entry id
957 uint32 reqhonorpoints; // 1 required honor points
958 uint32 reqarenapoints; // 2 required arena points
959 uint32 reqitem[5]; // 3-7 required item id
960 uint32 reqitemcount[5]; // 8-12 required count of 1st item
961 uint32 reqpersonalarenarating; // 13 required personal arena rating
964 struct ItemLimitCategoryEntry
966 uint32 ID; // 0 Id
967 //char* name[16] // 1-16 m_name_lang
968 // 17 name flags
969 uint32 maxCount; // max allowed equipped as item or in gem slot
970 //uint32 unk; // 1 for prismatic gems only...
973 struct ItemRandomPropertiesEntry
975 uint32 ID; // 0 m_ID
976 //char* internalName // 1 m_Name
977 uint32 enchant_id[5]; // 2-6 m_Enchantment
978 //char* nameSuffix[16] // 7-22 m_name_lang
979 // 23 name flags
982 struct ItemRandomSuffixEntry
984 uint32 ID; // 0 m_ID
985 //char* name[16] // 1-16 m_name_lang
986 // 17, name flags
987 // 18 m_internalName
988 uint32 enchant_id[5]; // 19-21 m_enchantment
989 uint32 prefix[5]; // 22-24 m_allocationPct
992 struct ItemSetEntry
994 //uint32 id // 0 m_ID
995 char* name[16]; // 1-16 m_name_lang
996 // 17 string flags, unused
997 //uint32 itemId[17]; // 18-34 m_itemID
998 uint32 spells[8]; // 35-42 m_setSpellID
999 uint32 items_to_triggerspell[8]; // 43-50 m_setThreshold
1000 uint32 required_skill_id; // 51 m_requiredSkill
1001 uint32 required_skill_value; // 52 m_requiredSkillRank
1004 #define MAX_LOCK_CASE 8
1006 struct LockEntry
1008 uint32 ID; // 0 m_ID
1009 uint32 Type[MAX_LOCK_CASE]; // 1-8 m_Type
1010 uint32 Index[MAX_LOCK_CASE]; // 9-16 m_Index
1011 uint32 Skill[MAX_LOCK_CASE]; // 17-24 m_Skill
1012 //uint32 Action[MAX_LOCK_CASE]; // 25-32 m_Action
1015 struct MailTemplateEntry
1017 uint32 ID; // 0
1018 //char* subject[16]; // 1-16
1019 // 17 name flags, unused
1020 //char* content[16]; // 18-33
1023 struct MapEntry
1025 uint32 MapID; // 0
1026 //char* internalname; // 1 unused
1027 uint32 map_type; // 2
1028 // 3 0 or 1 for battlegrounds (not arenas)
1029 char* name[16]; // 4-19
1030 // 20 name flags, unused
1031 uint32 linked_zone; // 21 common zone for instance and continent map
1032 //char* hordeIntro[16]; // 23-37 text for PvP Zones
1033 // 38 intro text flags
1034 //char* allianceIntro[16]; // 39-54 text for PvP Zones
1035 // 55 intro text flags
1036 uint32 multimap_id; // 56
1037 // 57
1038 //chat* unknownText1[16]; // 58-73 unknown empty text fields, possible normal Intro text.
1039 // 74 text flags
1040 //chat* heroicIntroText[16]; // 75-90 heroic mode requirement text
1041 // 91 text flags
1042 //chat* unknownText2[16]; // 92-107 unknown empty text fields
1043 // 108 text flags
1044 int32 entrance_map; // 109 map_id of entrance map
1045 float entrance_x; // 110 entrance x coordinate (if exist single entry)
1046 float entrance_y; // 111 entrance y coordinate (if exist single entry)
1047 uint32 resetTimeRaid; // 112
1048 uint32 resetTimeHeroic; // 113
1049 // 114 all 0
1050 // 115 -1, 0 and 720
1051 uint32 addon; // 116 (0-original maps,1-tbc addon)
1052 // 117 some kind of time?
1054 // Helpers
1055 uint32 Expansion() const { return addon; }
1058 bool IsDungeon() const { return map_type == MAP_INSTANCE || map_type == MAP_RAID; }
1059 bool Instanceable() const { return map_type == MAP_INSTANCE || map_type == MAP_RAID || map_type == MAP_BATTLEGROUND || map_type == MAP_ARENA; }
1060 bool IsRaid() const { return map_type == MAP_RAID; }
1061 bool IsBattleGround() const { return map_type == MAP_BATTLEGROUND; }
1062 bool IsBattleArena() const { return map_type == MAP_ARENA; }
1063 bool IsBattleGroundOrArena() const { return map_type == MAP_BATTLEGROUND || map_type == MAP_ARENA; }
1064 bool SupportsHeroicMode() const { return resetTimeHeroic != 0; }
1065 bool HasResetTime() const { return resetTimeHeroic || resetTimeRaid; }
1067 bool IsMountAllowed() const
1069 return !IsDungeon() ||
1070 MapID==209 || MapID==269 || MapID==309 || // TanarisInstance, CavernsOfTime, Zul'gurub
1071 MapID==509 || MapID==534 || MapID==560 || // AhnQiraj, HyjalPast, HillsbradPast
1072 MapID==568 || MapID==580 || MapID==615 || // ZulAman, Sunwell Plateau, Obsidian Sanctrum
1073 MapID==616; // Eye Of Eternity
1076 bool IsContinent() const
1078 return MapID == 0 || MapID == 1 || MapID == 530 || MapID == 571;
1082 struct QuestSortEntry
1084 uint32 id; // 0 m_ID
1085 //char* name[16]; // 1-16 m_SortName_lang
1086 // 17 name flags
1089 struct RandomPropertiesPointsEntry
1091 //uint32 Id; // 0 hidden key
1092 uint32 itemLevel; // 1
1093 uint32 EpicPropertiesPoints[5]; // 2-6
1094 uint32 RarePropertiesPoints[5]; // 7-11
1095 uint32 UncommonPropertiesPoints[5]; // 12-16
1098 struct ScalingStatDistributionEntry
1100 uint32 Id;
1101 uint32 StatMod[10];
1102 uint32 Modifier[10];
1103 uint32 MaxLevel;
1106 struct ScalingStatValuesEntry
1108 uint32 Id;
1109 uint32 Level;
1110 uint32 Multiplier[17];
1113 //struct SkillLineCategoryEntry{
1114 // uint32 id; // 0 m_ID
1115 // char* name[16]; // 1-17 m_name_lang
1116 // // 18 string flag
1117 // uint32 displayOrder; // 19 m_sortIndex
1118 //};
1120 //struct SkillRaceClassInfoEntry{
1121 // uint32 id; // 0 m_ID
1122 // uint32 skillId; // 1 m_skillID
1123 // uint32 raceMask; // 2 m_raceMask
1124 // uint32 classMask; // 3 m_classMask
1125 // uint32 flags; // 4 m_flags
1126 // uint32 reqLevel; // 5 m_minLevel
1127 // uint32 skillTierId; // 6 m_skillTierID
1128 // uint32 skillCostID; // 7 m_skillCostIndex
1129 //};
1131 //struct SkillTiersEntry{
1132 // uint32 id; // 0 m_ID
1133 // uint32 skillValue[16]; // 1-17 m_cost
1134 // uint32 maxSkillValue[16]; // 18-32 m_valueMax
1135 //};
1137 struct SkillLineEntry
1139 uint32 id; // 0 m_ID
1140 int32 categoryId; // 1 m_categoryID
1141 //uint32 skillCostID; // 2 m_skillCostsID
1142 char* name[16]; // 3-18 m_displayName_lang
1143 // 19 string flags
1144 //char* description[16]; // 20-35 m_description_lang
1145 // 36 string flags
1146 uint32 spellIcon; // 37 m_spellIconID
1147 //char* alternateVerb[16]; // 38-53 m_alternateVerb_lang
1148 // 54 string flags
1149 // 55 m_canLink
1152 struct SkillLineAbilityEntry
1154 uint32 id; // 0 m_ID
1155 uint32 skillId; // 1 m_skillLine
1156 uint32 spellId; // 2 m_spell
1157 uint32 racemask; // 3 m_raceMask
1158 uint32 classmask; // 4 m_classMask
1159 //uint32 racemaskNot; // 5 m_excludeRace
1160 //uint32 classmaskNot; // 6 m_excludeClass
1161 uint32 req_skill_value; // 7 m_minSkillLineRank
1162 uint32 forward_spellid; // 8 m_supercededBySpell
1163 uint32 learnOnGetSkill; // 9 m_acquireMethod
1164 uint32 max_value; // 10 m_trivialSkillLineRankHigh
1165 uint32 min_value; // 11 m_trivialSkillLineRankLow
1166 //uint32 characterPoints[2]; // 12-13 m_characterPoints[2]
1169 struct SoundEntriesEntry
1171 uint32 Id; // 0 m_ID
1172 //uint32 Type; // 1 m_soundType
1173 //char* InternalName; // 2 m_name
1174 //char* FileName[10]; // 3-12 m_File[10]
1175 //uint32 Unk13[10]; // 13-22 m_Freq[10]
1176 //char* Path; // 23 m_DirectoryBase
1177 // 24 m_volumeFloat
1178 // 25 m_flags
1179 // 26 m_minDistance
1180 // 27 m_distanceCutoff
1181 // 28 m_EAXDef
1182 // 29 new in 3.1
1185 struct SpellEntry
1187 uint32 Id; // 0 m_ID
1188 uint32 Category; // 1 m_category
1189 uint32 Dispel; // 2 m_dispelType
1190 uint32 Mechanic; // 3 m_mechanic
1191 uint32 Attributes; // 4 m_attribute
1192 uint32 AttributesEx; // 5 m_attributesEx
1193 uint32 AttributesEx2; // 6 m_attributesExB
1194 uint32 AttributesEx3; // 7 m_attributesExC
1195 uint32 AttributesEx4; // 8 m_attributesExD
1196 uint32 AttributesEx5; // 9 m_attributesExE
1197 //uint32 AttributesEx6; // 10 m_attributesExF not used
1198 uint32 Stances; // 11 m_shapeshiftMask
1199 uint32 StancesNot; // 12 m_shapeshiftExclude
1200 uint32 Targets; // 13 m_targets
1201 uint32 TargetCreatureType; // 14 m_targetCreatureType
1202 uint32 RequiresSpellFocus; // 15 m_requiresSpellFocus
1203 uint32 FacingCasterFlags; // 16 m_facingCasterFlags
1204 uint32 CasterAuraState; // 17 m_casterAuraState
1205 uint32 TargetAuraState; // 18 m_targetAuraState
1206 uint32 CasterAuraStateNot; // 19 m_excludeCasterAuraState
1207 uint32 TargetAuraStateNot; // 20 m_excludeTargetAuraState
1208 uint32 casterAuraSpell; // 21 m_casterAuraSpell
1209 uint32 targetAuraSpell; // 22 m_targetAuraSpell
1210 uint32 excludeCasterAuraSpell; // 23 m_excludeCasterAuraSpell
1211 uint32 excludeTargetAuraSpell; // 24 m_excludeTargetAuraSpell
1212 uint32 CastingTimeIndex; // 25 m_castingTimeIndex
1213 uint32 RecoveryTime; // 26 m_recoveryTime
1214 uint32 CategoryRecoveryTime; // 27 m_categoryRecoveryTime
1215 uint32 InterruptFlags; // 28 m_interruptFlags
1216 uint32 AuraInterruptFlags; // 29 m_auraInterruptFlags
1217 uint32 ChannelInterruptFlags; // 30 m_channelInterruptFlags
1218 uint32 procFlags; // 31 m_procTypeMask
1219 uint32 procChance; // 32 m_procChance
1220 uint32 procCharges; // 33 m_procCharges
1221 uint32 maxLevel; // 34 m_maxLevel
1222 uint32 baseLevel; // 35 m_baseLevel
1223 uint32 spellLevel; // 36 m_spellLevel
1224 uint32 DurationIndex; // 37 m_durationIndex
1225 uint32 powerType; // 38 m_powerType
1226 uint32 manaCost; // 39 m_manaCost
1227 uint32 manaCostPerlevel; // 40 m_manaCostPerLevel
1228 uint32 manaPerSecond; // 41 m_manaPerSecond
1229 uint32 manaPerSecondPerLevel; // 42 m_manaPerSecondPerLeve
1230 uint32 rangeIndex; // 43 m_rangeIndex
1231 float speed; // 44 m_speed
1232 //uint32 modalNextSpell; // 45 m_modalNextSpell not used
1233 uint32 StackAmount; // 46 m_cumulativeAura
1234 uint32 Totem[2]; // 47-48 m_totem
1235 int32 Reagent[8]; // 49-56 m_reagent
1236 uint32 ReagentCount[8]; // 57-64 m_reagentCount
1237 int32 EquippedItemClass; // 65 m_equippedItemClass (value)
1238 int32 EquippedItemSubClassMask; // 66 m_equippedItemSubclass (mask)
1239 int32 EquippedItemInventoryTypeMask; // 67 m_equippedItemInvTypes (mask)
1240 uint32 Effect[3]; // 68-70 m_effect
1241 int32 EffectDieSides[3]; // 71-73 m_effectDieSides
1242 uint32 EffectBaseDice[3]; // 74-76 m_effectBaseDice
1243 float EffectDicePerLevel[3]; // 77-79 m_effectDicePerLevel
1244 float EffectRealPointsPerLevel[3]; // 80-82 m_effectRealPointsPerLevel
1245 int32 EffectBasePoints[3]; // 83-85 m_effectBasePoints (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
1246 uint32 EffectMechanic[3]; // 86-88 m_effectMechanic
1247 uint32 EffectImplicitTargetA[3]; // 89-91 m_implicitTargetA
1248 uint32 EffectImplicitTargetB[3]; // 92-94 m_implicitTargetB
1249 uint32 EffectRadiusIndex[3]; // 95-97 m_effectRadiusIndex - spellradius.dbc
1250 uint32 EffectApplyAuraName[3]; // 98-100 m_effectAura
1251 uint32 EffectAmplitude[3]; // 101-103 m_effectAuraPeriod
1252 float EffectMultipleValue[3]; // 104-106 m_effectAmplitude
1253 uint32 EffectChainTarget[3]; // 107-109 m_effectChainTargets
1254 uint32 EffectItemType[3]; // 110-112 m_effectItemType
1255 int32 EffectMiscValue[3]; // 113-115 m_effectMiscValue
1256 int32 EffectMiscValueB[3]; // 116-118 m_effectMiscValueB
1257 uint32 EffectTriggerSpell[3]; // 119-121 m_effectTriggerSpell
1258 float EffectPointsPerComboPoint[3]; // 122-124 m_effectPointsPerCombo
1259 uint32 EffectSpellClassMaskA[3]; // 125-127 m_effectSpellClassMaskA
1260 uint32 EffectSpellClassMaskB[3]; // 128-130 m_effectSpellClassMaskB
1261 uint32 EffectSpellClassMaskC[3]; // 131-133 m_effectSpellClassMaskC
1262 uint32 SpellVisual[2]; // 134-135 m_spellVisualID
1263 uint32 SpellIconID; // 136 m_spellIconID
1264 uint32 activeIconID; // 137 m_activeIconID
1265 //uint32 spellPriority; // 138 m_spellPriority not used
1266 char* SpellName[16]; // 139-154 m_name_lang
1267 //uint32 SpellNameFlag; // 155 not used
1268 char* Rank[16]; // 156-171 m_nameSubtext_lang
1269 //uint32 RankFlags; // 172 not used
1270 //char* Description[16]; // 173-188 m_description_lang not used
1271 //uint32 DescriptionFlags; // 189 not used
1272 //char* ToolTip[16]; // 190-205 m_auraDescription_lang not used
1273 //uint32 ToolTipFlags; // 206 not used
1274 uint32 ManaCostPercentage; // 207 m_manaCostPct
1275 uint32 StartRecoveryCategory; // 208 m_startRecoveryCategory
1276 uint32 StartRecoveryTime; // 209 m_startRecoveryTime
1277 uint32 MaxTargetLevel; // 210 m_maxTargetLevel
1278 uint32 SpellFamilyName; // 211 m_spellClassSet
1279 uint64 SpellFamilyFlags; // 212-213 m_spellClassMask NOTE: size is 12 bytes!!!
1280 uint32 SpellFamilyFlags2; // 214 addition to m_spellClassMask
1281 uint32 MaxAffectedTargets; // 215 m_maxTargets
1282 uint32 DmgClass; // 216 m_defenseType
1283 uint32 PreventionType; // 217 m_preventionType
1284 //uint32 StanceBarOrder; // 218 m_stanceBarOrder not used
1285 float DmgMultiplier[3]; // 219-221 m_effectChainAmplitude
1286 //uint32 MinFactionId; // 222 m_minFactionID not used
1287 //uint32 MinReputation; // 223 m_minReputation not used
1288 //uint32 RequiredAuraVision; // 224 m_requiredAuraVision not used
1289 uint32 TotemCategory[2]; // 225-226 m_requiredTotemCategoryID
1290 int32 AreaGroupId; // 227 m_requiredAreaGroupId
1291 uint32 SchoolMask; // 228 m_schoolMask
1292 uint32 runeCostID; // 229 m_runeCostID
1293 //uint32 spellMissileID; // 230 m_spellMissileID not used
1294 //uint32 PowerDisplayId; // 231 PowerDisplay.dbc, new in 3.1
1296 // helpers
1297 int32 CalculateSimpleValue(uint8 eff) const { return EffectBasePoints[eff]+int32(EffectBaseDice[eff]); }
1299 private:
1300 // prevent creating custom entries (copy data from original in fact)
1301 SpellEntry(SpellEntry const&); // DON'T must have implementation
1304 typedef std::set<uint32> SpellCategorySet;
1305 typedef std::map<uint32,SpellCategorySet > SpellCategoryStore;
1306 typedef std::set<uint32> PetFamilySpellsSet;
1307 typedef std::map<uint32,PetFamilySpellsSet > PetFamilySpellsStore;
1309 struct SpellCastTimesEntry
1311 uint32 ID; // 0
1312 int32 CastTime; // 1
1313 //float CastTimePerLevel; // 2 unsure / per skill?
1314 //int32 MinCastTime; // 3 unsure
1317 struct SpellFocusObjectEntry
1319 uint32 ID; // 0
1320 //char* Name[16]; // 1-15 unused
1321 // 16 string flags, unused
1324 // stored in SQL table
1325 struct SpellThreatEntry
1327 uint32 spellId;
1328 int32 threat;
1331 struct SpellRadiusEntry
1333 uint32 ID;
1334 float Radius;
1335 float Radius2;
1338 struct SpellRangeEntry
1340 uint32 ID;
1341 float minRange;
1342 float maxRange;
1345 struct SpellRuneCostEntry
1347 uint32 ID; // 0
1348 uint32 RuneCost[3]; // 1-3 (0=blood, 1=frost, 2=unholy)
1349 uint32 runePowerGain; // 4
1351 bool NoRuneCost() const { return RuneCost[0] == 0 && RuneCost[1] == 0 && RuneCost[2] == 0; }
1352 bool NoRunicPowerGain() const { return runePowerGain == 0; }
1355 struct SpellShapeshiftEntry
1357 uint32 ID; // 0
1358 //uint32 buttonPosition; // 1 unused
1359 //char* Name[16]; // 2-17 unused
1360 //uint32 NameFlags; // 18 unused
1361 uint32 flags1; // 19
1362 int32 creatureType; // 20 <=0 humanoid, other normal creature types
1363 //uint32 unk1; // 21 unused
1364 uint32 attackSpeed; // 22
1365 //uint32 modelID; // 23 unused, alliance modelid (where horde case?)
1366 //uint32 unk2; // 24 unused
1367 //uint32 unk3; // 25 unused
1368 //uint32 unk4; // 26 unused
1369 //uint32 unk5; // 27 unused
1370 //uint32 unk6; // 28 unused
1371 //uint32 unk7; // 29 unused
1372 //uint32 unk8; // 30 unused
1373 //uint32 unk9; // 31 unused
1374 //uint32 unk10; // 32 unused
1375 //uint32 unk11; // 33 unused
1376 //uint32 unk12; // 34 unused
1379 struct SpellDurationEntry
1381 uint32 ID;
1382 int32 Duration[3];
1385 struct SpellItemEnchantmentEntry
1387 uint32 ID; // 0 m_ID
1388 //uint32 charges; // 1 m_charges
1389 uint32 type[3]; // 2-4 m_effect[3]
1390 uint32 amount[3]; // 5-7 m_effectPointsMin[3]
1391 //uint32 amount2[3] // 8-10 m_effectPointsMax[3]
1392 uint32 spellid[3]; // 11-13 m_effectArg[3]
1393 char* description[16]; // 14-29 m_name_lang[16]
1394 //uint32 descriptionFlags; // 30 name flags
1395 uint32 aura_id; // 31 m_itemVisual
1396 uint32 slot; // 32 m_flags
1397 uint32 GemID; // 33 m_src_itemID
1398 uint32 EnchantmentCondition; // 34 m_condition_id
1399 //uint32 requiredSkill; // 35 m_requiredSkillID
1400 //uint32 requiredSkillValue; // 36 m_requiredSkillRank
1401 // 37 new in 3.1
1404 struct SpellItemEnchantmentConditionEntry
1406 uint32 ID; // 0 m_ID
1407 uint8 Color[5]; // 1-5 m_lt_operandType[5]
1408 //uint32 LT_Operand[5]; // 6-10 m_lt_operand[5]
1409 uint8 Comparator[5]; // 11-15 m_operator[5]
1410 uint8 CompareColor[5]; // 15-20 m_rt_operandType[5]
1411 uint32 Value[5]; // 21-25 m_rt_operand[5]
1412 //uint8 Logic[5] // 25-30 m_logic[5]
1415 struct StableSlotPricesEntry
1417 uint32 Slot;
1418 uint32 Price;
1421 /*struct SummonPropertiesEntry
1423 uint32 Id; // 0
1424 uint32 Group; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount?
1425 uint32 FactionId; // 2, 14 rows > 0
1426 uint32 Type; // 3, see enum
1427 uint32 Slot; // 4, 0-6
1428 uint32 Flags; // 5
1429 };*/
1431 #define MAX_TALENT_RANK 5
1432 #define MAX_PET_TALENT_RANK 3 // use in calculations, expected <= MAX_TALENT_RANK
1434 struct TalentEntry
1436 uint32 TalentID; // 0
1437 uint32 TalentTab; // 1 index in TalentTab.dbc (TalentTabEntry)
1438 uint32 Row; // 2
1439 uint32 Col; // 3
1440 uint32 RankID[MAX_TALENT_RANK]; // 4-8
1441 // 9-12 not used, always 0, maybe not used high ranks
1442 uint32 DependsOn; // 13 index in Talent.dbc (TalentEntry)
1443 // 14-15 not used
1444 uint32 DependsOnRank; // 16
1445 // 17-18 not used
1446 //uint32 unk1; // 19, 0 or 1
1447 //uint32 unk2; // 20, all 0
1448 //uint32 unkFlags1; // 21, related to hunter pet talents
1449 //uint32 unkFlags2; // 22, related to hunter pet talents
1452 struct TalentTabEntry
1454 uint32 TalentTabID; // 0
1455 //char* name[16]; // 1-16, unused
1456 //uint32 nameFlags; // 17, unused
1457 //unit32 spellicon; // 18
1458 // 19 not used
1459 uint32 ClassMask; // 20
1460 uint32 petTalentMask; // 21
1461 uint32 tabpage; // 22
1462 //char* internalname; // 23
1465 struct TaxiNodesEntry
1467 uint32 ID; // 0 m_ID
1468 uint32 map_id; // 1 m_ContinentID
1469 float x; // 2 m_x
1470 float y; // 3 m_y
1471 float z; // 4 m_z
1472 //char* name[16]; // 5-21 m_Name_lang
1473 // 22 string flags
1474 uint32 MountCreatureID[2]; // 23-24 m_MountCreatureID[2]
1477 struct TaxiPathEntry
1479 uint32 ID; // 0 m_ID
1480 uint32 from; // 1 m_FromTaxiNode
1481 uint32 to; // 2 m_ToTaxiNode
1482 uint32 price; // 3 m_Cost
1485 struct TaxiPathNodeEntry
1487 // 0 m_ID
1488 uint32 path; // 1 m_PathID
1489 uint32 index; // 2 m_NodeIndex
1490 uint32 mapid; // 3 m_ContinentID
1491 float x; // 4 m_LocX
1492 float y; // 5 m_LocY
1493 float z; // 6 m_LocZ
1494 uint32 actionFlag; // 7 m_flags
1495 uint32 delay; // 8 m_delay
1496 // 9 m_arrivalEventID
1497 // 10 m_departureEventID
1500 struct TotemCategoryEntry
1502 uint32 ID; // 0
1503 //char* name[16]; // 1-16
1504 // 17 string flags, unused
1505 uint32 categoryType; // 18 (one for specialization)
1506 uint32 categoryMask; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods)
1509 struct VehicleEntry
1511 uint32 m_ID; // 0
1512 uint32 m_flags; // 1
1513 float m_turnSpeed; // 2
1514 float m_pitchSpeed; // 3
1515 float m_pitchMin; // 4
1516 float m_pitchMax; // 5
1517 uint32 m_seatID[8]; // 6-13
1518 float m_mouseLookOffsetPitch; // 14
1519 float m_cameraFadeDistScalarMin; // 15
1520 float m_cameraFadeDistScalarMax; // 16
1521 float m_cameraPitchOffset; // 17
1522 //int m_powerType[3]; // 18-20 removed in 3.1
1523 //int m_powerToken[3]; // 21-23 removed in 3.1
1524 float m_facingLimitRight; // 24
1525 float m_facingLimitLeft; // 25
1526 float m_msslTrgtTurnLingering; // 26
1527 float m_msslTrgtPitchLingering; // 27
1528 float m_msslTrgtMouseLingering; // 28
1529 float m_msslTrgtEndOpacity; // 29
1530 float m_msslTrgtArcSpeed; // 30
1531 float m_msslTrgtArcRepeat; // 31
1532 float m_msslTrgtArcWidth; // 32
1533 float m_msslTrgtImpactRadius[2]; // 33-34
1534 char* m_msslTrgtArcTexture; // 35
1535 char* m_msslTrgtImpactTexture; // 36
1536 char* m_msslTrgtImpactModel[2]; // 37-38
1537 float m_cameraYawOffset; // 39
1538 uint32 m_uiLocomotionType; // 40
1539 float m_msslTrgtImpactTexRadius; // 41
1540 uint32 m_uiSeatIndicatorType; // 42
1541 // 37, new in 3.1
1542 // 38, new in 3.1
1543 // 39, new in 3.1
1546 struct VehicleSeatEntry
1548 uint32 m_ID; // 0
1549 uint32 m_flags; // 1
1550 int32 m_attachmentID; // 2
1551 float m_attachmentOffsetX; // 3
1552 float m_attachmentOffsetY; // 4
1553 float m_attachmentOffsetZ; // 5
1554 float m_enterPreDelay; // 6
1555 float m_enterSpeed; // 7
1556 float m_enterGravity; // 8
1557 float m_enterMinDuration; // 9
1558 float m_enterMaxDuration; // 10
1559 float m_enterMinArcHeight; // 11
1560 float m_enterMaxArcHeight; // 12
1561 int32 m_enterAnimStart; // 13
1562 int32 m_enterAnimLoop; // 14
1563 int32 m_rideAnimStart; // 15
1564 int32 m_rideAnimLoop; // 16
1565 int32 m_rideUpperAnimStart; // 17
1566 int32 m_rideUpperAnimLoop; // 18
1567 float m_exitPreDelay; // 19
1568 float m_exitSpeed; // 20
1569 float m_exitGravity; // 21
1570 float m_exitMinDuration; // 22
1571 float m_exitMaxDuration; // 23
1572 float m_exitMinArcHeight; // 24
1573 float m_exitMaxArcHeight; // 25
1574 int32 m_exitAnimStart; // 26
1575 int32 m_exitAnimLoop; // 27
1576 int32 m_exitAnimEnd; // 28
1577 float m_passengerYaw; // 29
1578 float m_passengerPitch; // 30
1579 float m_passengerRoll; // 31
1580 int32 m_passengerAttachmentID; // 32
1581 int32 m_vehicleEnterAnim; // 33
1582 int32 m_vehicleExitAnim; // 34
1583 int32 m_vehicleRideAnimLoop; // 35
1584 int32 m_vehicleEnterAnimBone; // 36
1585 int32 m_vehicleExitAnimBone; // 37
1586 int32 m_vehicleRideAnimLoopBone; // 38
1587 float m_vehicleEnterAnimDelay; // 39
1588 float m_vehicleExitAnimDelay; // 40
1589 uint32 m_vehicleAbilityDisplay; // 41
1590 uint32 m_enterUISoundID; // 42
1591 uint32 m_exitUISoundID; // 43
1592 int32 m_uiSkin; // 44
1593 uint32 m_flagsB; // 45
1594 // 46-57 added in 3.1, floats mostly
1597 struct WorldMapAreaEntry
1599 //uint32 ID; // 0
1600 uint32 map_id; // 1
1601 uint32 area_id; // 2 index (continent 0 areas ignored)
1602 //char* internal_name // 3
1603 float y1; // 4
1604 float y2; // 5
1605 float x1; // 6
1606 float x2; // 7
1607 int32 virtual_map_id; // 8 -1 (map_id have correct map) other: virtual map where zone show (map_id - where zone in fact internally)
1610 struct WorldSafeLocsEntry
1612 uint32 ID; // 0
1613 uint32 map_id; // 1
1614 float x; // 2
1615 float y; // 3
1616 float z; // 4
1617 //char* name[16] // 5-20 name, unused
1618 // 21 name flags, unused
1621 struct WorldMapOverlayEntry
1623 uint32 ID; // 0
1624 uint32 areatableID[4]; // 2-5
1627 // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
1628 #if defined( __GNUC__ )
1629 #pragma pack()
1630 #else
1631 #pragma pack(pop)
1632 #endif
1634 // Structures not used for casting to loaded DBC data and not required then packing
1635 struct TalentSpellPos
1637 TalentSpellPos() : talent_id(0), rank(0) {}
1638 TalentSpellPos(uint16 _talent_id, uint8 _rank) : talent_id(_talent_id), rank(_rank) {}
1640 uint16 talent_id;
1641 uint8 rank;
1644 typedef std::map<uint32,TalentSpellPos> TalentSpellPosMap;
1646 struct TaxiPathBySourceAndDestination
1648 TaxiPathBySourceAndDestination() : ID(0),price(0) {}
1649 TaxiPathBySourceAndDestination(uint32 _id,uint32 _price) : ID(_id),price(_price) {}
1651 uint32 ID;
1652 uint32 price;
1654 typedef std::map<uint32,TaxiPathBySourceAndDestination> TaxiPathSetForSource;
1655 typedef std::map<uint32,TaxiPathSetForSource> TaxiPathSetBySource;
1657 struct TaxiPathNode
1659 TaxiPathNode() : mapid(0), x(0),y(0),z(0),actionFlag(0),delay(0) {}
1660 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) {}
1662 uint32 mapid;
1663 float x;
1664 float y;
1665 float z;
1666 uint32 actionFlag;
1667 uint32 delay;
1669 typedef std::vector<TaxiPathNode> TaxiPathNodeList;
1670 typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
1672 #define TaxiMaskSize 12
1673 typedef uint32 TaxiMask[TaxiMaskSize];
1674 #endif