TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DB2Stores.cpp File Reference
#include "DB2Stores.h"
#include "Common.h"
#include "Containers.h"
#include "DBCStores.h"
#include "DB2fmt.h"
#include "Log.h"
#include "TransportMgr.h"
#include "World.h"
+ Include dependency graph for DB2Stores.cpp:

Macros

#define LOAD_DB2(store)   LoadDB2(availableDb2Locales, bad_db2_files, _stores, &store, db2Path, defaultLocale)
 

Typedefs

typedef std::list< std::string > DB2StoreProblemList
 

Functions

template<class T >
void LoadDB2 (uint32 &availableDb2Locales, DB2StoreProblemList &errlist, DB2Manager::StorageMap &stores, DB2Storage< T > *storage, std::string const &db2Path, uint32 defaultLocale)
 

Variables

DB2Storage< AchievementEntrysAchievementStore ("Achievement.db2", AchievementFormat, HOTFIX_SEL_ACHIEVEMENT)
 
DB2Storage< AreaGroupMemberEntrysAreaGroupMemberStore ("AreaGroupMember.db2", AreaGroupMemberFormat, HOTFIX_SEL_AREA_GROUP_MEMBER)
 
DB2Storage< AuctionHouseEntrysAuctionHouseStore ("AuctionHouse.db2", AuctionHouseFormat, HOTFIX_SEL_AUCTION_HOUSE)
 
DB2Storage< BarberShopStyleEntrysBarberShopStyleStore ("BarberShopStyle.db2", BarberShopStyleFormat, HOTFIX_SEL_BARBER_SHOP_STYLE)
 
DB2Storage
< BattlePetBreedQualityEntry
sBattlePetBreedQualityStore ("BattlePetBreedQuality.db2", BattlePetBreedQualityFormat, HOTFIX_SEL_BATTLE_PET_BREED_QUALITY)
 
DB2Storage
< BattlePetBreedStateEntry
sBattlePetBreedStateStore ("BattlePetBreedState.db2", BattlePetBreedStateFormat, HOTFIX_SEL_BATTLE_PET_BREED_STATE)
 
DB2Storage< BattlePetSpeciesEntrysBattlePetSpeciesStore ("BattlePetSpecies.db2", BattlePetSpeciesFormat, HOTFIX_SEL_BATTLE_PET_SPECIES)
 
DB2Storage
< BattlePetSpeciesStateEntry
sBattlePetSpeciesStateStore ("BattlePetSpeciesState.db2", BattlePetSpeciesStateFormat, HOTFIX_SEL_BATTLE_PET_SPECIES_STATE)
 
DB2Storage< BroadcastTextEntrysBroadcastTextStore ("BroadcastText.db2", BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT)
 
DB2Storage< CharStartOutfitEntrysCharStartOutfitStore ("CharStartOutfit.db2", CharStartOutfitFormat, HOTFIX_SEL_CHAR_START_OUTFIT)
 
DB2Storage
< ChrClassesXPowerTypesEntry
sChrClassesXPowerTypesStore ("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesFormat, HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES)
 
DB2Storage
< CinematicSequencesEntry
sCinematicSequencesStore ("CinematicSequences.db2", CinematicSequencesFormat, HOTFIX_SEL_CINEMATIC_SEQUENCES)
 
DB2Storage
< CreatureDisplayInfoEntry
sCreatureDisplayInfoStore ("CreatureDisplayInfo.db2", CreatureDisplayInfoFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO)
 
DB2Storage< CreatureTypeEntrysCreatureTypeStore ("CreatureType.db2", CreatureTypeFormat, HOTFIX_SEL_CREATURE_TYPE)
 
DB2Storage< CriteriaEntrysCriteriaStore ("Criteria.db2", CriteriaFormat, HOTFIX_SEL_CRITERIA)
 
DB2Storage< CriteriaTreeEntrysCriteriaTreeStore ("CriteriaTree.db2", CriteriaTreeFormat, HOTFIX_SEL_CRITERIA_TREE)
 
DB2Storage< CurrencyTypesEntrysCurrencyTypesStore ("CurrencyTypes.db2", CurrencyTypesFormat, HOTFIX_SEL_CURRENCY_TYPES)
 
DB2Storage< CurvePointEntrysCurvePointStore ("CurvePoint.db2", CurvePointFormat, HOTFIX_SEL_CURVE_POINT)
 
DB2Storage
< DestructibleModelDataEntry
sDestructibleModelDataStore ("DestructibleModelData.db2", DestructibleModelDataFormat, HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA)
 
DB2Storage
< DurabilityQualityEntry
sDurabilityQualityStore ("DurabilityQuality.db2", DurabilityQualityFormat, HOTFIX_SEL_DURABILITY_QUALITY)
 
DB2Storage< GameObjectsEntrysGameObjectsStore ("GameObjects.db2", GameObjectsFormat, HOTFIX_SEL_GAMEOBJECTS)
 
DB2Storage< GameTablesEntrysGameTablesStore ("GameTables.db2", GameTablesFormat, HOTFIX_SEL_GAME_TABLES)
 
DB2Storage< GarrAbilityEntrysGarrAbilityStore ("GarrAbility.db2", GarrAbilityFormat, HOTFIX_SEL_GARR_ABILITY)
 
DB2Storage< GarrBuildingEntrysGarrBuildingStore ("GarrBuilding.db2", GarrBuildingFormat, HOTFIX_SEL_GARR_BUILDING)
 
DB2Storage
< GarrBuildingPlotInstEntry
sGarrBuildingPlotInstStore ("GarrBuildingPlotInst.db2", GarrBuildingPlotInstFormat, HOTFIX_SEL_GARR_BUILDING_PLOT_INST)
 
DB2Storage< GarrClassSpecEntrysGarrClassSpecStore ("GarrClassSpec.db2", GarrClassSpecFormat, HOTFIX_SEL_GARR_CLASS_SPEC)
 
DB2Storage< GarrFollowerEntrysGarrFollowerStore ("GarrFollower.db2", GarrFollowerFormat, HOTFIX_SEL_GARR_FOLLOWER)
 
DB2Storage
< GarrFollowerXAbilityEntry
sGarrFollowerXAbilityStore ("GarrFollowerXAbility.db2", GarrFollowerXAbilityFormat, HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY)
 
DB2Storage< GarrPlotBuildingEntrysGarrPlotBuildingStore ("GarrPlotBuilding.db2", GarrPlotBuildingFormat, HOTFIX_SEL_GARR_PLOT_BUILDING)
 
DB2Storage< GarrPlotEntrysGarrPlotStore ("GarrPlot.db2", GarrPlotFormat, HOTFIX_SEL_GARR_PLOT)
 
DB2Storage< GarrPlotInstanceEntrysGarrPlotInstanceStore ("GarrPlotInstance.db2", GarrPlotInstanceFormat, HOTFIX_SEL_GARR_PLOT_INSTANCE)
 
DB2Storage< GarrSiteLevelEntrysGarrSiteLevelStore ("GarrSiteLevel.db2", GarrSiteLevelFormat, HOTFIX_SEL_GARR_SITE_LEVEL)
 
DB2Storage
< GarrSiteLevelPlotInstEntry
sGarrSiteLevelPlotInstStore ("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstFormat, HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST)
 
DB2Storage< GlyphSlotEntrysGlyphSlotStore ("GlyphSlot.db2", GlyphSlotFormat, HOTFIX_SEL_GLYPH_SLOT)
 
DB2Storage< GuildPerkSpellsEntrysGuildPerkSpellsStore ("GuildPerkSpells.db2", GuildPerkSpellsFormat, HOTFIX_SEL_GUILD_PERK_SPELLS)
 
DB2Storage< HeirloomEntrysHeirloomStore ("Heirloom.db2", HeirloomFormat, HOTFIX_SEL_HEIRLOOM)
 
DB2Storage< HolidaysEntrysHolidaysStore ("Holidays.db2", HolidaysEntryFormat, HOTFIX_SEL_HOLIDAYS)
 
DB2Storage< ImportPriceArmorEntrysImportPriceArmorStore ("ImportPriceArmor.db2", ImportPriceArmorFormat, HOTFIX_SEL_IMPORT_PRICE_ARMOR)
 
DB2Storage
< ImportPriceQualityEntry
sImportPriceQualityStore ("ImportPriceQuality.db2", ImportPriceQualityFormat, HOTFIX_SEL_IMPORT_PRICE_QUALITY)
 
DB2Storage
< ImportPriceShieldEntry
sImportPriceShieldStore ("ImportPriceShield.db2", ImportPriceShieldFormat, HOTFIX_SEL_IMPORT_PRICE_SHIELD)
 
DB2Storage
< ImportPriceWeaponEntry
sImportPriceWeaponStore ("ImportPriceWeapon.db2", ImportPriceWeaponFormat, HOTFIX_SEL_IMPORT_PRICE_WEAPON)
 
DB2Storage< ItemAppearanceEntrysItemAppearanceStore ("ItemAppearance.db2", ItemAppearanceFormat, HOTFIX_SEL_ITEM_APPEARANCE)
 
DB2Storage< ItemBonusEntrysItemBonusStore ("ItemBonus.db2", ItemBonusFormat, HOTFIX_SEL_ITEM_BONUS)
 
DB2Storage
< ItemBonusTreeNodeEntry
sItemBonusTreeNodeStore ("ItemBonusTreeNode.db2", ItemBonusTreeNodeFormat, HOTFIX_SEL_ITEM_BONUS_TREE_NODE)
 
DB2Storage< ItemClassEntrysItemClassStore ("ItemClass.db2", ItemClassFormat, HOTFIX_SEL_ITEM_CLASS)
 
DB2Storage< ItemCurrencyCostEntrysItemCurrencyCostStore ("ItemCurrencyCost.db2", ItemCurrencyCostFormat, HOTFIX_SEL_ITEM_CURRENCY_COST)
 
DB2Storage
< ItemDisenchantLootEntry
sItemDisenchantLootStore ("ItemDisenchantLoot.db2", ItemDisenchantLootFormat, HOTFIX_SEL_ITEM_DISENCHANT_LOOT)
 
DB2Storage< ItemEffectEntrysItemEffectStore ("ItemEffect.db2", ItemEffectFormat, HOTFIX_SEL_ITEM_EFFECT)
 
DB2Storage< ItemEntrysItemStore ("Item.db2", ItemFormat, HOTFIX_SEL_ITEM)
 
DB2Storage< ItemExtendedCostEntrysItemExtendedCostStore ("ItemExtendedCost.db2", ItemExtendedCostFormat, HOTFIX_SEL_ITEM_EXTENDED_COST)
 
DB2Storage
< ItemLimitCategoryEntry
sItemLimitCategoryStore ("ItemLimitCategory.db2", ItemLimitCategoryFormat, HOTFIX_SEL_ITEM_LIMIT_CATEGORY)
 
DB2Storage
< ItemModifiedAppearanceEntry
sItemModifiedAppearanceStore ("ItemModifiedAppearance.db2", ItemModifiedAppearanceFormat, HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE)
 
DB2Storage< ItemPriceBaseEntrysItemPriceBaseStore ("ItemPriceBase.db2", ItemPriceBaseFormat, HOTFIX_SEL_ITEM_PRICE_BASE)
 
DB2Storage
< ItemRandomPropertiesEntry
sItemRandomPropertiesStore ("ItemRandomProperties.db2", ItemRandomPropertiesFormat, HOTFIX_SEL_ITEM_RANDOM_PROPERTIES)
 
DB2Storage< ItemRandomSuffixEntrysItemRandomSuffixStore ("ItemRandomSuffix.db2", ItemRandomSuffixFormat, HOTFIX_SEL_ITEM_RANDOM_SUFFIX)
 
DB2Storage< ItemSparseEntrysItemSparseStore ("Item-sparse.db2", ItemSparseFormat, HOTFIX_SEL_ITEM_SPARSE)
 
DB2Storage< ItemSpecEntrysItemSpecStore ("ItemSpec.db2", ItemSpecFormat, HOTFIX_SEL_ITEM_SPEC)
 
DB2Storage< ItemSpecOverrideEntrysItemSpecOverrideStore ("ItemSpecOverride.db2", ItemSpecOverrideFormat, HOTFIX_SEL_ITEM_SPEC_OVERRIDE)
 
DB2Storage
< ItemToBattlePetSpeciesEntry
sItemToBattlePetSpeciesStore ("ItemToBattlePetSpecies.db2", ItemToBattlePetSpeciesFormat, HOTFIX_SEL_ITEM_TO_BATTLE_PET_SPECIES)
 
DB2Storage< ItemXBonusTreeEntrysItemXBonusTreeStore ("ItemXBonusTree.db2", ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE)
 
DB2Storage< KeyChainEntrysKeyChainStore ("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN)
 
DB2Storage< MailTemplateEntrysMailTemplateStore ("MailTemplate.db2", MailTemplateFormat, HOTFIX_SEL_MAIL_TEMPLATE)
 
DB2Storage< ModifierTreeEntrysModifierTreeStore ("ModifierTree.db2", ModifierTreeFormat, HOTFIX_SEL_MODIFIER_TREE)
 
DB2Storage< MountCapabilityEntrysMountCapabilityStore ("MountCapability.db2", MountCapabilityFormat, HOTFIX_SEL_MOUNT_CAPABILITY)
 
DB2Storage< MountEntrysMountStore ("Mount.db2", MountFormat, HOTFIX_SEL_MOUNT)
 
DB2Storage
< MountTypeXCapabilityEntry
sMountTypeXCapabilityStore ("MountTypeXCapability.db2", MountTypeXCapabilityFormat, HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY)
 
DB2Storage< NameGenEntrysNameGenStore ("NameGen.db2", NameGenFormat, HOTFIX_SEL_NAME_GEN)
 
DB2Storage< NamesProfanityEntrysNamesProfanityStore ("NamesProfanity.db2", NamesProfanityFormat, HOTFIX_SEL_NAMES_PROFANITY)
 
DB2Storage< NamesReservedEntrysNamesReservedStore ("NamesReserved.db2", NamesReservedFormat, HOTFIX_SEL_NAMES_RESERVED)
 
DB2Storage
< NamesReservedLocaleEntry
sNamesReservedLocaleStore ("NamesReservedLocale.db2", NamesReservedLocaleFormat, HOTFIX_SEL_NAMES_RESERVED_LOCALE)
 
DB2Storage
< OverrideSpellDataEntry
sOverrideSpellDataStore ("OverrideSpellData.db2", OverrideSpellDataFormat, HOTFIX_SEL_OVERRIDE_SPELL_DATA)
 
DB2Storage< PhaseXPhaseGroupEntrysPhaseXPhaseGroupStore ("PhaseXPhaseGroup.db2", PhaseXPhaseGroupFormat, HOTFIX_SEL_PHASE_X_PHASE_GROUP)
 
DB2Storage< PlayerConditionEntrysPlayerConditionStore ("PlayerCondition.db2", PlayerConditionFormat, HOTFIX_SEL_PLAYER_CONDITION)
 
DB2Storage< QuestMoneyRewardEntrysQuestMoneyRewardStore ("QuestMoneyReward.db2", QuestMoneyRewardFormat, HOTFIX_SEL_QUEST_MONEY_REWARD)
 
DB2Storage< QuestPackageItemEntrysQuestPackageItemStore ("QuestPackageItem.db2", QuestPackageItemfmt, HOTFIX_SEL_QUEST_PACKAGE_ITEM)
 
DB2Storage< QuestSortEntrysQuestSortStore ("QuestSort.db2", QuestSortFormat, HOTFIX_SEL_QUEST_SORT)
 
DB2Storage< QuestV2EntrysQuestV2Store ("QuestV2.db2", QuestV2Format, HOTFIX_SEL_QUEST_V2)
 
DB2Storage< QuestXPEntrysQuestXPStore ("QuestXP.db2", QuestXPFormat, HOTFIX_SEL_QUEST_XP)
 
DB2Storage
< ScalingStatDistributionEntry
sScalingStatDistributionStore ("ScalingStatDistribution.db2", ScalingStatDistributionFormat, HOTFIX_SEL_SCALING_STAT_DISTRIBUTION)
 
DB2Storage< SoundEntriesEntrysSoundEntriesStore ("SoundEntries.db2", SoundEntriesFormat, HOTFIX_SEL_SOUND_ENTRIES)
 
DB2Storage
< SpecializationSpellsEntry
sSpecializationSpellsStore ("SpecializationSpells.db2", SpecializationSpellsFormat, HOTFIX_SEL_SPECIALIZATION_SPELLS)
 
DB2Storage
< SpellAuraRestrictionsEntry
sSpellAuraRestrictionsStore ("SpellAuraRestrictions.db2", SpellAuraRestrictionsFormat, HOTFIX_SEL_SPELL_AURA_RESTRICTIONS)
 
DB2Storage< SpellCastTimesEntrysSpellCastTimesStore ("SpellCastTimes.db2", SpellCastTimesFormat, HOTFIX_SEL_SPELL_CAST_TIMES)
 
DB2Storage
< SpellCastingRequirementsEntry
sSpellCastingRequirementsStore ("SpellCastingRequirements.db2", SpellCastingRequirementsFormat, HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS)
 
DB2Storage
< SpellClassOptionsEntry
sSpellClassOptionsStore ("SpellClassOptions.db2", SpellClassOptionsFormat, HOTFIX_SEL_SPELL_CLASS_OPTIONS)
 
DB2Storage< SpellDurationEntrysSpellDurationStore ("SpellDuration.db2", SpellDurationFormat, HOTFIX_SEL_SPELL_DURATION)
 
DB2Storage
< SpellItemEnchantmentConditionEntry
sSpellItemEnchantmentConditionStore ("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionFormat, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION)
 
DB2Storage< SpellLearnSpellEntrysSpellLearnSpellStore ("SpellLearnSpell.db2", SpellLearnSpellFormat, HOTFIX_SEL_SPELL_LEARN_SPELL)
 
DB2Storage< SpellMiscEntrysSpellMiscStore ("SpellMisc.db2", SpellMiscFormat, HOTFIX_SEL_SPELL_MISC)
 
DB2Storage
< SpellPowerDifficultyEntry
sSpellPowerDifficultyStore ("SpellPowerDifficulty.db2", SpellPowerDifficultyFormat, HOTFIX_SEL_SPELL_POWER_DIFFICULTY)
 
DB2Storage< SpellPowerEntrysSpellPowerStore ("SpellPower.db2", SpellPowerFormat, HOTFIX_SEL_SPELL_POWER)
 
DB2Storage< SpellRadiusEntrysSpellRadiusStore ("SpellRadius.db2", SpellRadiusFormat, HOTFIX_SEL_SPELL_RADIUS)
 
DB2Storage< SpellRangeEntrysSpellRangeStore ("SpellRange.db2", SpellRangeFormat, HOTFIX_SEL_SPELL_RANGE)
 
DB2Storage< SpellReagentsEntrysSpellReagentsStore ("SpellReagents.db2", SpellReagentsFormat, HOTFIX_SEL_SPELL_REAGENTS)
 
DB2Storage< SpellRuneCostEntrysSpellRuneCostStore ("SpellRuneCost.db2", SpellRuneCostFormat, HOTFIX_SEL_SPELL_RUNE_COST)
 
DB2Storage< SpellTotemsEntrysSpellTotemsStore ("SpellTotems.db2", SpellTotemsFormat, HOTFIX_SEL_SPELL_TOTEMS)
 
DB2Storage
< SpellXSpellVisualEntry
sSpellXSpellVisualStore ("SpellXSpellVisual.db2", SpellXSpellVisualFormat, HOTFIX_SEL_SPELL_X_SPELL_VISUAL)
 
DB2Storage< TaxiNodesEntrysTaxiNodesStore ("TaxiNodes.db2", TaxiNodesFormat, HOTFIX_SEL_TAXI_NODES)
 
DB2Storage< TaxiPathEntrysTaxiPathStore ("TaxiPath.db2", TaxiPathFormat, HOTFIX_SEL_TAXI_PATH)
 
DB2Storage< TaxiPathNodeEntrysTaxiPathNodeStore ("TaxiPathNode.db2", TaxiPathNodeFormat, HOTFIX_SEL_TAXI_PATH_NODE)
 
DB2Storage< TotemCategoryEntrysTotemCategoryStore ("TotemCategory.db2", TotemCategoryFormat, HOTFIX_SEL_TOTEM_CATEGORY)
 
DB2Storage< ToyEntrysToyStore ("Toy.db2", ToyFormat, HOTFIX_SEL_TOY)
 
DB2Storage
< TransportAnimationEntry
sTransportAnimationStore ("TransportAnimation.db2", TransportAnimationFormat, HOTFIX_SEL_TRANSPORT_ANIMATION)
 
DB2Storage
< TransportRotationEntry
sTransportRotationStore ("TransportRotation.db2", TransportRotationFormat, HOTFIX_SEL_TRANSPORT_ROTATION)
 
DB2Storage< UnitPowerBarEntrysUnitPowerBarStore ("UnitPowerBar.db2", UnitPowerBarFormat, HOTFIX_SEL_UNIT_POWER_BAR)
 
DB2Storage< WorldMapOverlayEntrysWorldMapOverlayStore ("WorldMapOverlay.db2", WorldMapOverlayFormat, HOTFIX_SEL_WORLD_MAP_OVERLAY)
 
TaxiMask sTaxiNodesMask
 
TaxiMask sOldContinentsNodesMask
 
TaxiMask sHordeTaxiNodesMask
 
TaxiMask sAllianceTaxiNodesMask
 
TaxiPathSetBySource sTaxiPathSetBySource
 
TaxiPathNodesByPath sTaxiPathNodesByPath
 
uint32 DB2FilesCount = 0
 

Macro Definition Documentation

#define LOAD_DB2 (   store)    LoadDB2(availableDb2Locales, bad_db2_files, _stores, &store, db2Path, defaultLocale)

Typedef Documentation

typedef std::list<std::string> DB2StoreProblemList

Function Documentation

template<class T >
void LoadDB2 ( uint32 availableDb2Locales,
DB2StoreProblemList errlist,
DB2Manager::StorageMap stores,
DB2Storage< T > *  storage,
std::string const db2Path,
uint32  defaultLocale 
)
inline
147 {
148  // compatibility format and C++ structure sizes
149  ASSERT(DB2FileLoader::GetFormatRecordSize(storage->GetFormat()) == sizeof(T),
150  "Size of '%s' set by format string (%u) not equal size of C++ structure (" SZFMTD ").",
151  storage->GetFileName().c_str(), DB2FileLoader::GetFormatRecordSize(storage->GetFormat()), sizeof(T));
152 
153  ++DB2FilesCount;
154 
155  if (storage->Load(db2Path + localeNames[defaultLocale] + '/', defaultLocale))
156  {
157  storage->LoadFromDB();
158 
159  for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
160  {
161  if (defaultLocale == i || i == LOCALE_none)
162  continue;
163 
164  if (availableDb2Locales & (1 << i))
165  if (!storage->LoadStringsFrom((db2Path + localeNames[i] + '/'), i))
166  availableDb2Locales &= ~(1 << i); // mark as not available for speedup next checks
167 
168  storage->LoadStringsFromDB(i);
169  }
170  }
171  else
172  {
173  // sort problematic db2 to (1) non compatible and (2) nonexistent
174  if (FILE* f = fopen((db2Path + storage->GetFileName()).c_str(), "rb"))
175  {
176  std::ostringstream stream;
177  stream << storage->GetFileName() << " exists, and has " << storage->GetFieldCount() << " field(s) (expected " << strlen(storage->GetFormat())
178  << "). Extracted file might be from wrong client version.";
179  std::string buf = stream.str();
180  errlist.push_back(buf);
181  fclose(f);
182  }
183  else
184  errlist.push_back(storage->GetFileName());
185  }
186 
187  stores[storage->GetHash()] = storage;
188 }
uint32 DB2FilesCount
Definition: DB2Stores.cpp:143
Definition: Common.h:126
#define SZFMTD
Definition: Define.h:143
uint32 GetFieldCount() const
Definition: DB2Store.h:133
std::string const & GetFileName() const
Definition: DB2Store.h:130
bool Load(std::string const &path, uint32 locale)
Definition: DB2Store.h:134
uint32_t uint32
Definition: Define.h:150
uint32 GetHash() const
Definition: DB2Store.h:32
char const * GetFormat() const
Definition: DB2Store.h:132
bool LoadStringsFrom(std::string const &path, uint32 locale)
Definition: DB2Store.h:161
TC_COMMON_API char const * localeNames[TOTAL_LOCALES]
Definition: Common.cpp:21
void LoadStringsFromDB(uint32 locale)
Definition: DB2Store.h:189
void LoadFromDB()
Definition: DB2Store.h:179
#define ASSERT
Definition: Errors.h:55
static uint32 GetFormatRecordSize(const char *format, int32 *index_pos=NULL)
Definition: DB2StorageLoader.cpp:207
Definition: Common.h:130

+ Here is the call graph for this function:

Variable Documentation

uint32 DB2FilesCount = 0
DB2Storage<AchievementEntry> sAchievementStore("Achievement.db2", AchievementFormat, HOTFIX_SEL_ACHIEVEMENT)
TaxiMask sAllianceTaxiNodesMask
DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberFormat, HOTFIX_SEL_AREA_GROUP_MEMBER)
DB2Storage<AuctionHouseEntry> sAuctionHouseStore("AuctionHouse.db2", AuctionHouseFormat, HOTFIX_SEL_AUCTION_HOUSE)
DB2Storage<BarberShopStyleEntry> sBarberShopStyleStore("BarberShopStyle.db2", BarberShopStyleFormat, HOTFIX_SEL_BARBER_SHOP_STYLE)
DB2Storage<BattlePetBreedQualityEntry> sBattlePetBreedQualityStore("BattlePetBreedQuality.db2", BattlePetBreedQualityFormat, HOTFIX_SEL_BATTLE_PET_BREED_QUALITY)
DB2Storage<BattlePetBreedStateEntry> sBattlePetBreedStateStore("BattlePetBreedState.db2", BattlePetBreedStateFormat, HOTFIX_SEL_BATTLE_PET_BREED_STATE)
DB2Storage<BattlePetSpeciesStateEntry> sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", BattlePetSpeciesStateFormat, HOTFIX_SEL_BATTLE_PET_SPECIES_STATE)
DB2Storage<BattlePetSpeciesEntry> sBattlePetSpeciesStore("BattlePetSpecies.db2", BattlePetSpeciesFormat, HOTFIX_SEL_BATTLE_PET_SPECIES)
DB2Storage<BroadcastTextEntry> sBroadcastTextStore("BroadcastText.db2", BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT)
DB2Storage<CharStartOutfitEntry> sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitFormat, HOTFIX_SEL_CHAR_START_OUTFIT)
DB2Storage<ChrClassesXPowerTypesEntry> sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesFormat, HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES)
DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesFormat, HOTFIX_SEL_CINEMATIC_SEQUENCES)
DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO)
DB2Storage<CreatureTypeEntry> sCreatureTypeStore("CreatureType.db2", CreatureTypeFormat, HOTFIX_SEL_CREATURE_TYPE)
DB2Storage<CriteriaEntry> sCriteriaStore("Criteria.db2", CriteriaFormat, HOTFIX_SEL_CRITERIA)
DB2Storage<CriteriaTreeEntry> sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeFormat, HOTFIX_SEL_CRITERIA_TREE)
DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesFormat, HOTFIX_SEL_CURRENCY_TYPES)
DB2Storage<CurvePointEntry> sCurvePointStore("CurvePoint.db2", CurvePointFormat, HOTFIX_SEL_CURVE_POINT)
DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataFormat, HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA)
DB2Storage<DurabilityQualityEntry> sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityFormat, HOTFIX_SEL_DURABILITY_QUALITY)
DB2Storage<GameObjectsEntry> sGameObjectsStore("GameObjects.db2", GameObjectsFormat, HOTFIX_SEL_GAMEOBJECTS)
DB2Storage<GameTablesEntry> sGameTablesStore("GameTables.db2", GameTablesFormat, HOTFIX_SEL_GAME_TABLES)
DB2Storage<GarrAbilityEntry> sGarrAbilityStore("GarrAbility.db2", GarrAbilityFormat, HOTFIX_SEL_GARR_ABILITY)
DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstFormat, HOTFIX_SEL_GARR_BUILDING_PLOT_INST)
DB2Storage<GarrBuildingEntry> sGarrBuildingStore("GarrBuilding.db2", GarrBuildingFormat, HOTFIX_SEL_GARR_BUILDING)
DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore("GarrClassSpec.db2", GarrClassSpecFormat, HOTFIX_SEL_GARR_CLASS_SPEC)
DB2Storage<GarrFollowerEntry> sGarrFollowerStore("GarrFollower.db2", GarrFollowerFormat, HOTFIX_SEL_GARR_FOLLOWER)
DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", GarrFollowerXAbilityFormat, HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY)
DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore("GarrPlotBuilding.db2", GarrPlotBuildingFormat, HOTFIX_SEL_GARR_PLOT_BUILDING)
DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceFormat, HOTFIX_SEL_GARR_PLOT_INSTANCE)
DB2Storage<GarrPlotEntry> sGarrPlotStore("GarrPlot.db2", GarrPlotFormat, HOTFIX_SEL_GARR_PLOT)
DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstFormat, HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST)
DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelFormat, HOTFIX_SEL_GARR_SITE_LEVEL)
DB2Storage<GlyphSlotEntry> sGlyphSlotStore("GlyphSlot.db2", GlyphSlotFormat, HOTFIX_SEL_GLYPH_SLOT)
DB2Storage<GuildPerkSpellsEntry> sGuildPerkSpellsStore("GuildPerkSpells.db2", GuildPerkSpellsFormat, HOTFIX_SEL_GUILD_PERK_SPELLS)
DB2Storage<HeirloomEntry> sHeirloomStore("Heirloom.db2", HeirloomFormat, HOTFIX_SEL_HEIRLOOM)
DB2Storage<HolidaysEntry> sHolidaysStore("Holidays.db2", HolidaysEntryFormat, HOTFIX_SEL_HOLIDAYS)
TaxiMask sHordeTaxiNodesMask
DB2Storage<ImportPriceArmorEntry> sImportPriceArmorStore("ImportPriceArmor.db2", ImportPriceArmorFormat, HOTFIX_SEL_IMPORT_PRICE_ARMOR)
DB2Storage<ImportPriceQualityEntry> sImportPriceQualityStore("ImportPriceQuality.db2", ImportPriceQualityFormat, HOTFIX_SEL_IMPORT_PRICE_QUALITY)
DB2Storage<ImportPriceShieldEntry> sImportPriceShieldStore("ImportPriceShield.db2", ImportPriceShieldFormat, HOTFIX_SEL_IMPORT_PRICE_SHIELD)
DB2Storage<ImportPriceWeaponEntry> sImportPriceWeaponStore("ImportPriceWeapon.db2", ImportPriceWeaponFormat, HOTFIX_SEL_IMPORT_PRICE_WEAPON)
DB2Storage<ItemAppearanceEntry> sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceFormat, HOTFIX_SEL_ITEM_APPEARANCE)
DB2Storage<ItemBonusEntry> sItemBonusStore("ItemBonus.db2", ItemBonusFormat, HOTFIX_SEL_ITEM_BONUS)
DB2Storage<ItemBonusTreeNodeEntry> sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", ItemBonusTreeNodeFormat, HOTFIX_SEL_ITEM_BONUS_TREE_NODE)
DB2Storage<ItemClassEntry> sItemClassStore("ItemClass.db2", ItemClassFormat, HOTFIX_SEL_ITEM_CLASS)
DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore("ItemCurrencyCost.db2", ItemCurrencyCostFormat, HOTFIX_SEL_ITEM_CURRENCY_COST)
DB2Storage<ItemDisenchantLootEntry> sItemDisenchantLootStore("ItemDisenchantLoot.db2", ItemDisenchantLootFormat, HOTFIX_SEL_ITEM_DISENCHANT_LOOT)
DB2Storage<ItemEffectEntry> sItemEffectStore("ItemEffect.db2", ItemEffectFormat, HOTFIX_SEL_ITEM_EFFECT)
DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore("ItemExtendedCost.db2", ItemExtendedCostFormat, HOTFIX_SEL_ITEM_EXTENDED_COST)
DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore("ItemLimitCategory.db2", ItemLimitCategoryFormat, HOTFIX_SEL_ITEM_LIMIT_CATEGORY)
DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceFormat, HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE)
DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseFormat, HOTFIX_SEL_ITEM_PRICE_BASE)
DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore("ItemRandomProperties.db2", ItemRandomPropertiesFormat, HOTFIX_SEL_ITEM_RANDOM_PROPERTIES)
DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore("ItemRandomSuffix.db2", ItemRandomSuffixFormat, HOTFIX_SEL_ITEM_RANDOM_SUFFIX)
DB2Storage<ItemSparseEntry> sItemSparseStore("Item-sparse.db2", ItemSparseFormat, HOTFIX_SEL_ITEM_SPARSE)
DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideFormat, HOTFIX_SEL_ITEM_SPEC_OVERRIDE)
DB2Storage<ItemSpecEntry> sItemSpecStore("ItemSpec.db2", ItemSpecFormat, HOTFIX_SEL_ITEM_SPEC)
DB2Storage<ItemEntry> sItemStore("Item.db2", ItemFormat, HOTFIX_SEL_ITEM)
DB2Storage<ItemToBattlePetSpeciesEntry> sItemToBattlePetSpeciesStore("ItemToBattlePetSpecies.db2", ItemToBattlePetSpeciesFormat, HOTFIX_SEL_ITEM_TO_BATTLE_PET_SPECIES)
DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE)
DB2Storage<KeyChainEntry> sKeyChainStore("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN)
DB2Storage<MailTemplateEntry> sMailTemplateStore("MailTemplate.db2", MailTemplateFormat, HOTFIX_SEL_MAIL_TEMPLATE)
DB2Storage<ModifierTreeEntry> sModifierTreeStore("ModifierTree.db2", ModifierTreeFormat, HOTFIX_SEL_MODIFIER_TREE)
DB2Storage<MountCapabilityEntry> sMountCapabilityStore("MountCapability.db2", MountCapabilityFormat, HOTFIX_SEL_MOUNT_CAPABILITY)
DB2Storage<MountEntry> sMountStore("Mount.db2", MountFormat, HOTFIX_SEL_MOUNT)
DB2Storage<MountTypeXCapabilityEntry> sMountTypeXCapabilityStore("MountTypeXCapability.db2", MountTypeXCapabilityFormat, HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY)
DB2Storage<NameGenEntry> sNameGenStore("NameGen.db2", NameGenFormat, HOTFIX_SEL_NAME_GEN)
DB2Storage<NamesProfanityEntry> sNamesProfanityStore("NamesProfanity.db2", NamesProfanityFormat, HOTFIX_SEL_NAMES_PROFANITY)
DB2Storage<NamesReservedLocaleEntry> sNamesReservedLocaleStore("NamesReservedLocale.db2", NamesReservedLocaleFormat, HOTFIX_SEL_NAMES_RESERVED_LOCALE)
DB2Storage<NamesReservedEntry> sNamesReservedStore("NamesReserved.db2", NamesReservedFormat, HOTFIX_SEL_NAMES_RESERVED)
TaxiMask sOldContinentsNodesMask
DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataFormat, HOTFIX_SEL_OVERRIDE_SPELL_DATA)
DB2Storage<PhaseXPhaseGroupEntry> sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupFormat, HOTFIX_SEL_PHASE_X_PHASE_GROUP)
DB2Storage<PlayerConditionEntry> sPlayerConditionStore("PlayerCondition.db2", PlayerConditionFormat, HOTFIX_SEL_PLAYER_CONDITION)
DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardFormat, HOTFIX_SEL_QUEST_MONEY_REWARD)
DB2Storage<QuestPackageItemEntry> sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemfmt, HOTFIX_SEL_QUEST_PACKAGE_ITEM)
DB2Storage<QuestSortEntry> sQuestSortStore("QuestSort.db2", QuestSortFormat, HOTFIX_SEL_QUEST_SORT)
DB2Storage<QuestV2Entry> sQuestV2Store("QuestV2.db2", QuestV2Format, HOTFIX_SEL_QUEST_V2)
DB2Storage<QuestXPEntry> sQuestXPStore("QuestXP.db2", QuestXPFormat, HOTFIX_SEL_QUEST_XP)
DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore("ScalingStatDistribution.db2", ScalingStatDistributionFormat, HOTFIX_SEL_SCALING_STAT_DISTRIBUTION)
DB2Storage<SoundEntriesEntry> sSoundEntriesStore("SoundEntries.db2", SoundEntriesFormat, HOTFIX_SEL_SOUND_ENTRIES)
DB2Storage<SpecializationSpellsEntry> sSpecializationSpellsStore("SpecializationSpells.db2", SpecializationSpellsFormat, HOTFIX_SEL_SPECIALIZATION_SPELLS)
DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", SpellAuraRestrictionsFormat, HOTFIX_SEL_SPELL_AURA_RESTRICTIONS)
DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore("SpellCastingRequirements.db2", SpellCastingRequirementsFormat, HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS)
DB2Storage<SpellCastTimesEntry> sSpellCastTimesStore("SpellCastTimes.db2", SpellCastTimesFormat, HOTFIX_SEL_SPELL_CAST_TIMES)
DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore("SpellClassOptions.db2", SpellClassOptionsFormat, HOTFIX_SEL_SPELL_CLASS_OPTIONS)
DB2Storage<SpellDurationEntry> sSpellDurationStore("SpellDuration.db2", SpellDurationFormat, HOTFIX_SEL_SPELL_DURATION)
DB2Storage<SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionFormat, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION)
DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellFormat, HOTFIX_SEL_SPELL_LEARN_SPELL)
DB2Storage<SpellMiscEntry> sSpellMiscStore("SpellMisc.db2", SpellMiscFormat, HOTFIX_SEL_SPELL_MISC)
DB2Storage<SpellPowerDifficultyEntry> sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", SpellPowerDifficultyFormat, HOTFIX_SEL_SPELL_POWER_DIFFICULTY)
DB2Storage<SpellPowerEntry> sSpellPowerStore("SpellPower.db2", SpellPowerFormat, HOTFIX_SEL_SPELL_POWER)
DB2Storage<SpellRadiusEntry> sSpellRadiusStore("SpellRadius.db2", SpellRadiusFormat, HOTFIX_SEL_SPELL_RADIUS)
DB2Storage<SpellRangeEntry> sSpellRangeStore("SpellRange.db2", SpellRangeFormat, HOTFIX_SEL_SPELL_RANGE)
DB2Storage<SpellReagentsEntry> sSpellReagentsStore("SpellReagents.db2", SpellReagentsFormat, HOTFIX_SEL_SPELL_REAGENTS)
DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore("SpellRuneCost.db2", SpellRuneCostFormat, HOTFIX_SEL_SPELL_RUNE_COST)
DB2Storage<SpellTotemsEntry> sSpellTotemsStore("SpellTotems.db2", SpellTotemsFormat, HOTFIX_SEL_SPELL_TOTEMS)
DB2Storage<SpellXSpellVisualEntry> sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualFormat, HOTFIX_SEL_SPELL_X_SPELL_VISUAL)
TaxiMask sTaxiNodesMask
DB2Storage<TaxiNodesEntry> sTaxiNodesStore("TaxiNodes.db2", TaxiNodesFormat, HOTFIX_SEL_TAXI_NODES)
TaxiPathNodesByPath sTaxiPathNodesByPath
DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeFormat, HOTFIX_SEL_TAXI_PATH_NODE)
TaxiPathSetBySource sTaxiPathSetBySource
DB2Storage<TaxiPathEntry> sTaxiPathStore("TaxiPath.db2", TaxiPathFormat, HOTFIX_SEL_TAXI_PATH)
DB2Storage<TotemCategoryEntry> sTotemCategoryStore("TotemCategory.db2", TotemCategoryFormat, HOTFIX_SEL_TOTEM_CATEGORY)
DB2Storage<ToyEntry> sToyStore("Toy.db2", ToyFormat, HOTFIX_SEL_TOY)
DB2Storage<TransportAnimationEntry> sTransportAnimationStore("TransportAnimation.db2", TransportAnimationFormat, HOTFIX_SEL_TRANSPORT_ANIMATION)
DB2Storage<TransportRotationEntry> sTransportRotationStore("TransportRotation.db2", TransportRotationFormat, HOTFIX_SEL_TRANSPORT_ROTATION)
DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarFormat, HOTFIX_SEL_UNIT_POWER_BAR)
DB2Storage<WorldMapOverlayEntry> sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayFormat, HOTFIX_SEL_WORLD_MAP_OVERLAY)