Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
DBCStores.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "DBCfmt.h"
7#include "DBCStores.h"
8#include "ItemPrototype.h"
9#include "Log.h"
10#include "ObjectDefines.h"
11#include "SharedDefines.h"
12#include "SpellInfo.h"
13#include "SpellMgr.h"
14#include "Timer.h"
15#include "TransportMgr.h"
16
17#include <map>
18
19typedef std::map<uint16, uint32> AreaFlagByAreaID;
20typedef std::map<uint32, uint32> AreaFlagByMapID;
21
23{
25 {
26 }
27
28 bool operator <(const WMOAreaTableTripple& b) const
29 {
30 return memcmp(this, &b, sizeof(WMOAreaTableTripple)) < 0;
31 }
32
33 // ordered by entropy; that way memcmp will have a minimal medium runtime
37};
38
39typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const*> WMOAreaInfoByTripple;
40
41DBCStorage <AreaTableEntry> sAreaStore(AreaTableEntryfmt);
42DBCStorage <AreaGroupEntry> sAreaGroupStore(AreaGroupEntryfmt);
43//DBCStorage <AreaPOIEntry> sAreaPOIStore(AreaPOIEntryfmt);
45static AreaFlagByMapID sAreaFlagByMapID; // for instances without generated *.map files
46
48
49DBCStorage <AchievementEntry> sAchievementStore(Achievementfmt);
50//DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore(AchievementCriteriafmt);
51DBCStorage <AreaTriggerEntry> sAreaTriggerStore(AreaTriggerEntryfmt);
52DBCStorage <ArmorLocationEntry> sArmorLocationStore(ArmorLocationfmt);
53DBCStorage <AuctionHouseEntry> sAuctionHouseStore(AuctionHouseEntryfmt);
54DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt);
55DBCStorage <BannedAddOnsEntry> sBannedAddOnsStore(BannedAddOnsfmt);
56DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt);
57DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore(BarberShopStyleEntryfmt);
58DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore(CharStartOutfitEntryfmt);
59std::map<uint32, CharStartOutfitEntry const*> sCharStartOutfitMap;
60DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt);
61DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt);
62DBCStorage <ChrClassesEntry> sChrClassesStore(ChrClassesEntryfmt);
63DBCStorage <ChrRacesEntry> sChrRacesStore(ChrRacesEntryfmt);
64DBCStorage <ChrPowerTypesEntry> sChrPowerTypesStore(ChrClassesXPowerTypesfmt);
65DBCStorage <ChrSpecializationEntry> sChrSpecializationStore(ChrSpecializationfmt);
66DBCStorage <CinematicCameraEntry> sCinematicCameraStore(CinematicCameraEntryfmt);
67DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore(CinematicSequencesEntryfmt);
68DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayInfofmt);
69DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
70DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore(CreatureModelDatafmt);
71DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt);
72DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt);
73DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore(CurrencyTypesfmt);
74DBCStorage <CriteriaEntry> sCriteriaStore(Criteriafmt);
75DBCStorage <CriteriaTreeEntry> sCriteriaTreeStore(CriteriaTreefmt);
77
78DBCStorage <DestructibleModelDataEntry> sDestructibleModelDataStore(DestructibleModelDatafmt);
79DBCStorage <DifficultyEntry> sDifficultyStore(Difficultyfmt);
80DBCStorage <DungeonEncounterEntry> sDungeonEncounterStore(DungeonEncounterfmt);
81DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore(DurabilityQualityfmt);
82DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore(DurabilityCostsfmt);
83
84DBCStorage <EmotesEntry> sEmotesStore(EmotesEntryfmt);
85DBCStorage <EmotesTextEntry> sEmotesTextStore(EmotesTextEntryfmt);
86
87typedef std::map<uint32, SimpleFactionsList> FactionTeamMap;
89DBCStorage <FactionEntry> sFactionStore(FactionEntryfmt);
90DBCStorage <FactionTemplateEntry> sFactionTemplateStore(FactionTemplateEntryfmt);
92DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt);
93DBCStorage <GemPropertiesEntry> sGemPropertiesStore(GemPropertiesEntryfmt);
94DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore(GlyphPropertiesfmt);
95DBCStorage <GlyphSlotEntry> sGlyphSlotStore(GlyphSlotfmt);
96
97DBCStorage <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt);
98DBCStorage <GtBattlePetXpEntry> sGtBattlePetXpStore(GtBattlePetXpfmt);
99DBCStorage <GtCombatRatingsEntry> sGtCombatRatingsStore(GtCombatRatingsfmt);
100DBCStorage <GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt);
101DBCStorage <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt);
102DBCStorage <GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore(GtChanceToSpellCritBasefmt);
103DBCStorage <GtChanceToSpellCritEntry> sGtChanceToSpellCritStore(GtChanceToSpellCritfmt);
104DBCStorage <GtNPCManaCostScalerEntry> sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt);
105DBCStorage <GtOCTClassCombatRatingScalarEntry> sGtOCTClassCombatRatingScalarStore(GtOCTClassCombatRatingScalarfmt);
106DBCStorage <gtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore(GtOCTHpPerStaminafmt);
107DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore(GtRegenMPPerSptfmt);
108DBCStorage <GtSpellScalingEntry> sGtSpellScalingStore(GtSpellScalingfmt);
109DBCStorage <GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore(GtOCTBaseHPByClassfmt);
110DBCStorage <GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore(GtOCTBaseMPByClassfmt);
111DBCStorage <GuildPerkSpellsEntry> sGuildPerkSpellsStore(GuildPerkSpellsfmt);
112
113DBCStorage <HolidaysEntry> sHolidaysStore(Holidaysfmt);
114
115DBCStorage <ImportPriceArmorEntry> sImportPriceArmorStore(ImportPriceArmorfmt);
116DBCStorage <ImportPriceQualityEntry> sImportPriceQualityStore(ImportPriceQualityfmt);
117DBCStorage <ImportPriceShieldEntry> sImportPriceShieldStore(ImportPriceShieldfmt);
118DBCStorage <ImportPriceWeaponEntry> sImportPriceWeaponStore(ImportPriceWeaponfmt);
119DBCStorage <ItemPriceBaseEntry> sItemPriceBaseStore(ItemPriceBasefmt);
120DBCStorage <ItemReforgeEntry> sItemReforgeStore(ItemReforgefmt);
121DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore(ItemArmorQualityfmt);
122DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore(ItemArmorShieldfmt);
123DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore(ItemArmorTotalfmt);
124DBCStorage <ItemClassEntry> sItemClassStore(ItemClassfmt);
125//DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore(ItemBagFamilyfmt);
126DBCStorage <ItemDamageEntry> sItemDamageAmmoStore(ItemDamagefmt);
127DBCStorage <ItemDamageEntry> sItemDamageOneHandStore(ItemDamagefmt);
128DBCStorage <ItemDamageEntry> sItemDamageOneHandCasterStore(ItemDamagefmt);
129DBCStorage <ItemDamageEntry> sItemDamageRangedStore(ItemDamagefmt);
130DBCStorage <ItemDamageEntry> sItemDamageThrownStore(ItemDamagefmt);
131DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore(ItemDamagefmt);
132DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore(ItemDamagefmt);
133DBCStorage <ItemDamageEntry> sItemDamageWandStore(ItemDamagefmt);
134DBCStorage <ItemDisenchantLootEntry> sItemDisenchantLootStore(ItemDisenchantLootfmt);
135//DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently
136DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore(ItemLimitCategoryEntryfmt);
137DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomPropertiesfmt);
138DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt);
139DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);
140
141DBCStorage <LFGDungeonEntry> sLFGDungeonStore(LFGDungeonEntryfmt);
142DBCStorage <LiquidTypeEntry> sLiquidTypeStore(LiquidTypefmt);
143DBCStorage <LockEntry> sLockStore(LockEntryfmt);
144
145DBCStorage <MailTemplateEntry> sMailTemplateStore(MailTemplateEntryfmt);
146DBCStorage <MapEntry> sMapStore(MapEntryfmt);
147
148// DBC used only for initialization sMapDifficultyMap at startup.
149DBCStorage <MapDifficultyEntry> sMapDifficultyStore(MapDifficultyEntryfmt); // only for loading
151
152DBCStorage <ModifierTreeEntry> sModifierTreeStore(ModifierTreefmt);
153DBCStorage <MovieEntry> sMovieStore(MovieEntryfmt);
154DBCStorage <MountCapabilityEntry> sMountCapabilityStore(MountCapabilityfmt);
155DBCStorage <MountTypeEntry> sMountTypeStore(MountTypefmt);
156
157DBCStorage <NameGenEntry> sNameGenStore(NameGenfmt);
159
160DBCStorage <OverrideSpellDataEntry> sOverrideSpellDataStore(OverrideSpellDatafmt);
161
162DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore(PvPDifficultyfmt);
163
164DBCStorage <QuestSortEntry> sQuestSortStore(QuestSortEntryfmt);
165DBCStorage <QuestXPEntry> sQuestXPStore(QuestXPfmt);
166DBCStorage <QuestFactionRewEntry> sQuestFactionRewardStore(QuestFactionRewardfmt);
167DBCStorage <QuestPOIPointEntry> sQuestPOIPointStore(QuestPOIPointfmt);
168DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore(RandomPropertiesPointsfmt);
169
170DBCStorage <ResearchBranchEntry> sResearchBranchStore(ResearchBranchfmt);
171DBCStorage <ResearchProjectEntry> sResearchProjectStore(ResearchProjectfmt);
172DBCStorage <ResearchSiteEntry> sResearchSiteStore(ResearchSitefmt);
174
175DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore(ScalingStatDistributionfmt);
176DBCStorage <ScalingStatValuesEntry> sScalingStatValuesStore(ScalingStatValuesfmt);
177
178DBCStorage <SkillLineEntry> sSkillLineStore(SkillLinefmt);
179DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore(SkillLineAbilityfmt);
180
181DBCStorage <SoundEntriesEntry> sSoundEntriesStore(SoundEntriesfmt);
182
183DBCStorage <SpecializationSpellsEntry> sSpecializationSpellsStore(SpecializationSpellsfmt);
184DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore(SpellItemEnchantmentfmt);
185DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt);
186DBCStorage <SpellEntry> sSpellStore(SpellEntryfmt);
187DBCStorage <SpellMiscEntry> sSpellMiscStore(SpellMiscfmt);
188DBCStorage <SpellEffectScalingEntry> sSpellEffectScalingStore(SpellEffectScalingfmt);
189
195
196DBCStorage <SpellScalingEntry> sSpellScalingStore(SpellScalingEntryfmt);
197DBCStorage <SpellTotemsEntry> sSpellTotemsStore(SpellTotemsEntryfmt);
198DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore(SpellTargetRestrictionsEntryfmt);
199DBCStorage <SpellPowerEntry> sSpellPowerStore(SpellPowerEntryfmt);
200DBCStorage <SpellLevelsEntry> sSpellLevelsStore(SpellLevelsEntryfmt);
201DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore(SpellInterruptsEntryfmt);
202DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore(SpellEquippedItemsEntryfmt);
203DBCStorage <SpellClassOptionsEntry> sSpellClassOptionsStore(SpellClassOptionsEntryfmt);
204DBCStorage <SpellCooldownsEntry> sSpellCooldownsStore(SpellCooldownsEntryfmt);
205DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore(SpellAuraOptionsEntryfmt);
206DBCStorage <SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore(SpellAuraRestrictionsEntryfmt);
207DBCStorage <SpellCastingRequirementsEntry> sSpellCastingRequirementsStore(SpellCastingRequirementsEntryfmt);
208DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore(SpellCastTimefmt);
209DBCStorage <SpellCategoriesEntry> sSpellCategoriesStore(SpellCategoriesEntryfmt);
210DBCStorage <SpellCategoryEntry> sSpellCategoryStore(SpellCategoryfmt);
211DBCStorage <SpellEffectEntry> sSpellEffectStore(SpellEffectEntryfmt);
212DBCStorage <SpellDifficultyEntry> sSpellDifficultyStore(SpellDifficultyfmt);
213DBCStorage <SpellDurationEntry> sSpellDurationStore(SpellDurationfmt);
214DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt);
215DBCStorage <SpellRadiusEntry> sSpellRadiusStore(SpellRadiusfmt);
216DBCStorage <SpellRangeEntry> sSpellRangeStore(SpellRangefmt);
217DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore(SpellRuneCostfmt);
218DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftEntryfmt);
219DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore(SpellShapeshiftFormfmt);
220DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore(SummonPropertiesfmt);
221DBCStorage <TalentEntry> sTalentStore(TalentEntryfmt);
223typedef std::map<uint32, std::vector<uint32> > SpecializationSpellsMap;
224
226
227// store absolute bit position for first rank for talent inspect
229
230DBCStorage <TaxiNodesEntry> sTaxiNodesStore(TaxiNodesEntryfmt);
236
237// DBC used only for initialization sTaxiPathSetBySource at startup.
239DBCStorage <TaxiPathEntry> sTaxiPathStore(TaxiPathEntryfmt);
240
241// DBC used only for initialization sTaxiPathNodeStore at startup.
243static DBCStorage <TaxiPathNodeEntry> sTaxiPathNodeStore(TaxiPathNodeEntryfmt);
244
245DBCStorage <TotemCategoryEntry> sTotemCategoryStore(TotemCategoryEntryfmt);
246DBCStorage <TransportAnimationEntry> sTransportAnimationStore(TransportAnimationfmt);
247DBCStorage <TransportRotationEntry> sTransportRotationStore(TransportRotationfmt);
248DBCStorage <UnitPowerBarEntry> sUnitPowerBarStore(UnitPowerBarfmt);
249DBCStorage <VehicleEntry> sVehicleStore(VehicleEntryfmt);
250DBCStorage <VehicleSeatEntry> sVehicleSeatStore(VehicleSeatEntryfmt);
251DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore(WMOAreaTableEntryfmt);
252DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreaEntryfmt);
253DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore(WorldMapOverlayEntryfmt);
254DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt);
255DBCStorage <PhaseEntry> sPhaseStore(PhaseEntryfmt);
256DBCStorage <PhaseGroupEntry> sPhaseGroupStore(PhaseGroupfmt);
257
259
260typedef std::list<std::string> StoreProblemList;
261
263
264static bool LoadDBC_assert_print(uint32 fsize, uint32 rsize, const std::string& filename)
265{
266 SF_LOG_ERROR("misc", "Size of '%s' set by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
267
268 // ASSERT must fail after function call
269 return false;
270}
271
272template<class T>
273inline void LoadDBC(uint32& availableDbcLocales, StoreProblemList& errors, DBCStorage<T>& storage, std::string const& dbcPath, std::string const& filename, std::string const* customFormat = NULL, std::string const* customIndexName = NULL)
274{
275 // compatibility format and C++ structure sizes
277
278 ++DBCFileCount;
279 std::string dbcFilename = dbcPath + filename;
280 SqlDbc* sql = NULL;
281 if (customFormat)
282 sql = new SqlDbc(&filename, customFormat, customIndexName, storage.GetFormat());
283
284 if (storage.Load(dbcFilename.c_str(), sql))
285 {
286 for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
287 {
288 if (!(availableDbcLocales & (1 << i)))
289 continue;
290
291 std::string localizedName(dbcPath);
292 localizedName.append(localeNames[i]);
293 localizedName.push_back('/');
294 localizedName.append(filename);
295
296 if (!storage.LoadStringsFrom(localizedName.c_str()))
297 availableDbcLocales &= ~(1 << i); // mark as not available for speedup next checks
298 }
299 }
300 else
301 {
302 // sort problematic dbc to (1) non compatible and (2) non-existed
303 if (FILE* f = fopen(dbcFilename.c_str(), "rb"))
304 {
305 std::ostringstream stream;
306 stream << dbcFilename << " exists, and has " << storage.GetFieldCount() << " field(s) (expected " << strlen(storage.GetFormat()) << "). Extracted file might be from wrong client version or a database-update has been forgotten.";
307 std::string buf = stream.str();
308 errors.push_back(buf);
309 fclose(f);
310 }
311 else
312 errors.push_back(dbcFilename);
313 }
314
315 delete sql;
316}
317
318void LoadDBCStores(const std::string& dataPath)
319{
320 uint32 oldMSTime = getMSTime();
321
322 std::string dbcPath = dataPath + "dbc/";
323
324 StoreProblemList bad_dbc_files;
325 uint32 availableDbcLocales = 0xFFFFFFFF;
326
327 LoadDBC(availableDbcLocales, bad_dbc_files, sAreaStore, dbcPath, "AreaTable.dbc");
328
329 // must be after sAreaStore loading
330 for (uint32 i = 0; i < sAreaStore.GetNumRows(); ++i) // areaflag numbered from 0
331 {
332 if (AreaTableEntry const* area = sAreaStore.LookupEntry(i))
333 {
334 // fill AreaId->DBC records
335 sAreaFlagByAreaID.insert(AreaFlagByAreaID::value_type(uint16(area->m_ID), area->m_AreaBit));
336
337 // fill MapId->DBC records (skip sub zones and continents)
338 if (area->m_ParentAreaID == 0 && area->m_ContinentID != 0 && area->m_ContinentID != 1 && area->m_ContinentID != 530 && area->m_ContinentID != 571 && area->m_ContinentID != 860 && area->m_ContinentID != 870)
339 sAreaFlagByMapID.insert(AreaFlagByMapID::value_type(area->m_ContinentID, area->m_AreaBit));
340 }
341 }
342
343 LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementStore, dbcPath, "Achievement.dbc"/*, &CustomAchievementfmt, &CustomAchievementIndex*/);//15595
344 //LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementCriteriaStore, dbcPath, "Achievement_Criteria.dbc");//15595
345 LoadDBC(availableDbcLocales, bad_dbc_files, sAreaTriggerStore, dbcPath, "AreaTrigger.dbc");//15595
346 LoadDBC(availableDbcLocales, bad_dbc_files, sAreaGroupStore, dbcPath, "AreaGroup.dbc");//15595
347 //LoadDBC(availableDbcLocales, bad_dbc_files, sAreaPOIStore, dbcPath, "AreaPOI.dbc");//15595
348 LoadDBC(availableDbcLocales, bad_dbc_files, sAuctionHouseStore, dbcPath, "AuctionHouse.dbc");//15595
349 LoadDBC(availableDbcLocales, bad_dbc_files, sArmorLocationStore, dbcPath, "ArmorLocation.dbc");//15595
350 LoadDBC(availableDbcLocales, bad_dbc_files, sBankBagSlotPricesStore, dbcPath, "BankBagSlotPrices.dbc");//15595
351 LoadDBC(availableDbcLocales, bad_dbc_files, sBannedAddOnsStore, dbcPath, "BannedAddOns.dbc");
352 LoadDBC(availableDbcLocales, bad_dbc_files, sBattlemasterListStore, dbcPath, "BattleMasterList.dbc");//15595
353 LoadDBC(availableDbcLocales, bad_dbc_files, sBarberShopStyleStore, dbcPath, "BarberShopStyle.dbc");//15595
354 LoadDBC(availableDbcLocales, bad_dbc_files, sCharStartOutfitStore, dbcPath, "CharStartOutfit.dbc");//15595
355 for (uint32 i = 0; i < sCharStartOutfitStore.GetNumRows(); ++i)
356 if (CharStartOutfitEntry const* outfit = sCharStartOutfitStore.LookupEntry(i))
357 sCharStartOutfitMap[outfit->Race | (outfit->Class << 8) | (outfit->Gender << 16)] = outfit;
358
359 LoadDBC(availableDbcLocales, bad_dbc_files, sCharTitlesStore, dbcPath, "CharTitles.dbc");//15595
360 LoadDBC(availableDbcLocales, bad_dbc_files, sChatChannelsStore, dbcPath, "ChatChannels.dbc");//15595
361 LoadDBC(availableDbcLocales, bad_dbc_files, sChrClassesStore, dbcPath, "ChrClasses.dbc");//15595
362 LoadDBC(availableDbcLocales, bad_dbc_files, sChrRacesStore, dbcPath, "ChrRaces.dbc");//15595
363 LoadDBC(availableDbcLocales, bad_dbc_files, sChrPowerTypesStore, dbcPath, "ChrClassesXPowerTypes.dbc");//15595
364 for (uint32 i = 0; i < MAX_CLASSES; ++i)
365 for (uint32 j = 0; j < MAX_POWERS; ++j)
367
368 for (uint32 i = 0; i < sChrPowerTypesStore.GetNumRows(); ++i)
369 {
370 if (ChrPowerTypesEntry const* power = sChrPowerTypesStore.LookupEntry(i))
371 {
372 uint32 index = 0;
373 for (uint32 j = 0; j < MAX_POWERS; ++j)
374 if (PowersByClass[power->classId][j] != MAX_POWERS)
375 ++index;
376
377 PowersByClass[power->classId][power->power] = index;
378 }
379 }
380
381 LoadDBC(availableDbcLocales, bad_dbc_files, sCinematicCameraStore, dbcPath, "CinematicCamera.dbc"); // 18414
382 LoadDBC(availableDbcLocales, bad_dbc_files, sCinematicSequencesStore, dbcPath, "CinematicSequences.dbc");//15595
383 LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureDisplayInfoStore, dbcPath, "CreatureDisplayInfo.dbc");//15595
384 LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureFamilyStore, dbcPath, "CreatureFamily.dbc");//15595
385 LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureModelDataStore, dbcPath, "CreatureModelData.dbc");//15595
386 LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureSpellDataStore, dbcPath, "CreatureSpellData.dbc");//15595
387 LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureTypeStore, dbcPath, "CreatureType.dbc");//15595
388 LoadDBC(availableDbcLocales, bad_dbc_files, sCurrencyTypesStore, dbcPath, "CurrencyTypes.dbc");//15595
389 LoadDBC(availableDbcLocales, bad_dbc_files, sCriteriaStore, dbcPath, "Criteria.dbc");//18414
390 LoadDBC(availableDbcLocales, bad_dbc_files, sCriteriaTreeStore, dbcPath, "CriteriaTree.dbc");//18414
391 LoadDBC(availableDbcLocales, bad_dbc_files, sDestructibleModelDataStore, dbcPath, "DestructibleModelData.dbc");//15595
392 LoadDBC(availableDbcLocales, bad_dbc_files, sDifficultyStore, dbcPath, "Difficulty.dbc"); // 18414
393 LoadDBC(availableDbcLocales, bad_dbc_files, sDungeonEncounterStore, dbcPath, "DungeonEncounter.dbc");//15595
394 LoadDBC(availableDbcLocales, bad_dbc_files, sDurabilityCostsStore, dbcPath, "DurabilityCosts.dbc");//15595
395 LoadDBC(availableDbcLocales, bad_dbc_files, sDurabilityQualityStore, dbcPath, "DurabilityQuality.dbc");//15595
396 LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesStore, dbcPath, "Emotes.dbc");//15595
397 LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesTextStore, dbcPath, "EmotesText.dbc");//15595
398 LoadDBC(availableDbcLocales, bad_dbc_files, sFactionStore, dbcPath, "Faction.dbc");//15595
399 for (uint32 i = 0; i < sFactionStore.GetNumRows(); ++i)
400 {
401 FactionEntry const* faction = sFactionStore.LookupEntry(i);
402 if (faction && faction->team)
403 {
404 SimpleFactionsList& flist = sFactionTeamMap[faction->team];
405 flist.push_back(i);
406 }
407 }
408
409 LoadDBC(availableDbcLocales, bad_dbc_files, sFactionTemplateStore, dbcPath, "FactionTemplate.dbc");//15595
410 LoadDBC(availableDbcLocales, bad_dbc_files, sGameObjectDisplayInfoStore, dbcPath, "GameObjectDisplayInfo.dbc");//15595
411 for (uint32 i = 0; i < sGameObjectDisplayInfoStore.GetNumRows(); ++i)
412 {
413 if (GameObjectDisplayInfoEntry const* info = sGameObjectDisplayInfoStore.LookupEntry(i))
414 {
415 if (info->maxX < info->minX)
416 std::swap(*(float*)(&info->maxX), *(float*)(&info->minX));
417 if (info->maxY < info->minY)
418 std::swap(*(float*)(&info->maxY), *(float*)(&info->minY));
419 if (info->maxZ < info->minZ)
420 std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ));
421 }
422 }
423
424 LoadDBC(availableDbcLocales, bad_dbc_files, sGemPropertiesStore, dbcPath, "GemProperties.dbc");//15595
425 LoadDBC(availableDbcLocales, bad_dbc_files, sGlyphPropertiesStore, dbcPath, "GlyphProperties.dbc");//15595
426 LoadDBC(availableDbcLocales, bad_dbc_files, sGlyphSlotStore, dbcPath, "GlyphSlot.dbc");//15595
427 LoadDBC(availableDbcLocales, bad_dbc_files, sGtBarberShopCostBaseStore, dbcPath, "gtBarberShopCostBase.dbc");//15595
428 LoadDBC(availableDbcLocales, bad_dbc_files, sGtBattlePetXpStore, dbcPath, "gtBattlePetXP.dbc");
429 LoadDBC(availableDbcLocales, bad_dbc_files, sGtCombatRatingsStore, dbcPath, "gtCombatRatings.dbc");//15595
430 LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToMeleeCritBaseStore, dbcPath, "gtChanceToMeleeCritBase.dbc");//15595
431 LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToMeleeCritStore, dbcPath, "gtChanceToMeleeCrit.dbc");//15595
432 LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToSpellCritBaseStore, dbcPath, "gtChanceToSpellCritBase.dbc");//15595
433 LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToSpellCritStore, dbcPath, "gtChanceToSpellCrit.dbc");//15595
434 LoadDBC(availableDbcLocales, bad_dbc_files, sGtNPCManaCostScalerStore, dbcPath, "gtNPCManaCostScaler.dbc");
435 LoadDBC(availableDbcLocales, bad_dbc_files, sGtOCTClassCombatRatingScalarStore, dbcPath, "gtOCTClassCombatRatingScalar.dbc");//15595
436 LoadDBC(availableDbcLocales, bad_dbc_files, sGtOCTHpPerStaminaStore, dbcPath, "gtOCTHpPerStamina.dbc");//15595
437 LoadDBC(availableDbcLocales, bad_dbc_files, sGtRegenMPPerSptStore, dbcPath, "gtRegenMPPerSpt.dbc");//15595
438 LoadDBC(availableDbcLocales, bad_dbc_files, sGtSpellScalingStore, dbcPath, "gtSpellScaling.dbc");//15595
439 LoadDBC(availableDbcLocales, bad_dbc_files, sGtOCTBaseHPByClassStore, dbcPath, "gtOCTBaseHPByClass.dbc");//15595
440 LoadDBC(availableDbcLocales, bad_dbc_files, sGtOCTBaseMPByClassStore, dbcPath, "gtOCTBaseMPByClass.dbc");//15595
441 LoadDBC(availableDbcLocales, bad_dbc_files, sGuildPerkSpellsStore, dbcPath, "GuildPerkSpells.dbc");//15595
442
443 LoadDBC(availableDbcLocales, bad_dbc_files, sHolidaysStore, dbcPath, "Holidays.dbc");//15595
444 LoadDBC(availableDbcLocales, bad_dbc_files, sImportPriceArmorStore, dbcPath, "ImportPriceArmor.dbc"); // 15595
445 LoadDBC(availableDbcLocales, bad_dbc_files, sImportPriceQualityStore, dbcPath, "ImportPriceQuality.dbc"); // 15595
446 LoadDBC(availableDbcLocales, bad_dbc_files, sImportPriceShieldStore, dbcPath, "ImportPriceShield.dbc"); // 15595
447 LoadDBC(availableDbcLocales, bad_dbc_files, sImportPriceWeaponStore, dbcPath, "ImportPriceWeapon.dbc"); // 15595
448 LoadDBC(availableDbcLocales, bad_dbc_files, sItemPriceBaseStore, dbcPath, "ItemPriceBase.dbc"); // 15595
449 LoadDBC(availableDbcLocales, bad_dbc_files, sItemReforgeStore, dbcPath, "ItemReforge.dbc"); // 15595
450 //LoadDBC(availableDbcLocales, bad_dbc_files, sItemBagFamilyStore, dbcPath, "ItemBagFamily.dbc");//15595
451 LoadDBC(availableDbcLocales, bad_dbc_files, sItemClassStore, dbcPath, "ItemClass.dbc"); // 15595
452 //LoadDBC(dbcCount, availableDbcLocales, bad_dbc_files, sItemDisplayInfoStore, dbcPath, "ItemDisplayInfo.dbc"); -- not used currently
453 LoadDBC(availableDbcLocales, bad_dbc_files, sItemLimitCategoryStore, dbcPath, "ItemLimitCategory.dbc");//15595
454 LoadDBC(availableDbcLocales, bad_dbc_files, sItemRandomPropertiesStore, dbcPath, "ItemRandomProperties.dbc");//15595
455 LoadDBC(availableDbcLocales, bad_dbc_files, sItemRandomSuffixStore, dbcPath, "ItemRandomSuffix.dbc");//15595
456 LoadDBC(availableDbcLocales, bad_dbc_files, sItemSetStore, dbcPath, "ItemSet.dbc");//15595
457
458 LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorQualityStore, dbcPath, "ItemArmorQuality.dbc");//15595
459 LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorShieldStore, dbcPath, "ItemArmorShield.dbc");//15595
460 LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorTotalStore, dbcPath, "ItemArmorTotal.dbc");//15595
461 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageAmmoStore, dbcPath, "ItemDamageAmmo.dbc");//15595
462 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageOneHandStore, dbcPath, "ItemDamageOneHand.dbc");//15595
463 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageOneHandCasterStore, dbcPath, "ItemDamageOneHandCaster.dbc");//15595
464 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageRangedStore, dbcPath, "ItemDamageRanged.dbc");//15595
465 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageThrownStore, dbcPath, "ItemDamageThrown.dbc");//15595
466 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageTwoHandStore, dbcPath, "ItemDamageTwoHand.dbc");//15595
467 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageTwoHandCasterStore, dbcPath, "ItemDamageTwoHandCaster.dbc");//15595
468 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageWandStore, dbcPath, "ItemDamageWand.dbc");//15595
469 LoadDBC(availableDbcLocales, bad_dbc_files, sItemDisenchantLootStore, dbcPath, "ItemDisenchantLoot.dbc");
470
471 LoadDBC(availableDbcLocales, bad_dbc_files, sLFGDungeonStore, dbcPath, "LfgDungeons.dbc");//15595
472 LoadDBC(availableDbcLocales, bad_dbc_files, sLiquidTypeStore, dbcPath, "LiquidType.dbc");//15595
473 LoadDBC(availableDbcLocales, bad_dbc_files, sLockStore, dbcPath, "Lock.dbc");//15595
474
475 LoadDBC(availableDbcLocales, bad_dbc_files, sMailTemplateStore, dbcPath, "MailTemplate.dbc");//15595
476 LoadDBC(availableDbcLocales, bad_dbc_files, sMapStore, dbcPath, "Map.dbc");//15595
477 LoadDBC(availableDbcLocales, bad_dbc_files, sMapDifficultyStore, dbcPath, "MapDifficulty.dbc");//15595
478 // fill data
479 sMapDifficultyMap[0][0] = MapDifficulty(DIFFICULTY_NONE, "", 0, 0, false);//map 0 is missingg from MapDifficulty.dbc use this till its ported to sql
480
481 auto addScenarioDifficulty = [](uint32 mapId, DifficultyID difficulty, uint32 maxPlayers)
482 {
483 sMapDifficultyMap[mapId][difficulty] = MapDifficulty(difficulty, "", 0, maxPlayers, false);
484 };
485
486 addScenarioDifficulty(999, DIFFICULTY_SCE_NORMAL, 3);
487 addScenarioDifficulty(1000, DIFFICULTY_SCE_NORMAL, 3);
488 addScenarioDifficulty(1005, DIFFICULTY_SCE_NORMAL, 3);
489 addScenarioDifficulty(1005, DIFFICULTY_SCE_HEROIC, 3);
490 addScenarioDifficulty(1024, DIFFICULTY_SCE_NORMAL, 3);
491 addScenarioDifficulty(1030, DIFFICULTY_SCE_NORMAL, 3);
492 addScenarioDifficulty(1030, DIFFICULTY_SCE_HEROIC, 3);
493 addScenarioDifficulty(1031, DIFFICULTY_SCE_NORMAL, 3);
494 addScenarioDifficulty(1048, DIFFICULTY_SCE_NORMAL, 3);
495 addScenarioDifficulty(1050, DIFFICULTY_SCE_NORMAL, 3);
496 addScenarioDifficulty(1051, DIFFICULTY_SCE_NORMAL, 3);
497 addScenarioDifficulty(1095, DIFFICULTY_SCE_NORMAL, 3);
498 addScenarioDifficulty(1099, DIFFICULTY_SCE_NORMAL, 3);
499 addScenarioDifficulty(1099, DIFFICULTY_SCE_HEROIC, 3);
500 addScenarioDifficulty(1102, DIFFICULTY_SCE_NORMAL, 3);
501 addScenarioDifficulty(1103, DIFFICULTY_SCE_NORMAL, 3);
502 addScenarioDifficulty(1104, DIFFICULTY_SCE_NORMAL, 3);
503 addScenarioDifficulty(1112, DIFFICULTY_SCE_NORMAL, 1);
504 addScenarioDifficulty(1126, DIFFICULTY_SCE_NORMAL, 1);
505 addScenarioDifficulty(1130, DIFFICULTY_SCE_NORMAL, 3);
506 addScenarioDifficulty(1130, DIFFICULTY_SCE_HEROIC, 3);
507 addScenarioDifficulty(1131, DIFFICULTY_SCE_NORMAL, 3);
508 addScenarioDifficulty(1131, DIFFICULTY_SCE_HEROIC, 3);
509 addScenarioDifficulty(1135, DIFFICULTY_SCE_NORMAL, 1);
510 addScenarioDifficulty(1144, DIFFICULTY_SCE_NORMAL, 3);
511 addScenarioDifficulty(1144, DIFFICULTY_SCE_HEROIC, 3);
512 addScenarioDifficulty(1148, DIFFICULTY_SCE_NORMAL, 1);
513 addScenarioDifficulty(1157, DIFFICULTY_SCE_HEROIC, 1);
514
515 for (uint32 i = 0; i < sMapDifficultyStore.GetNumRows(); ++i)
516 if (MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i))
517 sMapDifficultyMap[entry->MapId][entry->Difficulty] = MapDifficulty(entry->Difficulty, entry->areaTriggerText, entry->resetTime, entry->maxPlayers, entry->areaTriggerText[0] > 0);
518 sMapDifficultyStore.Clear();
519
520 LoadDBC(availableDbcLocales, bad_dbc_files, sMountCapabilityStore, dbcPath, "MountCapability.dbc");//15595
521 LoadDBC(availableDbcLocales, bad_dbc_files, sMountTypeStore, dbcPath, "MountType.dbc");//15595
522
523 LoadDBC(availableDbcLocales, bad_dbc_files, sNameGenStore, dbcPath, "NameGen.dbc");//15595
524 for (uint32 i = 0; i < sNameGenStore.GetNumRows(); ++i)
525 if (NameGenEntry const* entry = sNameGenStore.LookupEntry(i))
526 sGenNameVectoArraysMap[entry->race].stringVectorArray[entry->gender].push_back(std::string(entry->name));
527 sNameGenStore.Clear();
528
529 LoadDBC(availableDbcLocales, bad_dbc_files, sModifierTreeStore, dbcPath, "ModifierTree.dbc");//18414
530 LoadDBC(availableDbcLocales, bad_dbc_files, sMovieStore, dbcPath, "Movie.dbc");//15595
531 LoadDBC(availableDbcLocales, bad_dbc_files, sOverrideSpellDataStore, dbcPath, "OverrideSpellData.dbc");//15595
532
533 LoadDBC(availableDbcLocales, bad_dbc_files, sPhaseStore, dbcPath, "Phase.dbc"); // 18414
534 LoadDBC(availableDbcLocales, bad_dbc_files, sPhaseGroupStore, dbcPath, "PhaseXPhaseGroup.dbc"); // 18414
535 for (uint32 i = 0; i < sPhaseGroupStore.GetNumRows(); ++i)
536 if (PhaseGroupEntry const* group = sPhaseGroupStore.LookupEntry(i))
537 if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseId))
538 sPhasesByGroup[group->GroupId].insert(phase->ID);
539
540 LoadDBC(availableDbcLocales, bad_dbc_files, sPvPDifficultyStore, dbcPath, "PvpDifficulty.dbc");//15595
541 for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
542 if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
543 if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS)
544 ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
545
546 LoadDBC(availableDbcLocales, bad_dbc_files, sQuestXPStore, dbcPath, "QuestXP.dbc");//15595
547 LoadDBC(availableDbcLocales, bad_dbc_files, sQuestFactionRewardStore, dbcPath, "QuestFactionReward.dbc");//15595
548 LoadDBC(availableDbcLocales, bad_dbc_files, sQuestSortStore, dbcPath, "QuestSort.dbc");//15595
549 LoadDBC(availableDbcLocales, bad_dbc_files, sQuestPOIPointStore, dbcPath, "QuestPOIPoint.dbc");//15595
550
551 LoadDBC(availableDbcLocales, bad_dbc_files, sRandomPropertiesPointsStore, dbcPath, "RandPropPoints.dbc");//15595
552 LoadDBC(availableDbcLocales, bad_dbc_files, sResearchBranchStore, dbcPath, "ResearchBranch.dbc");//15595
553 LoadDBC(availableDbcLocales, bad_dbc_files, sResearchProjectStore, dbcPath, "ResearchProject.dbc");//15595
554 LoadDBC(availableDbcLocales, bad_dbc_files, sResearchSiteStore, dbcPath, "ResearchSite.dbc");//15595
555
556 // must be after sQuestPOIPointStore and sResearchSiteStore loading
557 for (uint32 i = 0; i < sResearchSiteStore.GetNumRows(); ++i)
558 {
559 if (ResearchSiteEntry const* siteEntry = sResearchSiteStore.LookupEntry(i))
560 {
561 for (uint32 j = 0; j < sQuestPOIPointStore.GetNumRows(); ++j)
562 if (QuestPOIPointEntry const* pointEntry = sQuestPOIPointStore.LookupEntry(j))
563 if (siteEntry->QuestPOIBlobId == pointEntry->BlobId)
564 sDigsitePOIPolygons[siteEntry->Id].push_back(std::make_pair(pointEntry->X, pointEntry->Y));
565 }
566 }
567
568 LoadDBC(availableDbcLocales, bad_dbc_files, sScalingStatDistributionStore, dbcPath, "ScalingStatDistribution.dbc");//15595
569 LoadDBC(availableDbcLocales, bad_dbc_files, sScalingStatValuesStore, dbcPath, "ScalingStatValues.dbc");//15595
570 LoadDBC(availableDbcLocales, bad_dbc_files, sSkillLineStore, dbcPath, "SkillLine.dbc");//15595
571 LoadDBC(availableDbcLocales, bad_dbc_files, sSkillLineAbilityStore, dbcPath, "SkillLineAbility.dbc");//15595
572 LoadDBC(availableDbcLocales, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc");//15595
573 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc"/*, &CustomSpellEntryfmt, &CustomSpellEntryIndex*/);//
574 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCategoriesStore, dbcPath, "SpellCategories.dbc");//15595
575 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCategoryStore, dbcPath, "SpellCategory.dbc");
576 for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
577 {
578 SpellEntry const* spell = sSpellStore.LookupEntry(i);
579 if (!spell)
580 continue;
581
582 if (SpellCategoriesEntry const* category = sSpellCategoriesStore.LookupEntry(spell->SpellCategoriesId))
583 sSpellsByCategoryStore[category->Category].insert(i);
584 }
585
586 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellScalingStore, dbcPath, "SpellScaling.dbc");//15595
587 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellTotemsStore, dbcPath, "SpellTotems.dbc");//15595
588 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellTargetRestrictionsStore, dbcPath, "SpellTargetRestrictions.dbc");//15595
589 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellPowerStore, dbcPath, "SpellPower.dbc");//15595
590 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellLevelsStore, dbcPath, "SpellLevels.dbc");//15595
591 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellInterruptsStore, dbcPath, "SpellInterrupts.dbc");//15595
592 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellEquippedItemsStore, dbcPath, "SpellEquippedItems.dbc");//15595
593 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellClassOptionsStore, dbcPath, "SpellClassOptions.dbc");//15595
594 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCooldownsStore, dbcPath, "SpellCooldowns.dbc");//15595
595 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellAuraOptionsStore, dbcPath, "SpellAuraOptions.dbc");//15595
596 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellAuraRestrictionsStore, dbcPath, "SpellAuraRestrictions.dbc");//15595
597 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCastingRequirementsStore, dbcPath, "SpellCastingRequirements.dbc");//15595
598 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellEffectStore, dbcPath, "SpellEffect.dbc"/*, &CustomSpellEffectEntryfmt, &CustomSpellEffectEntryIndex*/);//15595
599 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCastTimesStore, dbcPath, "SpellCastTimes.dbc");//15595
600 // LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDifficultyStore, dbcPath, "SpellDifficulty.dbc", &CustomSpellDifficultyfmt, &CustomSpellDifficultyIndex);//15595 -- DBC gone, wtf blizzard ...
601 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDurationStore, dbcPath, "SpellDuration.dbc");//15595
602 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellFocusObjectStore, dbcPath, "SpellFocusObject.dbc");//15595
603 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellItemEnchantmentStore, dbcPath, "SpellItemEnchantment.dbc");//18414
604 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellMiscStore, dbcPath, "SpellMisc.dbc");//17538
605 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellEffectScalingStore, dbcPath, "SpellEffectScaling.dbc");//17538
606 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellItemEnchantmentConditionStore, dbcPath, "SpellItemEnchantmentCondition.dbc");//15595
607 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRadiusStore, dbcPath, "SpellRadius.dbc");//15595
608 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRangeStore, dbcPath, "SpellRange.dbc");//15595
609 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRuneCostStore, dbcPath, "SpellRuneCost.dbc");//15595
610 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellShapeshiftStore, dbcPath, "SpellShapeshift.dbc");//15595
611 LoadDBC(availableDbcLocales, bad_dbc_files, sSpellShapeshiftFormStore, dbcPath, "SpellShapeshiftForm.dbc");//15595
612 LoadDBC(availableDbcLocales, bad_dbc_files, sSummonPropertiesStore, dbcPath, "SummonProperties.dbc");//15595
613
614 for (uint32 j = 0; j < sSpellEffectScalingStore.GetNumRows(); j++)
615 {
616 SpellEffectScalingEntry const* spellEffectScaling = sSpellEffectScalingStore.LookupEntry(j);
617 if (!spellEffectScaling)
618 continue;
619
620 sSpellEffectScallingByEffectId.insert(std::make_pair(spellEffectScaling->SpellEffectId, j));
621 }
622
623 std::map<std::string, uint32> classIdByName;
624 for (uint32 j = 0; j < sChrClassesStore.GetNumRows(); j++)
625 {
626 ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(j);
627 if (!classEntry)
628 continue;
629
630 classIdByName.insert(std::make_pair(std::string(classEntry->name), j));
631 }
632
633 for (uint32 j = 0; j < sSkillLineStore.GetNumRows(); j++)
634 {
635 SkillLineEntry const* skillEntry = sSkillLineStore.LookupEntry(j);
636 if (!skillEntry)
637 continue;
638
639 if (skillEntry->categoryId != SKILL_CATEGORY_CLASS)
640 continue;
641
642 std::map<std::string, uint32> ::const_iterator iter = classIdByName.find(std::string(skillEntry->name));
643 if (iter == classIdByName.end())
644 continue;
645
646 sClassBySkillIdStore.insert(std::make_pair(j, iter->second));
647 }
648
649 for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
650 {
651 SkillLineAbilityEntry const* skillAbility = sSkillLineAbilityStore.LookupEntry(j);
652 if (!skillAbility)
653 continue;
654
656 continue;
657
658 SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillAbility->spellId);
659 if (!spellInfo)
660 continue;
661
662 SpellLevelsEntry const* spellLevels = sSpellLevelsStore.LookupEntry(spellInfo->SpellLevelsId);
663 if (!spellLevels || !spellLevels->spellLevel)
664 continue;
665
666 uint32 classId = GetClassBySkillId(skillAbility->skillId);
667
668 if (!classId)
669 continue;
670
671 if (sSpellsPerClassStore.find(classId) == sSpellsPerClassStore.end())
672 sSpellsPerClassStore.insert(make_pair(classId, std::list<SkillLineAbilityEntry const*>()));
673
674 sSpellsPerClassStore[classId].push_back(skillAbility);
675 }
676
677 // Must be done when sSkillLineAbilityStore, sSpellStore, sSpellLevelsStore and sCreatureFamilyStore are all loaded
678 for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
679 {
680 SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(j);
681 if (!skillLine)
682 continue;
683
684 SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId);
685 if (!spellInfo)
686 continue;
687
688 SpellLevelsEntry const* levels = sSpellLevelsStore.LookupEntry(spellInfo->SpellLevelsId);
689 if (spellInfo->SpellLevelsId && (!levels || levels->spellLevel))
690 continue;
691
692 if (SpellMiscEntry const* spellMisc = sSpellMiscStore.LookupEntry(spellInfo->SpellMiscId))
693 {
694 if (spellMisc->Attributes & SPELL_ATTR0_PASSIVE)
695 {
696 for (uint32 i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i)
697 {
698 CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(i);
699 if (!cFamily)
700 continue;
701
702 if (skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1])
703 continue;
704
706 continue;
707
708 sPetFamilySpellsStore[i].insert(spellInfo->Id);
709 }
710 }
711 }
712 }
713
714 LoadDBC(availableDbcLocales, bad_dbc_files, sTalentStore, dbcPath, "Talent.dbc");//15595
715
716 // Create Spelldifficulty searcher
717 for (uint32 i = 0; i < sSpellDifficultyStore.GetNumRows(); ++i)
718 {
719 SpellDifficultyEntry const* spellDiff = sSpellDifficultyStore.LookupEntry(i);
720 if (!spellDiff)
721 continue;
722
723 SpellDifficultyEntry newEntry;
724 memset(newEntry.SpellID, 0, 4 * sizeof(uint32));
725 for (uint32 x = 0; x < 4; ++x)
726 {
727 if (spellDiff->SpellID[x] <= 0 || !sSpellStore.LookupEntry(spellDiff->SpellID[x]))
728 {
729 if (spellDiff->SpellID[x] > 0)//don't show error if spell is <= 0, not all modes have spells and there are unknown negative values
730 SF_LOG_ERROR("sql.sql", "spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x);
731 newEntry.SpellID[x] = 0;//spell was <= 0 or invalid, set to 0
732 }
733 else
734 newEntry.SpellID[x] = spellDiff->SpellID[x];
735 }
736
737 if (newEntry.SpellID[0] <= 0 || newEntry.SpellID[1] <= 0)//id0-1 must be always set!
738 continue;
739
740 for (uint32 x = 0; x < 4; ++x)
741 sSpellMgr->SetSpellDifficultyId(uint32(newEntry.SpellID[x]), spellDiff->ID);
742 }
743
744 // create talent spells set
745 for (unsigned int i = 0; i < sTalentStore.GetNumRows(); ++i)
746 {
747 TalentEntry const* talentInfo = sTalentStore.LookupEntry(i);
748 if (!talentInfo)
749 continue;
750
751 for (int j = 0; j < MAX_TALENT_RANK; j++)
752 if (talentInfo->SpellId)
753 sTalentSpellPosMap[talentInfo->SpellId] = TalentSpellPos(i, j);
754 }
755
756 LoadDBC(availableDbcLocales, bad_dbc_files, sChrSpecializationStore, dbcPath, "ChrSpecialization.dbc");
757
758 // prepare fast data access to bit pos of talent ranks for use at inspecting
759 {
760 // now have all max ranks (and then bit amount used for store talent ranks in inspect)
761 for (uint32 j = 0; j < sChrSpecializationStore.GetNumRows(); j++)
762 {
763 ChrSpecializationEntry const* specializationInfo = sChrSpecializationStore.LookupEntry(j);
764 if (!specializationInfo)
765 continue;
766
767 // prevent memory corruption; otherwise cls will become 12 below
768 if (!specializationInfo->classId || specializationInfo->classId >= MAX_CLASSES)
769 continue;
770
771 sSpecializationClassStore[specializationInfo->classId][specializationInfo->TabPage] = j;
772 }
773 }
774
775 LoadDBC(availableDbcLocales, bad_dbc_files, sSpecializationSpellsStore, dbcPath, "SpecializationSpells.dbc");
776 for (uint32 j = 0; j < sSpecializationSpellsStore.GetNumRows(); j++)
777 if (SpecializationSpellsEntry const* specializationSpells = sSpecializationSpellsStore.LookupEntry(j))
778 sSpecializationSpellsMap[specializationSpells->SpecializationId].push_back(specializationSpells->SpellId);
779
780 LoadDBC(availableDbcLocales, bad_dbc_files, sTaxiNodesStore, dbcPath, "TaxiNodes.dbc");//15595
781 LoadDBC(availableDbcLocales, bad_dbc_files, sTaxiPathStore, dbcPath, "TaxiPath.dbc");//15595
782 for (uint32 i = 1; i < sTaxiPathStore.GetNumRows(); ++i)
783 if (TaxiPathEntry const* entry = sTaxiPathStore.LookupEntry(i))
784 sTaxiPathSetBySource[entry->from][entry->to] = TaxiPathBySourceAndDestination(entry->ID, entry->price);
785 uint32 pathCount = sTaxiPathStore.GetNumRows();
786
787 //## TaxiPathNode.dbc ## Loaded only for initialization different structures
788 LoadDBC(availableDbcLocales, bad_dbc_files, sTaxiPathNodeStore, dbcPath, "TaxiPathNode.dbc");//15595
789 // Calculate path nodes count
790 std::vector<uint32> pathLength;
791 pathLength.resize(pathCount); // 0 and some other indexes not used
792 for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
793 if (TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i))
794 {
795 if (pathLength[entry->path] < entry->index + 1)
796 pathLength[entry->path] = entry->index + 1;
797 }
798 // Set path length
799 sTaxiPathNodesByPath.resize(pathCount); // 0 and some other indexes not used
800 for (uint32 i = 1; i < sTaxiPathNodesByPath.size(); ++i)
801 sTaxiPathNodesByPath[i].resize(pathLength[i]);
802 // fill data
803 for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
804 if (TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i))
805 sTaxiPathNodesByPath[entry->path].set(entry->index, entry);
806
807 // Initialize global taxinodes mask
808 // include existed nodes that have at least single not spell base (scripted) path
809 {
810 std::set<uint32> spellPaths;
811 for (uint32 i = 1; i < sSpellEffectStore.GetNumRows(); ++i)
812 if (SpellEffectEntry const* sInfo = sSpellEffectStore.LookupEntry(i))
813 if (sInfo->Effect == SPELL_EFFECT_SEND_TAXI)
814 spellPaths.insert(sInfo->EffectMiscValue);
815
816 memset(sTaxiNodesMask, 0, sizeof(sTaxiNodesMask));
818 memset(sHordeTaxiNodesMask, 0, sizeof(sHordeTaxiNodesMask));
821 for (uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
822 {
823 TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
824 if (!node)
825 continue;
826
827 TaxiPathSetBySource::const_iterator src_i = sTaxiPathSetBySource.find(i);
828 if (src_i != sTaxiPathSetBySource.end() && !src_i->second.empty())
829 {
830 bool ok = false;
831 for (TaxiPathSetForSource::const_iterator dest_i = src_i->second.begin(); dest_i != src_i->second.end(); ++dest_i)
832 {
833 // not spell path
834 if (spellPaths.find(dest_i->second.ID) == spellPaths.end())
835 {
836 ok = true;
837 break;
838 }
839 }
840
841 if (!ok)
842 continue;
843 }
844
845 // valid taxi network node
846 uint8 field = (uint8)((i - 1) / 8);
847 uint32 submask = 1 << ((i - 1) % 8);
848
849 sTaxiNodesMask[field] |= submask;
850 if (node->MountCreatureID[0] && node->MountCreatureID[0] != 32981)
851 sHordeTaxiNodesMask[field] |= submask;
852 if (node->MountCreatureID[1] && node->MountCreatureID[1] != 32981)
853 sAllianceTaxiNodesMask[field] |= submask;
854 if (node->MountCreatureID[0] == 32981 || node->MountCreatureID[1] == 32981)
855 sDeathKnightTaxiNodesMask[field] |= submask;
856
857 // old continent node (+ nodes virtually at old continents, check explicitly to avoid loading map files for zone info)
858 if (node->map_id < 2 || i == 82 || i == 83 || i == 93 || i == 94)
859 sOldContinentsNodesMask[field] |= submask;
860
861 // fix DK node at Ebon Hold and Shadow Vault flight master
862 if (i == 315 || i == 333)
863 ((TaxiNodesEntry*)node)->MountCreatureID[1] = 32981;
864 }
865 }
866
867 //LoadDBC(availableDbcLocales, bad_dbc_files, sTeamContributionPointsStore, dbcPath, "TeamContributionPoints.dbc");
868 LoadDBC(availableDbcLocales, bad_dbc_files, sTotemCategoryStore, dbcPath, "TotemCategory.dbc");//15595
869 LoadDBC(availableDbcLocales, bad_dbc_files, sTransportAnimationStore, dbcPath, "TransportAnimation.dbc");
870 for (uint32 i = 0; i < sTransportAnimationStore.GetNumRows(); ++i)
871 {
872 TransportAnimationEntry const* anim = sTransportAnimationStore.LookupEntry(i);
873 if (!anim)
874 continue;
875
876 sTransportMgr->AddPathNodeToTransport(anim->TransportEntry, anim->TimeSeg, anim);
877 }
878
879 LoadDBC(availableDbcLocales, bad_dbc_files, sTransportRotationStore, dbcPath, "TransportRotation.dbc");
880 for (uint32 i = 0; i < sTransportRotationStore.GetNumRows(); ++i)
881 {
882 TransportRotationEntry const* rot = sTransportRotationStore.LookupEntry(i);
883 if (!rot)
884 continue;
885
886 sTransportMgr->AddPathRotationToTransport(rot->TransportEntry, rot->TimeSeg, rot);
887 }
888
889 LoadDBC(availableDbcLocales, bad_dbc_files, sUnitPowerBarStore, dbcPath, "UnitPowerBar.dbc");//15595
890
891 LoadDBC(availableDbcLocales, bad_dbc_files, sVehicleStore, dbcPath, "Vehicle.dbc");//15595
892 LoadDBC(availableDbcLocales, bad_dbc_files, sVehicleSeatStore, dbcPath, "VehicleSeat.dbc");//15595
893
894 LoadDBC(availableDbcLocales, bad_dbc_files, sWMOAreaTableStore, dbcPath, "WMOAreaTable.dbc");//15595
895 for (uint32 i = 0; i < sWMOAreaTableStore.GetNumRows(); ++i)
896 if (WMOAreaTableEntry const* entry = sWMOAreaTableStore.LookupEntry(i))
897 sWMOAreaInfoByTripple.insert(WMOAreaInfoByTripple::value_type(WMOAreaTableTripple(entry->rootId, entry->adtId, entry->groupId), entry));
898 LoadDBC(availableDbcLocales, bad_dbc_files, sWorldMapAreaStore, dbcPath, "WorldMapArea.dbc");//15595
899 LoadDBC(availableDbcLocales, bad_dbc_files, sWorldMapOverlayStore, dbcPath, "WorldMapOverlay.dbc");//15595
900 LoadDBC(availableDbcLocales, bad_dbc_files, sWorldSafeLocsStore, dbcPath, "WorldSafeLocs.dbc");//15595
901
902 // error checks
903 if (bad_dbc_files.size() >= DBCFileCount)
904 {
905 SF_LOG_ERROR("misc", "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str());
906 exit(1);
907 }
908 else if (!bad_dbc_files.empty())
909 {
910 std::string str;
911 for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
912 str += *i + "\n";
913
914 SF_LOG_ERROR("misc", "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str());
915 exit(1);
916 }
917
918 // Check loaded DBC files proper version
919 if (!sAreaStore.LookupEntry(5491) || // last area (areaflag) added in 5.4.8 (18414)
920 !sCharTitlesStore.LookupEntry(389) || // last char title added in 5.4.8 (18414)
921 !sGemPropertiesStore.LookupEntry(2467) || // last gem property added in 5.4.8 (18414)
922 !sMapStore.LookupEntry(1173) || // last map added in 5.4.8 (18414)
923 !sSpellStore.LookupEntry(163227)) // last spell added in 5.4.8 (18414)
924 {
925 SF_LOG_ERROR("misc", "You have _outdated_ DBC files. Please extract correct dbc files from client 5.4.8 18414.");
926 exit(1);
927 }
928
929 SF_LOG_INFO("server.loading", ">> Initialized %d DBC data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
930}
931
932const std::string* GetRandomCharacterName(uint8 race, uint8 gender)
933{
934 uint32 size = sGenNameVectoArraysMap[race].stringVectorArray[gender].size();
935 uint32 randPos = std::rand() % size;
936
937 return &sGenNameVectoArraysMap[race].stringVectorArray[gender][randPos];
938}
939
941{
942 FactionTeamMap::const_iterator itr = sFactionTeamMap.find(faction);
943 if (itr != sFactionTeamMap.end())
944 return &itr->second;
945
946 return NULL;
947}
948
949char const* GetPetName(uint32 petfamily, uint32 /*dbclang*/)
950{
951 if (!petfamily)
952 return NULL;
953 CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(petfamily);
954 if (!pet_family)
955 return NULL;
956 return pet_family->Name ? pet_family->Name : NULL;
957}
958
960{
961 TalentSpellPosMap::const_iterator itr = sTalentSpellPosMap.find(spellId);
962 if (itr == sTalentSpellPosMap.end())
963 return NULL;
964
965 return &itr->second;
966}
967
969{
970 if (TalentSpellPos const* pos = GetTalentSpellPos(spellId))
971 return pos->rank + 1;
972
973 return 0;
974}
975
977{
978 AreaFlagByAreaID::iterator i = sAreaFlagByAreaID.find(area_id);
979 if (i == sAreaFlagByAreaID.end())
980 return -1;
981
982 return i->second;
983}
984
986{
987 WMOAreaInfoByTripple::iterator i = sWMOAreaInfoByTripple.find(WMOAreaTableTripple(rootid, adtid, groupid));
988 if (i == sWMOAreaInfoByTripple.end())
989 return NULL;
990 return i->second;
991}
992
994{
995 int32 areaflag = GetAreaFlagByAreaID(area_id);
996 if (areaflag < 0)
997 return NULL;
998
999 return sAreaStore.LookupEntry(areaflag);
1000}
1001
1003{
1004 if (area_flag)
1005 return sAreaStore.LookupEntry(area_flag);
1006
1007 if (MapEntry const* mapEntry = sMapStore.LookupEntry(map_id))
1008 return GetAreaEntryByAreaID(mapEntry->linked_zone);
1009
1010 return NULL;
1011}
1012
1013char const* GetRaceName(uint8 race, uint8 /*locale*/)
1014{
1015 ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(race);
1016 return raceEntry ? raceEntry->name : NULL;
1017}
1018
1019char const* GetClassName(uint8 class_, uint8 /*locale*/)
1020{
1021 ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_);
1022 return classEntry ? classEntry->name : NULL;
1023}
1024
1026{
1027 AreaFlagByMapID::iterator i = sAreaFlagByMapID.find(mapid);
1028 if (i == sAreaFlagByMapID.end())
1029 return 0;
1030 else
1031 return i->second;
1032}
1033
1035{
1036 if (mapid != 530 && mapid != 571 && mapid != 732 && mapid != 1064) // speed for most cases
1037 return mapid;
1038
1039 if (WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId))
1040 return wma->virtual_map_id >= 0 ? wma->virtual_map_id : wma->map_id;
1041
1042 return mapid;
1043}
1044
1046{
1047 switch (expansion)
1048 {
1049 case CONTENT_1_60:
1050 return 60;
1051 case CONTENT_61_70:
1052 return 70;
1053 case CONTENT_71_80:
1054 return 80;
1055 case CONTENT_81_85:
1056 return 85;
1057 case CONTENT_86_90:
1058 return 90;
1059 default:
1060 break;
1061 }
1062 return 0;
1063}
1064
1065/*
1066Used only for calculate xp gain by content lvl.
1067Calculation on Gilneas and group maps of LostIslands calculated as CONTENT_1_60.
1068*/
1070{
1071 mapid = GetVirtualMapForMapAndZone(mapid, zoneId);
1072 if (mapid < 2)
1073 return CONTENT_1_60;
1074
1075 MapEntry const* mapEntry = sMapStore.LookupEntry(mapid);
1076 if (!mapEntry)
1077 return CONTENT_1_60;
1078
1079 // no need enum all maps from phasing
1080 if (mapEntry->rootPhaseMap >= 0)
1081 mapid = mapEntry->rootPhaseMap;
1082
1083 switch (mapid)
1084 {
1085 case 648: //LostIslands
1086 case 654: //Gilneas
1087 return CONTENT_1_60;
1088 default:
1089 return ContentLevels(mapEntry->Expansion());
1090 }
1091}
1092
1093bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId)
1094{
1095 if (requiredTotemCategoryId == 0)
1096 return true;
1097 if (itemTotemCategoryId == 0)
1098 return false;
1099
1100 TotemCategoryEntry const* itemEntry = sTotemCategoryStore.LookupEntry(itemTotemCategoryId);
1101 if (!itemEntry)
1102 return false;
1103 TotemCategoryEntry const* reqEntry = sTotemCategoryStore.LookupEntry(requiredTotemCategoryId);
1104 if (!reqEntry)
1105 return false;
1106
1107 if (itemEntry->categoryType != reqEntry->categoryType)
1108 return false;
1109
1110 return (itemEntry->categoryMask & reqEntry->categoryMask) == reqEntry->categoryMask;
1111}
1112
1113void Zone2MapCoordinates(float& x, float& y, uint32 zone)
1114{
1115 WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(zone);
1116
1117 // if not listed then map coordinates (instance)
1118 if (!maEntry)
1119 return;
1120
1121 std::swap(x, y); // at client map coords swapped
1122 x = x * ((maEntry->x2 - maEntry->x1) / 100) + maEntry->x1;
1123 y = y * ((maEntry->y2 - maEntry->y1) / 100) + maEntry->y1; // client y coord from top to down
1124}
1125
1126void Map2ZoneCoordinates(float& x, float& y, uint32 zone)
1127{
1128 WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(zone);
1129
1130 // if not listed then map coordinates (instance)
1131 if (!maEntry)
1132 return;
1133
1134 x = (x - maEntry->x1) / ((maEntry->x2 - maEntry->x1) / 100);
1135 y = (y - maEntry->y1) / ((maEntry->y2 - maEntry->y1) / 100); // client y coord from top to down
1136 std::swap(x, y); // client have map coords swapped
1137}
1138
1140{
1141 ClassBySkillIdStore::const_iterator iter = sClassBySkillIdStore.find(skillId);
1142 if (iter != sClassBySkillIdStore.end())
1143 return iter->second;
1144 return 0;
1145}
1146
1148{
1149 for (ClassBySkillIdStore::const_iterator iter = sClassBySkillIdStore.begin(); iter != sClassBySkillIdStore.end(); ++iter)
1150 if (iter->second == classId)
1151 return iter->first;
1152 return 0;
1153}
1154
1155std::list<uint32> GetSpellsForLevels(uint32 classId, uint32 raceMask, uint32 specializationId, uint32 minLevel, uint32 maxLevel)
1156{
1157 std::list<uint32> spellList;
1158
1159 if (classId != 0)
1160 {
1161 SpellsPerClassStore::const_iterator classIter = sSpellsPerClassStore.find(classId);
1162 if (classIter != sSpellsPerClassStore.end())
1163 {
1164 const std::list<SkillLineAbilityEntry const*>& learnSpellList = classIter->second;
1165 for (std::list<SkillLineAbilityEntry const*>::const_iterator iter = learnSpellList.begin(); iter != learnSpellList.end(); ++iter)
1166 {
1167 SkillLineAbilityEntry const* skillLine = *iter;
1168 if (!skillLine)
1169 continue;
1170
1171 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->spellId);
1172 if (!spellInfo)
1173 continue;
1174
1175 if (skillLine->racemask && !(skillLine->racemask & raceMask))
1176 continue;
1177
1178 if (spellInfo->SpellLevel <= minLevel || spellInfo->SpellLevel > maxLevel)
1179 continue;
1180
1181 spellList.push_back(spellInfo->Id);
1182 }
1183 }
1184 }
1185
1186 if (!specializationId)
1187 return spellList;
1188
1189 SpecializationSpellsMap::const_iterator specIter = sSpecializationSpellsMap.find(specializationId);
1190 if (specIter != sSpecializationSpellsMap.end())
1191 {
1192 const std::vector<uint32>& learnSpellList = specIter->second;
1193 for (int i = 0; i != learnSpellList.size(); i++)
1194 {
1195 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(learnSpellList[i]);
1196 if (!spellInfo)
1197 continue;
1198
1199 if (spellInfo->SpellLevel <= minLevel || spellInfo->SpellLevel > maxLevel)
1200 continue;
1201
1202 spellList.push_back(spellInfo->Id);
1203 }
1204 }
1205 return spellList;
1206}
1207
1208std::vector<uint32> const* GetSpecializationSpells(uint32 specializationId)
1209{
1210 SpecializationSpellsMap::const_iterator specIter = sSpecializationSpellsMap.find(specializationId);
1211 if (specIter != sSpecializationSpellsMap.end())
1212 return &specIter->second;
1213
1214 return NULL;
1215}
1216
1218{
1219 auto itr = sMapDifficultyMap.find(mapId);
1220 if (itr == sMapDifficultyMap.end())
1221 return nullptr;
1222
1223 if (itr->second.empty())
1224 return nullptr;
1225
1226 for (auto& p : itr->second)
1227 {
1228 DifficultyEntry const* difficulty = sDifficultyStore.LookupEntry(p.first);
1229 if (!difficulty)
1230 continue;
1231
1232 if (difficulty->flags & 0x02)
1233 return &p.second;
1234 }
1235
1236 return &itr->second.begin()->second;
1237}
1238
1240{
1241 auto itr = sMapDifficultyMap.find(mapId);
1242 if (itr == sMapDifficultyMap.end())
1243 return nullptr;
1244
1245 auto diffItr = itr->second.find(difficulty);
1246 if (diffItr == itr->second.end())
1247 return nullptr;
1248
1249 return &diffItr->second;
1250}
1251
1253{
1254 MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
1255 if (mapEntry && mapEntry->IsScenario())
1256 {
1257 if (MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, difficulty))
1258 return mapDiff;
1259
1260 if (difficulty == DIFFICULTY_SCE_HEROIC)
1261 {
1262 difficulty = DIFFICULTY_SCE_NORMAL;
1263 if (MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, difficulty))
1264 return mapDiff;
1265 }
1266
1267 difficulty = DIFFICULTY_SCE_NORMAL;
1268 if (MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, difficulty))
1269 return mapDiff;
1270
1271 return GetDefaultMapDifficulty(mapId);
1272 }
1273
1274 DifficultyEntry const* diffEntry = sDifficultyStore.LookupEntry(difficulty);
1275 if (!diffEntry)
1276 return GetDefaultMapDifficulty(mapId);
1277
1278 uint32 tmpDiff = difficulty;
1279 MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, DifficultyID(tmpDiff));
1280 while (!mapDiff)
1281 {
1282 tmpDiff = diffEntry->DownscaleID;
1283 diffEntry = sDifficultyStore.LookupEntry(tmpDiff);
1284 if (!diffEntry)
1285 return GetDefaultMapDifficulty(mapId);
1286
1287 // pull new data
1288 mapDiff = GetMapDifficultyData(mapId, DifficultyID(tmpDiff));
1289 }
1290
1291 difficulty = DifficultyID(tmpDiff);
1292 return mapDiff;
1293}
1294
1296{
1297 PvPDifficultyEntry const* maxEntry = NULL; // used for level > max listed level case
1298 for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
1299 {
1300 if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
1301 {
1302 // skip unrelated and too-high brackets
1303 if (entry->mapId != mapid || entry->minLevel > level)
1304 continue;
1305
1306 // exactly fit
1307 if (entry->maxLevel >= level)
1308 return entry;
1309
1310 // remember for possible out-of-range case (search higher from existed)
1311 if (!maxEntry || maxEntry->maxLevel < entry->maxLevel)
1312 maxEntry = entry;
1313 }
1314 }
1315
1316 return maxEntry;
1317}
1318
1320{
1321 for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
1322 if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
1323 if (entry->mapId == mapid && entry->GetBracketId() == id)
1324 return entry;
1325
1326 return NULL;
1327}
1328
1330{
1331 return sSpecializationClassStore[classId];
1332}
1333
1335{
1336 if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquidType))
1337 return 1 << liq->Type;
1338
1339 return 0;
1340}
1341
1343{
1344 std::map<uint32, CharStartOutfitEntry const*>::const_iterator itr = sCharStartOutfitMap.find(race | (class_ << 8) | (gender << 16));
1345 if (itr == sCharStartOutfitMap.end())
1346 return NULL;
1347
1348 return itr->second;
1349}
1350
1352{
1353 return PowersByClass[classId][powerType];
1354}
1355
1357{
1358 if (inventoryType < MAX_INVTYPE)
1359 {
1360 switch (inventoryType)
1361 {
1362 case INVTYPE_NON_EQUIP:
1363 case INVTYPE_BODY:
1364 case INVTYPE_BAG:
1365 case INVTYPE_TABARD:
1366 case INVTYPE_AMMO:
1367 case INVTYPE_QUIVER:
1368 return 0;
1369 case INVTYPE_HEAD:
1370 case INVTYPE_CHEST:
1371 case INVTYPE_LEGS:
1372 case INVTYPE_2HWEAPON:
1373 case INVTYPE_ROBE:
1374 return StatMultiplier[0];
1375 case INVTYPE_SHOULDERS:
1376 case INVTYPE_WAIST:
1377 case INVTYPE_FEET:
1378 case INVTYPE_HANDS:
1379 case INVTYPE_TRINKET:
1380 return StatMultiplier[1];
1381 case INVTYPE_NECK:
1382 case INVTYPE_WRISTS:
1383 case INVTYPE_FINGER:
1384 case INVTYPE_SHIELD:
1385 case INVTYPE_CLOAK:
1386 case INVTYPE_HOLDABLE:
1387 return StatMultiplier[2];
1388 case INVTYPE_RANGED:
1389 case INVTYPE_THROWN:
1391 case INVTYPE_RELIC:
1392 return StatMultiplier[3];
1393 case INVTYPE_WEAPON:
1396 return StatMultiplier[4];
1397 default:
1398 break;
1399 }
1400 }
1401 return 0;
1402}
1403
1405{
1406 if (inventoryType <= INVTYPE_ROBE && armorType < 4)
1407 {
1408 switch (inventoryType)
1409 {
1410 case INVTYPE_NON_EQUIP:
1411 case INVTYPE_NECK:
1412 case INVTYPE_BODY:
1413 case INVTYPE_FINGER:
1414 case INVTYPE_TRINKET:
1415 case INVTYPE_WEAPON:
1416 case INVTYPE_RANGED:
1417 case INVTYPE_2HWEAPON:
1418 case INVTYPE_BAG:
1419 case INVTYPE_TABARD:
1420 break;
1421 case INVTYPE_SHOULDERS:
1422 return Armor[0][armorType];
1423 case INVTYPE_CHEST:
1424 case INVTYPE_ROBE:
1425 return Armor[1][armorType];
1426 case INVTYPE_HEAD:
1427 return Armor[2][armorType];
1428 case INVTYPE_LEGS:
1429 return Armor[3][armorType];
1430 case INVTYPE_FEET:
1431 return Armor[4][armorType];
1432 case INVTYPE_WAIST:
1433 return Armor[5][armorType];
1434 case INVTYPE_HANDS:
1435 return Armor[6][armorType];
1436 case INVTYPE_WRISTS:
1437 return Armor[7][armorType];
1438 case INVTYPE_CLOAK:
1439 return CloakArmor;
1440 case INVTYPE_SHIELD:
1441 return ShieldArmor;
1442 default:
1443 break;
1444 }
1445 }
1446 return 0;
1447}
1448
1449uint32 ScalingStatValuesEntry::GetDPSAndDamageMultiplier(uint32 subClass, bool isCasterWeapon, float* damageMultiplier) const
1450{
1451 if (!isCasterWeapon)
1452 {
1453 switch (subClass)
1454 {
1460 *damageMultiplier = 0.3f;
1461 return dpsMod[0];
1468 *damageMultiplier = 0.2f;
1469 return dpsMod[1];
1473 *damageMultiplier = 0.3f;
1474 return dpsMod[4];
1482 break;
1483 }
1484 }
1485 else
1486 {
1487 if (subClass <= ITEM_SUBCLASS_WEAPON_WAND)
1488 {
1489 uint32 mask = 1 << subClass;
1490 // two-handed weapons
1491 if (mask & 0x562)
1492 {
1493 *damageMultiplier = 0.2f;
1494 return dpsMod[3];
1495 }
1496
1497 if (mask & (1 << ITEM_SUBCLASS_WEAPON_WAND))
1498 {
1499 *damageMultiplier = 0.3f;
1500 return dpsMod[5];
1501 }
1502 }
1503 *damageMultiplier = 0.3f;
1504 return dpsMod[2];
1505 }
1506 return 0;
1507}
1509{
1510 DigsitePOIPolygonContainer::const_iterator itr = sDigsitePOIPolygons.find(digsiteId);
1511 if (itr != sDigsitePOIPolygons.end())
1512 return &itr->second;
1513
1514 return NULL;
1515}
1516
1519{
1520 for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i)
1521 {
1522 LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i);
1523 if (!dungeon)
1524 continue;
1525
1526 if (dungeon->m_ContinentID == int32(mapId) && DifficultyID(dungeon->m_DifficultyID) == difficulty)
1527 return dungeon;
1528 }
1529
1530 return NULL;
1531}
1532
1533std::set<uint32> const& GetPhasesForGroup(uint32 group)
1534{
1535 return sPhasesByGroup[group];
1536}
char const * localeNames[TOTAL_LOCALES]
Definition Common.cpp:8
const uint8 TOTAL_LOCALES
Definition Common.h:153
#define MAX_BATTLEGROUND_BRACKETS
Definition DBCEnums.h:34
@ ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL
Definition DBCEnums.h:404
DifficultyID
Definition DBCEnums.h:330
@ DIFFICULTY_NONE
Definition DBCEnums.h:331
@ DIFFICULTY_SCE_HEROIC
Definition DBCEnums.h:341
@ DIFFICULTY_SCE_NORMAL
Definition DBCEnums.h:342
BattlegroundBracketId
Definition DBCEnums.h:28
DBCStorage< DurabilityQualityEntry > sDurabilityQualityStore(DurabilityQualityfmt)
PhaseGroupContainer sPhasesByGroup
DBCStorage< AreaTableEntry > sAreaStore(AreaTableEntryfmt)
DBCStorage< MovieEntry > sMovieStore(MovieEntryfmt)
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
DBCStorage< RandomPropertiesPointsEntry > sRandomPropertiesPointsStore(RandomPropertiesPointsfmt)
DBCStorage< CharTitlesEntry > sCharTitlesStore(CharTitlesEntryfmt)
std::map< uint32, uint32 > AreaFlagByMapID
Definition DBCStores.cpp:20
DBCStorage< ResearchSiteEntry > sResearchSiteStore(ResearchSitefmt)
DBCStorage< NameGenEntry > sNameGenStore(NameGenfmt)
DBCStorage< VehicleSeatEntry > sVehicleSeatStore(VehicleSeatEntryfmt)
DBCStorage< ItemArmorQualityEntry > sItemArmorQualityStore(ItemArmorQualityfmt)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
DBCStorage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore(SpellShapeshiftFormfmt)
DBCStorage< ChrPowerTypesEntry > sChrPowerTypesStore(ChrClassesXPowerTypesfmt)
DBCStorage< ScalingStatDistributionEntry > sScalingStatDistributionStore(ScalingStatDistributionfmt)
TaxiMask sAllianceTaxiNodesMask
DBCStorage< CriteriaTreeEntry > sCriteriaTreeStore(CriteriaTreefmt)
ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId)
DBCStorage< ItemSetEntry > sItemSetStore(ItemSetEntryfmt)
DBCStorage< WorldSafeLocsEntry > sWorldSafeLocsStore(WorldSafeLocsEntryfmt)
static uint32 sSpecializationClassStore[MAX_CLASSES][4]
static AreaFlagByAreaID sAreaFlagByAreaID
Definition DBCStores.cpp:44
DBCStorage< DestructibleModelDataEntry > sDestructibleModelDataStore(DestructibleModelDatafmt)
DBCStorage< GlyphSlotEntry > sGlyphSlotStore(GlyphSlotfmt)
TaxiPathSetBySource sTaxiPathSetBySource
DigsitePOIPolygon const * GetDigsitePOIPolygon(uint32 digsiteId)
DBCStorage< LFGDungeonEntry > sLFGDungeonStore(LFGDungeonEntryfmt)
DBCStorage< MailTemplateEntry > sMailTemplateStore(MailTemplateEntryfmt)
DBCStorage< GtChanceToSpellCritBaseEntry > sGtChanceToSpellCritBaseStore(GtChanceToSpellCritBasefmt)
DBCStorage< VehicleEntry > sVehicleStore(VehicleEntryfmt)
ClassBySkillIdStore sClassBySkillIdStore
void Zone2MapCoordinates(float &x, float &y, uint32 zone)
DBCStorage< ItemLimitCategoryEntry > sItemLimitCategoryStore(ItemLimitCategoryEntryfmt)
const std::string * GetRandomCharacterName(uint8 race, uint8 gender)
DBCStorage< SpellRadiusEntry > sSpellRadiusStore(SpellRadiusfmt)
DBCStorage< SpellLevelsEntry > sSpellLevelsStore(SpellLevelsEntryfmt)
DBCStorage< SummonPropertiesEntry > sSummonPropertiesStore(SummonPropertiesfmt)
void LoadDBC(uint32 &availableDbcLocales, StoreProblemList &errors, DBCStorage< T > &storage, std::string const &dbcPath, std::string const &filename, std::string const *customFormat=NULL, std::string const *customIndexName=NULL)
void Map2ZoneCoordinates(float &x, float &y, uint32 zone)
std::map< uint16, uint32 > AreaFlagByAreaID
Definition DBCStores.cpp:19
std::map< uint32, SimpleFactionsList > FactionTeamMap
Definition DBCStores.cpp:87
int32 GetAreaFlagByAreaID(uint32 area_id)
SpellEffectScallingByEffectId sSpellEffectScallingByEffectId
SpellCategoryStore sSpellsByCategoryStore
DBCStorage< UnitPowerBarEntry > sUnitPowerBarStore(UnitPowerBarfmt)
TaxiMask sTaxiNodesMask
std::map< uint32, CharStartOutfitEntry const * > sCharStartOutfitMap
Definition DBCStores.cpp:59
uint32 GetAreaFlagByMapId(uint32 mapid)
DBCStorage< SpellClassOptionsEntry > sSpellClassOptionsStore(SpellClassOptionsEntryfmt)
DBCStorage< QuestPOIPointEntry > sQuestPOIPointStore(QuestPOIPointfmt)
DBCStorage< ScalingStatValuesEntry > sScalingStatValuesStore(ScalingStatValuesfmt)
static DigsitePOIPolygonContainer sDigsitePOIPolygons
DBCStorage< GtOCTBaseHPByClassEntry > sGtOCTBaseHPByClassStore(GtOCTBaseHPByClassfmt)
DBCStorage< CharStartOutfitEntry > sCharStartOutfitStore(CharStartOutfitEntryfmt)
DBCStorage< QuestFactionRewEntry > sQuestFactionRewardStore(QuestFactionRewardfmt)
DBCStorage< SpellInterruptsEntry > sSpellInterruptsStore(SpellInterruptsEntryfmt)
DBCStorage< GtCombatRatingsEntry > sGtCombatRatingsStore(GtCombatRatingsfmt)
DBCStorage< LockEntry > sLockStore(LockEntryfmt)
DBCStorage< SpellAuraOptionsEntry > sSpellAuraOptionsStore(SpellAuraOptionsEntryfmt)
MapDifficulty const * GetMapDifficultyData(uint32 mapId, DifficultyID difficulty)
TaxiPathNodesByPath sTaxiPathNodesByPath
DBCStorage< SpellCategoryEntry > sSpellCategoryStore(SpellCategoryfmt)
DBCStorage< ChatChannelsEntry > sChatChannelsStore(ChatChannelsEntryfmt)
std::map< uint32, std::vector< uint32 > > SpecializationSpellsMap
DBCStorage< ItemDamageEntry > sItemDamageOneHandCasterStore(ItemDamagefmt)
bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId)
TalentSpellPos const * GetTalentSpellPos(uint32 spellId)
DBCStorage< BankBagSlotPricesEntry > sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt)
DBCStorage< BattlemasterListEntry > sBattlemasterListStore(BattlemasterListEntryfmt)
static DBCStorage< TaxiPathNodeEntry > sTaxiPathNodeStore(TaxiPathNodeEntryfmt)
DBCStorage< CreatureSpellDataEntry > sCreatureSpellDataStore(CreatureSpellDatafmt)
MapDifficultyMap sMapDifficultyMap
char const * GetClassName(uint8 class_, uint8)
DBCStorage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore(CreatureDisplayInfofmt)
DBCStorage< SpellItemEnchantmentConditionEntry > sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt)
DBCStorage< SpellCastTimesEntry > sSpellCastTimesStore(SpellCastTimefmt)
DBCStorage< SpellRangeEntry > sSpellRangeStore(SpellRangefmt)
uint32 GetLiquidFlags(uint32 liquidType)
LFGDungeonEntry const * GetLFGDungeon(uint32 mapId, DifficultyID difficulty)
Returns LFGDungeonEntry for a specific map and difficulty. Will return first found entry if multiple ...
DBCStorage< MapDifficultyEntry > sMapDifficultyStore(MapDifficultyEntryfmt)
DBCStorage< BarberShopStyleEntry > sBarberShopStyleStore(BarberShopStyleEntryfmt)
DBCStorage< SpellMiscEntry > sSpellMiscStore(SpellMiscfmt)
DBCStorage< ChrRacesEntry > sChrRacesStore(ChrRacesEntryfmt)
DBCStorage< ImportPriceShieldEntry > sImportPriceShieldStore(ImportPriceShieldfmt)
DBCStorage< SpellRuneCostEntry > sSpellRuneCostStore(SpellRuneCostfmt)
NameGenVectorArraysMap sGenNameVectoArraysMap
uint32 GetTalentSpellCost(uint32 spellId)
DBCStorage< SpellTargetRestrictionsEntry > sSpellTargetRestrictionsStore(SpellTargetRestrictionsEntryfmt)
DBCStorage< GtChanceToSpellCritEntry > sGtChanceToSpellCritStore(GtChanceToSpellCritfmt)
std::map< WMOAreaTableTripple, WMOAreaTableEntry const * > WMOAreaInfoByTripple
Definition DBCStores.cpp:39
DBCStorage< SpellDifficultyEntry > sSpellDifficultyStore(SpellDifficultyfmt)
TaxiMask sOldContinentsNodesMask
SpellsPerClassStore sSpellsPerClassStore
DBCStorage< SpellEquippedItemsEntry > sSpellEquippedItemsStore(SpellEquippedItemsEntryfmt)
DBCStorage< ModifierTreeEntry > sModifierTreeStore(ModifierTreefmt)
DBCStorage< SpellPowerEntry > sSpellPowerStore(SpellPowerEntryfmt)
DBCStorage< OverrideSpellDataEntry > sOverrideSpellDataStore(OverrideSpellDatafmt)
DBCStorage< GameObjectDisplayInfoEntry > sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt)
DBCStorage< MountCapabilityEntry > sMountCapabilityStore(MountCapabilityfmt)
DBCStorage< SpellTotemsEntry > sSpellTotemsStore(SpellTotemsEntryfmt)
DBCStorage< ItemDamageEntry > sItemDamageRangedStore(ItemDamagefmt)
DBCStorage< ItemDamageEntry > sItemDamageAmmoStore(ItemDamagefmt)
PvPDifficultyEntry const * GetBattlegroundBracketByLevel(uint32 mapid, uint32 level)
TaxiMask sDeathKnightTaxiNodesMask
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId)
DBCStorage< AreaTriggerEntry > sAreaTriggerStore(AreaTriggerEntryfmt)
std::vector< uint32 > const * GetSpecializationSpells(uint32 specializationId)
char const * GetRaceName(uint8 race, uint8)
DBCStorage< ItemDisenchantLootEntry > sItemDisenchantLootStore(ItemDisenchantLootfmt)
DBCStorage< HolidaysEntry > sHolidaysStore(Holidaysfmt)
DBCStorage< ItemClassEntry > sItemClassStore(ItemClassfmt)
DBCStorage< ResearchBranchEntry > sResearchBranchStore(ResearchBranchfmt)
static AreaFlagByMapID sAreaFlagByMapID
Definition DBCStores.cpp:45
DBCStorage< SpellShapeshiftEntry > sSpellShapeshiftStore(SpellShapeshiftEntryfmt)
DBCStorage< ResearchProjectEntry > sResearchProjectStore(ResearchProjectfmt)
DBCStorage< SpellAuraRestrictionsEntry > sSpellAuraRestrictionsStore(SpellAuraRestrictionsEntryfmt)
AreaTableEntry const * GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id)
DBCStorage< PhaseGroupEntry > sPhaseGroupStore(PhaseGroupfmt)
DBCStorage< GtBattlePetXpEntry > sGtBattlePetXpStore(GtBattlePetXpfmt)
DBCStorage< GtOCTClassCombatRatingScalarEntry > sGtOCTClassCombatRatingScalarStore(GtOCTClassCombatRatingScalarfmt)
DBCStorage< BannedAddOnsEntry > sBannedAddOnsStore(BannedAddOnsfmt)
DBCStorage< WorldMapAreaEntry > sWorldMapAreaStore(WorldMapAreaEntryfmt)
DBCStorage< ItemRandomSuffixEntry > sItemRandomSuffixStore(ItemRandomSuffixfmt)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
uint32 GetSkillIdByClass(uint32 classId)
DBCStorage< EmotesTextEntry > sEmotesTextStore(EmotesTextEntryfmt)
DBCStorage< AchievementEntry > sAchievementStore(Achievementfmt)
DBCStorage< TotemCategoryEntry > sTotemCategoryStore(TotemCategoryEntryfmt)
DBCStorage< ItemDamageEntry > sItemDamageWandStore(ItemDamagefmt)
DBCStorage< ImportPriceArmorEntry > sImportPriceArmorStore(ImportPriceArmorfmt)
DBCStorage< TransportRotationEntry > sTransportRotationStore(TransportRotationfmt)
DBCStorage< QuestSortEntry > sQuestSortStore(QuestSortEntryfmt)
DBCStorage< GtRegenMPPerSptEntry > sGtRegenMPPerSptStore(GtRegenMPPerSptfmt)
std::set< uint32 > const & GetPhasesForGroup(uint32 group)
PvPDifficultyEntry const * GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id)
DBCStorage< DurabilityCostsEntry > sDurabilityCostsStore(DurabilityCostsfmt)
DBCStorage< ItemPriceBaseEntry > sItemPriceBaseStore(ItemPriceBasefmt)
DBCStorage< WorldMapOverlayEntry > sWorldMapOverlayStore(WorldMapOverlayEntryfmt)
DBCStorage< SpellCastingRequirementsEntry > sSpellCastingRequirementsStore(SpellCastingRequirementsEntryfmt)
DBCStorage< GtChanceToMeleeCritBaseEntry > sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt)
DBCStorage< ArmorLocationEntry > sArmorLocationStore(ArmorLocationfmt)
DBCStorage< ItemArmorTotalEntry > sItemArmorTotalStore(ItemArmorTotalfmt)
static FactionTeamMap sFactionTeamMap
Definition DBCStores.cpp:88
DBCStorage< GemPropertiesEntry > sGemPropertiesStore(GemPropertiesEntryfmt)
MapDifficulty const * GetDownscaledMapDifficultyData(uint32 mapId, DifficultyID &difficulty)
DBCStorage< ItemRandomPropertiesEntry > sItemRandomPropertiesStore(ItemRandomPropertiesfmt)
uint32 DBCFileCount
SpecializationSpellsMap sSpecializationSpellsMap
DBCStorage< DifficultyEntry > sDifficultyStore(Difficultyfmt)
DBCStorage< DungeonEncounterEntry > sDungeonEncounterStore(DungeonEncounterfmt)
DBCStorage< GtNPCManaCostScalerEntry > sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt)
uint32 const * GetClassSpecializations(uint8 classId)
DBCStorage< SpellEntry > sSpellStore(SpellEntryfmt)
DBCStorage< AreaGroupEntry > sAreaGroupStore(AreaGroupEntryfmt)
DBCStorage< QuestXPEntry > sQuestXPStore(QuestXPfmt)
uint32 PowersByClass[MAX_CLASSES][MAX_POWERS]
Definition DBCStores.cpp:76
uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< PhaseEntry > sPhaseStore(PhaseEntryfmt)
DBCStorage< SpellEffectEntry > sSpellEffectStore(SpellEffectEntryfmt)
DBCStorage< CreatureFamilyEntry > sCreatureFamilyStore(CreatureFamilyfmt)
DBCStorage< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
static bool LoadDBC_assert_print(uint32 fsize, uint32 rsize, const std::string &filename)
DBCStorage< ItemDamageEntry > sItemDamageThrownStore(ItemDamagefmt)
DBCStorage< TaxiPathEntry > sTaxiPathStore(TaxiPathEntryfmt)
DBCStorage< GtSpellScalingEntry > sGtSpellScalingStore(GtSpellScalingfmt)
DBCStorage< WMOAreaTableEntry > sWMOAreaTableStore(WMOAreaTableEntryfmt)
DBCStorage< GtOCTBaseMPByClassEntry > sGtOCTBaseMPByClassStore(GtOCTBaseMPByClassfmt)
DBCStorage< TalentEntry > sTalentStore(TalentEntryfmt)
DBCStorage< TaxiNodesEntry > sTaxiNodesStore(TaxiNodesEntryfmt)
DBCStorage< SpellDurationEntry > sSpellDurationStore(SpellDurationfmt)
DBCStorage< gtOCTHpPerStaminaEntry > sGtOCTHpPerStaminaStore(GtOCTHpPerStaminafmt)
DBCStorage< SpellFocusObjectEntry > sSpellFocusObjectStore(SpellFocusObjectfmt)
DBCStorage< AuctionHouseEntry > sAuctionHouseStore(AuctionHouseEntryfmt)
DBCStorage< ItemReforgeEntry > sItemReforgeStore(ItemReforgefmt)
char const * GetPetName(uint32 petfamily, uint32)
DBCStorage< TransportAnimationEntry > sTransportAnimationStore(TransportAnimationfmt)
DBCStorage< ItemDamageEntry > sItemDamageOneHandStore(ItemDamagefmt)
DBCStorage< ItemDamageEntry > sItemDamageTwoHandStore(ItemDamagefmt)
DBCStorage< ImportPriceQualityEntry > sImportPriceQualityStore(ImportPriceQualityfmt)
DBCStorage< ChrSpecializationEntry > sChrSpecializationStore(ChrSpecializationfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< SpellCooldownsEntry > sSpellCooldownsStore(SpellCooldownsEntryfmt)
CharStartOutfitEntry const * GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender)
MapDifficulty const * GetDefaultMapDifficulty(uint32 mapId)
TalentSpellPosMap sTalentSpellPosMap
DBCStorage< GlyphPropertiesEntry > sGlyphPropertiesStore(GlyphPropertiesfmt)
DBCStorage< CreatureModelDataEntry > sCreatureModelDataStore(CreatureModelDatafmt)
DBCStorage< SpellCategoriesEntry > sSpellCategoriesStore(SpellCategoriesEntryfmt)
std::list< uint32 > GetSpellsForLevels(uint32 classId, uint32 raceMask, uint32 specializationId, uint32 minLevel, uint32 maxLevel)
DBCStorage< CreatureTypeEntry > sCreatureTypeStore(CreatureTypefmt)
std::list< std::string > StoreProblemList
DBCStorage< MountTypeEntry > sMountTypeStore(MountTypefmt)
PetFamilySpellsStore sPetFamilySpellsStore
uint32 GetClassBySkillId(uint32 skillId)
AreaTableEntry const * GetAreaEntryByAreaID(uint32 area_id)
DBCStorage< CinematicSequencesEntry > sCinematicSequencesStore(CinematicSequencesEntryfmt)
DBCStorage< GtBarberShopCostBaseEntry > sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt)
DBCStorage< CinematicCameraEntry > sCinematicCameraStore(CinematicCameraEntryfmt)
DBCStorage< SpecializationSpellsEntry > sSpecializationSpellsStore(SpecializationSpellsfmt)
DBCStorage< SpellEffectScalingEntry > sSpellEffectScalingStore(SpellEffectScalingfmt)
DBCStorage< GuildPerkSpellsEntry > sGuildPerkSpellsStore(GuildPerkSpellsfmt)
void LoadDBCStores(const std::string &dataPath)
DBCStorage< SkillLineAbilityEntry > sSkillLineAbilityStore(SkillLineAbilityfmt)
DBCStorage< ChrClassesEntry > sChrClassesStore(ChrClassesEntryfmt)
DBCStorage< CurrencyTypesEntry > sCurrencyTypesStore(CurrencyTypesfmt)
SimpleFactionsList const * GetFactionTeamList(uint32 faction)
DBCStorage< EmotesEntry > sEmotesStore(EmotesEntryfmt)
DBCStorage< GtChanceToMeleeCritEntry > sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt)
DBCStorage< LiquidTypeEntry > sLiquidTypeStore(LiquidTypefmt)
DBCStorage< ItemArmorShieldEntry > sItemArmorShieldStore(ItemArmorShieldfmt)
DBCStorage< PvPDifficultyEntry > sPvPDifficultyStore(PvPDifficultyfmt)
DBCStorage< SpellScalingEntry > sSpellScalingStore(SpellScalingEntryfmt)
DBCStorage< ImportPriceWeaponEntry > sImportPriceWeaponStore(ImportPriceWeaponfmt)
TaxiMask sHordeTaxiNodesMask
WMOAreaTableEntry const * GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid)
uint32 GetMaxLevelForExpansion(uint32 expansion)
static WMOAreaInfoByTripple sWMOAreaInfoByTripple
Definition DBCStores.cpp:47
DBCStorage< CriteriaEntry > sCriteriaStore(Criteriafmt)
DBCStorage< ItemDamageEntry > sItemDamageTwoHandCasterStore(ItemDamagefmt)
ContentLevels
Definition DBCStores.h:37
@ CONTENT_61_70
Definition DBCStores.h:39
@ CONTENT_71_80
Definition DBCStores.h:40
@ CONTENT_1_60
Definition DBCStores.h:38
@ CONTENT_86_90
Definition DBCStores.h:42
@ CONTENT_81_85
Definition DBCStores.h:41
std::list< uint32 > SimpleFactionsList
Definition DBCStores.h:15
std::unordered_map< uint32, std::unordered_map< uint32, MapDifficulty > > MapDifficultyMap
Definition DBCStores.h:59
std::map< uint32, DigsitePOIPolygon > DigsitePOIPolygonContainer
Definition DBCStores.h:74
std::vector< std::pair< int32, int32 > > DigsitePOIPolygon
Definition DBCStores.h:73
std::unordered_map< uint32, std::set< uint32 > > PhaseGroupContainer
std::vector< TaxiPathNodeList > TaxiPathNodesByPath
std::map< uint32, PetFamilySpellsSet > PetFamilySpellsStore
std::map< uint32, VectorArray > NameGenVectorArraysMap
UNORDERED_MAP< uint32, uint32 > ClassBySkillIdStore
std::map< uint32, SpellCategorySet > SpellCategoryStore
#define MAX_TALENT_RANK
std::map< uint32, TaxiPathSetForSource > TaxiPathSetBySource
UNORDERED_MAP< uint32, std::list< SkillLineAbilityEntry const * > > SpellsPerClassStore
UNORDERED_MAP< uint32, uint32 > SpellEffectScallingByEffectId
uint8 TaxiMask[TaxiMaskSize]
std::map< uint32, TalentSpellPos > TalentSpellPosMap
char const SpellItemEnchantmentConditionfmt[]
Definition DBCfmt.h:156
char const CreatureFamilyfmt[]
Definition DBCfmt.h:39
char const MapDifficultyEntryfmt[]
Definition DBCfmt.h:97
char const ItemSetEntryfmt[]
Definition DBCfmt.h:91
char const DungeonEncounterfmt[]
Definition DBCfmt.h:47
char const CharStartOutfitEntryfmt[]
Definition DBCfmt.h:28
char const GtBattlePetXpfmt[]
Definition DBCfmt.h:59
char const SpellMiscfmt[]
Definition DBCfmt.h:136
char const BarberShopStyleEntryfmt[]
Definition DBCfmt.h:26
char const BattlemasterListEntryfmt[]
Definition DBCfmt.h:27
char const LFGDungeonEntryfmt[]
Definition DBCfmt.h:92
char const QuestXPfmt[]
Definition DBCfmt.h:110
char const CriteriaTreefmt[]
Definition DBCfmt.h:43
char const GtCombatRatingsfmt[]
Definition DBCfmt.h:60
char const AreaTableEntryfmt[]
Definition DBCfmt.h:18
char const EmotesEntryfmt[]
Definition DBCfmt.h:50
char const RandomPropertiesPointsfmt[]
Definition DBCfmt.h:111
char const EmotesTextEntryfmt[]
Definition DBCfmt.h:51
char const GtChanceToSpellCritBasefmt[]
Definition DBCfmt.h:64
char const ResearchBranchfmt[]
Definition DBCfmt.h:112
char const SkillLinefmt[]
Definition DBCfmt.h:117
char const GemPropertiesEntryfmt[]
Definition DBCfmt.h:55
char const SpellCooldownsEntryfmt[]
Definition DBCfmt.h:130
char const ChrSpecializationfmt[]
Definition DBCfmt.h:34
char const SpellShapeshiftFormfmt[]
Definition DBCfmt.h:160
char const SpellScalingEntryfmt[]
Definition DBCfmt.h:138
char const SpellFocusObjectfmt[]
Definition DBCfmt.h:154
char const GtRegenMPPerSptfmt[]
Definition DBCfmt.h:68
char const SummonPropertiesfmt[]
Definition DBCfmt.h:162
char const Difficultyfmt[]
Definition DBCfmt.h:46
char const ItemRandomSuffixfmt[]
Definition DBCfmt.h:90
char const SpecializationSpellsfmt[]
Definition DBCfmt.h:120
char const QuestSortEntryfmt[]
Definition DBCfmt.h:109
char const SpellClassOptionsEntryfmt[]
Definition DBCfmt.h:129
char const TransportRotationfmt[]
Definition DBCfmt.h:170
char const CinematicSequencesEntryfmt[]
Definition DBCfmt.h:36
char const ImportPriceWeaponfmt[]
Definition DBCfmt.h:77
char const DurabilityQualityfmt[]
Definition DBCfmt.h:49
char const PhaseEntryfmt[]
Definition DBCfmt.h:104
char const SpellDifficultyfmt[]
Definition DBCfmt.h:144
char const WorldMapOverlayEntryfmt[]
Definition DBCfmt.h:175
char const QuestPOIPointfmt[]
Definition DBCfmt.h:108
char const SpellRangefmt[]
Definition DBCfmt.h:137
char const ChrClassesXPowerTypesfmt[]
Definition DBCfmt.h:33
char const PhaseGroupfmt[]
Definition DBCfmt.h:105
char const MountTypefmt[]
Definition DBCfmt.h:100
char const ModifierTreefmt[]
Definition DBCfmt.h:98
char const SpellEffectScalingfmt[]
Definition DBCfmt.h:153
char const VehicleEntryfmt[]
Definition DBCfmt.h:171
char const WorldSafeLocsEntryfmt[]
Definition DBCfmt.h:176
char const DurabilityCostsfmt[]
Definition DBCfmt.h:48
char const GlyphSlotfmt[]
Definition DBCfmt.h:57
char const SpellAuraRestrictionsEntryfmt[]
Definition DBCfmt.h:124
char const ItemArmorTotalfmt[]
Definition DBCfmt.h:82
char const CharTitlesEntryfmt[]
Definition DBCfmt.h:29
char const SpellInterruptsEntryfmt[]
Definition DBCfmt.h:134
char const NameGenfmt[]
Definition DBCfmt.h:102
char const GtOCTBaseMPByClassfmt[]
Definition DBCfmt.h:71
char const SpellLevelsEntryfmt[]
Definition DBCfmt.h:135
char const QuestFactionRewardfmt[]
Definition DBCfmt.h:107
char const ItemDamagefmt[]
Definition DBCfmt.h:84
char const ImportPriceQualityfmt[]
Definition DBCfmt.h:75
char const SoundEntriesfmt[]
Definition DBCfmt.h:119
char const WMOAreaTableEntryfmt[]
Definition DBCfmt.h:173
char const ImportPriceShieldfmt[]
Definition DBCfmt.h:76
char const CreatureTypefmt[]
Definition DBCfmt.h:41
char const CinematicCameraEntryfmt[]
Definition DBCfmt.h:35
char const SpellRadiusfmt[]
Definition DBCfmt.h:157
char const SpellEquippedItemsEntryfmt[]
Definition DBCfmt.h:133
char const CurrencyTypesfmt[]
Definition DBCfmt.h:44
char const Holidaysfmt[]
Definition DBCfmt.h:73
char const SpellPowerEntryfmt[]
Definition DBCfmt.h:158
char const ArmorLocationfmt[]
Definition DBCfmt.h:22
char const LockEntryfmt[]
Definition DBCfmt.h:94
char const SpellCategoriesEntryfmt[]
Definition DBCfmt.h:127
char const WorldMapAreaEntryfmt[]
Definition DBCfmt.h:174
char const GtOCTHpPerStaminafmt[]
Definition DBCfmt.h:61
char const CreatureDisplayInfofmt[]
Definition DBCfmt.h:37
char const ResearchProjectfmt[]
Definition DBCfmt.h:113
char const SpellDurationfmt[]
Definition DBCfmt.h:131
char const GameObjectDisplayInfofmt[]
Definition DBCfmt.h:54
char const SpellAuraOptionsEntryfmt[]
Definition DBCfmt.h:123
char const ItemArmorQualityfmt[]
Definition DBCfmt.h:80
char const SpellEntryfmt[]
Definition DBCfmt.h:132
char const GtOCTClassCombatRatingScalarfmt[]
Definition DBCfmt.h:67
char const GtBarberShopCostBasefmt[]
Definition DBCfmt.h:58
char const ChrClassesEntryfmt[]
Definition DBCfmt.h:31
char const UnitPowerBarfmt[]
Definition DBCfmt.h:168
char const SpellShapeshiftEntryfmt[]
Definition DBCfmt.h:139
char const TotemCategoryEntryfmt[]
Definition DBCfmt.h:167
char const AuctionHouseEntryfmt[]
Definition DBCfmt.h:23
char const ItemRandomPropertiesfmt[]
Definition DBCfmt.h:89
char const MountCapabilityfmt[]
Definition DBCfmt.h:99
char const TaxiPathNodeEntryfmt[]
Definition DBCfmt.h:166
char const TalentEntryfmt[]
Definition DBCfmt.h:163
char const BannedAddOnsfmt[]
Definition DBCfmt.h:25
char const MovieEntryfmt[]
Definition DBCfmt.h:101
char const TransportAnimationfmt[]
Definition DBCfmt.h:169
char const GtChanceToMeleeCritfmt[]
Definition DBCfmt.h:63
char const GtNPCManaCostScalerfmt[]
Definition DBCfmt.h:66
char const SpellRuneCostfmt[]
Definition DBCfmt.h:159
char const ItemLimitCategoryEntryfmt[]
Definition DBCfmt.h:88
char const AreaTriggerEntryfmt[]
Definition DBCfmt.h:21
char const LiquidTypefmt[]
Definition DBCfmt.h:93
char const Criteriafmt[]
Definition DBCfmt.h:42
char const BankBagSlotPricesEntryfmt[]
Definition DBCfmt.h:24
char const SpellItemEnchantmentfmt[]
Definition DBCfmt.h:155
char const MailTemplateEntryfmt[]
Definition DBCfmt.h:95
char const GlyphPropertiesfmt[]
Definition DBCfmt.h:56
char const FactionEntryfmt[]
Definition DBCfmt.h:52
char const ScalingStatValuesfmt[]
Definition DBCfmt.h:116
char const ItemClassfmt[]
Definition DBCfmt.h:83
char const SpellCastingRequirementsEntryfmt[]
Definition DBCfmt.h:125
char const PvPDifficultyfmt[]
Definition DBCfmt.h:106
char const ItemArmorShieldfmt[]
Definition DBCfmt.h:81
char const Achievementfmt[]
Definition DBCfmt.h:14
char const TaxiPathEntryfmt[]
Definition DBCfmt.h:165
char const TaxiNodesEntryfmt[]
Definition DBCfmt.h:164
char const GtOCTBaseHPByClassfmt[]
Definition DBCfmt.h:70
char const VehicleSeatEntryfmt[]
Definition DBCfmt.h:172
char const GtChanceToMeleeCritBasefmt[]
Definition DBCfmt.h:62
char const AreaGroupEntryfmt[]
Definition DBCfmt.h:19
char const GtSpellScalingfmt[]
Definition DBCfmt.h:69
char const ItemReforgefmt[]
Definition DBCfmt.h:79
char const SpellCategoryfmt[]
Definition DBCfmt.h:128
char const SpellCastTimefmt[]
Definition DBCfmt.h:126
char const GtChanceToSpellCritfmt[]
Definition DBCfmt.h:65
char const DestructibleModelDatafmt[]
Definition DBCfmt.h:45
char const MapEntryfmt[]
Definition DBCfmt.h:96
char const ItemPriceBasefmt[]
Definition DBCfmt.h:78
char const SpellTotemsEntryfmt[]
Definition DBCfmt.h:141
char const OverrideSpellDatafmt[]
Definition DBCfmt.h:103
char const SpellTargetRestrictionsEntryfmt[]
Definition DBCfmt.h:140
char const GuildPerkSpellsfmt[]
Definition DBCfmt.h:72
char const SkillLineAbilityfmt[]
Definition DBCfmt.h:118
char const ItemDisenchantLootfmt[]
Definition DBCfmt.h:87
char const FactionTemplateEntryfmt[]
Definition DBCfmt.h:53
char const CreatureSpellDatafmt[]
Definition DBCfmt.h:40
char const ScalingStatDistributionfmt[]
Definition DBCfmt.h:115
char const ChatChannelsEntryfmt[]
Definition DBCfmt.h:30
char const ResearchSitefmt[]
Definition DBCfmt.h:114
char const ChrRacesEntryfmt[]
Definition DBCfmt.h:32
char const CreatureModelDatafmt[]
Definition DBCfmt.h:38
char const SpellEffectEntryfmt[]
Definition DBCfmt.h:148
char const ImportPriceArmorfmt[]
Definition DBCfmt.h:74
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
std::uint16_t uint16
Definition Define.h:78
#define ASSERT
Definition Errors.h:29
@ ITEM_SUBCLASS_WEAPON_MISCELLANEOUS
@ ITEM_SUBCLASS_WEAPON_CROSSBOW
@ ITEM_SUBCLASS_WEAPON_GUN
@ ITEM_SUBCLASS_WEAPON_AXE2
@ ITEM_SUBCLASS_WEAPON_SPEAR
@ ITEM_SUBCLASS_WEAPON_STAFF
@ ITEM_SUBCLASS_WEAPON_MACE
@ ITEM_SUBCLASS_WEAPON_EXOTIC2
@ ITEM_SUBCLASS_WEAPON_FISHING_POLE
@ ITEM_SUBCLASS_WEAPON_MACE2
@ ITEM_SUBCLASS_WEAPON_DAGGER
@ ITEM_SUBCLASS_WEAPON_BOW
@ ITEM_SUBCLASS_WEAPON_SWORD
@ ITEM_SUBCLASS_WEAPON_AXE
@ ITEM_SUBCLASS_WEAPON_Obsolete
@ ITEM_SUBCLASS_WEAPON_FIST_WEAPON
@ ITEM_SUBCLASS_WEAPON_WAND
@ ITEM_SUBCLASS_WEAPON_EXOTIC
@ ITEM_SUBCLASS_WEAPON_THROWN
@ ITEM_SUBCLASS_WEAPON_SWORD2
@ ITEM_SUBCLASS_WEAPON_POLEARM
@ INVTYPE_BODY
@ INVTYPE_FINGER
@ INVTYPE_HEAD
@ INVTYPE_CLOAK
@ INVTYPE_ROBE
@ INVTYPE_HOLDABLE
@ INVTYPE_TRINKET
@ INVTYPE_RELIC
@ INVTYPE_RANGED
@ INVTYPE_THROWN
@ INVTYPE_WAIST
@ INVTYPE_RANGEDRIGHT
@ INVTYPE_WRISTS
@ INVTYPE_WEAPON
@ INVTYPE_WEAPONMAINHAND
@ INVTYPE_WEAPONOFFHAND
@ INVTYPE_2HWEAPON
@ INVTYPE_BAG
@ INVTYPE_NECK
@ INVTYPE_SHOULDERS
@ INVTYPE_FEET
@ INVTYPE_NON_EQUIP
@ INVTYPE_AMMO
@ INVTYPE_QUIVER
@ INVTYPE_SHIELD
@ INVTYPE_TABARD
@ INVTYPE_LEGS
@ INVTYPE_CHEST
@ INVTYPE_HANDS
#define MAX_INVTYPE
#define SF_LOG_ERROR(filterType__,...)
Definition Log.h:143
#define SF_LOG_INFO(filterType__,...)
Definition Log.h:137
@ SPELL_ATTR0_PASSIVE
@ MAX_POWERS
@ SPELL_EFFECT_SEND_TAXI
@ SKILL_CATEGORY_CLASS
#define MAX_CLASSES
#define sSpellMgr
Definition SpellMgr.h:744
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition Timer.h:22
uint32 getMSTime()
Definition Timer.h:12
#define sTransportMgr
static uint32 GetFormatRecordSize(std::string format, int32 *index_pos=NULL)
char const * GetFormat() const
Definition DBCStore.h:77
bool LoadStringsFrom(char const *fn)
Definition DBCStore.h:235
uint32 GetFieldCount() const
Definition DBCStore.h:78
bool Load(char const *fn, SqlDbc *sql)
Definition DBCStore.h:80
uint32 SpellLevel
Definition SpellInfo.h:206
uint32 Id
Definition SpellInfo.h:160
char * name
char * name
uint32 classId
uint32 TabPage
char * Name
uint32 skillLine[2]
uint32 flags
uint32 DownscaleID
uint32 team
int32 m_ContinentID
uint32 m_DifficultyID
bool IsScenario() const
int32 rootPhaseMap
uint32 Expansion() const
uint32 maxLevel
uint32 ShieldArmor
uint32 GetDPSAndDamageMultiplier(uint32 subClass, bool isCasterWeapon, float *damageMultiplier) const
uint32 GetArmor(uint32 inventoryType, uint32 armorType) const
uint32 StatMultiplier[5]
uint32 GetStatMultiplier(uint32 inventoryType) const
uint32 CloakArmor
uint32 dpsMod[6]
uint32 Armor[8][4]
uint32 spellId
uint32 learnOnGetSkill
uint32 racemask
uint32 skillId
char * name
int32 categoryId
uint32 ID
int32 SpellID[4]
uint32 SpellEffectId
uint32 SpellLevelsId
uint32 SpellMiscId
uint32 SpellCategoriesId
uint32 Id
uint32 spellLevel
uint32 SpellId
uint32 map_id
uint32 MountCreatureID[2]
uint32 categoryType
uint32 categoryMask
uint32 TransportEntry
uint32 TimeSeg
uint32 TimeSeg
uint32 TransportEntry
WMOAreaTableTripple(int32 r, int32 a, int32 g)
Definition DBCStores.cpp:24
bool operator<(const WMOAreaTableTripple &b) const
Definition DBCStores.cpp:28
float x2
float x1
float y1
float y2