2 * Copyright (C) 2005-2010 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_DBCSTORES_H
20 #define MANGOS_DBCSTORES_H
23 #include "Database/DBCStore.h"
24 #include "DBCStructure.h"
28 bool IsAcceptableClientBuild(uint32 build
);
29 std::string
AcceptableClientBuildsListStr();
31 typedef std::list
<uint32
> SimpleFactionsList
;
33 SimpleFactionsList
const* GetFactionTeamList(uint32 faction
);
34 char* GetPetName(uint32 petfamily
, uint32 dbclang
);
35 uint32
GetTalentSpellCost(uint32 spellId
);
36 TalentSpellPos
const* GetTalentSpellPos(uint32 spellId
);
38 int32
GetAreaFlagByAreaID(uint32 area_id
); // -1 if not found
39 uint32
GetAreaFlagByMapId(uint32 mapid
);
41 MANGOS_DLL_SPEC AreaTableEntry
const* GetAreaEntryByAreaID(uint32 area_id
);
42 MANGOS_DLL_SPEC AreaTableEntry
const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag
,uint32 map_id
);
44 uint32
GetVirtualMapForMapAndZone(uint32 mapid
, uint32 zoneId
);
52 ContentLevels
GetContentLevelsForMapAndZone(uint32 mapid
, uint32 zoneId
);
54 ChatChannelsEntry
const* GetChannelEntryFor(uint32 channel_id
);
56 bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId
, uint32 requiredTotemCategoryId
);
58 bool Zone2MapCoordinates(float& x
,float& y
,uint32 zone
);
59 bool Map2ZoneCoordinates(float& x
,float& y
,uint32 zone
);
61 typedef std::map
<uint32
/*pair32(map,diff)*/,MapDifficulty
> MapDifficultyMap
;
62 MapDifficulty
const* GetMapDifficultyData(uint32 mapId
, Difficulty difficulty
);
64 uint32
const* /*[3]*/ GetTalentTabPages(uint32 cls
);
66 PvPDifficultyEntry
const* GetBattlegroundBracketByLevel(uint32 mapid
, uint32 level
);
67 PvPDifficultyEntry
const* GetBattlegroundBracketById(uint32 mapid
, BattleGroundBracketId id
);
69 extern DBCStorage
<AchievementEntry
> sAchievementStore
;
70 extern DBCStorage
<AchievementCriteriaEntry
> sAchievementCriteriaStore
;
71 extern DBCStorage
<AreaTableEntry
> sAreaStore
;// recommend access using functions
72 extern DBCStorage
<AreaGroupEntry
> sAreaGroupStore
;
73 extern DBCStorage
<AreaTriggerEntry
> sAreaTriggerStore
;
74 extern DBCStorage
<AuctionHouseEntry
> sAuctionHouseStore
;
75 extern DBCStorage
<BankBagSlotPricesEntry
> sBankBagSlotPricesStore
;
76 extern DBCStorage
<BarberShopStyleEntry
> sBarberShopStyleStore
;
77 extern DBCStorage
<BattlemasterListEntry
> sBattlemasterListStore
;
78 //extern DBCStorage <ChatChannelsEntry> sChatChannelsStore; -- accessed using function, no usable index
79 extern DBCStorage
<CharStartOutfitEntry
> sCharStartOutfitStore
;
80 extern DBCStorage
<CharTitlesEntry
> sCharTitlesStore
;
81 extern DBCStorage
<ChrClassesEntry
> sChrClassesStore
;
82 extern DBCStorage
<ChrRacesEntry
> sChrRacesStore
;
83 extern DBCStorage
<CinematicSequencesEntry
> sCinematicSequencesStore
;
84 extern DBCStorage
<CreatureDisplayInfoEntry
> sCreatureDisplayInfoStore
;
85 extern DBCStorage
<CreatureFamilyEntry
> sCreatureFamilyStore
;
86 extern DBCStorage
<CreatureSpellDataEntry
> sCreatureSpellDataStore
;
87 extern DBCStorage
<CreatureTypeEntry
> sCreatureTypeStore
;
88 extern DBCStorage
<CurrencyTypesEntry
> sCurrencyTypesStore
;
89 extern DBCStorage
<DurabilityCostsEntry
> sDurabilityCostsStore
;
90 extern DBCStorage
<DurabilityQualityEntry
> sDurabilityQualityStore
;
91 extern DBCStorage
<EmotesEntry
> sEmotesStore
;
92 extern DBCStorage
<EmotesTextEntry
> sEmotesTextStore
;
93 extern DBCStorage
<FactionEntry
> sFactionStore
;
94 extern DBCStorage
<FactionTemplateEntry
> sFactionTemplateStore
;
95 extern DBCStorage
<GameObjectDisplayInfoEntry
> sGameObjectDisplayInfoStore
;
96 extern DBCStorage
<GemPropertiesEntry
> sGemPropertiesStore
;
97 extern DBCStorage
<GlyphPropertiesEntry
> sGlyphPropertiesStore
;
98 extern DBCStorage
<GlyphSlotEntry
> sGlyphSlotStore
;
100 extern DBCStorage
<GtBarberShopCostBaseEntry
> sGtBarberShopCostBaseStore
;
101 extern DBCStorage
<GtCombatRatingsEntry
> sGtCombatRatingsStore
;
102 extern DBCStorage
<GtChanceToMeleeCritBaseEntry
> sGtChanceToMeleeCritBaseStore
;
103 extern DBCStorage
<GtChanceToMeleeCritEntry
> sGtChanceToMeleeCritStore
;
104 extern DBCStorage
<GtChanceToSpellCritBaseEntry
> sGtChanceToSpellCritBaseStore
;
105 extern DBCStorage
<GtChanceToSpellCritEntry
> sGtChanceToSpellCritStore
;
106 extern DBCStorage
<GtOCTRegenHPEntry
> sGtOCTRegenHPStore
;
107 //extern DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore; -- not used currently
108 extern DBCStorage
<GtRegenHPPerSptEntry
> sGtRegenHPPerSptStore
;
109 extern DBCStorage
<GtRegenMPPerSptEntry
> sGtRegenMPPerSptStore
;
110 extern DBCStorage
<HolidaysEntry
> sHolidaysStore
;
111 extern DBCStorage
<ItemEntry
> sItemStore
;
112 extern DBCStorage
<ItemBagFamilyEntry
> sItemBagFamilyStore
;
113 //extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
114 extern DBCStorage
<ItemExtendedCostEntry
> sItemExtendedCostStore
;
115 extern DBCStorage
<ItemLimitCategoryEntry
> sItemLimitCategoryStore
;
116 extern DBCStorage
<ItemRandomPropertiesEntry
> sItemRandomPropertiesStore
;
117 extern DBCStorage
<ItemRandomSuffixEntry
> sItemRandomSuffixStore
;
118 extern DBCStorage
<ItemSetEntry
> sItemSetStore
;
119 extern DBCStorage
<LockEntry
> sLockStore
;
120 extern DBCStorage
<MailTemplateEntry
> sMailTemplateStore
;
121 extern DBCStorage
<MapEntry
> sMapStore
;
122 //extern DBCStorage <MapDifficultyEntry> sMapDifficultyStore; -- use GetMapDifficultyData insteed
123 extern MapDifficultyMap sMapDifficultyMap
;
124 extern DBCStorage
<MovieEntry
> sMovieStore
;
125 extern DBCStorage
<QuestFactionRewardEntry
> sQuestFactionRewardStore
;
126 extern DBCStorage
<QuestSortEntry
> sQuestSortStore
;
127 extern DBCStorage
<QuestXPLevel
> sQuestXPLevelStore
;
128 //extern DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore; -- use GetBattlegroundSlotByLevel for access
129 extern DBCStorage
<RandomPropertiesPointsEntry
> sRandomPropertiesPointsStore
;
130 extern DBCStorage
<ScalingStatDistributionEntry
> sScalingStatDistributionStore
;
131 extern DBCStorage
<ScalingStatValuesEntry
> sScalingStatValuesStore
;
132 extern DBCStorage
<SkillLineEntry
> sSkillLineStore
;
133 extern DBCStorage
<SkillLineAbilityEntry
> sSkillLineAbilityStore
;
134 extern DBCStorage
<SoundEntriesEntry
> sSoundEntriesStore
;
135 extern DBCStorage
<SpellCastTimesEntry
> sSpellCastTimesStore
;
136 extern DBCStorage
<SpellDurationEntry
> sSpellDurationStore
;
137 extern DBCStorage
<SpellFocusObjectEntry
> sSpellFocusObjectStore
;
138 extern DBCStorage
<SpellItemEnchantmentEntry
> sSpellItemEnchantmentStore
;
139 extern DBCStorage
<SpellItemEnchantmentConditionEntry
> sSpellItemEnchantmentConditionStore
;
140 extern SpellCategoryStore sSpellCategoryStore
;
141 extern PetFamilySpellsStore sPetFamilySpellsStore
;
142 extern DBCStorage
<SpellRadiusEntry
> sSpellRadiusStore
;
143 extern DBCStorage
<SpellRangeEntry
> sSpellRangeStore
;
144 extern DBCStorage
<SpellRuneCostEntry
> sSpellRuneCostStore
;
145 extern DBCStorage
<SpellShapeshiftEntry
> sSpellShapeshiftStore
;
146 extern DBCStorage
<SpellEntry
> sSpellStore
;
147 extern DBCStorage
<StableSlotPricesEntry
> sStableSlotPricesStore
;
148 extern DBCStorage
<SummonPropertiesEntry
> sSummonPropertiesStore
;
149 extern DBCStorage
<TalentEntry
> sTalentStore
;
150 extern DBCStorage
<TalentTabEntry
> sTalentTabStore
;
151 extern DBCStorage
<TaxiNodesEntry
> sTaxiNodesStore
;
152 extern DBCStorage
<TaxiPathEntry
> sTaxiPathStore
;
153 extern TaxiMask sTaxiNodesMask
;
154 extern TaxiMask sOldContinentsNodesMask
;
155 extern TaxiPathSetBySource sTaxiPathSetBySource
;
156 extern TaxiPathNodesByPath sTaxiPathNodesByPath
;
157 extern DBCStorage
<TotemCategoryEntry
> sTotemCategoryStore
;
158 extern DBCStorage
<VehicleEntry
> sVehicleStore
;
159 extern DBCStorage
<VehicleSeatEntry
> sVehicleSeatStore
;
160 //extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
161 extern DBCStorage
<WorldMapOverlayEntry
> sWorldMapOverlayStore
;
162 extern DBCStorage
<WorldSafeLocsEntry
> sWorldSafeLocsStore
;
164 void LoadDBCStores(const std::string
& dataPath
);
166 // script support functions
167 MANGOS_DLL_SPEC DBCStorage
<SoundEntriesEntry
> const* GetSoundEntriesStore();
168 MANGOS_DLL_SPEC DBCStorage
<SpellEntry
> const* GetSpellStore();
169 MANGOS_DLL_SPEC DBCStorage
<SpellRangeEntry
> const* GetSpellRangeStore();
170 MANGOS_DLL_SPEC DBCStorage
<FactionEntry
> const* GetFactionStore();
171 MANGOS_DLL_SPEC DBCStorage
<ItemEntry
> const* GetItemDisplayStore();
172 MANGOS_DLL_SPEC DBCStorage
<CreatureDisplayInfoEntry
> const* GetCreatureDisplayStore();
173 MANGOS_DLL_SPEC DBCStorage
<EmotesEntry
> const* GetEmotesStore();
174 MANGOS_DLL_SPEC DBCStorage
<EmotesTextEntry
> const* GetEmotesTextStore();