257{
259
260 std::string dbcPath = dataPath + "dbc/";
261
263 uint32 availableDbcLocales = 0xFFFFFFFF;
264
265#define LOAD_DBC(store, file, dbtable) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file, dbtable)
266
313
319
376
377#undef LOAD_DBC
378
380 sCharStartOutfitMap[outfit->Race | (outfit->Class << 8) | (outfit->Gender << 16)] = outfit;
381
383 {
384 if (faction->team)
385 {
387 flist.push_back(faction->ID);
388 }
389 }
390
392 {
393 if (info->maxX < info->minX)
394 std::swap(*(float*)(&info->maxX), *(float*)(&info->minX));
395
396 if (info->maxY < info->minY)
397 std::swap(*(float*)(&info->maxY), *(float*)(&info->minY));
398
399 if (info->maxZ < info->minZ)
400 std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ));
401 }
402
403
406
409 ASSERT(
false &&
"Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
410
412 if (i->Category)
414
416 {
418 {
420 }
421 }
422
424 {
427 {
429 {
430 if (skillLine->SkillLine != cFamily->skillLine[0] && skillLine->SkillLine != cFamily->skillLine[1])
431 {
432 continue;
433 }
434
436 {
437 continue;
438 }
439
441 {
442 continue;
443 }
444
446 }
447 }
448 }
449
450
452 {
454
456
458 {
459 if (spellDiff->SpellID[x] <= 0 || !
sSpellStore.LookupEntry(spellDiff->SpellID[x]))
460 {
461 if (spellDiff->SpellID[x] > 0)
462 LOG_ERROR(
"sql.sql",
"spelldifficulty_dbc: spell {} at field id: {} at spellid {} does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x);
463
465 }
466 else
467 newEntry.
SpellID[x] = spellDiff->SpellID[x];
468 }
469
471 continue;
472
476 }
477
478
480 {
482
484 {
485 if (talentInfo->RankID[j])
486 {
488
490 {
492 }
493 }
494 }
495 }
496
497
498 {
499
501 {
503 if (!talentTabInfo)
504 continue;
505
506
508 continue;
509
510
512 if (talentTabInfo->
ClassMask & (1 << (cls - 1)))
514 }
515 }
516
520
521
523 std::vector<uint32> pathLength;
524 pathLength.resize(pathCount);
525
528 if (pathLength[entry->path] < entry->index + 1)
529 pathLength[entry->path] = entry->index + 1;
530
531
535
536
539
540
541
542 {
543 std::set<uint32> spellPaths;
547 spellPaths.insert(sInfo->EffectMiscValue[j]);
548
554
556 {
558 if (!node)
559 continue;
560
563 {
564 bool ok = false;
565 for (TaxiPathSetForSource::const_iterator dest_i = src_i->second.begin(); dest_i != src_i->second.end(); ++dest_i)
566 {
567
568 if (dest_i->second->price || spellPaths.find(dest_i->second->ID) == spellPaths.end())
569 {
570 ok = true;
571 break;
572 }
573 }
574
575 if (!ok)
576 continue;
577 }
578
579
581 uint32 submask = 1 << ((i - 1) % 32);
583
586
589
592
593
594 if (node->
map_id < 2 || i == 82 || i == 83 || i == 93 || i == 94)
596
597
598 if (i == 315 || i == 333)
600 }
601 }
602
604 sTransportMgr->AddPathNodeToTransport(anim->TransportEntry, anim->TimeSeg, anim);
605
607 sTransportMgr->AddPathRotationToTransport(rot->TransportEntry, rot->TimeSeg, rot);
608
611
612
614 {
615 LOG_ERROR(
"dbc",
"Incorrect DataDir value in worldserver.conf or ALL required *.dbc files ({}) not found by path: {}dbc",
DBCFileCount, dataPath);
616 exit(1);
617 }
618 else if (!bad_dbc_files.empty())
619 {
620 std::string str;
621 for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
622 str += *i + "\n";
623
624 LOG_ERROR(
"dbc",
"Some required *.dbc files ({} from {}) not found or not compatible:\n{}", (
uint32)bad_dbc_files.size(),
DBCFileCount, str);
625 exit(1);
626 }
627
628
635 {
636 LOG_ERROR(
"dbc",
"You have _outdated_ DBC data. Please extract correct versions from current using client.");
637 exit(1);
638 }
639
642}
std::uint8_t uint8
Definition: Define.h:110
DBCStorage< DurabilityQualityEntry > sDurabilityQualityStore(DurabilityQualityfmt)
DBCStorage< AchievementCriteriaEntry > sAchievementCriteriaStore(AchievementCriteriafmt)
DBCStorage< MovieEntry > sMovieStore(MovieEntryfmt)
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
DBCStorage< RandomPropertiesPointsEntry > sRandomPropertiesPointsStore(RandomPropertiesPointsfmt)
DBCStorage< CharTitlesEntry > sCharTitlesStore(CharTitlesEntryfmt)
DBCStorage< SpellShapeshiftEntry > sSpellShapeshiftStore(SpellShapeshiftfmt)
DBCStorage< VehicleSeatEntry > sVehicleSeatStore(VehicleSeatEntryfmt)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
DBCStorage< TalentTabEntry > sTalentTabStore(TalentTabEntryfmt)
DBCStorage< ScalingStatDistributionEntry > sScalingStatDistributionStore(ScalingStatDistributionfmt)
#define LOAD_DBC(store, file, dbtable)
TaxiMask sAllianceTaxiNodesMask
Definition: DBCStores.cpp:174
DBCStorage< ItemSetEntry > sItemSetStore(ItemSetEntryfmt)
DBCStorage< DestructibleModelDataEntry > sDestructibleModelDataStore(DestructibleModelDatafmt)
DBCStorage< GlyphSlotEntry > sGlyphSlotStore(GlyphSlotfmt)
TaxiPathSetBySource sTaxiPathSetBySource
Definition: DBCStores.cpp:178
DBCStorage< LFGDungeonEntry > sLFGDungeonStore(LFGDungeonEntryfmt)
DBCStorage< MailTemplateEntry > sMailTemplateStore(MailTemplateEntryfmt)
DBCStorage< GtChanceToSpellCritBaseEntry > sGtChanceToSpellCritBaseStore(GtChanceToSpellCritBasefmt)
DBCStorage< VehicleEntry > sVehicleStore(VehicleEntryfmt)
DBCStorage< ItemLimitCategoryEntry > sItemLimitCategoryStore(ItemLimitCategoryEntryfmt)
DBCStorage< SpellRadiusEntry > sSpellRadiusStore(SpellRadiusfmt)
DBCStorage< SummonPropertiesEntry > sSummonPropertiesStore(SummonPropertiesfmt)
SpellCategoryStore sSpellsByCategoryStore
Definition: DBCStores.cpp:147
TaxiMask sTaxiNodesMask
Definition: DBCStores.cpp:171
std::tuple< int16, int8, int32 > WMOAreaTableKey
Definition: DBCStores.cpp:34
std::map< uint32, CharStartOutfitEntry const * > sCharStartOutfitMap
Definition: DBCStores.cpp:51
DBCStorage< ScalingStatValuesEntry > sScalingStatValuesStore(ScalingStatValuesfmt)
DBCStorage< CharStartOutfitEntry > sCharStartOutfitStore(CharStartOutfitEntryfmt)
DBCStorage< QuestFactionRewEntry > sQuestFactionRewardStore(QuestFactionRewardfmt)
DBCStorage< GtCombatRatingsEntry > sGtCombatRatingsStore(GtCombatRatingsfmt)
DBCStorage< LockEntry > sLockStore(LockEntryfmt)
DBCStorage< SkillTiersEntry > sSkillTiersStore(SkillTiersfmt)
DBCStorage< AchievementCategoryEntry > sAchievementCategoryStore(AchievementCategoryfmt)
DBCStorage< SpellCategoryEntry > sSpellCategoryStore(SpellCategoryfmt)
DBCStorage< ChatChannelsEntry > sChatChannelsStore(ChatChannelsEntryfmt)
DBCStorage< PowerDisplayEntry > sPowerDisplayStore(PowerDisplayfmt)
DBCStorage< BankBagSlotPricesEntry > sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt)
DBCStorage< BattlemasterListEntry > sBattlemasterListStore(BattlemasterListEntryfmt)
static DBCStorage< TaxiPathNodeEntry > sTaxiPathNodeStore(TaxiPathNodeEntryfmt)
DBCStorage< CreatureSpellDataEntry > sCreatureSpellDataStore(CreatureSpellDatafmt)
MapDifficultyMap sMapDifficultyMap
Definition: DBCStores.cpp:120
DBCStorage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore(CreatureDisplayInfofmt)
DBCStorage< SpellItemEnchantmentConditionEntry > sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt)
DBCStorage< SpellCastTimesEntry > sSpellCastTimesStore(SpellCastTimefmt)
DBCStorage< SpellRangeEntry > sSpellRangeStore(SpellRangefmt)
DBCStorage< MapDifficultyEntry > sMapDifficultyStore(MapDifficultyEntryfmt)
DBCStorage< ItemBagFamilyEntry > sItemBagFamilyStore(ItemBagFamilyfmt)
DBCStorage< BarberShopStyleEntry > sBarberShopStyleStore(BarberShopStyleEntryfmt)
SkillRaceClassInfoMap SkillRaceClassInfoBySkill
Definition: DBCStores.cpp:139
DBCStorage< ChrRacesEntry > sChrRacesStore(ChrRacesEntryfmt)
DBCStorage< SpellRuneCostEntry > sSpellRuneCostStore(SpellRuneCostfmt)
DBCStorage< GtChanceToSpellCritEntry > sGtChanceToSpellCritStore(GtChanceToSpellCritfmt)
DBCStorage< SpellDifficultyEntry > sSpellDifficultyStore(SpellDifficultyfmt)
TaxiMask sOldContinentsNodesMask
Definition: DBCStores.cpp:172
DBCStorage< SpellVisualEntry > sSpellVisualStore(SpellVisualfmt)
DBCStorage< OverrideSpellDataEntry > sOverrideSpellDataStore(OverrideSpellDatafmt)
DBCStorage< GameObjectDisplayInfoEntry > sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt)
std::unordered_set< uint32 > sPetTalentSpells
Definition: DBCStores.cpp:164
TaxiMask sDeathKnightTaxiNodesMask
Definition: DBCStores.cpp:175
DBCStorage< HolidaysEntry > sHolidaysStore(Holidaysfmt)
DBCStorage< GtOCTClassCombatRatingScalarEntry > sGtOCTClassCombatRatingScalarStore(GtOCTClassCombatRatingScalarfmt)
DBCStorage< WorldMapAreaEntry > sWorldMapAreaStore(WorldMapAreaEntryfmt)
DBCStorage< ItemRandomSuffixEntry > sItemRandomSuffixStore(ItemRandomSuffixfmt)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
DBCStorage< EmotesTextEntry > sEmotesTextStore(EmotesTextEntryfmt)
DBCStorage< AchievementEntry > sAchievementStore(Achievementfmt)
DBCStorage< TotemCategoryEntry > sTotemCategoryStore(TotemCategoryEntryfmt)
DBCStorage< TransportRotationEntry > sTransportRotationStore(TransportRotationfmt)
DBCStorage< QuestSortEntry > sQuestSortStore(QuestSortEntryfmt)
DBCStorage< LightEntry > sLightStore(LightEntryfmt)
DBCStorage< GtRegenMPPerSptEntry > sGtRegenMPPerSptStore(GtRegenMPPerSptfmt)
DBCStorage< GameObjectArtKitEntry > sGameObjectArtKitStore(GameObjectArtKitfmt)
DBCStorage< DurabilityCostsEntry > sDurabilityCostsStore(DurabilityCostsfmt)
DBCStorage< WorldMapOverlayEntry > sWorldMapOverlayStore(WorldMapOverlayEntryfmt)
DBCStorage< GtChanceToMeleeCritBaseEntry > sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt)
DBCStorage< CreatureDisplayInfoExtraEntry > sCreatureDisplayInfoExtraStore(CreatureDisplayInfoExtrafmt)
DBCStorage< GtRegenHPPerSptEntry > sGtRegenHPPerSptStore(GtRegenHPPerSptfmt)
DBCStorage< SkillRaceClassInfoEntry > sSkillRaceClassInfoStore(SkillRaceClassInfofmt)
static FactionTeamMap sFactionTeamMap
Definition: DBCStores.cpp:75
DBCStorage< GemPropertiesEntry > sGemPropertiesStore(GemPropertiesEntryfmt)
DBCStorage< ItemRandomPropertiesEntry > sItemRandomPropertiesStore(ItemRandomPropertiesfmt)
uint32 DBCFileCount
Definition: DBCStores.cpp:197
DBCStorage< DungeonEncounterEntry > sDungeonEncounterStore(DungeonEncounterfmt)
DBCStorage< GtNPCManaCostScalerEntry > sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt)
DBCStorage< SpellEntry > sSpellStore(SpellEntryfmt)
DBCStorage< AreaGroupEntry > sAreaGroupStore(AreaGroupEntryfmt)
DBCStorage< QuestXPEntry > sQuestXPStore(QuestXPfmt)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< CreatureFamilyEntry > sCreatureFamilyStore(CreatureFamilyfmt)
DBCStorage< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
DBCStorage< GtOCTRegenHPEntry > sGtOCTRegenHPStore(GtOCTRegenHPfmt)
DBCStorage< TaxiPathEntry > sTaxiPathStore(TaxiPathEntryfmt)
DBCStorage< WMOAreaTableEntry > sWMOAreaTableStore(WMOAreaTableEntryfmt)
DBCStorage< TalentEntry > sTalentStore(TalentEntryfmt)
DBCStorage< TaxiNodesEntry > sTaxiNodesStore(TaxiNodesEntryfmt)
DBCStorage< TeamContributionPointsEntry > sTeamContributionPointsStore(TeamContributionPointsfmt)
DBCStorage< SpellDurationEntry > sSpellDurationStore(SpellDurationfmt)
DBCStorage< SpellFocusObjectEntry > sSpellFocusObjectStore(SpellFocusObjectfmt)
DBCStorage< AuctionHouseEntry > sAuctionHouseStore(AuctionHouseEntryfmt)
DBCStorage< TransportAnimationEntry > sTransportAnimationStore(TransportAnimationfmt)
DBCStorage< AreaPOIEntry > sAreaPOIStore(AreaPOIEntryfmt)
TalentSpellPosMap sTalentSpellPosMap
Definition: DBCStores.cpp:163
DBCStorage< GlyphPropertiesEntry > sGlyphPropertiesStore(GlyphPropertiesfmt)
DBCStorage< CreatureModelDataEntry > sCreatureModelDataStore(CreatureModelDatafmt)
static uint32 sTalentTabPages[MAX_CLASSES][3]
Definition: DBCStores.cpp:168
DBCStorage< CreatureTypeEntry > sCreatureTypeStore(CreatureTypefmt)
std::list< std::string > StoreProblemList
Definition: DBCStores.cpp:195
PetFamilySpellsStore sPetFamilySpellsStore
Definition: DBCStores.cpp:148
DBCStorage< CinematicSequencesEntry > sCinematicSequencesStore(CinematicSequencesEntryfmt)
DBCStorage< GtBarberShopCostBaseEntry > sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt)
DBCStorage< CinematicCameraEntry > sCinematicCameraStore(CinematicCameraEntryfmt)
DBCStorage< ItemExtendedCostEntry > sItemExtendedCostStore(ItemExtendedCostEntryfmt)
DBCStorage< ItemDisplayInfoEntry > sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
DBCStorage< SkillLineAbilityEntry > sSkillLineAbilityStore(SkillLineAbilityfmt)
DBCStorage< ChrClassesEntry > sChrClassesStore(ChrClassesEntryfmt)
DBCStorage< CurrencyTypesEntry > sCurrencyTypesStore(CurrencyTypesfmt)
DBCStorage< EmotesEntry > sEmotesStore(EmotesEntryfmt)
DBCStorage< GtChanceToMeleeCritEntry > sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt)
DBCStorage< LiquidTypeEntry > sLiquidTypeStore(LiquidTypefmt)
DBCStorage< PvPDifficultyEntry > sPvPDifficultyStore(PvPDifficultyfmt)
TaxiMask sHordeTaxiNodesMask
Definition: DBCStores.cpp:173
DBCStorage< StableSlotPricesEntry > sStableSlotPricesStore(StableSlotPricesfmt)
static WMOAreaInfoByTripple sWMOAreaInfoByTripple
Definition: DBCStores.cpp:41
std::list< uint32 > SimpleFactionsList
Definition: DBCStores.h:28
uint32 MAKE_PAIR32(uint16 l, uint16 h)
Definition: ObjectDefines.h:87
#define sTransportMgr
Definition: TransportMgr.h:163
#define sSpellMgr
Definition: SpellMgr.h:803
#define MAX_DIFFICULTY
Definition: DBCEnums.h:288
#define MAX_BATTLEGROUND_BRACKETS
Definition: DBCEnums.h:58
@ SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN
Definition: DBCEnums.h:366
#define MAX_TALENT_RANK
Definition: DBCStructure.h:1880
#define MAX_SPELL_EFFECTS
Definition: DBCStructure.h:1596
@ SPELL_EFFECT_SEND_TAXI
Definition: SharedDefines.h:873
@ SPELL_ATTR0_PASSIVE
Definition: SharedDefines.h:360
#define MAX_CLASSES
Definition: SharedDefines.h:127
#define CLASSMASK_ALL_PLAYABLE
Definition: SharedDefines.h:129
Definition: DBCStructure.h:620
Definition: DBCStructure.h:754
Definition: DBCStructure.h:898
Definition: DBCStructure.h:991
Definition: DBCStructure.h:1362
Definition: DBCStructure.h:1400
Definition: DBCStructure.h:1528
Definition: DBCStructure.h:1557
Definition: DBCStructure.h:1601
uint32 Id
Definition: DBCStructure.h:1602
uint32 Attributes
Definition: DBCStructure.h:1606
uint32 SpellLevel
Definition: DBCStructure.h:1641
Definition: DBCStructure.h:1733
int32 SpellID[MAX_DIFFICULTY]
Definition: DBCStructure.h:1735
Definition: DBCStructure.h:1885
Definition: DBCStructure.h:1902
uint32 petTalentMask
Definition: DBCStructure.h:1909
uint32 tabpage
Definition: DBCStructure.h:1910
uint32 ClassMask
Definition: DBCStructure.h:1908
Definition: DBCStructure.h:1915
uint32 map_id
Definition: DBCStructure.h:1917
uint32 MountCreatureID[2]
Definition: DBCStructure.h:1923
Definition: DBCStructure.h:1927
Definition: DBCStructure.h:1965
Definition: DBCStructure.h:1976
Definition: DBCStructure.h:2093
Definition: DBCStructure.h:2181
Definition: DBCStructure.h:2191