From 4990423dbfdda716078f7fa9e31b455541426b82 Mon Sep 17 00:00:00 2001 From: Treeston Date: Thu, 27 Sep 2018 18:19:20 +0200 Subject: [PATCH] Core/Misc: Unify naming of DBC entry, storage and format identifiers based on DBC file name * DBC file name: .dbc * Format string: DBCfmt_ * DB Format string: DBCfmt__DBFormat * DB index string: DBCfmt__DBIndex * Entry struct: Entry * Global storage: sStore --- src/server/game/DataStores/DBCStores.cpp | 481 ++++++++++---------- src/server/game/DataStores/DBCStores.h | 222 ++++----- src/server/game/DungeonFinding/LFGMgr.cpp | 10 +- src/server/game/DungeonFinding/LFGMgr.h | 4 +- src/server/game/Entities/Player/Player.cpp | 30 +- src/server/game/Spells/SpellInfo.cpp | 8 +- src/server/shared/DataStores/DBCStructure.h | 28 +- src/server/shared/DataStores/DBCfmt.h | 242 +++++----- 8 files changed, 516 insertions(+), 509 deletions(-) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index d2bc89c53c..db1812f4bb 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -39,150 +39,152 @@ typedef std::map AreaFlagByMapID; typedef std::tuple WMOAreaTableKey; typedef std::map WMOAreaInfoByTripple; -DBCStorage sAreaTableStore(AreaTableEntryfmt); -DBCStorage sAreaGroupStore(AreaGroupEntryfmt); -DBCStorage sAreaPOIStore(AreaPOIEntryfmt); +#define DEFINE_DBC_STORAGE(dbc) DBCStorage s ## dbc ## Store(DBCfmt_ ## dbc); + +DEFINE_DBC_STORAGE(AreaTable); +DEFINE_DBC_STORAGE(AreaGroup); +DEFINE_DBC_STORAGE(AreaPOI); static WMOAreaInfoByTripple sWMOAreaInfoByTripple; -DBCStorage sAchievementStore(Achievementfmt); -DBCStorage sAchievementCriteriaStore(AchievementCriteriafmt); -DBCStorage sAreaTriggerStore(AreaTriggerEntryfmt); -DBCStorage sAuctionHouseStore(AuctionHouseEntryfmt); -DBCStorage sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt); -DBCStorage sBannedAddOnsStore(BannedAddOnsfmt); -DBCStorage sBattlemasterListStore(BattlemasterListEntryfmt); -DBCStorage sBarberShopStyleStore(BarberShopStyleEntryfmt); -DBCStorage sCharacterFacialHairStylesStore(CharacterFacialHairStylesfmt); +DEFINE_DBC_STORAGE(Achievement); +DEFINE_DBC_STORAGE(AchievementCriteria); +DEFINE_DBC_STORAGE(AreaTrigger); +DEFINE_DBC_STORAGE(AuctionHouse); +DEFINE_DBC_STORAGE(BankBagSlotPrices); +DEFINE_DBC_STORAGE(BannedAddOns); +DEFINE_DBC_STORAGE(BattlemasterList); +DEFINE_DBC_STORAGE(BarberShopStyle); +DEFINE_DBC_STORAGE(CharacterFacialHairStyles); std::unordered_map sCharFacialHairMap; -DBCStorage sCharSectionsStore(CharSectionsEntryfmt); +DEFINE_DBC_STORAGE(CharSections); std::unordered_multimap sCharSectionMap; -DBCStorage sCharStartOutfitStore(CharStartOutfitEntryfmt); +DEFINE_DBC_STORAGE(CharStartOutfit); std::map sCharStartOutfitMap; -DBCStorage sCharTitlesStore(CharTitlesEntryfmt); -DBCStorage sChatChannelsStore(ChatChannelsEntryfmt); -DBCStorage sChrClassesStore(ChrClassesEntryfmt); -DBCStorage sChrRacesStore(ChrRacesEntryfmt); -DBCStorage sCinematicCameraStore(CinematicCameraEntryfmt); -DBCStorage sCinematicSequencesStore(CinematicSequencesEntryfmt); -DBCStorage sCreatureDisplayInfoStore(CreatureDisplayInfofmt); -DBCStorage sCreatureDisplayInfoExtraStore(CreatureDisplayInfoExtrafmt); -DBCStorage sCreatureFamilyStore(CreatureFamilyfmt); -DBCStorage sCreatureModelDataStore(CreatureModelDatafmt); -DBCStorage sCreatureSpellDataStore(CreatureSpellDatafmt); -DBCStorage sCreatureTypeStore(CreatureTypefmt); -DBCStorage sCurrencyTypesStore(CurrencyTypesfmt); +DEFINE_DBC_STORAGE(CharTitles); +DEFINE_DBC_STORAGE(ChatChannels); +DEFINE_DBC_STORAGE(ChrClasses); +DEFINE_DBC_STORAGE(ChrRaces); +DEFINE_DBC_STORAGE(CinematicCamera); +DEFINE_DBC_STORAGE(CinematicSequences); +DEFINE_DBC_STORAGE(CreatureDisplayInfo); +DEFINE_DBC_STORAGE(CreatureDisplayInfoExtra); +DEFINE_DBC_STORAGE(CreatureFamily); +DEFINE_DBC_STORAGE(CreatureModelData); +DEFINE_DBC_STORAGE(CreatureSpellData); +DEFINE_DBC_STORAGE(CreatureType); +DEFINE_DBC_STORAGE(CurrencyTypes); -DBCStorage sDestructibleModelDataStore(DestructibleModelDatafmt); -DBCStorage sDungeonEncounterStore(DungeonEncounterfmt); -DBCStorage sDurabilityQualityStore(DurabilityQualityfmt); -DBCStorage sDurabilityCostsStore(DurabilityCostsfmt); +DEFINE_DBC_STORAGE(DestructibleModelData); +DEFINE_DBC_STORAGE(DungeonEncounter); +DEFINE_DBC_STORAGE(DurabilityQuality); +DEFINE_DBC_STORAGE(DurabilityCosts); -DBCStorage sEmotesStore(EmotesEntryfmt); -DBCStorage sEmotesTextStore(EmotesTextEntryfmt); +DEFINE_DBC_STORAGE(Emotes); +DEFINE_DBC_STORAGE(EmotesText); typedef std::tuple EmotesTextSoundKey; static std::map sEmotesTextSoundMap; -DBCStorage sEmotesTextSoundStore(EmotesTextSoundEntryfmt); +DEFINE_DBC_STORAGE(EmotesTextSound); typedef std::map FactionTeamMap; static FactionTeamMap sFactionTeamMap; -DBCStorage sFactionStore(FactionEntryfmt); -DBCStorage sFactionTemplateStore(FactionTemplateEntryfmt); +DEFINE_DBC_STORAGE(Faction); +DEFINE_DBC_STORAGE(FactionTemplate); -DBCStorage sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt); -DBCStorage sGemPropertiesStore(GemPropertiesEntryfmt); -DBCStorage sGlyphPropertiesStore(GlyphPropertiesfmt); -DBCStorage sGlyphSlotStore(GlyphSlotfmt); +DEFINE_DBC_STORAGE(GameObjectDisplayInfo); +DEFINE_DBC_STORAGE(GemProperties); +DEFINE_DBC_STORAGE(GlyphProperties); +DEFINE_DBC_STORAGE(GlyphSlot); -DBCStorage sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt); -DBCStorage sGtCombatRatingsStore(GtCombatRatingsfmt); -DBCStorage sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt); -DBCStorage sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt); -DBCStorage sGtChanceToSpellCritBaseStore(GtChanceToSpellCritBasefmt); -DBCStorage sGtChanceToSpellCritStore(GtChanceToSpellCritfmt); -DBCStorage sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt); -DBCStorage sGtOCTClassCombatRatingScalarStore(GtOCTClassCombatRatingScalarfmt); -DBCStorage sGtOCTRegenHPStore(GtOCTRegenHPfmt); -//DBCStorage sGtOCTRegenMPStore(GtOCTRegenMPfmt); -- not used currently -DBCStorage sGtRegenHPPerSptStore(GtRegenHPPerSptfmt); -DBCStorage sGtRegenMPPerSptStore(GtRegenMPPerSptfmt); +DEFINE_DBC_STORAGE(gtBarberShopCostBase); +DEFINE_DBC_STORAGE(gtCombatRatings); +DEFINE_DBC_STORAGE(gtChanceToMeleeCritBase); +DEFINE_DBC_STORAGE(gtChanceToMeleeCrit); +DEFINE_DBC_STORAGE(gtChanceToSpellCritBase); +DEFINE_DBC_STORAGE(gtChanceToSpellCrit); +DEFINE_DBC_STORAGE(gtNPCManaCostScaler); +DEFINE_DBC_STORAGE(gtOCTClassCombatRatingScalar); +DEFINE_DBC_STORAGE(gtOCTRegenHP); +//DEFINE_DBC_STORAGE(gtOCTRegenMP); +DEFINE_DBC_STORAGE(gtRegenHPPerSpt); +DEFINE_DBC_STORAGE(gtRegenMPPerSpt); -DBCStorage sHolidaysStore(Holidaysfmt); +DEFINE_DBC_STORAGE(Holidays); -DBCStorage sItemStore(Itemfmt); -DBCStorage sItemBagFamilyStore(ItemBagFamilyfmt); -//DBCStorage sItemCondExtCostsStore(ItemCondExtCostsEntryfmt); -//DBCStorage sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently -DBCStorage sItemExtendedCostStore(ItemExtendedCostEntryfmt); -DBCStorage sItemLimitCategoryStore(ItemLimitCategoryEntryfmt); -DBCStorage sItemRandomPropertiesStore(ItemRandomPropertiesfmt); -DBCStorage sItemRandomSuffixStore(ItemRandomSuffixfmt); -DBCStorage sItemSetStore(ItemSetEntryfmt); +DEFINE_DBC_STORAGE(Item); +DEFINE_DBC_STORAGE(ItemBagFamily); +//DEFINE_DBC_STORAGE(ItemCondExtCosts); +//DEFINE_DBC_STORAGE(ItemDisplayInfo); +DEFINE_DBC_STORAGE(ItemExtendedCost); +DEFINE_DBC_STORAGE(ItemLimitCategory); +DEFINE_DBC_STORAGE(ItemRandomProperties); +DEFINE_DBC_STORAGE(ItemRandomSuffix); +DEFINE_DBC_STORAGE(ItemSet); -DBCStorage sLFGDungeonStore(LFGDungeonEntryfmt); -DBCStorage sLightStore(LightEntryfmt); -DBCStorage sLiquidTypeStore(LiquidTypefmt); -DBCStorage sLockStore(LockEntryfmt); +DEFINE_DBC_STORAGE(LFGDungeons); +DEFINE_DBC_STORAGE(Light); +DEFINE_DBC_STORAGE(LiquidType); +DEFINE_DBC_STORAGE(Lock); -DBCStorage sMailTemplateStore(MailTemplateEntryfmt); -DBCStorage sMapStore(MapEntryfmt); +DEFINE_DBC_STORAGE(MailTemplate); +DEFINE_DBC_STORAGE(Map); // DBC used only for initialization sMapDifficultyMap at startup. -DBCStorage sMapDifficultyStore(MapDifficultyEntryfmt); // only for loading +DEFINE_DBC_STORAGE(MapDifficulty); MapDifficultyMap sMapDifficultyMap; -DBCStorage sMovieStore(MovieEntryfmt); +DEFINE_DBC_STORAGE(Movie); -DBCStorage sNamesProfanityStore(NamesProfanityEntryfmt); -DBCStorage sNamesReservedStore(NamesReservedEntryfmt); +DEFINE_DBC_STORAGE(NamesProfanity); +DEFINE_DBC_STORAGE(NamesReserved); typedef std::array, TOTAL_LOCALES> NameValidationRegexContainer; NameValidationRegexContainer NamesProfaneValidators; NameValidationRegexContainer NamesReservedValidators; -DBCStorage sOverrideSpellDataStore(OverrideSpellDatafmt); +DEFINE_DBC_STORAGE(OverrideSpellData); -DBCStorage sPowerDisplayStore(PowerDisplayfmt); -DBCStorage sPvPDifficultyStore(PvPDifficultyfmt); +DEFINE_DBC_STORAGE(PowerDisplay); +DEFINE_DBC_STORAGE(PvPDifficulty); -DBCStorage sQuestSortStore(QuestSortEntryfmt); -DBCStorage sQuestXPStore(QuestXPfmt); -DBCStorage sQuestFactionRewardStore(QuestFactionRewardfmt); -DBCStorage sRandomPropertiesPointsStore(RandomPropertiesPointsfmt); -DBCStorage sScalingStatDistributionStore(ScalingStatDistributionfmt); -DBCStorage sScalingStatValuesStore(ScalingStatValuesfmt); +DEFINE_DBC_STORAGE(QuestSort); +DEFINE_DBC_STORAGE(QuestXP); +DEFINE_DBC_STORAGE(QuestFactionReward); +DEFINE_DBC_STORAGE(RandomPropertiesPoints); +DEFINE_DBC_STORAGE(ScalingStatDistribution); +DEFINE_DBC_STORAGE(ScalingStatValues); -DBCStorage sSkillLineStore(SkillLinefmt); -DBCStorage sSkillLineAbilityStore(SkillLineAbilityfmt); -DBCStorage sSkillRaceClassInfoStore(SkillRaceClassInfofmt); +DEFINE_DBC_STORAGE(SkillLine); +DEFINE_DBC_STORAGE(SkillLineAbility); +DEFINE_DBC_STORAGE(SkillRaceClassInfo); SkillRaceClassInfoMap SkillRaceClassInfoBySkill; -DBCStorage sSkillTiersStore(SkillTiersfmt); +DEFINE_DBC_STORAGE(SkillTiers); -DBCStorage sSoundEntriesStore(SoundEntriesfmt); +DEFINE_DBC_STORAGE(SoundEntries); -DBCStorage sSpellItemEnchantmentStore(SpellItemEnchantmentfmt); -DBCStorage sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt); -DBCStorage sSpellStore(SpellEntryfmt); +DEFINE_DBC_STORAGE(SpellItemEnchantment); +DEFINE_DBC_STORAGE(SpellItemEnchantmentCondition); +DEFINE_DBC_STORAGE(Spell); PetFamilySpellsStore sPetFamilySpellsStore; -DBCStorage sSpellCastTimesStore(SpellCastTimefmt); -DBCStorage sSpellCategoryStore(SpellCategoryfmt); -DBCStorage sSpellDifficultyStore(SpellDifficultyfmt); -DBCStorage sSpellDurationStore(SpellDurationfmt); -DBCStorage sSpellFocusObjectStore(SpellFocusObjectfmt); -DBCStorage sSpellRadiusStore(SpellRadiusfmt); -DBCStorage sSpellRangeStore(SpellRangefmt); -DBCStorage sSpellRuneCostStore(SpellRuneCostfmt); -DBCStorage sSpellShapeshiftStore(SpellShapeshiftfmt); -DBCStorage sStableSlotPricesStore(StableSlotPricesfmt); -DBCStorage sSummonPropertiesStore(SummonPropertiesfmt); -DBCStorage sTalentStore(TalentEntryfmt); +DEFINE_DBC_STORAGE(SpellCastTimes); +DEFINE_DBC_STORAGE(SpellCategory); +DEFINE_DBC_STORAGE(SpellDifficulty); +DEFINE_DBC_STORAGE(SpellDuration); +DEFINE_DBC_STORAGE(SpellFocusObject); +DEFINE_DBC_STORAGE(SpellRadius); +DEFINE_DBC_STORAGE(SpellRange); +DEFINE_DBC_STORAGE(SpellRuneCost); +DEFINE_DBC_STORAGE(SpellShapeshift); +DEFINE_DBC_STORAGE(StableSlotPrices); +DEFINE_DBC_STORAGE(SummonProperties); +DEFINE_DBC_STORAGE(Talent); TalentSpellPosMap sTalentSpellPosMap; -DBCStorage sTalentTabStore(TalentTabEntryfmt); +DEFINE_DBC_STORAGE(TalentTab); // store absolute bit position for first rank for talent inspect static uint32 sTalentTabPages[MAX_CLASSES][3]; -DBCStorage sTaxiNodesStore(TaxiNodesEntryfmt); +DEFINE_DBC_STORAGE(TaxiNodes); TaxiMask sTaxiNodesMask; TaxiMask sOldContinentsNodesMask; TaxiMask sHordeTaxiNodesMask; @@ -191,22 +193,24 @@ TaxiMask sDeathKnightTaxiNodesMask; // DBC used only for initialization sTaxiPathSetBySource at startup. TaxiPathSetBySource sTaxiPathSetBySource; -DBCStorage sTaxiPathStore(TaxiPathEntryfmt); +DEFINE_DBC_STORAGE(TaxiPath); // DBC used only for initialization sTaxiPathNodeStore at startup. TaxiPathNodesByPath sTaxiPathNodesByPath; -static DBCStorage sTaxiPathNodeStore(TaxiPathNodeEntryfmt); +static DEFINE_DBC_STORAGE(TaxiPathNode); -DBCStorage sTeamContributionPointsStore(TeamContributionPointsfmt); -DBCStorage sTotemCategoryStore(TotemCategoryEntryfmt); -DBCStorage sTransportAnimationStore(TransportAnimationfmt); -DBCStorage sTransportRotationStore(TransportRotationfmt); -DBCStorage sVehicleStore(VehicleEntryfmt); -DBCStorage sVehicleSeatStore(VehicleSeatEntryfmt); -DBCStorage sWMOAreaTableStore(WMOAreaTableEntryfmt); -DBCStorage sWorldMapAreaStore(WorldMapAreaEntryfmt); -DBCStorage sWorldMapOverlayStore(WorldMapOverlayEntryfmt); -DBCStorage sWorldSafeLocsStore(WorldSafeLocsEntryfmt); +DEFINE_DBC_STORAGE(TeamContributionPoints); +DEFINE_DBC_STORAGE(TotemCategory); +DEFINE_DBC_STORAGE(TransportAnimation); +DEFINE_DBC_STORAGE(TransportRotation); +DEFINE_DBC_STORAGE(Vehicle); +DEFINE_DBC_STORAGE(VehicleSeat); +DEFINE_DBC_STORAGE(WMOAreaTable); +DEFINE_DBC_STORAGE(WorldMapArea); +DEFINE_DBC_STORAGE(WorldMapOverlay); +DEFINE_DBC_STORAGE(WorldSafeLocs); + +#undef DEFINE_DBC_STORAGE typedef std::list StoreProblemList; @@ -273,131 +277,130 @@ void LoadDBCStores(const std::string& dataPath) StoreProblemList bad_dbc_files; uint32 availableDbcLocales = 0xFFFFFFFF; -#define LOAD_DBC(store, file) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file) +#define LOAD_DBC(dbc) LoadDBC(availableDbcLocales, bad_dbc_files, s ## dbc ## Store, dbcPath, #dbc ".dbc") +#define LOAD_DBC_EXT(dbc) LoadDBC(availableDbcLocales, bad_dbc_files, s ## dbc ## Store, dbcPath, #dbc ".dbc", DBCfmt_ ## dbc ## _DBFormat, DBCfmt_ ## dbc ## _DBIndex) - LOAD_DBC(sAreaTableStore, "AreaTable.dbc"); - LOAD_DBC(sAchievementCriteriaStore, "Achievement_Criteria.dbc"); - LOAD_DBC(sAreaTriggerStore, "AreaTrigger.dbc"); - LOAD_DBC(sAreaGroupStore, "AreaGroup.dbc"); - LOAD_DBC(sAreaPOIStore, "AreaPOI.dbc"); - LOAD_DBC(sAuctionHouseStore, "AuctionHouse.dbc"); - LOAD_DBC(sBankBagSlotPricesStore, "BankBagSlotPrices.dbc"); - LOAD_DBC(sBannedAddOnsStore, "BannedAddOns.dbc"); - LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc"); - LOAD_DBC(sBarberShopStyleStore, "BarberShopStyle.dbc"); - LOAD_DBC(sCharacterFacialHairStylesStore, "CharacterFacialHairStyles.dbc"); - LOAD_DBC(sCharSectionsStore, "CharSections.dbc"); - LOAD_DBC(sCharStartOutfitStore, "CharStartOutfit.dbc"); - LOAD_DBC(sCharTitlesStore, "CharTitles.dbc"); - LOAD_DBC(sChatChannelsStore, "ChatChannels.dbc"); - LOAD_DBC(sChrClassesStore, "ChrClasses.dbc"); - LOAD_DBC(sChrRacesStore, "ChrRaces.dbc"); - LOAD_DBC(sCinematicCameraStore, "CinematicCamera.dbc"); - LOAD_DBC(sCinematicSequencesStore, "CinematicSequences.dbc"); - LOAD_DBC(sCreatureDisplayInfoStore, "CreatureDisplayInfo.dbc"); - LOAD_DBC(sCreatureDisplayInfoExtraStore, "CreatureDisplayInfoExtra.dbc"); - LOAD_DBC(sCreatureFamilyStore, "CreatureFamily.dbc"); - LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc"); - LOAD_DBC(sCreatureSpellDataStore, "CreatureSpellData.dbc"); - LOAD_DBC(sCreatureTypeStore, "CreatureType.dbc"); - LOAD_DBC(sCurrencyTypesStore, "CurrencyTypes.dbc"); - LOAD_DBC(sDestructibleModelDataStore, "DestructibleModelData.dbc"); - LOAD_DBC(sDungeonEncounterStore, "DungeonEncounter.dbc"); - LOAD_DBC(sDurabilityCostsStore, "DurabilityCosts.dbc"); - LOAD_DBC(sDurabilityQualityStore, "DurabilityQuality.dbc"); - LOAD_DBC(sEmotesStore, "Emotes.dbc"); - LOAD_DBC(sEmotesTextStore, "EmotesText.dbc"); - LOAD_DBC(sEmotesTextSoundStore, "EmotesTextSound.dbc"); - LOAD_DBC(sFactionStore, "Faction.dbc"); - LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc"); - LOAD_DBC(sGameObjectDisplayInfoStore, "GameObjectDisplayInfo.dbc"); - LOAD_DBC(sGemPropertiesStore, "GemProperties.dbc"); - LOAD_DBC(sGlyphPropertiesStore, "GlyphProperties.dbc"); - LOAD_DBC(sGlyphSlotStore, "GlyphSlot.dbc"); - LOAD_DBC(sGtBarberShopCostBaseStore, "gtBarberShopCostBase.dbc"); - LOAD_DBC(sGtCombatRatingsStore, "gtCombatRatings.dbc"); - LOAD_DBC(sGtChanceToMeleeCritBaseStore, "gtChanceToMeleeCritBase.dbc"); - LOAD_DBC(sGtChanceToMeleeCritStore, "gtChanceToMeleeCrit.dbc"); - LOAD_DBC(sGtChanceToSpellCritBaseStore, "gtChanceToSpellCritBase.dbc"); - LOAD_DBC(sGtChanceToSpellCritStore, "gtChanceToSpellCrit.dbc"); - LOAD_DBC(sGtNPCManaCostScalerStore, "gtNPCManaCostScaler.dbc"); - LOAD_DBC(sGtOCTClassCombatRatingScalarStore, "gtOCTClassCombatRatingScalar.dbc"); - LOAD_DBC(sGtOCTRegenHPStore, "gtOCTRegenHP.dbc"); - //LOAD_DBC(sGtOCTRegenMPStore, "gtOCTRegenMP.dbc"); -- not used currently - LOAD_DBC(sGtRegenHPPerSptStore, "gtRegenHPPerSpt.dbc"); - LOAD_DBC(sGtRegenMPPerSptStore, "gtRegenMPPerSpt.dbc"); - LOAD_DBC(sHolidaysStore, "Holidays.dbc"); - LOAD_DBC(sItemStore, "Item.dbc"); - LOAD_DBC(sItemBagFamilyStore, "ItemBagFamily.dbc"); - //LOAD_DBC(sItemDisplayInfoStore, "ItemDisplayInfo.dbc"); -- not used currently - //LOAD_DBC(sItemCondExtCostsStore, "ItemCondExtCosts.dbc"); - LOAD_DBC(sItemExtendedCostStore, "ItemExtendedCost.dbc"); - LOAD_DBC(sItemLimitCategoryStore, "ItemLimitCategory.dbc"); - LOAD_DBC(sItemRandomPropertiesStore, "ItemRandomProperties.dbc"); - LOAD_DBC(sItemRandomSuffixStore, "ItemRandomSuffix.dbc"); - LOAD_DBC(sItemSetStore, "ItemSet.dbc"); - LOAD_DBC(sLFGDungeonStore, "LFGDungeons.dbc"); - LOAD_DBC(sLightStore, "Light.dbc"); - LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc"); - LOAD_DBC(sLockStore, "Lock.dbc"); - LOAD_DBC(sMailTemplateStore, "MailTemplate.dbc"); - LOAD_DBC(sMapStore, "Map.dbc"); - LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc"); - LOAD_DBC(sMovieStore, "Movie.dbc"); - LOAD_DBC(sNamesProfanityStore, "NamesProfanity.dbc"); - LOAD_DBC(sNamesReservedStore, "NamesReserved.dbc"); - LOAD_DBC(sOverrideSpellDataStore, "OverrideSpellData.dbc"); - LOAD_DBC(sPowerDisplayStore, "PowerDisplay.dbc"); - LOAD_DBC(sPvPDifficultyStore, "PvpDifficulty.dbc"); - LOAD_DBC(sQuestXPStore, "QuestXP.dbc"); - LOAD_DBC(sQuestFactionRewardStore, "QuestFactionReward.dbc"); - LOAD_DBC(sQuestSortStore, "QuestSort.dbc"); - LOAD_DBC(sRandomPropertiesPointsStore, "RandPropPoints.dbc"); - LOAD_DBC(sScalingStatDistributionStore, "ScalingStatDistribution.dbc"); - LOAD_DBC(sScalingStatValuesStore, "ScalingStatValues.dbc"); - LOAD_DBC(sSkillLineStore, "SkillLine.dbc"); - LOAD_DBC(sSkillLineAbilityStore, "SkillLineAbility.dbc"); - LOAD_DBC(sSkillRaceClassInfoStore, "SkillRaceClassInfo.dbc"); - LOAD_DBC(sSkillTiersStore, "SkillTiers.dbc"); - LOAD_DBC(sSoundEntriesStore, "SoundEntries.dbc"); - LOAD_DBC(sSpellCastTimesStore, "SpellCastTimes.dbc"); - LOAD_DBC(sSpellCategoryStore, "SpellCategory.dbc"); - LOAD_DBC(sSpellDurationStore, "SpellDuration.dbc"); - LOAD_DBC(sSpellFocusObjectStore, "SpellFocusObject.dbc"); - LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc"); - LOAD_DBC(sSpellItemEnchantmentConditionStore, "SpellItemEnchantmentCondition.dbc"); - LOAD_DBC(sSpellRadiusStore, "SpellRadius.dbc"); - LOAD_DBC(sSpellRangeStore, "SpellRange.dbc"); - LOAD_DBC(sSpellRuneCostStore, "SpellRuneCost.dbc"); - LOAD_DBC(sSpellShapeshiftStore, "SpellShapeshiftForm.dbc"); - LOAD_DBC(sStableSlotPricesStore, "StableSlotPrices.dbc"); - LOAD_DBC(sSummonPropertiesStore, "SummonProperties.dbc"); - LOAD_DBC(sTalentStore, "Talent.dbc"); - LOAD_DBC(sTalentTabStore, "TalentTab.dbc"); - LOAD_DBC(sTaxiNodesStore, "TaxiNodes.dbc"); - LOAD_DBC(sTaxiPathStore, "TaxiPath.dbc"); - LOAD_DBC(sTaxiPathNodeStore, "TaxiPathNode.dbc"); - LOAD_DBC(sTeamContributionPointsStore, "TeamContributionPoints.dbc"); - LOAD_DBC(sTotemCategoryStore, "TotemCategory.dbc"); - LOAD_DBC(sTransportAnimationStore, "TransportAnimation.dbc"); - LOAD_DBC(sTransportRotationStore, "TransportRotation.dbc"); - LOAD_DBC(sVehicleStore, "Vehicle.dbc"); - LOAD_DBC(sVehicleSeatStore, "VehicleSeat.dbc"); - LOAD_DBC(sWMOAreaTableStore, "WMOAreaTable.dbc"); - LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc"); - LOAD_DBC(sWorldMapOverlayStore, "WorldMapOverlay.dbc"); - LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); + LOAD_DBC(AreaTable); + LOAD_DBC(AchievementCriteria); + LOAD_DBC(AreaTrigger); + LOAD_DBC(AreaGroup); + LOAD_DBC(AreaPOI); + LOAD_DBC(AuctionHouse); + LOAD_DBC(BankBagSlotPrices); + LOAD_DBC(BannedAddOns); + LOAD_DBC(BattlemasterList); + LOAD_DBC(BarberShopStyle); + LOAD_DBC(CharacterFacialHairStyles); + LOAD_DBC(CharSections); + LOAD_DBC(CharStartOutfit); + LOAD_DBC(CharTitles); + LOAD_DBC(ChatChannels); + LOAD_DBC(ChrClasses); + LOAD_DBC(ChrRaces); + LOAD_DBC(CinematicCamera); + LOAD_DBC(CinematicSequences); + LOAD_DBC(CreatureDisplayInfo); + LOAD_DBC(CreatureDisplayInfoExtra); + LOAD_DBC(CreatureFamily); + LOAD_DBC(CreatureModelData); + LOAD_DBC(CreatureSpellData); + LOAD_DBC(CreatureType); + LOAD_DBC(CurrencyTypes); + LOAD_DBC(DestructibleModelData); + LOAD_DBC(DungeonEncounter); + LOAD_DBC(DurabilityCosts); + LOAD_DBC(DurabilityQuality); + LOAD_DBC(Emotes); + LOAD_DBC(EmotesText); + LOAD_DBC(EmotesTextSound); + LOAD_DBC(Faction); + LOAD_DBC(FactionTemplate); + LOAD_DBC(GameObjectDisplayInfo); + LOAD_DBC(GemProperties); + LOAD_DBC(GlyphProperties); + LOAD_DBC(GlyphSlot); + LOAD_DBC(gtBarberShopCostBase); + LOAD_DBC(gtCombatRatings); + LOAD_DBC(gtChanceToMeleeCritBase); + LOAD_DBC(gtChanceToMeleeCrit); + LOAD_DBC(gtChanceToSpellCritBase); + LOAD_DBC(gtChanceToSpellCrit); + LOAD_DBC(gtNPCManaCostScaler); + LOAD_DBC(gtOCTClassCombatRatingScalar); + LOAD_DBC(gtOCTRegenHP); + //LOAD_DBC(gtOCTRegenMP); + LOAD_DBC(gtRegenHPPerSpt); + LOAD_DBC(gtRegenMPPerSpt); + LOAD_DBC(Holidays); + LOAD_DBC(Item); + LOAD_DBC(ItemBagFamily); + //LOAD_DBC(ItemDisplayInfo); + //LOAD_DBC(ItemCondExtCosts); + LOAD_DBC(ItemExtendedCost); + LOAD_DBC(ItemLimitCategory); + LOAD_DBC(ItemRandomProperties); + LOAD_DBC(ItemRandomSuffix); + LOAD_DBC(ItemSet); + LOAD_DBC(LFGDungeons); + LOAD_DBC(Light); + LOAD_DBC(LiquidType); + LOAD_DBC(Lock); + LOAD_DBC(MailTemplate); + LOAD_DBC(Map); + LOAD_DBC(MapDifficulty); + LOAD_DBC(Movie); + LOAD_DBC(NamesProfanity); + LOAD_DBC(NamesReserved); + LOAD_DBC(OverrideSpellData); + LOAD_DBC(PowerDisplay); + LOAD_DBC(PvPDifficulty); + LOAD_DBC(QuestXP); + LOAD_DBC(QuestFactionReward); + LOAD_DBC(QuestSort); + LOAD_DBC(RandomPropertiesPoints); + LOAD_DBC(ScalingStatDistribution); + LOAD_DBC(ScalingStatValues); + LOAD_DBC(SkillLine); + LOAD_DBC(SkillLineAbility); + LOAD_DBC(SkillRaceClassInfo); + LOAD_DBC(SkillTiers); + LOAD_DBC(SoundEntries); + LOAD_DBC(SpellCastTimes); + LOAD_DBC(SpellCategory); + LOAD_DBC(SpellDuration); + LOAD_DBC(SpellFocusObject); + LOAD_DBC(SpellItemEnchantment); + LOAD_DBC(SpellItemEnchantmentCondition); + LOAD_DBC(SpellRadius); + LOAD_DBC(SpellRange); + LOAD_DBC(SpellRuneCost); + LOAD_DBC(SpellShapeshift); + LOAD_DBC(StableSlotPrices); + LOAD_DBC(SummonProperties); + LOAD_DBC(Talent); + LOAD_DBC(TalentTab); + LOAD_DBC(TaxiNodes); + LOAD_DBC(TaxiPath); + LOAD_DBC(TaxiPathNode); + LOAD_DBC(TeamContributionPoints); + LOAD_DBC(TotemCategory); + LOAD_DBC(TransportAnimation); + LOAD_DBC(TransportRotation); + LOAD_DBC(Vehicle); + LOAD_DBC(VehicleSeat); + LOAD_DBC(WMOAreaTable); + LOAD_DBC(WorldMapArea); + LOAD_DBC(WorldMapOverlay); + LOAD_DBC(WorldSafeLocs); + + LOAD_DBC_EXT(Achievement); + LOAD_DBC_EXT(Spell); + LOAD_DBC_EXT(SpellDifficulty); #undef LOAD_DBC - -#define LOAD_DBC_EXT(store, file, dbformat, dbpk) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file, dbformat, dbpk) - - LOAD_DBC_EXT(sAchievementStore, "Achievement.dbc", CustomAchievementfmt, CustomAchievementIndex); - LOAD_DBC_EXT(sSpellStore, "Spell.dbc", CustomSpellEntryfmt, CustomSpellEntryIndex); - LOAD_DBC_EXT(sSpellDifficultyStore, "SpellDifficulty.dbc", CustomSpellDifficultyfmt, CustomSpellDifficultyIndex); - #undef LOAD_DBC_EXT + for (CharacterFacialHairStylesEntry const* entry : sCharacterFacialHairStylesStore) if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) // ignore nonplayable races sCharFacialHairMap.insert({ entry->Race | (entry->Gender << 8) | (entry->Variation << 16), entry }); @@ -893,12 +896,12 @@ CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, ui return itr->second; } -/// Returns LFGDungeonEntry for a specific map and difficulty. Will return first found entry if multiple dungeons use the same map (such as Scarlet Monastery) -LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty) +/// Returns LFGDungeonsEntry for a specific map and difficulty. Will return first found entry if multiple dungeons use the same map (such as Scarlet Monastery) +LFGDungeonsEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty) { - for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i) + for (uint32 i = 0; i < sLFGDungeonsStore.GetNumRows(); ++i) { - LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i); + LFGDungeonsEntry const* dungeon = sLFGDungeonsStore.LookupEntry(i); if (!dungeon) continue; diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 8bcc9c5ac2..f0b555a4c6 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -75,7 +75,7 @@ TC_GAME_API CharacterFacialHairStylesEntry const* GetCharFacialHairEntry(uint8 r TC_GAME_API CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color); TC_GAME_API CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender); -TC_GAME_API LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty); +TC_GAME_API LFGDungeonsEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty); TC_GAME_API uint32 GetDefaultMapLight(uint32 mapId); @@ -87,107 +87,109 @@ TC_GAME_API ResponseCodes ValidateName(std::wstring const& name, LocaleConstant TC_GAME_API EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uint32 gender); -TC_GAME_API extern DBCStorage sAchievementStore; -TC_GAME_API extern DBCStorage sAchievementCriteriaStore; -TC_GAME_API extern DBCStorage sAreaTableStore; -TC_GAME_API extern DBCStorage sAreaGroupStore; -TC_GAME_API extern DBCStorage sAreaPOIStore; -TC_GAME_API extern DBCStorage sAreaTriggerStore; -TC_GAME_API extern DBCStorage sAuctionHouseStore; -TC_GAME_API extern DBCStorage sBankBagSlotPricesStore; -TC_GAME_API extern DBCStorage sBannedAddOnsStore; -TC_GAME_API extern DBCStorage sBarberShopStyleStore; -TC_GAME_API extern DBCStorage sBattlemasterListStore; -TC_GAME_API extern DBCStorage sChatChannelsStore; -TC_GAME_API extern DBCStorage sCharacterFacialHairStylesStore; -TC_GAME_API extern DBCStorage sCharSectionsStore; -TC_GAME_API extern DBCStorage sCharStartOutfitStore; -TC_GAME_API extern DBCStorage sCharTitlesStore; -TC_GAME_API extern DBCStorage sChrClassesStore; -TC_GAME_API extern DBCStorage sChrRacesStore; -TC_GAME_API extern DBCStorage sCinematicCameraStore; -TC_GAME_API extern DBCStorage sCinematicSequencesStore; -TC_GAME_API extern DBCStorage sCreatureDisplayInfoStore; -TC_GAME_API extern DBCStorage sCreatureDisplayInfoExtraStore; -TC_GAME_API extern DBCStorage sCreatureFamilyStore; -TC_GAME_API extern DBCStorage sCreatureModelDataStore; -TC_GAME_API extern DBCStorage sCreatureSpellDataStore; -TC_GAME_API extern DBCStorage sCreatureTypeStore; -TC_GAME_API extern DBCStorage sCurrencyTypesStore; -TC_GAME_API extern DBCStorage sDestructibleModelDataStore; -TC_GAME_API extern DBCStorage sDungeonEncounterStore; -TC_GAME_API extern DBCStorage sDurabilityCostsStore; -TC_GAME_API extern DBCStorage sDurabilityQualityStore; -TC_GAME_API extern DBCStorage sEmotesStore; -TC_GAME_API extern DBCStorage sEmotesTextStore; -TC_GAME_API extern DBCStorage sEmotesTextSoundStore; -TC_GAME_API extern DBCStorage sFactionStore; -TC_GAME_API extern DBCStorage sFactionTemplateStore; -TC_GAME_API extern DBCStorage sGameObjectDisplayInfoStore; -TC_GAME_API extern DBCStorage sGemPropertiesStore; -TC_GAME_API extern DBCStorage sGlyphPropertiesStore; -TC_GAME_API extern DBCStorage sGlyphSlotStore; +#define DECLARE_DBC_STORAGE(dbc) TC_GAME_API extern DBCStorage s ## dbc ## Store; -TC_GAME_API extern DBCStorage sGtBarberShopCostBaseStore; -TC_GAME_API extern DBCStorage sGtCombatRatingsStore; -TC_GAME_API extern DBCStorage sGtChanceToMeleeCritBaseStore; -TC_GAME_API extern DBCStorage sGtChanceToMeleeCritStore; -TC_GAME_API extern DBCStorage sGtChanceToSpellCritBaseStore; -TC_GAME_API extern DBCStorage sGtChanceToSpellCritStore; -TC_GAME_API extern DBCStorage sGtNPCManaCostScalerStore; -TC_GAME_API extern DBCStorage sGtOCTClassCombatRatingScalarStore; -TC_GAME_API extern DBCStorage sGtOCTRegenHPStore; -//TC_GAME_API extern DBCStorage sGtOCTRegenMPStore; -- not used currently -TC_GAME_API extern DBCStorage sGtRegenHPPerSptStore; -TC_GAME_API extern DBCStorage sGtRegenMPPerSptStore; -TC_GAME_API extern DBCStorage sHolidaysStore; -TC_GAME_API extern DBCStorage sItemStore; -TC_GAME_API extern DBCStorage sItemBagFamilyStore; -//TC_GAME_API extern DBCStorage sItemDisplayInfoStore; -- not used currently -TC_GAME_API extern DBCStorage sItemExtendedCostStore; -TC_GAME_API extern DBCStorage sItemLimitCategoryStore; -TC_GAME_API extern DBCStorage sItemRandomPropertiesStore; -TC_GAME_API extern DBCStorage sItemRandomSuffixStore; -TC_GAME_API extern DBCStorage sItemSetStore; -TC_GAME_API extern DBCStorage sLFGDungeonStore; -TC_GAME_API extern DBCStorage sLiquidTypeStore; -TC_GAME_API extern DBCStorage sLockStore; -TC_GAME_API extern DBCStorage sMailTemplateStore; -TC_GAME_API extern DBCStorage sMapStore; -//TC_GAME_API extern DBCStorage sMapDifficultyStore; -- use GetMapDifficultyData insteed +DECLARE_DBC_STORAGE(Achievement); +DECLARE_DBC_STORAGE(AchievementCriteria); +DECLARE_DBC_STORAGE(AreaTable); +DECLARE_DBC_STORAGE(AreaGroup); +DECLARE_DBC_STORAGE(AreaPOI); +DECLARE_DBC_STORAGE(AreaTrigger); +DECLARE_DBC_STORAGE(AuctionHouse); +DECLARE_DBC_STORAGE(BankBagSlotPrices); +DECLARE_DBC_STORAGE(BannedAddOns); +DECLARE_DBC_STORAGE(BarberShopStyle); +DECLARE_DBC_STORAGE(BattlemasterList); +DECLARE_DBC_STORAGE(ChatChannels); +DECLARE_DBC_STORAGE(CharacterFacialHairStyles); +DECLARE_DBC_STORAGE(CharSections); +DECLARE_DBC_STORAGE(CharStartOutfit); +DECLARE_DBC_STORAGE(CharTitles); +DECLARE_DBC_STORAGE(ChrClasses); +DECLARE_DBC_STORAGE(ChrRaces); +DECLARE_DBC_STORAGE(CinematicCamera); +DECLARE_DBC_STORAGE(CinematicSequences); +DECLARE_DBC_STORAGE(CreatureDisplayInfo); +DECLARE_DBC_STORAGE(CreatureDisplayInfoExtra); +DECLARE_DBC_STORAGE(CreatureFamily); +DECLARE_DBC_STORAGE(CreatureModelData); +DECLARE_DBC_STORAGE(CreatureSpellData); +DECLARE_DBC_STORAGE(CreatureType); +DECLARE_DBC_STORAGE(CurrencyTypes); +DECLARE_DBC_STORAGE(DestructibleModelData); +DECLARE_DBC_STORAGE(DungeonEncounter); +DECLARE_DBC_STORAGE(DurabilityCosts); +DECLARE_DBC_STORAGE(DurabilityQuality); +DECLARE_DBC_STORAGE(Emotes); +DECLARE_DBC_STORAGE(EmotesText); +DECLARE_DBC_STORAGE(EmotesTextSound); +DECLARE_DBC_STORAGE(Faction); +DECLARE_DBC_STORAGE(FactionTemplate); +DECLARE_DBC_STORAGE(GameObjectDisplayInfo); +DECLARE_DBC_STORAGE(GemProperties); +DECLARE_DBC_STORAGE(GlyphProperties); +DECLARE_DBC_STORAGE(GlyphSlot); + +DECLARE_DBC_STORAGE(gtBarberShopCostBase); +DECLARE_DBC_STORAGE(gtCombatRatings); +DECLARE_DBC_STORAGE(gtChanceToMeleeCritBase); +DECLARE_DBC_STORAGE(gtChanceToMeleeCrit); +DECLARE_DBC_STORAGE(gtChanceToSpellCritBase); +DECLARE_DBC_STORAGE(gtChanceToSpellCrit); +DECLARE_DBC_STORAGE(gtNPCManaCostScaler); +DECLARE_DBC_STORAGE(gtOCTClassCombatRatingScalar); +DECLARE_DBC_STORAGE(gtOCTRegenHP); +//DECLARE_DBC_STORAGE(gtOCTRegenMP); +DECLARE_DBC_STORAGE(gtRegenHPPerSpt); +DECLARE_DBC_STORAGE(gtRegenMPPerSpt); +DECLARE_DBC_STORAGE(Holidays); +DECLARE_DBC_STORAGE(Item); +DECLARE_DBC_STORAGE(ItemBagFamily); +//DECLARE_DBC_STORAGE(ItemDisplayInfo); +DECLARE_DBC_STORAGE(ItemExtendedCost); +DECLARE_DBC_STORAGE(ItemLimitCategory); +DECLARE_DBC_STORAGE(ItemRandomProperties); +DECLARE_DBC_STORAGE(ItemRandomSuffix); +DECLARE_DBC_STORAGE(ItemSet); +DECLARE_DBC_STORAGE(LFGDungeons); +DECLARE_DBC_STORAGE(LiquidType); +DECLARE_DBC_STORAGE(Lock); +DECLARE_DBC_STORAGE(MailTemplate); +DECLARE_DBC_STORAGE(Map); +//DECLARE_DBC_STORAGE(MapDifficulty); TC_GAME_API extern MapDifficultyMap sMapDifficultyMap; -TC_GAME_API extern DBCStorage sMovieStore; -TC_GAME_API extern DBCStorage sOverrideSpellDataStore; -TC_GAME_API extern DBCStorage sPowerDisplayStore; -TC_GAME_API extern DBCStorage sQuestSortStore; -TC_GAME_API extern DBCStorage sQuestXPStore; -TC_GAME_API extern DBCStorage sQuestFactionRewardStore; -TC_GAME_API extern DBCStorage sRandomPropertiesPointsStore; -TC_GAME_API extern DBCStorage sScalingStatDistributionStore; -TC_GAME_API extern DBCStorage sScalingStatValuesStore; -TC_GAME_API extern DBCStorage sSkillLineStore; -TC_GAME_API extern DBCStorage sSkillLineAbilityStore; -TC_GAME_API extern DBCStorage sSkillTiersStore; -TC_GAME_API extern DBCStorage sSoundEntriesStore; -TC_GAME_API extern DBCStorage sSpellCastTimesStore; -TC_GAME_API extern DBCStorage sSpellCategoryStore; -TC_GAME_API extern DBCStorage sSpellDifficultyStore; -TC_GAME_API extern DBCStorage sSpellDurationStore; -TC_GAME_API extern DBCStorage sSpellFocusObjectStore; -TC_GAME_API extern DBCStorage sSpellItemEnchantmentStore; -TC_GAME_API extern DBCStorage sSpellItemEnchantmentConditionStore; +DECLARE_DBC_STORAGE(Movie); +DECLARE_DBC_STORAGE(OverrideSpellData); +DECLARE_DBC_STORAGE(PowerDisplay); +DECLARE_DBC_STORAGE(QuestSort); +DECLARE_DBC_STORAGE(QuestXP); +DECLARE_DBC_STORAGE(QuestFactionReward); +DECLARE_DBC_STORAGE(RandomPropertiesPoints); +DECLARE_DBC_STORAGE(ScalingStatDistribution); +DECLARE_DBC_STORAGE(ScalingStatValues); +DECLARE_DBC_STORAGE(SkillLine); +DECLARE_DBC_STORAGE(SkillLineAbility); +DECLARE_DBC_STORAGE(SkillTiers); +DECLARE_DBC_STORAGE(SoundEntries); +DECLARE_DBC_STORAGE(SpellCastTimes); +DECLARE_DBC_STORAGE(SpellCategory); +DECLARE_DBC_STORAGE(SpellDifficulty); +DECLARE_DBC_STORAGE(SpellDuration); +DECLARE_DBC_STORAGE(SpellFocusObject); +DECLARE_DBC_STORAGE(SpellItemEnchantment); +DECLARE_DBC_STORAGE(SpellItemEnchantmentCondition); TC_GAME_API extern PetFamilySpellsStore sPetFamilySpellsStore; -TC_GAME_API extern DBCStorage sSpellRadiusStore; -TC_GAME_API extern DBCStorage sSpellRangeStore; -TC_GAME_API extern DBCStorage sSpellRuneCostStore; -TC_GAME_API extern DBCStorage sSpellShapeshiftStore; -TC_GAME_API extern DBCStorage sSpellStore; -TC_GAME_API extern DBCStorage sStableSlotPricesStore; -TC_GAME_API extern DBCStorage sSummonPropertiesStore; -TC_GAME_API extern DBCStorage sTalentStore; -TC_GAME_API extern DBCStorage sTalentTabStore; -TC_GAME_API extern DBCStorage sTaxiNodesStore; -TC_GAME_API extern DBCStorage sTaxiPathStore; +DECLARE_DBC_STORAGE(SpellRadius); +DECLARE_DBC_STORAGE(SpellRange); +DECLARE_DBC_STORAGE(SpellRuneCost); +DECLARE_DBC_STORAGE(SpellShapeshift); +DECLARE_DBC_STORAGE(Spell); +DECLARE_DBC_STORAGE(StableSlotPrices); +DECLARE_DBC_STORAGE(SummonProperties); +DECLARE_DBC_STORAGE(Talent); +DECLARE_DBC_STORAGE(TalentTab); +DECLARE_DBC_STORAGE(TaxiNodes); +DECLARE_DBC_STORAGE(TaxiPath); TC_GAME_API extern TaxiMask sTaxiNodesMask; TC_GAME_API extern TaxiMask sOldContinentsNodesMask; TC_GAME_API extern TaxiMask sHordeTaxiNodesMask; @@ -195,16 +197,18 @@ TC_GAME_API extern TaxiMask sAllianceTaxiNodesM TC_GAME_API extern TaxiMask sDeathKnightTaxiNodesMask; TC_GAME_API extern TaxiPathSetBySource sTaxiPathSetBySource; TC_GAME_API extern TaxiPathNodesByPath sTaxiPathNodesByPath; -TC_GAME_API extern DBCStorage sTransportAnimationStore; -TC_GAME_API extern DBCStorage sTransportRotationStore; -TC_GAME_API extern DBCStorage sTeamContributionPointsStore; -TC_GAME_API extern DBCStorage sTotemCategoryStore; -TC_GAME_API extern DBCStorage sVehicleStore; -TC_GAME_API extern DBCStorage sVehicleSeatStore; -TC_GAME_API extern DBCStorage sWMOAreaTableStore; -//TC_GAME_API extern DBCStorage sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates -TC_GAME_API extern DBCStorage sWorldMapOverlayStore; -TC_GAME_API extern DBCStorage sWorldSafeLocsStore; +DECLARE_DBC_STORAGE(TransportAnimation); +DECLARE_DBC_STORAGE(TransportRotation); +DECLARE_DBC_STORAGE(TeamContributionPoints); +DECLARE_DBC_STORAGE(TotemCategory); +DECLARE_DBC_STORAGE(Vehicle); +DECLARE_DBC_STORAGE(VehicleSeat); +DECLARE_DBC_STORAGE(WMOAreaTable); +//DECLARE_DBC_STORAGE(WorldMapArea); +DECLARE_DBC_STORAGE(WorldMapOverlay); +DECLARE_DBC_STORAGE(WorldSafeLocs); + +#undef DECLARE_DBC_STORAGE TC_GAME_API void LoadDBCStores(const std::string& dataPath); diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 7fadc85a86..ff10193a35 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -48,7 +48,7 @@ LFGDungeonData::LFGDungeonData() : id(0), name(), map(0), type(0), expansion(0), { } -LFGDungeonData::LFGDungeonData(LFGDungeonEntry const* dbc) : id(dbc->ID), name(dbc->name[0]), map(dbc->map), +LFGDungeonData::LFGDungeonData(LFGDungeonsEntry const* dbc) : id(dbc->ID), name(dbc->name[0]), map(dbc->map), type(dbc->type), expansion(uint8(dbc->expansion)), group(uint8(dbc->grouptype)), minlevel(uint8(dbc->minlevel)), maxlevel(uint8(dbc->maxlevel)), difficulty(Difficulty(dbc->difficulty)), seasonal((dbc->flags & LFG_FLAG_SEASONAL) != 0), x(0.0f), y(0.0f), z(0.0f), o(0.0f) @@ -192,9 +192,9 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) LfgDungeonStore.clear(); // Initialize Dungeon map with data from dbcs - for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i) + for (uint32 i = 0; i < sLFGDungeonsStore.GetNumRows(); ++i) { - LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i); + LFGDungeonsEntry const* dungeon = sLFGDungeonsStore.LookupEntry(i); if (!dungeon) continue; @@ -962,7 +962,7 @@ void LFGMgr::MakeNewGroup(LfgProposal const& proposal) if (!dungeons.empty()) { uint32 rDungeonId = (*dungeons.begin()); - LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(rDungeonId); + LFGDungeonsEntry const* dungeon = sLFGDungeonsStore.LookupEntry(rDungeonId); if (dungeon && dungeon->type == LFG_TYPE_RANDOM) player->CastSpell(player, LFG_SPELL_DUNGEON_COOLDOWN, false); } @@ -1633,7 +1633,7 @@ LfgLockMap const LFGMgr::GetLockedDungeons(ObjectGuid guid) for (LfgDungeonSet::const_iterator it = dungeons.begin(); it != dungeons.end(); ++it) { LFGDungeonData const* dungeon = GetLFGDungeon(*it); - if (!dungeon) // should never happen - We provide a list from sLFGDungeonStore + if (!dungeon) // should never happen - We provide a list from sLFGDungeonsStore continue; uint32 lockData = 0; diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 8b2c074b7b..eb01734e93 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -30,7 +30,7 @@ class Group; class Player; class Quest; class Map; -struct LFGDungeonEntry; +struct LFGDungeonsEntry; enum Difficulty : uint8; namespace lfg @@ -269,7 +269,7 @@ struct LfgPlayerBoot struct LFGDungeonData { LFGDungeonData(); - LFGDungeonData(LFGDungeonEntry const* dbc); + LFGDungeonData(LFGDungeonsEntry const* dbc); uint32 id; std::string name; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7f37550b0f..2f92a2b12e 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -5281,8 +5281,8 @@ float Player::GetMeleeCritFromAgility() const if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtChanceToMeleeCritBaseEntry const* critBase = sGtChanceToMeleeCritBaseStore.LookupEntry(pclass-1); - GtChanceToMeleeCritEntry const* critRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + gtChanceToMeleeCritBaseEntry const* critBase = sgtChanceToMeleeCritBaseStore.LookupEntry(pclass-1); + gtChanceToMeleeCritEntry const* critRatio = sgtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (critBase == nullptr || critRatio == nullptr) return 0.0f; @@ -5330,7 +5330,7 @@ void Player::GetDodgeFromAgility(float &diminishing, float &nondiminishing) cons level = GT_MAX_LEVEL; // Dodge per agility is proportional to crit per agility, which is available from DBC files - GtChanceToMeleeCritEntry const* dodgeRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + gtChanceToMeleeCritEntry const* dodgeRatio = sgtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (dodgeRatio == nullptr || pclass > MAX_CLASSES) return; @@ -5351,8 +5351,8 @@ float Player::GetSpellCritFromIntellect() const if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtChanceToSpellCritBaseEntry const* critBase = sGtChanceToSpellCritBaseStore.LookupEntry(pclass-1); - GtChanceToSpellCritEntry const* critRatio = sGtChanceToSpellCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + gtChanceToSpellCritBaseEntry const* critBase = sgtChanceToSpellCritBaseStore.LookupEntry(pclass-1); + gtChanceToSpellCritEntry const* critRatio = sgtChanceToSpellCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (critBase == nullptr || critRatio == nullptr) return 0.0f; @@ -5367,9 +5367,9 @@ float Player::GetRatingMultiplier(CombatRating cr) const if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtCombatRatingsEntry const* Rating = sGtCombatRatingsStore.LookupEntry(cr*GT_MAX_LEVEL+level-1); + gtCombatRatingsEntry const* Rating = sgtCombatRatingsStore.LookupEntry(cr*GT_MAX_LEVEL+level-1); // gtOCTClassCombatRatingScalarStore.dbc starts with 1, CombatRating with zero, so cr+1 - GtOCTClassCombatRatingScalarEntry const* classRating = sGtOCTClassCombatRatingScalarStore.LookupEntry((getClass()-1)*GT_MAX_RATING+cr+1); + gtOCTClassCombatRatingScalarEntry const* classRating = sgtOCTClassCombatRatingScalarStore.LookupEntry((getClass()-1)*GT_MAX_RATING+cr+1); if (!Rating || !classRating) return 1.0f; // By default use minimum coefficient (not must be called) @@ -5403,8 +5403,8 @@ float Player::OCTRegenHPPerSpirit() const if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtOCTRegenHPEntry const* baseRatio = sGtOCTRegenHPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); - GtRegenHPPerSptEntry const* moreRatio = sGtRegenHPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + gtOCTRegenHPEntry const* baseRatio = sgtOCTRegenHPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + gtRegenHPPerSptEntry const* moreRatio = sgtRegenHPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (baseRatio == nullptr || moreRatio == nullptr) return 0.0f; @@ -5426,8 +5426,8 @@ float Player::OCTRegenMPPerSpirit() const if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; -// GtOCTRegenMPEntry const* baseRatio = sGtOCTRegenMPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); - GtRegenMPPerSptEntry const* moreRatio = sGtRegenMPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); +// gtOCTRegenMPEntry const* baseRatio = sgtOCTRegenMPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + gtRegenMPPerSptEntry const* moreRatio = sgtRegenMPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (moreRatio == nullptr) return 0.0f; @@ -6591,7 +6591,7 @@ void Player::RewardReputation(Unit* victim, float rate) // support for: Championing - http://www.wowwiki.com/Championing Map const* map = GetMap(); if (map->IsNonRaidDungeon()) - if (LFGDungeonEntry const* dungeon = GetLFGDungeon(map->GetId(), map->GetDifficulty())) + if (LFGDungeonsEntry const* dungeon = GetLFGDungeon(map->GetId(), map->GetDifficulty())) if (dungeon->reclevel == 80) ChampioningFaction = GetChampioningFaction(); } @@ -6640,10 +6640,10 @@ void Player::RewardReputation(Quest const* quest) else { uint32 row = ((quest->RewardFactionValueId[i] < 0) ? 1 : 0) + 1; - if (QuestFactionRewEntry const* questFactionRewEntry = sQuestFactionRewardStore.LookupEntry(row)) + if (QuestFactionRewardEntry const* questFactionRewardEntry = sQuestFactionRewardStore.LookupEntry(row)) { uint32 field = abs(quest->RewardFactionValueId[i]); - rep = questFactionRewEntry->QuestRewFactionValue[field]; + rep = questFactionRewardEntry->QuestRewFactionValue[field]; } } @@ -24244,7 +24244,7 @@ uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 n if ((hairstyle == newhairstyle) && (haircolor == newhaircolor) && (facialhair == newfacialhair) && (!newSkin || (newSkin->hair_id == skincolor))) return 0; - GtBarberShopCostBaseEntry const* bsc = sGtBarberShopCostBaseStore.LookupEntry(level - 1); + gtBarberShopCostBaseEntry const* bsc = sgtBarberShopCostBaseStore.LookupEntry(level - 1); if (!bsc) // shouldn't happen return 0xFFFFFFFF; diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 6750341446..bc2001575c 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -494,8 +494,8 @@ int32 SpellEffectInfo::CalcValue(WorldObject const* caster /*= nullptr*/, int32 if (canEffectScale) { - GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(_spellInfo->SpellLevel - 1); - GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(casterUnit->getLevel() - 1); + gtNPCManaCostScalerEntry const* spellScaler = sgtNPCManaCostScalerStore.LookupEntry(_spellInfo->SpellLevel - 1); + gtNPCManaCostScalerEntry const* casterScaler = sgtNPCManaCostScalerStore.LookupEntry(casterUnit->getLevel() - 1); if (spellScaler && casterScaler) value *= casterScaler->ratio / spellScaler->ratio; } @@ -3220,8 +3220,8 @@ int32 SpellInfo::CalcPowerCost(WorldObject const* caster, SpellSchoolMask school { if (HasAttribute(SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION)) { - GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1); - GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(unitCaster->getLevel() - 1); + gtNPCManaCostScalerEntry const* spellScaler = sgtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1); + gtNPCManaCostScalerEntry const* casterScaler = sgtNPCManaCostScalerStore.LookupEntry(unitCaster->getLevel() - 1); if (spellScaler && casterScaler) powerCost *= casterScaler->ratio / spellScaler->ratio; } diff --git a/src/server/shared/DataStores/DBCStructure.h b/src/server/shared/DataStores/DBCStructure.h index cf43e5bc01..e514c6e758 100644 --- a/src/server/shared/DataStores/DBCStructure.h +++ b/src/server/shared/DataStores/DBCStructure.h @@ -738,62 +738,62 @@ struct GlyphSlotEntry // gtOCTClassCombatRatingScalar.dbc stores data for 32 ratings, look at MAX_COMBAT_RATING for real used amount #define GT_MAX_RATING 32 -struct GtBarberShopCostBaseEntry +struct gtBarberShopCostBaseEntry { float cost; }; -struct GtCombatRatingsEntry +struct gtCombatRatingsEntry { float ratio; }; -struct GtChanceToMeleeCritBaseEntry +struct gtChanceToMeleeCritBaseEntry { float base; }; -struct GtChanceToMeleeCritEntry +struct gtChanceToMeleeCritEntry { float ratio; }; -struct GtChanceToSpellCritBaseEntry +struct gtChanceToSpellCritBaseEntry { float base; }; -struct GtNPCManaCostScalerEntry +struct gtNPCManaCostScalerEntry { float ratio; }; -struct GtChanceToSpellCritEntry +struct gtChanceToSpellCritEntry { float ratio; }; -struct GtOCTClassCombatRatingScalarEntry +struct gtOCTClassCombatRatingScalarEntry { float ratio; }; -struct GtOCTRegenHPEntry +struct gtOCTRegenHPEntry { float ratio; }; -//struct GtOCTRegenMPEntry +//struct gtOCTRegenMPEntry //{ // float ratio; //}; -struct GtRegenHPPerSptEntry +struct gtRegenHPPerSptEntry { float ratio; }; -struct GtRegenMPPerSptEntry +struct gtRegenMPPerSptEntry { float ratio; }; @@ -941,7 +941,7 @@ struct ItemSetEntry uint32 required_skill_value; // 52 m_requiredSkillRank }; -struct LFGDungeonEntry +struct LFGDungeonsEntry { uint32 ID; // 0 char* name[16]; // 1-17 Name lang @@ -1157,7 +1157,7 @@ struct QuestXPEntry uint32 Exp[10]; }; -struct QuestFactionRewEntry +struct QuestFactionRewardEntry { uint32 id; int32 QuestRewFactionValue[10]; diff --git a/src/server/shared/DataStores/DBCfmt.h b/src/server/shared/DataStores/DBCfmt.h index 9de1c6a490..1c1bea9fd2 100644 --- a/src/server/shared/DataStores/DBCfmt.h +++ b/src/server/shared/DataStores/DBCfmt.h @@ -19,126 +19,126 @@ #ifndef TRINITY_DBCSFRM_H #define TRINITY_DBCSFRM_H -char constexpr Achievementfmt[] = "niixssssssssssssssssxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxii"; -char constexpr CustomAchievementfmt[] = "pppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaapapaaaaaaaaaaaaaaaaaapp"; -char constexpr CustomAchievementIndex[] = "ID"; -char constexpr AchievementCriteriafmt[] = "niiiiiiiixxxxxxxxxxxxxxxxxiiiix"; -char constexpr AreaTableEntryfmt[] = "niiiixxxxxissssssssssssssssxiiiiixxx"; -char constexpr AreaGroupEntryfmt[] = "niiiiiii"; -char constexpr AreaPOIEntryfmt[] = "niiiiiiiiiiifffixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxix"; -char constexpr AreaTriggerEntryfmt[] = "niffffffff"; -char constexpr AuctionHouseEntryfmt[] = "niiixxxxxxxxxxxxxxxxx"; -char constexpr BankBagSlotPricesEntryfmt[] = "ni"; -char constexpr BannedAddOnsfmt[] = "nxxxxxxxxxx"; -char constexpr BarberShopStyleEntryfmt[] = "nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii"; -char constexpr BattlemasterListEntryfmt[] = "niiiiiiiiixssssssssssssssssxiixx"; -char constexpr CharacterFacialHairStylesfmt[] = "iiixxxxx"; -char constexpr CharStartOutfitEntryfmt[] = "dbbbXiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char constexpr CharSectionsEntryfmt[] = "diiixxxiii"; -char constexpr CharTitlesEntryfmt[] = "nxssssssssssssssssxssssssssssssssssxi"; -char constexpr ChatChannelsEntryfmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxx"; -char constexpr ChrClassesEntryfmt[] = "nxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii"; -char constexpr ChrRacesEntryfmt[] = "niixiixixxxxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi"; -char constexpr CinematicCameraEntryfmt[] = "nsiffff"; -char constexpr CinematicSequencesEntryfmt[] = "nxixxxxxxx"; -char constexpr CreatureDisplayInfofmt[] = "nixifxxxxxxxxxxx"; -char constexpr CreatureDisplayInfoExtrafmt[] = "diixxxxxxxxxxxxxxxxxx"; -char constexpr CreatureFamilyfmt[] = "nfifiiiiixssssssssssssssssxx"; -char constexpr CreatureModelDatafmt[] = "nisxfxxxxxxxxxxffxxxxxxxxxxx"; -char constexpr CreatureSpellDatafmt[] = "niiiixxxx"; -char constexpr CreatureTypefmt[] = "nxxxxxxxxxxxxxxxxxx"; -char constexpr CurrencyTypesfmt[] = "xnxi"; -char constexpr DestructibleModelDatafmt[] = "nxxixxxixxxixxxixxx"; -char constexpr DungeonEncounterfmt[] = "niixissssssssssssssssxx"; -char constexpr DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; -char constexpr DurabilityQualityfmt[] = "nf"; -char constexpr EmotesEntryfmt[] = "nxxiiix"; -char constexpr EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx"; -char constexpr EmotesTextSoundEntryfmt[] = "niiii"; -char constexpr FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixssssssssssssssssxxxxxxxxxxxxxxxxxx"; -char constexpr FactionTemplateEntryfmt[] = "niiiiiiiiiiiii"; -char constexpr GameObjectDisplayInfofmt[] = "nsxxxxxxxxxxffffffx"; -char constexpr GemPropertiesEntryfmt[] = "nixxi"; -char constexpr GlyphPropertiesfmt[] = "niii"; -char constexpr GlyphSlotfmt[] = "nii"; -char constexpr GtBarberShopCostBasefmt[] = "f"; -char constexpr GtCombatRatingsfmt[] = "f"; -char constexpr GtChanceToMeleeCritBasefmt[] = "f"; -char constexpr GtChanceToMeleeCritfmt[] = "f"; -char constexpr GtChanceToSpellCritBasefmt[] = "f"; -char constexpr GtChanceToSpellCritfmt[] = "f"; -char constexpr GtNPCManaCostScalerfmt[] = "f"; -char constexpr GtOCTClassCombatRatingScalarfmt[] = "df"; -char constexpr GtOCTRegenHPfmt[] = "f"; -//char constexpr GtOCTRegenMPfmt[] = "f"; -char constexpr GtRegenHPPerSptfmt[] = "f"; -char constexpr GtRegenMPPerSptfmt[] = "f"; -char constexpr Holidaysfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiixxsiix"; -char constexpr Itemfmt[] = "niiiiiii"; -char constexpr ItemBagFamilyfmt[] = "nxxxxxxxxxxxxxxxxx"; -//char constexpr ItemDisplayTemplateEntryfmt[] = "nxxxxxxxxxxixxxxxxxxxxx"; -//char constexpr ItemCondExtCostsEntryfmt[] = "xiii"; -char constexpr ItemExtendedCostEntryfmt[] = "niiiiiiiiiiiiiix"; -char constexpr ItemLimitCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii"; -char constexpr ItemRandomPropertiesfmt[] = "nxiiixxssssssssssssssssx"; -char constexpr ItemRandomSuffixfmt[] = "nssssssssssssssssxxiiixxiiixx"; -char constexpr ItemSetEntryfmt[] = "dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; -char constexpr LFGDungeonEntryfmt[] = "nssssssssssssssssxiiiiiiiiixxixixxxxxxxxxxxxxxxxx"; -char constexpr LightEntryfmt[] = "nifffxxxxxxxxxx"; -char constexpr LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char constexpr LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; -char constexpr MailTemplateEntryfmt[] = "nxxxxxxxxxxxxxxxxxssssssssssssssssx"; -char constexpr MapEntryfmt[] = "nxiixssssssssssssssssxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixiffxiii"; -char constexpr MapDifficultyEntryfmt[] = "diisxxxxxxxxxxxxxxxxiix"; -char constexpr MovieEntryfmt[] = "nxx"; -char constexpr NamesProfanityEntryfmt[] = "dsi"; -char constexpr NamesReservedEntryfmt[] = "dsi"; -char constexpr OverrideSpellDatafmt[] = "niiiiiiiiiix"; -char constexpr QuestFactionRewardfmt[] = "niiiiiiiiii"; -char constexpr QuestSortEntryfmt[] = "nxxxxxxxxxxxxxxxxx"; -char constexpr QuestXPfmt[] = "niiiiiiiiii"; -char constexpr PowerDisplayfmt[] = "nixxxx"; -char constexpr PvPDifficultyfmt[] = "diiiii"; -char constexpr RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii"; -char constexpr ScalingStatDistributionfmt[] = "niiiiiiiiiiiiiiiiiiiii"; -char constexpr ScalingStatValuesfmt[] = "iniiiiiiiiiiiiiiiiiiiiii"; -char constexpr SkillLinefmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxi"; -char constexpr SkillLineAbilityfmt[] = "niiiixxiiiiixx"; -char constexpr SkillRaceClassInfofmt[] = "diiiixix"; -char constexpr SkillTiersfmt[] = "nxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiii"; -char constexpr SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char constexpr SpellCastTimefmt[] = "nixx"; -char constexpr SpellCategoryfmt[] = "ni"; -char constexpr SpellDifficultyfmt[] = "niiii"; -char constexpr CustomSpellDifficultyfmt[] = "ppppp"; -char constexpr CustomSpellDifficultyIndex[] = "id"; -char constexpr SpellDurationfmt[] = "niii"; -char constexpr SpellEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiiissssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixxfffxx"; -char constexpr CustomSpellEntryfmt[] = "papppppppppppapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaappppppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa"; -char constexpr CustomSpellEntryIndex[] = "Id"; -char constexpr SpellFocusObjectfmt[] = "nxxxxxxxxxxxxxxxxx"; -char constexpr SpellItemEnchantmentfmt[] = "nxiiiiiixxxiiissssssssssssssssxiiiiiii"; -char constexpr SpellItemEnchantmentConditionfmt[] = "nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX"; -char constexpr SpellRadiusfmt[] = "nfff"; -char constexpr SpellRangefmt[] = "nffffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char constexpr SpellRuneCostfmt[] = "niiii"; -char constexpr SpellShapeshiftfmt[] = "nxxxxxxxxxxxxxxxxxxiixiiixxiiiiiiii"; -char constexpr StableSlotPricesfmt[] = "ni"; -char constexpr SummonPropertiesfmt[] = "niiiii"; -char constexpr TalentEntryfmt[] = "niiiiiiiixxxxixxixxxxxx"; -char constexpr TalentTabEntryfmt[] = "nxxxxxxxxxxxxxxxxxxxiiix"; -char constexpr TaxiNodesEntryfmt[] = "nifffssssssssssssssssxii"; -char constexpr TaxiPathEntryfmt[] = "niii"; -char constexpr TaxiPathNodeEntryfmt[] = "diiifffiiii"; -char constexpr TeamContributionPointsfmt[] = "df"; -char constexpr TotemCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii"; -char constexpr TransportAnimationfmt[] = "diifffx"; -char constexpr TransportRotationfmt[] = "diiffff"; -char constexpr VehicleEntryfmt[] = "niffffiiiiiiiifffffffffffffffssssfifiixx"; -char constexpr VehicleSeatEntryfmt[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxx"; -char constexpr WMOAreaTableEntryfmt[] = "niiixxxxxiixxxxxxxxxxxxxxxxx"; -char constexpr WorldMapAreaEntryfmt[] = "xinxffffixx"; -char constexpr WorldMapOverlayEntryfmt[] = "nxiiiixxxxxxxxxxx"; -char constexpr WorldSafeLocsEntryfmt[] = "nifffxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_Achievement[] = "niixssssssssssssssssxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxii"; +char constexpr DBCfmt_Achievement_DBFormat[] = "pppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaapapaaaaaaaaaaaaaaaaaapp"; +char constexpr DBCfmt_Achievement_DBIndex[] = "ID"; +char constexpr DBCfmt_AchievementCriteria[] = "niiiiiiiixxxxxxxxxxxxxxxxxiiiix"; +char constexpr DBCfmt_AreaTable[] = "niiiixxxxxissssssssssssssssxiiiiixxx"; +char constexpr DBCfmt_AreaGroup[] = "niiiiiii"; +char constexpr DBCfmt_AreaPOI[] = "niiiiiiiiiiifffixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxix"; +char constexpr DBCfmt_AreaTrigger[] = "niffffffff"; +char constexpr DBCfmt_AuctionHouse[] = "niiixxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_BankBagSlotPrices[] = "ni"; +char constexpr DBCfmt_BannedAddOns[] = "nxxxxxxxxxx"; +char constexpr DBCfmt_BarberShopStyle[] = "nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii"; +char constexpr DBCfmt_BattlemasterList[] = "niiiiiiiiixssssssssssssssssxiixx"; +char constexpr DBCfmt_CharacterFacialHairStyles[] = "iiixxxxx"; +char constexpr DBCfmt_CharStartOutfit[] = "dbbbXiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_CharSections[] = "diiixxxiii"; +char constexpr DBCfmt_CharTitles[] = "nxssssssssssssssssxssssssssssssssssxi"; +char constexpr DBCfmt_ChatChannels[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_ChrClasses[] = "nxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii"; +char constexpr DBCfmt_ChrRaces[] = "niixiixixxxxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi"; +char constexpr DBCfmt_CinematicCamera[] = "nsiffff"; +char constexpr DBCfmt_CinematicSequences[] = "nxixxxxxxx"; +char constexpr DBCfmt_CreatureDisplayInfo[] = "nixifxxxxxxxxxxx"; +char constexpr DBCfmt_CreatureDisplayInfoExtra[] = "diixxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_CreatureFamily[] = "nfifiiiiixssssssssssssssssxx"; +char constexpr DBCfmt_CreatureModelData[] = "nisxfxxxxxxxxxxffxxxxxxxxxxx"; +char constexpr DBCfmt_CreatureSpellData[] = "niiiixxxx"; +char constexpr DBCfmt_CreatureType[] = "nxxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_CurrencyTypes[] = "xnxi"; +char constexpr DBCfmt_DestructibleModelData[] = "nxxixxxixxxixxxixxx"; +char constexpr DBCfmt_DungeonEncounter[] = "niixissssssssssssssssxx"; +char constexpr DBCfmt_DurabilityCosts[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; +char constexpr DBCfmt_DurabilityQuality[] = "nf"; +char constexpr DBCfmt_Emotes[] = "nxxiiix"; +char constexpr DBCfmt_EmotesText[] = "nxixxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_EmotesTextSound[] = "niiii"; +char constexpr DBCfmt_Faction[] = "niiiiiiiiiiiiiiiiiiffixssssssssssssssssxxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_FactionTemplate[] = "niiiiiiiiiiiii"; +char constexpr DBCfmt_GameObjectDisplayInfo[] = "nsxxxxxxxxxxffffffx"; +char constexpr DBCfmt_GemProperties[] = "nixxi"; +char constexpr DBCfmt_GlyphProperties[] = "niii"; +char constexpr DBCfmt_GlyphSlot[] = "nii"; +char constexpr DBCfmt_gtBarberShopCostBase[] = "f"; +char constexpr DBCfmt_gtCombatRatings[] = "f"; +char constexpr DBCfmt_gtChanceToMeleeCritBase[] = "f"; +char constexpr DBCfmt_gtChanceToMeleeCrit[] = "f"; +char constexpr DBCfmt_gtChanceToSpellCritBase[] = "f"; +char constexpr DBCfmt_gtChanceToSpellCrit[] = "f"; +char constexpr DBCfmt_gtNPCManaCostScaler[] = "f"; +char constexpr DBCfmt_gtOCTClassCombatRatingScalar[] = "df"; +char constexpr DBCfmt_gtOCTRegenHP[] = "f"; +//char constexpr DBCfmt_gtOCTRegenMP[] = "f"; +char constexpr DBCfmt_gtRegenHPPerSpt[] = "f"; +char constexpr DBCfmt_gtRegenMPPerSpt[] = "f"; +char constexpr DBCfmt_Holidays[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiixxsiix"; +char constexpr DBCfmt_Item[] = "niiiiiii"; +char constexpr DBCfmt_ItemBagFamily[] = "nxxxxxxxxxxxxxxxxx"; +//char constexpr DBCfmt_ItemDisplayTemplate[] = "nxxxxxxxxxxixxxxxxxxxxx"; +//char constexpr DBCfmt_ItemCondExtCosts[] = "xiii"; +char constexpr DBCfmt_ItemExtendedCost[] = "niiiiiiiiiiiiiix"; +char constexpr DBCfmt_ItemLimitCategory[] = "nxxxxxxxxxxxxxxxxxii"; +char constexpr DBCfmt_ItemRandomProperties[] = "nxiiixxssssssssssssssssx"; +char constexpr DBCfmt_ItemRandomSuffix[] = "nssssssssssssssssxxiiixxiiixx"; +char constexpr DBCfmt_ItemSet[] = "dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; +char constexpr DBCfmt_LFGDungeons[] = "nssssssssssssssssxiiiiiiiiixxixixxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_Light[] = "nifffxxxxxxxxxx"; +char constexpr DBCfmt_LiquidType[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_Lock[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; +char constexpr DBCfmt_MailTemplate[] = "nxxxxxxxxxxxxxxxxxssssssssssssssssx"; +char constexpr DBCfmt_Map[] = "nxiixssssssssssssssssxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixiffxiii"; +char constexpr DBCfmt_MapDifficulty[] = "diisxxxxxxxxxxxxxxxxiix"; +char constexpr DBCfmt_Movie[] = "nxx"; +char constexpr DBCfmt_NamesProfanity[] = "dsi"; +char constexpr DBCfmt_NamesReserved[] = "dsi"; +char constexpr DBCfmt_OverrideSpellData[] = "niiiiiiiiiix"; +char constexpr DBCfmt_QuestFactionReward[] = "niiiiiiiiii"; +char constexpr DBCfmt_QuestSort[] = "nxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_QuestXP[] = "niiiiiiiiii"; +char constexpr DBCfmt_PowerDisplay[] = "nixxxx"; +char constexpr DBCfmt_PvPDifficulty[] = "diiiii"; +char constexpr DBCfmt_RandomPropertiesPoints[] = "niiiiiiiiiiiiiii"; +char constexpr DBCfmt_ScalingStatDistribution[] = "niiiiiiiiiiiiiiiiiiiii"; +char constexpr DBCfmt_ScalingStatValues[] = "iniiiiiiiiiiiiiiiiiiiiii"; +char constexpr DBCfmt_SkillLine[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxi"; +char constexpr DBCfmt_SkillLineAbility[] = "niiiixxiiiiixx"; +char constexpr DBCfmt_SkillRaceClassInfo[] = "diiiixix"; +char constexpr DBCfmt_SkillTiers[] = "nxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiii"; +char constexpr DBCfmt_SoundEntries[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_SpellCastTimes[] = "nixx"; +char constexpr DBCfmt_SpellCategory[] = "ni"; +char constexpr DBCfmt_SpellDifficulty[] = "niiii"; +char constexpr DBCfmt_SpellDifficulty_DBFormat[] = "ppppp"; +char constexpr DBCfmt_SpellDifficulty_DBIndex[] = "id"; +char constexpr DBCfmt_SpellDuration[] = "niii"; +char constexpr DBCfmt_Spell[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiiissssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixxfffxx"; +char constexpr DBCfmt_Spell_DBFormat[] = "papppppppppppapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaappppppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa"; +char constexpr DBCfmt_Spell_DBIndex[] = "Id"; +char constexpr DBCfmt_SpellFocusObject[] = "nxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_SpellItemEnchantment[] = "nxiiiiiixxxiiissssssssssssssssxiiiiiii"; +char constexpr DBCfmt_SpellItemEnchantmentCondition[] = "nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX"; +char constexpr DBCfmt_SpellRadius[] = "nfff"; +char constexpr DBCfmt_SpellRange[] = "nffffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_SpellRuneCost[] = "niiii"; +char constexpr DBCfmt_SpellShapeshift[] = "nxxxxxxxxxxxxxxxxxxiixiiixxiiiiiiii"; +char constexpr DBCfmt_StableSlotPrices[] = "ni"; +char constexpr DBCfmt_SummonProperties[] = "niiiii"; +char constexpr DBCfmt_Talent[] = "niiiiiiiixxxxixxixxxxxx"; +char constexpr DBCfmt_TalentTab[] = "nxxxxxxxxxxxxxxxxxxxiiix"; +char constexpr DBCfmt_TaxiNodes[] = "nifffssssssssssssssssxii"; +char constexpr DBCfmt_TaxiPath[] = "niii"; +char constexpr DBCfmt_TaxiPathNode[] = "diiifffiiii"; +char constexpr DBCfmt_TeamContributionPoints[] = "df"; +char constexpr DBCfmt_TotemCategory[] = "nxxxxxxxxxxxxxxxxxii"; +char constexpr DBCfmt_TransportAnimation[] = "diifffx"; +char constexpr DBCfmt_TransportRotation[] = "diiffff"; +char constexpr DBCfmt_Vehicle[] = "niffffiiiiiiiifffffffffffffffssssfifiixx"; +char constexpr DBCfmt_VehicleSeat[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxx"; +char constexpr DBCfmt_WMOAreaTable[] = "niiixxxxxiixxxxxxxxxxxxxxxxx"; +char constexpr DBCfmt_WorldMapArea[] = "xinxffffixx"; +char constexpr DBCfmt_WorldMapOverlay[] = "nxiiiixxxxxxxxxxx"; +char constexpr DBCfmt_WorldSafeLocs[] = "nifffxxxxxxxxxxxxxxxxx"; #endif