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
23 #include "Platform/Define.h"
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__ )
38 struct AchievementEntry
41 uint32 factionFlag
; // 1 -1=all, 0=horde, 1=alliance
42 uint32 mapID
; // 2 -1=none
43 //char *name[16]; // 3-19
44 //uint32 name_flags; // 20
45 //char *description[16]; // 21-36
46 //uint32 desc_flags; // 37
47 uint32 categoryId
; // 38
48 uint32 points
; // 39 reward points
49 //uint32 OrderInCategory; // 40
51 //uint32 flags; // 42 not flags, some unknown value...
52 //char *unk1[16]; // 43-58
53 //uint32 unk_flags; // 59
55 uint32 refAchievement
; // 61
58 struct AchievementCategoryEntry
61 uint32 parentCategory
; // 1 -1 for main category
62 //char *name[16]; // 2-17
63 //uint32 name_flags; // 18
64 uint32 sortOrder
; // 19
67 struct AchievementCriteriaEntry
70 uint32 referredAchievement
; // 1
71 uint32 requiredType
; // 2
74 // ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0
75 // TODO: also used for player deaths..
78 uint32 creatureID
; // 3
79 uint32 creatureCount
; // 4
82 // ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1
83 // TODO: there are further criterias instead just winning
90 // ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5
97 // ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7
101 uint32 skillLevel
; // 4
104 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8
107 uint32 linkedAchievement
; // 3
108 } complete_achievement
;
110 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9
114 uint32 totalQuestCount
; // 4
115 } complete_quest_count
;
117 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10
121 uint32 numberOfDays
; // 4
122 } complete_daily_quest_daily
;
124 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11
128 uint32 questCount
; // 4
129 } complete_quests_in_zone
;
131 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST = 14
135 uint32 questCount
; // 4
136 } complete_daily_quest
;
138 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND= 15
142 } complete_battleground
;
144 // ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP= 16
150 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19
153 uint32 groupSize
; // 3 can be 5, 10 or 25
156 // ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20
159 uint32 creatureEntry
; // 3
160 } killed_by_creature
;
162 // ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING = 24
166 uint32 fallHeight
; // 4
167 } fall_without_dying
;
169 // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27
173 uint32 questCount
; // 4
176 // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28
177 // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2= 69
181 uint32 spellCount
; // 4
184 // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL= 29
185 // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110
189 uint32 castCount
; // 4
192 // ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31
195 uint32 areaID
; // 3 Reference to AreaTable.dbc
196 uint32 killCount
; // 4
197 } honorable_kill_at_area
;
199 // ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32
202 uint32 mapID
; // 3 Reference to Map.dbc
205 // ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33
208 uint32 mapID
; // 3 Reference to Map.dbc
211 // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34
214 uint32 spellID
; // 3 Reference to Map.dbc
217 // ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36
221 uint32 itemCount
; // 4
224 // ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37
229 uint32 flag
; // 5 4=in a row
232 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38
235 uint32 teamtype
; // 3 {2,3,5}
236 } highest_team_rating
;
238 // ACHIEVEMENT_CRITERIA_TYPE_REACH_TEAM_RATING = 39
241 uint32 teamtype
; // 3 {2,3,5}
242 uint32 teamrating
; // 4
245 // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40
249 uint32 skillLevel
; // 4 apprentice=1, journeyman=2, expert=3, artisan=4, master=5, grand master=6
252 // ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41
256 uint32 itemCount
; // 4
259 // ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM = 42
263 uint32 itemCount
; // 4
266 // ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43
269 // TODO: This rank is _NOT_ the index from AreaTable.dbc
270 uint32 areaReference
; // 3
273 // ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK= 44
276 // TODO: This rank is _NOT_ the index from CharTitles.dbc
280 // ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT= 45
284 uint32 numberOfSlots
; // 4
287 // ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION= 46
290 uint32 factionID
; // 3
291 uint32 reputationAmount
; // 4 Total reputation amount, so 42000 = exalted
294 // ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION= 47
298 uint32 numberOfExaltedFactions
; // 4
299 } gain_exalted_reputation
;
301 // ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP = 48
305 uint32 numberOfVisits
; // 4
308 // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49
309 // TODO: where is the required itemlevel stored?
312 uint32 itemSlot
; // 3
315 // ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT= 50
318 uint32 rollValue
; // 3
322 // ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52
329 // ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53
336 // ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54
337 // TODO: where is the information about the target stored?
343 // ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE = 55
348 uint32 flag
; // 5 =3 for battleground healing
352 // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57
359 // ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67
363 uint32 goldInCopper
; // 4
366 // ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68
370 uint32 useCount
; // 4
373 // ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL= 70
374 // TODO: are those special criteria stored in the dbc or do we have to add another sql table?
378 uint32 killCount
; // 4
381 // ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72
385 uint32 lootCount
; // 4
386 } fish_in_gameobject
;
388 // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS= 75
391 uint32 skillLine
; // 3
392 uint32 spellCount
; // 4
393 } learn_skilline_spell
;
395 // ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL = 76
399 uint32 duelCount
; // 4
402 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96
405 uint32 powerType
; // 3 mana=0, 1=rage, 3=energy, 6=runic power
408 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97
411 uint32 statType
; // 3 4=spirit, 3=int, 2=stamina, 1=agi, 0=strength
414 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98
417 uint32 spellSchool
; // 3
418 } highest_spellpower
;
420 // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING = 100
423 uint32 ratingType
; // 3
426 // ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109
429 uint32 lootType
; // 3 3=fishing, 2=pickpocket, 4=disentchant
430 uint32 lootTypeCount
; // 4
433 // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE= 112
436 uint32 skillLine
; // 3
437 uint32 spellCount
; // 4
440 // ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113
444 uint32 killCount
; // 4
449 uint32 field3
; // 3 main requirement
450 uint32 field4
; // 4 main requirement count
451 uint32 additionalRequirement1_type
; // 5 additional requirement 1 type
452 uint32 additionalRequirement1_value
; // 6 additional requirement 1 value
453 uint32 additionalRequirement2_type
; // 7 additional requirement 2 type
454 uint32 additionalRequirement2_value
; // 8 additional requirement 1 value
457 //char* name[16]; // 9-24
458 //uint32 name_flags; // 25
459 uint32 completionFlag
; // 26
460 uint32 groupFlag
; // 27
461 uint32 timeLimit
; // 29 time limit in seconds
465 struct AreaTableEntry
469 uint32 zone
; // 2 if 0 then it's zone, else it's zone id of this area
470 uint32 exploreFlag
; // 3, main index
471 uint32 flags
; // 4, unknown value but 312 for all cities
473 int32 area_level
; // 10
474 char* area_name
[16]; // 11-26
475 // 27, string flags, unused
479 struct AreaTriggerEntry
482 uint32 mapid
; // 1 m_ContinentID
486 float radius
; // 5 m_radius
487 float box_x
; // 6 m_box_length
488 float box_y
; // 7 m_box_width
489 float box_z
; // 8 m_box_heigh
490 float box_orientation
; // 9 m_box_yaw
493 struct BankBagSlotPricesEntry
499 struct BarberShopStyleEntry
502 uint32 type
; // 1 value 0 -> hair, value 2 -> facialhair
503 //char* name[16]; // 2-17 name of hair style
504 //uint32 name_flags; // 18
505 //uint32 unk_name[16]; // 19-34, all empty
506 //uint32 unk_flags; // 35
507 //float CostMultiplier; // 36 values 1 and 0.75
508 uint32 race
; // 37 race
509 uint32 gender
; // 38 0 -> male, 1 -> female
510 uint32 hair_id
; // 39 real ID to hair/facial hair
513 struct BattlemasterListEntry
516 int32 mapid
[8]; // 1-8 mapid
517 uint32 type
; // 9 (3 - BG, 4 - arena)
520 uint32 maxplayersperteam
; // 12
524 char* name
[16]; // 16-31
525 // 32 string flag, unused
529 struct CharTitlesEntry
531 uint32 ID
; // 0, title ids, for example in Quest::GetCharTitleId()
532 //uint32 unk1; // 1 flags?
533 //char* name[16]; // 2-17, unused
534 // 18 string flag, unused
535 //char* name2[16]; // 19-34, unused
536 // 35 string flag, unused
537 uint32 bit_index
; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
540 struct ChatChannelsEntry
542 uint32 ChannelID
; // 0
544 char* pattern
[16]; // 3-18
545 // 19 string flags, unused
546 //char* name[16]; // 20-35 unused
547 // 36 string flag, unused
550 struct ChrClassesEntry
554 uint32 powerType
; // 2
556 //char* name[16]; // 5-20 unused
557 // 21 string flag, unused
558 //char* string1[16]; // 21-36 unused
559 // 37 string flag, unused
560 //char* string2[16]; // 38-53 unused
561 // 54 string flag, unused
563 uint32 spellfamily
; // 56
565 uint32 CinematicSequence
; // 58 id from CinematicSequences.dbc
566 uint32 addon
; // 59 (0 - original race, 1 - tbc addon, ...)
573 uint32 FactionID
; // 2 facton template id
578 uint32 TeamID
; // 8 (7-Alliance 1-Horde)
580 uint32 CinematicSequence
; // 13 id from CinematicSequences.dbc
581 char* name
[16]; // 14-29 used for DBC language detection/selection
582 // 30 string flags, unused
583 //char* string1[16]; // 31-46 used for DBC language detection/selection
584 // 47 string flags, unused
585 //char* string2[16]; // 48-63 used for DBC language detection/selection
586 // 64 string flags, unused
588 uint32 addon
; // 68 (0 - original race, 1 - tbc addon, ...)
591 struct CreatureDisplayInfoEntry
593 uint32 Displayid
; // 0 m_ID
596 // 3 m_extendedDisplayInfoID
597 float scale
; // 4 m_creatureModelScale
598 // 5 m_creatureModelAlpha
599 // 6-8 m_textureVariation[3]
600 // 9 m_portraitTextureName
604 // 13 m_particleColorID
605 // 14 m_creatureGeosetData
606 // 15 m_objectEffectPackageID
609 struct CreatureFamilyEntry
612 float minScale
; // 1 m_minScale
613 uint32 minScaleLevel
; // 2 m_minScaleLevel
614 float maxScale
; // 3 m_maxScale
615 uint32 maxScaleLevel
; // 4 m_maxScaleLevel
616 uint32 skillLine
[2]; // 5-6 m_skillLine
617 uint32 petFoodMask
; // 7 m_petFoodMask
618 int32 petTalentType
; // 8 m_petTalentType
619 // 9 m_categoryEnumID
620 char* Name
[16]; // 10-25 m_name_lang
625 struct CreatureSpellDataEntry
628 //uint32 spellId[4]; // 1-4 m_spells[4]
629 //uint32 availability[4]; // 4-7 m_availability[4]
632 struct DurabilityCostsEntry
635 uint32 multiplier
[29]; // 1-29
638 struct DurabilityQualityEntry
641 float quality_mod
; // 1
644 struct EmotesTextEntry
653 int32 reputationListID
; // 1 m_reputationIndex
654 uint32 BaseRepRaceMask
[4]; // 2-5 m_reputationRaceMask
655 uint32 BaseRepClassMask
[4]; // 6-9 m_reputationClassMask
656 int32 BaseRepValue
[4]; // 10-13 m_reputationBase
657 uint32 ReputationFlags
[4]; // 14-17 m_reputationFlags
658 uint32 team
; // 18 m_parentFactionID
659 char* name
[16]; // 19-34 m_name_lang
661 //char* description[16]; // 36-51 m_description_lang
665 struct FactionTemplateEntry
668 uint32 faction
; // 1 m_faction
669 uint32 factionFlags
; // 2 m_flags
670 uint32 ourMask
; // 3 m_factionGroup
671 uint32 friendlyMask
; // 4 m_friendGroup
672 uint32 hostileMask
; // 5 m_enemyGroup
673 uint32 enemyFaction
[4]; // 6 m_enemies[4]
674 uint32 friendFaction
[4]; // 10 m_friend[4]
675 //------------------------------------------------------- end structure
678 bool IsFriendlyTo(FactionTemplateEntry
const& entry
) const
680 if(enemyFaction
[0] == entry
.faction
|| enemyFaction
[1] == entry
.faction
|| enemyFaction
[2] == entry
.faction
|| enemyFaction
[3] == entry
.faction
)
682 if(friendFaction
[0] == entry
.faction
|| friendFaction
[1] == entry
.faction
|| friendFaction
[2] == entry
.faction
|| friendFaction
[3] == entry
.faction
)
684 return (friendlyMask
& entry
.ourMask
) || (ourMask
& entry
.friendlyMask
);
686 bool IsHostileTo(FactionTemplateEntry
const& entry
) const
688 if(enemyFaction
[0] == entry
.faction
|| enemyFaction
[1] == entry
.faction
|| enemyFaction
[2] == entry
.faction
|| enemyFaction
[3] == entry
.faction
)
690 if(friendFaction
[0] == entry
.faction
|| friendFaction
[1] == entry
.faction
|| friendFaction
[2] == entry
.faction
|| friendFaction
[3] == entry
.faction
)
692 return (hostileMask
& entry
.ourMask
) != 0;
694 bool IsHostileToPlayers() const { return (hostileMask
& FACTION_MASK_PLAYER
) !=0; }
695 bool IsNeutralToAll() const { return hostileMask
== 0 && friendlyMask
== 0 && enemyFaction
[0]==0 && enemyFaction
[1]==0 && enemyFaction
[2]==0 && enemyFaction
[3]==0; }
696 bool IsContestedGuardFaction() const { return (factionFlags
& FACTION_TEMPLATE_FLAG_CONTESTED_GUARD
)!=0; }
699 struct GemPropertiesEntry
702 uint32 spellitemenchantement
;
706 struct GlyphPropertiesEntry
714 struct GlyphSlotEntry
721 #define GT_MAX_LEVEL 100
723 struct GtBarberShopCostBaseEntry
728 struct GtCombatRatingsEntry
733 struct GtChanceToMeleeCritBaseEntry
738 struct GtChanceToMeleeCritEntry
743 struct GtChanceToSpellCritBaseEntry
748 struct GtChanceToSpellCritEntry
753 struct GtOCTRegenHPEntry
758 //struct GtOCTRegenMPEntry
763 struct GtRegenHPPerSptEntry
768 struct GtRegenMPPerSptEntry
781 uint32 InventoryType
;
785 struct ItemDisplayInfoEntry
789 // 2 m_modelTexture[2]
791 // 4 m_geosetGroup[3]
794 // 7 m_groupSoundIndex
795 // 8 m_helmetGeosetVis[2]
797 // 10 m_itemVisual[8]
798 // 11 m_particleColorID
801 //struct ItemCondExtCostsEntry
804 // uint32 condExtendedCost; // ItemPrototype::CondExtendedCost
805 // uint32 itemextendedcostentry; // ItemPrototype::ExtendedCost
806 // uint32 arenaseason; // arena season number(1-4)
809 struct ItemExtendedCostEntry
811 uint32 ID
; // 0 extended-cost entry id
812 uint32 reqhonorpoints
; // 1 required honor points
813 uint32 reqarenapoints
; // 2 required arena points
814 uint32 reqitem
[5]; // 3-7 required item id
815 uint32 reqitemcount
[5]; // 8-12 required count of 1st item
816 uint32 reqpersonalarenarating
; // 13 required personal arena rating
819 struct ItemRandomPropertiesEntry
822 //char* internalName // 1 m_Name
823 uint32 enchant_id
[5]; // 2-6 m_Enchantment
824 //char* nameSuffix[16] // 7-22 m_name_lang
828 struct ItemRandomSuffixEntry
831 //char* name[16] // 1-16 m_name_lang
834 uint32 enchant_id
[5]; // 19-21 m_enchantment
835 uint32 prefix
[5]; // 22-24 m_allocationPct
840 //uint32 id // 0 m_ID
841 char* name
[16]; // 1-16 m_name_lang
842 // 17 string flags, unused
843 //uint32 itemId[17]; // 18-34 m_itemID
844 uint32 spells
[8]; // 35-42 m_setSpellID
845 uint32 items_to_triggerspell
[8]; // 43-50 m_setThreshold
846 uint32 required_skill_id
; // 51 m_requiredSkill
847 uint32 required_skill_value
; // 52 m_requiredSkillRank
853 uint32 Type
[8]; // 1-8 m_Type
854 uint32 Index
[8]; // 9-16 m_Index
855 uint32 Skill
[8]; // 17-24 m_Skill
856 //uint32 Action[8]; // 25-32 m_Action
859 struct MailTemplateEntry
862 //char* subject[16]; // 1-16
863 // 17 name flags, unused
864 //char* content[16]; // 18-33
870 //char* internalname; // 1 unused
871 uint32 map_type
; // 2
872 // 3 0 or 1 for battlegrounds (not arenas)
873 char* name
[16]; // 4-19
874 // 20 name flags, unused
875 uint32 linked_zone
; // 21 common zone for instance and continent map
876 //char* hordeIntro[16]; // 23-37 text for PvP Zones
877 // 38 intro text flags
878 //char* allianceIntro[16]; // 39-54 text for PvP Zones
879 // 55 intro text flags
880 uint32 multimap_id
; // 56
882 //chat* unknownText1[16]; // 58-73 unknown empty text fields, possible normal Intro text.
884 //chat* heroicIntroText[16]; // 75-90 heroic mode requirement text
886 //chat* unknownText2[16]; // 92-107 unknown empty text fields
888 int32 entrance_map
; // 109 map_id of entrance map
889 float entrance_x
; // 110 entrance x coordinate (if exist single entry)
890 float entrance_y
; // 111 entrance y coordinate (if exist single entry)
891 uint32 resetTimeRaid
; // 112
892 uint32 resetTimeHeroic
; // 113
895 uint32 addon
; // 116 (0-original maps,1-tbc addon)
896 // 117 some kind of time?
899 uint32
Expansion() const { return addon
; }
900 bool Instanceable() const { return map_type
== MAP_INSTANCE
|| map_type
== MAP_RAID
; }
901 // NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable
902 bool IsDungeon() const { return map_type
== MAP_INSTANCE
|| map_type
== MAP_RAID
; }
903 bool IsRaid() const { return map_type
== MAP_RAID
; }
904 bool IsBattleGround() const { return map_type
== MAP_BATTLEGROUND
; }
905 bool IsBattleArena() const { return map_type
== MAP_ARENA
; }
906 bool IsBattleGroundOrArena() const { return map_type
== MAP_BATTLEGROUND
|| map_type
== MAP_ARENA
; }
907 bool SupportsHeroicMode() const { return resetTimeHeroic
&& !resetTimeRaid
; }
908 bool HasResetTime() const { return resetTimeHeroic
|| resetTimeRaid
; }
910 bool IsMountAllowed() const
912 return !IsDungeon() ||
913 MapID
==568 || MapID
==309 || MapID
==209 || MapID
==534 ||
914 MapID
==560 || MapID
==509 || MapID
==269;
917 bool IsContinent() const
919 return MapID
== 0 || MapID
== 1 || MapID
== 530 || MapID
== 571;
923 struct QuestSortEntry
926 //char* name[16]; // 1-16 m_SortName_lang
930 struct RandomPropertiesPointsEntry
932 //uint32 Id; // 0 hidden key
933 uint32 itemLevel
; // 1
934 uint32 EpicPropertiesPoints
[5]; // 2-6
935 uint32 RarePropertiesPoints
[5]; // 7-11
936 uint32 UncommonPropertiesPoints
[5]; // 12-16
939 struct ScalingStatDistributionEntry
947 struct ScalingStatValuesEntry
951 uint32 Multiplier
[17];
954 //struct SkillLineCategoryEntry{
955 // uint32 id; // 0 m_ID
956 // char* name[16]; // 1-17 m_name_lang
958 // uint32 displayOrder; // 19 m_sortIndex
961 //struct SkillRaceClassInfoEntry{
962 // uint32 id; // 0 m_ID
963 // uint32 skillId; // 1 m_skillID
964 // uint32 raceMask; // 2 m_raceMask
965 // uint32 classMask; // 3 m_classMask
966 // uint32 flags; // 4 m_flags
967 // uint32 reqLevel; // 5 m_minLevel
968 // uint32 skillTierId; // 6 m_skillTierID
969 // uint32 skillCostID; // 7 m_skillCostIndex
972 //struct SkillTiersEntry{
973 // uint32 id; // 0 m_ID
974 // uint32 skillValue[16]; // 1-17 m_cost
975 // uint32 maxSkillValue[16]; // 18-32 m_valueMax
978 struct SkillLineEntry
981 int32 categoryId
; // 1 m_categoryID
982 //uint32 skillCostID; // 2 m_skillCostsID
983 char* name
[16]; // 3-18 m_displayName_lang
985 //char* description[16]; // 20-35 m_description_lang
987 uint32 spellIcon
; // 37 m_spellIconID
988 //char* alternateVerb[16]; // 38-53 m_alternateVerb_lang
993 struct SkillLineAbilityEntry
996 uint32 skillId
; // 1 m_skillLine
997 uint32 spellId
; // 2 m_spell
998 uint32 racemask
; // 3 m_raceMask
999 uint32 classmask
; // 4 m_classMask
1000 //uint32 racemaskNot; // 5 m_excludeRace
1001 //uint32 classmaskNot; // 6 m_excludeClass
1002 uint32 req_skill_value
; // 7 m_minSkillLineRank
1003 uint32 forward_spellid
; // 8 m_supercededBySpell
1004 uint32 learnOnGetSkill
; // 9 m_acquireMethod
1005 uint32 max_value
; // 10 m_trivialSkillLineRankHigh
1006 uint32 min_value
; // 11 m_trivialSkillLineRankLow
1007 //uint32 characterPoints[2]; // 12-13 m_characterPoints[2]
1010 struct SoundEntriesEntry
1012 uint32 Id
; // 0 m_ID
1013 //uint32 Type; // 1 m_soundType
1014 //char* InternalName; // 2 m_name
1015 //char* FileName[10]; // 3-12 m_File[10]
1016 //uint32 Unk13[10]; // 13-22 m_Freq[10]
1017 //char* Path; // 23 m_DirectoryBase
1021 // 27 m_distanceCutoff
1027 uint32 Id
; // 0 m_ID
1028 uint32 Category
; // 1 m_category
1029 uint32 Dispel
; // 2 m_dispelType
1030 uint32 Mechanic
; // 3 m_mechanic
1031 uint32 Attributes
; // 4 m_attribute
1032 uint32 AttributesEx
; // 5 m_attributesEx
1033 uint32 AttributesEx2
; // 6 m_attributesExB
1034 uint32 AttributesEx3
; // 7 m_attributesExC
1035 uint32 AttributesEx4
; // 8 m_attributesExD
1036 uint32 AttributesEx5
; // 9 m_attributesExE
1037 //uint32 AttributesEx6; // 10 m_attributesExF not used
1038 uint32 Stances
; // 11 m_shapeshiftMask
1039 uint32 StancesNot
; // 12 m_shapeshiftExclude
1040 uint32 Targets
; // 13 m_targets
1041 uint32 TargetCreatureType
; // 14 m_targetCreatureType
1042 uint32 RequiresSpellFocus
; // 15 m_requiresSpellFocus
1043 uint32 FacingCasterFlags
; // 16 m_facingCasterFlags
1044 uint32 CasterAuraState
; // 17 m_casterAuraState
1045 uint32 TargetAuraState
; // 18 m_targetAuraState
1046 uint32 CasterAuraStateNot
; // 19 m_excludeCasterAuraState
1047 uint32 TargetAuraStateNot
; // 20 m_excludeTargetAuraState
1048 //uint32 casterAuraSpell; // 21 m_casterAuraSpell not used
1049 //uint32 targetAuraSpell; // 22 m_targetAuraSpell not used
1050 //uint32 excludeCasterAuraSpell; // 23 m_excludeCasterAuraSpell not used
1051 //uint32 excludeTargetAuraSpell; // 24 m_excludeTargetAuraSpell not used
1052 uint32 CastingTimeIndex
; // 25 m_castingTimeIndex
1053 uint32 RecoveryTime
; // 26 m_recoveryTime
1054 uint32 CategoryRecoveryTime
; // 27 m_categoryRecoveryTime
1055 uint32 InterruptFlags
; // 28 m_interruptFlags
1056 uint32 AuraInterruptFlags
; // 29 m_auraInterruptFlags
1057 uint32 ChannelInterruptFlags
; // 30 m_channelInterruptFlags
1058 uint32 procFlags
; // 31 m_procTypeMask
1059 uint32 procChance
; // 32 m_procChance
1060 uint32 procCharges
; // 33 m_procCharges
1061 uint32 maxLevel
; // 34 m_maxLevel
1062 uint32 baseLevel
; // 35 m_baseLevel
1063 uint32 spellLevel
; // 36 m_spellLevel
1064 uint32 DurationIndex
; // 37 m_durationIndex
1065 uint32 powerType
; // 38 m_powerType
1066 uint32 manaCost
; // 39 m_manaCost
1067 uint32 manaCostPerlevel
; // 40 m_manaCostPerLevel
1068 uint32 manaPerSecond
; // 41 m_manaPerSecond
1069 uint32 manaPerSecondPerLevel
; // 42 m_manaPerSecondPerLeve
1070 uint32 rangeIndex
; // 43 m_rangeIndex
1071 float speed
; // 44 m_speed
1072 //uint32 modalNextSpell; // 45 m_modalNextSpell not used
1073 uint32 StackAmount
; // 46 m_cumulativeAura
1074 uint32 Totem
[2]; // 47-48 m_totem
1075 int32 Reagent
[8]; // 49-56 m_reagent
1076 uint32 ReagentCount
[8]; // 57-64 m_reagentCount
1077 int32 EquippedItemClass
; // 65 m_equippedItemClass (value)
1078 int32 EquippedItemSubClassMask
; // 66 m_equippedItemSubclass (mask)
1079 int32 EquippedItemInventoryTypeMask
; // 67 m_equippedItemInvTypes (mask)
1080 uint32 Effect
[3]; // 68-70 m_effect
1081 int32 EffectDieSides
[3]; // 71-73 m_effectDieSides
1082 uint32 EffectBaseDice
[3]; // 74-76 m_effectBaseDice
1083 float EffectDicePerLevel
[3]; // 77-79 m_effectDicePerLevel
1084 float EffectRealPointsPerLevel
[3]; // 80-82 m_effectRealPointsPerLevel
1085 int32 EffectBasePoints
[3]; // 83-85 m_effectBasePoints (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
1086 uint32 EffectMechanic
[3]; // 86-88 m_effectMechanic
1087 uint32 EffectImplicitTargetA
[3]; // 89-91 m_implicitTargetA
1088 uint32 EffectImplicitTargetB
[3]; // 92-94 m_implicitTargetB
1089 uint32 EffectRadiusIndex
[3]; // 95-97 m_effectRadiusIndex - spellradius.dbc
1090 uint32 EffectApplyAuraName
[3]; // 98-100 m_effectAura
1091 uint32 EffectAmplitude
[3]; // 101-103 m_effectAuraPeriod
1092 float EffectMultipleValue
[3]; // 104-106 m_effectAmplitude
1093 uint32 EffectChainTarget
[3]; // 107-109 m_effectChainTargets
1094 uint32 EffectItemType
[3]; // 110-112 m_effectItemType
1095 int32 EffectMiscValue
[3]; // 113-115 m_effectMiscValue
1096 int32 EffectMiscValueB
[3]; // 116-118 m_effectMiscValueB
1097 uint32 EffectTriggerSpell
[3]; // 119-121 m_effectTriggerSpell
1098 float EffectPointsPerComboPoint
[3]; // 122-124 m_effectPointsPerCombo
1099 //uint32 EffectSpellClassMaskA[3]; // 125-127 m_effectSpellClassMaskA not used
1100 //uint32 EffectSpellClassMaskB[3]; // 128-130 m_effectSpellClassMaskB not used
1101 //uint32 EffectSpellClassMaskC[3]; // 131-133 m_effectSpellClassMaskC not used
1102 uint32 SpellVisual
[2]; // 134-135 m_spellVisualID
1103 uint32 SpellIconID
; // 136 m_spellIconID
1104 uint32 activeIconID
; // 137 m_activeIconID
1105 //uint32 spellPriority; // 138 m_spellPriority not used
1106 char* SpellName
[16]; // 139-154 m_name_lang
1107 //uint32 SpellNameFlag; // 155 not used
1108 char* Rank
[16]; // 156-171 m_nameSubtext_lang
1109 //uint32 RankFlags; // 172 not used
1110 //char* Description[16]; // 173-188 m_description_lang not used
1111 //uint32 DescriptionFlags; // 189 not used
1112 //char* ToolTip[16]; // 190-205 m_auraDescription_lang not used
1113 //uint32 ToolTipFlags; // 206 not used
1114 uint32 ManaCostPercentage
; // 207 m_manaCostPct
1115 uint32 StartRecoveryCategory
; // 208 m_startRecoveryCategory
1116 uint32 StartRecoveryTime
; // 209 m_startRecoveryTime
1117 uint32 MaxTargetLevel
; // 210 m_maxTargetLevel
1118 uint32 SpellFamilyName
; // 211 m_spellClassSet
1119 uint64 SpellFamilyFlags
; // 212-213 m_spellClassMask NOTE: size is 12 bytes!!!
1120 uint32 SpellFamilyFlags2
; // 214 addition to m_spellClassMask
1121 uint32 MaxAffectedTargets
; // 215 m_maxTargets
1122 uint32 DmgClass
; // 216 m_defenseType
1123 uint32 PreventionType
; // 217 m_preventionType
1124 //uint32 StanceBarOrder; // 218 m_stanceBarOrder not used
1125 float DmgMultiplier
[3]; // 219-221 m_effectChainAmplitude
1126 //uint32 MinFactionId; // 222 m_minFactionID not used
1127 //uint32 MinReputation; // 223 m_minReputation not used
1128 //uint32 RequiredAuraVision; // 224 m_requiredAuraVision not used
1129 uint32 TotemCategory
[2]; // 225-226 m_requiredTotemCategoryID
1130 int32 AreaId
; // 227 m_requiredAreasID
1131 uint32 SchoolMask
; // 228 m_schoolMask
1132 uint32 runeCostID
; // 229 m_runeCostID
1133 //uint32 spellMissileID; // 230 m_spellMissileID not used
1136 // prevent creating custom entries (copy data from original in fact)
1137 SpellEntry(SpellEntry
const&); // DON'T must have implementation
1140 typedef std::set
<uint32
> SpellCategorySet
;
1141 typedef std::map
<uint32
,SpellCategorySet
> SpellCategoryStore
;
1142 typedef std::set
<uint32
> PetFamilySpellsSet
;
1143 typedef std::map
<uint32
,PetFamilySpellsSet
> PetFamilySpellsStore
;
1145 struct SpellCastTimesEntry
1148 int32 CastTime
; // 1
1149 //float CastTimePerLevel; // 2 unsure / per skill?
1150 //int32 MinCastTime; // 3 unsure
1153 struct SpellFocusObjectEntry
1156 //char* Name[16]; // 1-15 unused
1157 // 16 string flags, unused
1160 // stored in SQL table
1161 struct SpellThreatEntry
1167 struct SpellRadiusEntry
1174 struct SpellRangeEntry
1181 struct SpellRuneCostEntry
1184 uint32 bloodRuneCost
;
1185 uint32 frostRuneCost
;
1186 uint32 unholyRuneCost
;
1187 uint32 runePowerGain
;
1190 struct SpellShapeshiftEntry
1193 //uint32 buttonPosition; // 1 unused
1194 //char* Name[16]; // 2-17 unused
1195 //uint32 NameFlags; // 18 unused
1196 uint32 flags1
; // 19
1197 int32 creatureType
; // 20 <=0 humanoid, other normal creature types
1198 //uint32 unk1; // 21 unused
1199 uint32 attackSpeed
; // 22
1200 //uint32 modelID; // 23 unused, alliance modelid (where horde case?)
1201 //uint32 unk2; // 24 unused
1202 //uint32 unk3; // 25 unused
1203 //uint32 unk4; // 26 unused
1204 //uint32 unk5; // 27 unused
1205 //uint32 unk6; // 28 unused
1206 //uint32 unk7; // 29 unused
1207 //uint32 unk8; // 30 unused
1208 //uint32 unk9; // 31 unused
1209 //uint32 unk10; // 32 unused
1210 //uint32 unk11; // 33 unused
1211 //uint32 unk12; // 34 unused
1214 struct SpellDurationEntry
1220 struct SpellItemEnchantmentEntry
1222 uint32 ID
; // 0 m_ID
1223 //uint32 charges; // 1 m_charges
1224 uint32 type
[3]; // 2-4 m_effect[3]
1225 uint32 amount
[3]; // 5-7 m_effectPointsMin[3]
1226 //uint32 amount2[3] // 8-10 m_effectPointsMax[3]
1227 uint32 spellid
[3]; // 11-13 m_effectArg[3]
1228 char* description
[16]; // 14-30 m_name_lang[16]
1229 //uint32 descriptionFlags; // 31 name flags
1230 uint32 aura_id
; // 32 m_itemVisual
1231 uint32 slot
; // 33 m_flags
1232 uint32 GemID
; // 34 m_src_itemID
1233 uint32 EnchantmentCondition
; // 35 m_condition_id
1234 //uint32 requiredSkill; // 36 m_requiredSkillID
1235 //uint32 requiredSkillValue; // 37 m_requiredSkillRank
1238 struct SpellItemEnchantmentConditionEntry
1240 uint32 ID
; // 0 m_ID
1241 uint8 Color
[5]; // 1-5 m_lt_operandType[5]
1242 //uint32 LT_Operand[5]; // 6-10 m_lt_operand[5]
1243 uint8 Comparator
[5]; // 11-15 m_operator[5]
1244 uint8 CompareColor
[5]; // 15-20 m_rt_operandType[5]
1245 uint32 Value
[5]; // 21-25 m_rt_operand[5]
1246 //uint8 Logic[5] // 25-30 m_logic[5]
1249 struct StableSlotPricesEntry
1255 /*struct SummonPropertiesEntry
1258 uint32 Group; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount?
1259 uint32 Unk2; // 2, 14 rows > 0
1260 uint32 Type; // 3, see enum
1261 uint32 Slot; // 4, 0-6
1267 uint32 TalentID
; // 0
1268 uint32 TalentTab
; // 1 index in TalentTab.dbc (TalentTabEntry)
1271 uint32 RankID
[5]; // 4-8
1272 // 9-12 not used, always 0, maybe not used high ranks
1273 uint32 DependsOn
; // 13 index in Talent.dbc (TalentEntry)
1275 uint32 DependsOnRank
; // 16
1277 //uint32 unk1; // 19, 0 or 1
1278 //uint32 unk2; // 20, all 0
1279 //uint32 unkFlags1; // 21, related to hunter pet talents
1280 //uint32 unkFlags2; // 22, related to hunter pet talents
1283 struct TalentTabEntry
1285 uint32 TalentTabID
; // 0
1286 //char* name[16]; // 1-16, unused
1287 //uint32 nameFlags; // 17, unused
1288 //unit32 spellicon; // 18
1290 uint32 ClassMask
; // 20
1291 uint32 petTalentMask
; // 21
1292 uint32 tabpage
; // 22
1293 //char* internalname; // 23
1296 struct TaxiNodesEntry
1298 uint32 ID
; // 0 m_ID
1299 uint32 map_id
; // 1 m_ContinentID
1303 //char* name[16]; // 5-21 m_Name_lang
1305 uint32 MountCreatureID
[2]; // 23-24 m_MountCreatureID[2]
1308 struct TaxiPathEntry
1310 uint32 ID
; // 0 m_ID
1311 uint32 from
; // 1 m_FromTaxiNode
1312 uint32 to
; // 2 m_ToTaxiNode
1313 uint32 price
; // 3 m_Cost
1316 struct TaxiPathNodeEntry
1319 uint32 path
; // 1 m_PathID
1320 uint32 index
; // 2 m_NodeIndex
1321 uint32 mapid
; // 3 m_ContinentID
1322 float x
; // 4 m_LocX
1323 float y
; // 5 m_LocY
1324 float z
; // 6 m_LocZ
1325 uint32 actionFlag
; // 7 m_flags
1326 uint32 delay
; // 8 m_delay
1327 // 9 m_arrivalEventID
1328 // 10 m_departureEventID
1331 struct TotemCategoryEntry
1334 //char* name[16]; // 1-16
1335 // 17 string flags, unused
1336 uint32 categoryType
; // 18 (one for specialization)
1337 uint32 categoryMask
; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods)
1343 uint32 m_flags
; // 1
1344 float m_turnSpeed
; // 2
1345 float m_pitchSpeed
; // 3
1346 float m_pitchMin
; // 4
1347 float m_pitchMax
; // 5
1348 uint32 m_seatID
[8]; // 6-13
1349 float m_mouseLookOffsetPitch
; // 14
1350 float m_cameraFadeDistScalarMin
; // 15
1351 float m_cameraFadeDistScalarMax
; // 16
1352 float m_cameraPitchOffset
; // 17
1353 int m_powerType
[3]; // 18-20
1354 int m_powerToken
[3]; // 21-23
1355 float m_facingLimitRight
; // 24
1356 float m_facingLimitLeft
; // 25
1357 float m_msslTrgtTurnLingering
; // 26
1358 float m_msslTrgtPitchLingering
; // 27
1359 float m_msslTrgtMouseLingering
; // 28
1360 float m_msslTrgtEndOpacity
; // 29
1361 float m_msslTrgtArcSpeed
; // 30
1362 float m_msslTrgtArcRepeat
; // 31
1363 float m_msslTrgtArcWidth
; // 32
1364 float m_msslTrgtImpactRadius
[2]; // 33-34
1365 char* m_msslTrgtArcTexture
; // 35
1366 char* m_msslTrgtImpactTexture
; // 36
1367 char* m_msslTrgtImpactModel
[2]; // 37-38
1368 float m_cameraYawOffset
; // 39
1369 uint32 m_uiLocomotionType
; // 40
1370 float m_msslTrgtImpactTexRadius
; // 41
1371 uint32 m_uiSeatIndicatorType
; // 42
1374 struct VehicleSeatEntry
1377 uint32 m_flags
; // 1
1378 int32 m_attachmentID
; // 2
1379 float m_attachmentOffsetX
; // 3
1380 float m_attachmentOffsetY
; // 4
1381 float m_attachmentOffsetZ
; // 5
1382 float m_enterPreDelay
; // 6
1383 float m_enterSpeed
; // 7
1384 float m_enterGravity
; // 8
1385 float m_enterMinDuration
; // 9
1386 float m_enterMaxDuration
; // 10
1387 float m_enterMinArcHeight
; // 11
1388 float m_enterMaxArcHeight
; // 12
1389 int32 m_enterAnimStart
; // 13
1390 int32 m_enterAnimLoop
; // 14
1391 int32 m_rideAnimStart
; // 15
1392 int32 m_rideAnimLoop
; // 16
1393 int32 m_rideUpperAnimStart
; // 17
1394 int32 m_rideUpperAnimLoop
; // 18
1395 float m_exitPreDelay
; // 19
1396 float m_exitSpeed
; // 20
1397 float m_exitGravity
; // 21
1398 float m_exitMinDuration
; // 22
1399 float m_exitMaxDuration
; // 23
1400 float m_exitMinArcHeight
; // 24
1401 float m_exitMaxArcHeight
; // 25
1402 int32 m_exitAnimStart
; // 26
1403 int32 m_exitAnimLoop
; // 27
1404 int32 m_exitAnimEnd
; // 28
1405 float m_passengerYaw
; // 29
1406 float m_passengerPitch
; // 30
1407 float m_passengerRoll
; // 31
1408 int32 m_passengerAttachmentID
; // 32
1409 int32 m_vehicleEnterAnim
; // 33
1410 int32 m_vehicleExitAnim
; // 34
1411 int32 m_vehicleRideAnimLoop
; // 35
1412 int32 m_vehicleEnterAnimBone
; // 36
1413 int32 m_vehicleExitAnimBone
; // 37
1414 int32 m_vehicleRideAnimLoopBone
; // 38
1415 float m_vehicleEnterAnimDelay
; // 39
1416 float m_vehicleExitAnimDelay
; // 40
1417 uint32 m_vehicleAbilityDisplay
; // 41
1418 uint32 m_enterUISoundID
; // 42
1419 uint32 m_exitUISoundID
; // 43
1420 int32 m_uiSkin
; // 44
1421 uint32 m_flagsB
; // 45
1424 struct WorldMapAreaEntry
1428 uint32 area_id
; // 2 index (continent 0 areas ignored)
1429 //char* internal_name // 3
1434 int32 virtual_map_id
; // 8 -1 (map_id have correct map) other: virtual map where zone show (map_id - where zone in fact internally)
1437 struct WorldSafeLocsEntry
1444 //char* name[16] // 5-20 name, unused
1445 // 21 name flags, unused
1448 // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
1449 #if defined( __GNUC__ )
1455 // Structures not used for casting to loaded DBC data and not required then packing
1456 struct TalentSpellPos
1458 TalentSpellPos() : talent_id(0), rank(0) {}
1459 TalentSpellPos(uint16 _talent_id
, uint8 _rank
) : talent_id(_talent_id
), rank(_rank
) {}
1465 typedef std::map
<uint32
,TalentSpellPos
> TalentSpellPosMap
;
1467 struct TaxiPathBySourceAndDestination
1469 TaxiPathBySourceAndDestination() : ID(0),price(0) {}
1470 TaxiPathBySourceAndDestination(uint32 _id
,uint32 _price
) : ID(_id
),price(_price
) {}
1475 typedef std::map
<uint32
,TaxiPathBySourceAndDestination
> TaxiPathSetForSource
;
1476 typedef std::map
<uint32
,TaxiPathSetForSource
> TaxiPathSetBySource
;
1480 TaxiPathNode() : mapid(0), x(0),y(0),z(0),actionFlag(0),delay(0) {}
1481 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
) {}
1490 typedef std::vector
<TaxiPathNode
> TaxiPathNodeList
;
1491 typedef std::vector
<TaxiPathNodeList
> TaxiPathNodesByPath
;
1493 #define TaxiMaskSize 12
1494 typedef uint32 TaxiMask
[TaxiMaskSize
];