262{
264
265 std::string dbcPath = dataPath + "dbc/";
266
268 uint32 availableDbcLocales = 0xFFFFFFFF;
269
270#define LOAD_DBC(store, file, dbtable) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file, dbtable)
271
318
325
384
385#undef LOAD_DBC
386
388 sCharStartOutfitMap[outfit->Race | (outfit->Class << 8) | (outfit->Gender << 16)] = outfit;
389
391 {
392 if (faction->team)
393 {
395 flist.push_back(faction->ID);
396 }
397 }
398
400 {
401 if (info->maxX < info->minX)
402 std::swap(*(float*)(&info->maxX), *(float*)(&info->minX));
403
404 if (info->maxY < info->minY)
405 std::swap(*(float*)(&info->maxY), *(float*)(&info->minY));
406
407 if (info->maxZ < info->minZ)
408 std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ));
409 }
410
411
414
417 ASSERT(
false &&
"Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
418
420 if (i->Category)
422
424 {
426 {
428 }
429 }
430
432 {
435 {
437 {
438 if (skillLine->SkillLine != cFamily->skillLine[0] && skillLine->SkillLine != cFamily->skillLine[1])
439 {
440 continue;
441 }
442
444 {
445 continue;
446 }
447
449 {
450 continue;
451 }
452
454 }
455 }
456 }
457
460
461
463 {
465
467
469 {
470 if (spellDiff->SpellID[x] <= 0 || !
sSpellStore.LookupEntry(spellDiff->SpellID[x]))
471 {
472 if (spellDiff->SpellID[x] > 0)
473 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);
474
476 }
477 else
478 newEntry.
SpellID[x] = spellDiff->SpellID[x];
479 }
480
482 continue;
483
487 }
488
489
491 {
493
495 {
496 if (talentInfo->RankID[j])
497 {
499
501 {
503 }
504 }
505 }
506 }
507
508
509 {
510
512 {
514 if (!talentTabInfo)
515 continue;
516
517
519 continue;
520
521
523 if (talentTabInfo->
ClassMask & (1 << (cls - 1)))
525 }
526 }
527
531
532
534 std::vector<uint32> pathLength;
535 pathLength.resize(pathCount);
536
539 if (pathLength[entry->path] < entry->index + 1)
540 pathLength[entry->path] = entry->index + 1;
541
542
546
547
550
551
552
553 {
554 std::set<uint32> spellPaths;
558 spellPaths.insert(sInfo->EffectMiscValue[j]);
559
565
567 {
569 if (!node)
570 continue;
571
574 {
575 bool ok = false;
576 for (TaxiPathSetForSource::const_iterator dest_i = src_i->second.begin(); dest_i != src_i->second.end(); ++dest_i)
577 {
578
579 if (dest_i->second->price || spellPaths.find(dest_i->second->ID) == spellPaths.end())
580 {
581 ok = true;
582 break;
583 }
584 }
585
586 if (!ok)
587 continue;
588 }
589
590
592 uint32 submask = 1 << ((i - 1) % 32);
594
597
600
603
604
605 if (node->
map_id < 2 || i == 82 || i == 83 || i == 93 || i == 94)
607
608
609 if (i == 315 || i == 333)
611 }
612 }
613
615 sTransportMgr->AddPathNodeToTransport(anim->TransportEntry, anim->TimeSeg, anim);
616
618 sTransportMgr->AddPathRotationToTransport(rot->TransportEntry, rot->TimeSeg, rot);
619
622
623
625 {
626 LOG_ERROR(
"dbc",
"Incorrect DataDir value in worldserver.conf or ALL required *.dbc files ({}) not found by path: {}dbc",
DBCFileCount, dataPath);
627 exit(1);
628 }
629 else if (!bad_dbc_files.empty())
630 {
631 std::string str;
632 for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
633 str += *i + "\n";
634
635 LOG_ERROR(
"dbc",
"Some required *.dbc files ({} from {}) not found or not compatible:\n{}", (
uint32)bad_dbc_files.size(),
DBCFileCount, str);
636 exit(1);
637 }
638
639
647 {
648 LOG_ERROR(
"dbc",
"You have _outdated_ DBC data. Please extract correct versions from current using client.");
649 exit(1);
650 }
651
654}
#define ASSERT
Definition: Errors.h:68
#define LOG_INFO(filterType__,...)
Definition: Log.h:165
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:131
uint32 getMSTime()
Definition: Timer.h:103
std::uint8_t uint8
Definition: Define.h:109
#define MAX_TALENT_RANK
Definition: DBCStructure.h:1917
#define MAX_SPELL_EFFECTS
Definition: DBCStructure.h:1636
#define MAX_DIFFICULTY
Definition: DBCEnums.h:283
#define MAX_BATTLEGROUND_BRACKETS
Definition: DBCEnums.h:52
@ SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN
Definition: DBCEnums.h:361
@ SPELL_EFFECT_SEND_TAXI
Definition: SharedDefines.h:901
@ SPELL_ATTR0_PASSIVE
Definition: SharedDefines.h:388
#define MAX_CLASSES
Definition: SharedDefines.h:155
#define CLASSMASK_ALL_PLAYABLE
Definition: SharedDefines.h:157
#define sTransportMgr
Definition: TransportMgr.h:163
#define sSpellMgr
Definition: SpellMgr.h:825
std::list< uint32 > SimpleFactionsList
Definition: DBCStores.h:28
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< 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:179
DBCStorage< ItemSetEntry > sItemSetStore(ItemSetEntryfmt)
DBCStorage< DestructibleModelDataEntry > sDestructibleModelDataStore(DestructibleModelDatafmt)
DBCStorage< GlyphSlotEntry > sGlyphSlotStore(GlyphSlotfmt)
TaxiPathSetBySource sTaxiPathSetBySource
Definition: DBCStores.cpp:183
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:152
TaxiMask sTaxiNodesMask
Definition: DBCStores.cpp:176
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)
TaxiPathNodesByPath sTaxiPathNodesByPath
Definition: DBCStores.cpp:187
DBCStorage< SpellCategoryEntry > sSpellCategoryStore(SpellCategoryfmt)
DBCStorage< ItemEntry > sItemStore(Itemfmt)
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)
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)
DBCStorage< ChrRacesEntry > sChrRacesStore(ChrRacesEntryfmt)
DBCStorage< SpellRuneCostEntry > sSpellRuneCostStore(SpellRuneCostfmt)
DBCStorage< GtChanceToSpellCritEntry > sGtChanceToSpellCritStore(GtChanceToSpellCritfmt)
DBCStorage< SpellDifficultyEntry > sSpellDifficultyStore(SpellDifficultyfmt)
TaxiMask sOldContinentsNodesMask
Definition: DBCStores.cpp:177
DBCStorage< SpellVisualEntry > sSpellVisualStore(SpellVisualfmt)
DBCStorage< OverrideSpellDataEntry > sOverrideSpellDataStore(OverrideSpellDatafmt)
DBCStorage< GameObjectDisplayInfoEntry > sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt)
std::unordered_set< uint32 > sPetTalentSpells
Definition: DBCStores.cpp:169
TaxiMask sDeathKnightTaxiNodesMask
Definition: DBCStores.cpp:180
DBCStorage< HolidaysEntry > sHolidaysStore(Holidaysfmt)
DBCStorage< NamesReservedEntry > sNamesReservedStore(NamesReservedfmt)
DBCStorage< GtOCTClassCombatRatingScalarEntry > sGtOCTClassCombatRatingScalarStore(GtOCTClassCombatRatingScalarfmt)
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< GtRegenMPPerSptEntry > sGtRegenMPPerSptStore(GtRegenMPPerSptfmt)
DBCStorage< GameObjectArtKitEntry > sGameObjectArtKitStore(GameObjectArtKitfmt)
DBCStorage< DurabilityCostsEntry > sDurabilityCostsStore(DurabilityCostsfmt)
DBCStorage< WorldMapOverlayEntry > sWorldMapOverlayStore(WorldMapOverlayEntryfmt)
DBCStorage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore(SpellShapeshiftFormEntryfmt)
DBCStorage< GtChanceToMeleeCritBaseEntry > sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt)
DBCStorage< CreatureDisplayInfoExtraEntry > sCreatureDisplayInfoExtraStore(CreatureDisplayInfoExtrafmt)
DBCStorage< GtRegenHPPerSptEntry > sGtRegenHPPerSptStore(GtRegenHPPerSptfmt)
DBCStorage< SkillRaceClassInfoEntry > sSkillRaceClassInfoStore(SkillRaceClassInfofmt)
DBCStorage< GemPropertiesEntry > sGemPropertiesStore(GemPropertiesEntryfmt)
DBCStorage< ItemRandomPropertiesEntry > sItemRandomPropertiesStore(ItemRandomPropertiesfmt)
uint32 DBCFileCount
Definition: DBCStores.cpp:202
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< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
DBCStorage< GtOCTRegenHPEntry > sGtOCTRegenHPStore(GtOCTRegenHPfmt)
DBCStorage< TaxiPathEntry > sTaxiPathStore(TaxiPathEntryfmt)
DBCStorage< WMOAreaTableEntry > sWMOAreaTableStore(WMOAreaTableEntryfmt)
DBCStorage< TalentEntry > sTalentStore(TalentEntryfmt)
DBCStorage< NamesProfanityEntry > sNamesProfanityStore(NamesProfanityfmt)
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)
DBCStorage< GlyphPropertiesEntry > sGlyphPropertiesStore(GlyphPropertiesfmt)
DBCStorage< CreatureModelDataEntry > sCreatureModelDataStore(CreatureModelDatafmt)
DBCStorage< CreatureTypeEntry > sCreatureTypeStore(CreatureTypefmt)
std::list< std::string > StoreProblemList
Definition: DBCStores.cpp:200
PetFamilySpellsStore sPetFamilySpellsStore
Definition: DBCStores.cpp:153
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)
TaxiMask sHordeTaxiNodesMask
Definition: DBCStores.cpp:178
DBCStorage< StableSlotPricesEntry > sStableSlotPricesStore(StableSlotPricesfmt)
Definition: DBCStructure.h:619
Definition: DBCStructure.h:906
Definition: DBCStructure.h:999
Definition: DBCStructure.h:1378
Definition: DBCStructure.h:1568
Definition: DBCStructure.h:1597
Definition: DBCStructure.h:1641
uint32 Id
Definition: DBCStructure.h:1642
uint32 Attributes
Definition: DBCStructure.h:1646
uint32 SpellLevel
Definition: DBCStructure.h:1679
Definition: DBCStructure.h:1771
int32 SpellID[MAX_DIFFICULTY]
Definition: DBCStructure.h:1773
Definition: DBCStructure.h:1922
Definition: DBCStructure.h:1939
uint32 petTalentMask
Definition: DBCStructure.h:1946
uint32 tabpage
Definition: DBCStructure.h:1947
uint32 ClassMask
Definition: DBCStructure.h:1945
Definition: DBCStructure.h:1952
uint32 map_id
Definition: DBCStructure.h:1954
uint32 MountCreatureID[2]
Definition: DBCStructure.h:1960
Definition: DBCStructure.h:1964
Definition: DBCStructure.h:1972
Definition: DBCStructure.h:2002
Definition: DBCStructure.h:2013
Definition: DBCStructure.h:2130