18 #ifndef TRINITY_DB2STORES_H
19 #define TRINITY_DB2STORES_H
24 #include <boost/regex.hpp>
127 #define DEFINE_DB2_SET_COMPARATOR(structure) \
128 struct structure ## Comparator : public std::binary_function<structure const*, structure const*, bool> \
130 bool operator()(structure const* left, structure const* right) const { return Compare(left, right); } \
131 static bool Compare(structure const* left, structure const* right); \
156 typedef std::unordered_map<uint32, std::array<std::vector<NameGenEntry const*>, 2>>
NameGenContainer;
167 void LoadStores(std::string
const& dataPath, uint32 defaultLocale);
170 void LoadHotfixData();
172 time_t GetHotfixDate(uint32 entry, uint32 type)
const;
174 std::vector<uint32> GetAreasForGroup(uint32 areaGroupId)
const;
177 uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId)
const;
179 uint32 GetHeirloomItemLevel(uint32 curveId, uint32 level)
const;
180 HeirloomEntry const* GetHeirloomByItemId(uint32 itemId)
const;
181 ItemBonusList
const* GetItemBonusList(uint32 bonusListId)
const;
182 std::set<uint32> GetItemBonusTree(uint32 itemId, uint32 itemBonusTreeMod)
const;
183 uint32 GetItemDisplayId(uint32 itemId, uint32 appearanceModId)
const;
184 std::vector<ItemSpecOverrideEntry const*>
const* GetItemSpecOverrides(uint32 itemId)
const;
186 MountEntry const* GetMount(uint32 spellId)
const;
187 MountEntry const* GetMountById(uint32
id)
const;
188 MountTypeXCapabilitySet
const* GetMountCapabilities(uint32 mountType)
const;
190 std::vector<QuestPackageItemEntry const*>
const* GetQuestPackageItems(uint32 questPackageID)
const;
191 uint32 GetQuestUniqueBitFlag(uint32 questId);
192 std::set<uint32> GetPhasesForGroup(uint32 group)
const;
193 std::vector<SpecializationSpellsEntry const*>
const* GetSpecializationSpells(uint32 specId)
const;
194 std::vector<SpellPowerEntry const*> GetSpellPowers(uint32 spellId,
Difficulty difficulty =
DIFFICULTY_NONE,
bool* hasDifficultyPowers =
nullptr)
const;
195 bool IsToyItem(uint32 toy)
const;
224 #define sDB2Manager DB2Manager::Instance()
TC_GAME_API DB2Storage< ImportPriceArmorEntry > sImportPriceArmorStore
std::unordered_map< uint32, MountTypeXCapabilitySet > MountCapabilitiesByTypeContainer
Definition: DB2Stores.h:155
TC_GAME_API DB2Storage< ItemSparseEntry > sItemSparseStore
MountCapabilitiesByTypeContainer _mountCapabilitiesByType
Definition: DB2Stores.h:213
Definition: DBCEnums.h:404
TC_GAME_API DB2Storage< ModifierTreeEntry > sModifierTreeStore
HotfixData const * GetHotfixData() const
Definition: DB2Stores.h:171
AreaGroupMemberContainer _areaGroupMembers
Definition: DB2Stores.h:201
TC_GAME_API DB2Storage< ImportPriceShieldEntry > sImportPriceShieldStore
TC_GAME_API DB2Storage< GarrAbilityEntry > sGarrAbilityStore
Difficulty
Definition: DBCEnums.h:402
TC_GAME_API DB2Storage< CurrencyTypesEntry > sCurrencyTypesStore
TC_GAME_API DB2Storage< SoundEntriesEntry > sSoundEntriesStore
TC_GAME_API DB2Storage< SpellXSpellVisualEntry > sSpellXSpellVisualStore
Definition: DB2Stores.h:118
PhaseGroupContainer _phasesByGroup
Definition: DB2Stores.h:216
TC_GAME_API DB2Storage< ItemPriceBaseEntry > sItemPriceBaseStore
TC_GAME_API DB2Storage< PlayerConditionEntry > sPlayerConditionStore
NameGenContainer _nameGenData
Definition: DB2Stores.h:214
MountContainer _mountsBySpellId
Definition: DB2Stores.h:212
TC_GAME_API DB2Storage< GarrBuildingPlotInstEntry > sGarrBuildingPlotInstStore
std::vector< HotfixNotify > HotfixData
Definition: DB2Stores.h:125
std::unordered_map< uint32, std::array< std::vector< NameGenEntry const * >, 2 > > NameGenContainer
Definition: DB2Stores.h:156
uint32 Entry
Definition: DB2Stores.h:122
std::map< uint32, DB2StorageBase * > StorageMap
Definition: DB2Stores.h:141
ItemDisplayIdContainer _itemDisplayIDs
Definition: DB2Stores.h:209
std::vector< TaxiPathNodeList > TaxiPathNodesByPath
Definition: DB2Structure.h:1450
TC_GAME_API DB2Storage< QuestMoneyRewardEntry > sQuestMoneyRewardStore
TC_GAME_API DB2Storage< BattlePetSpeciesStateEntry > sBattlePetSpeciesStateStore
TC_GAME_API DB2Storage< SpellRadiusEntry > sSpellRadiusStore
std::set< GlyphSlotEntry const *, GlyphSlotEntryComparator > GlyphSlotContainer
Definition: DB2Stores.h:144
Definition: DB2Structure.h:127
TC_GAME_API DB2Storage< ItemClassEntry > sItemClassStore
Definition: DB2Stores.h:134
TC_GAME_API DB2Storage< GlyphSlotEntry > sGlyphSlotStore
TC_GAME_API DB2Storage< GarrFollowerXAbilityEntry > sGarrFollowerXAbilityStore
TC_GAME_API DB2Storage< GarrClassSpecEntry > sGarrClassSpecStore
TC_GAME_API DB2Storage< SpellCastingRequirementsEntry > sSpellCastingRequirementsStore
TC_GAME_API DB2Storage< SpellDurationEntry > sSpellDurationStore
TC_GAME_API DB2Storage< GarrSiteLevelPlotInstEntry > sGarrSiteLevelPlotInstStore
std::set< MountTypeXCapabilityEntry const *, MountTypeXCapabilityEntryComparator > MountTypeXCapabilitySet
Definition: DB2Stores.h:154
TC_GAME_API DB2Storage< SpellCastTimesEntry > sSpellCastTimesStore
Definition: DB2Structure.h:586
TC_GAME_API DB2Storage< ItemEntry > sItemStore
TC_GAME_API DB2Storage< ItemDisenchantLootEntry > sItemDisenchantLootStore
TC_GAME_API DB2Storage< GarrPlotBuildingEntry > sGarrPlotBuildingStore
TC_GAME_API DB2Storage< GuildPerkSpellsEntry > sGuildPerkSpellsStore
Definition: DB2Structure.h:112
Definition: DB2Structure.h:345
std::unordered_map< uint32, std::set< uint32 > > PhaseGroupContainer
Definition: DB2Stores.h:158
TC_GAME_API DB2Storage< DestructibleModelDataEntry > sDestructibleModelDataStore
#define DEFINE_DB2_SET_COMPARATOR(structure)
Definition: DB2Stores.h:127
std::vector< ItemBonusEntry const * > ItemBonusList
Definition: DB2Stores.h:147
HeirloomItemsContainer _heirlooms
Definition: DB2Stores.h:205
SpellPowerContainer _spellPowers
Definition: DB2Stores.h:219
uint32 Timestamp
Definition: DB2Stores.h:121
TC_GAME_API DB2Storage< BattlePetSpeciesEntry > sBattlePetSpeciesStore
std::unordered_map< uint32, CharStartOutfitEntry const * > CharStartOutfitContainer
Definition: DB2Stores.h:143
TC_GAME_API DB2Storage< GameObjectsEntry > sGameObjectsStore
TC_GAME_API DB2Storage< SpellRangeEntry > sSpellRangeStore
TC_GAME_API DB2Storage< OverrideSpellDataEntry > sOverrideSpellDataStore
Definition: DB2Structure.h:572
ItemToBonusTreeContainer _itemToBonusTree
Definition: DB2Stores.h:210
Definition: DB2Structure.h:139
TC_GAME_API DB2Storage< CinematicSequencesEntry > sCinematicSequencesStore
TC_GAME_API DB2Storage< CreatureTypeEntry > sCreatureTypeStore
TC_GAME_API TaxiMask sHordeTaxiNodesMask
Definition: DB2Stores.cpp:136
Definition: SharedDefines.h:93
TC_GAME_API DB2Storage< SpellItemEnchantmentConditionEntry > sSpellItemEnchantmentConditionStore
TC_GAME_API DB2Storage< SpellTotemsEntry > sSpellTotemsStore
std::unordered_set< uint32 > ToyItemIdsContainer
Definition: DB2Stores.h:163
TC_GAME_API DB2Storage< GarrPlotEntry > sGarrPlotStore
Interface class for common access.
Definition: DB2Store.h:27
TC_GAME_API DB2Storage< GameTablesEntry > sGameTablesStore
TC_GAME_API DB2Storage< MountCapabilityEntry > sMountCapabilityStore
TC_GAME_API DB2Storage< TaxiPathEntry > sTaxiPathStore
std::map< uint32, TaxiPathSetForSource > TaxiPathSetBySource
Definition: DB2Structure.h:1447
TC_GAME_API DB2Storage< SpellClassOptionsEntry > sSpellClassOptionsStore
TC_GAME_API DB2Storage< HeirloomEntry > sHeirloomStore
SpecializationSpellsContainer _specializationSpellsBySpec
Definition: DB2Stores.h:218
GlyphSlotContainer const & GetGlyphSlots() const
Definition: DB2Stores.h:178
TC_GAME_API DB2Storage< ItemLimitCategoryEntry > sItemLimitCategoryStore
TC_GAME_API DB2Storage< ScalingStatDistributionEntry > sScalingStatDistributionStore
LocaleConstant
Definition: Common.h:115
TC_GAME_API DB2Storage< SpellReagentsEntry > sSpellReagentsStore
StorageMap _stores
Definition: DB2Stores.h:198
CharStartOutfitContainer _charStartOutfits
Definition: DB2Stores.h:202
TC_GAME_API DB2Storage< SpellLearnSpellEntry > sSpellLearnSpellStore
TC_GAME_API TaxiPathNodesByPath sTaxiPathNodesByPath
Definition: DB2Stores.cpp:139
TC_GAME_API DB2Storage< CriteriaEntry > sCriteriaStore
TC_GAME_API DB2Storage< GarrBuildingEntry > sGarrBuildingStore
TC_GAME_API DB2Storage< ImportPriceWeaponEntry > sImportPriceWeaponStore
TC_GAME_API DB2Storage< GarrPlotInstanceEntry > sGarrPlotInstanceStore
std::unordered_map< uint32, std::unordered_map< uint32, std::vector< SpellPowerEntry const * > > > SpellPowerDifficultyContainer
Definition: DB2Stores.h:162
std::unordered_map< uint32, std::vector< SpellPowerEntry const * > > SpellPowerContainer
Definition: DB2Stores.h:161
ResponseCodes
Definition: SharedDefines.h:4422
TC_GAME_API DB2Storage< SpellAuraRestrictionsEntry > sSpellAuraRestrictionsStore
ItemSpecOverridesContainer _itemSpecOverrides
Definition: DB2Stores.h:211
GlyphSlotContainer _glyphSlots
Definition: DB2Stores.h:204
TC_GAME_API DB2Storage< ItemSpecOverrideEntry > sItemSpecOverrideStore
TC_GAME_API DB2Storage< BattlePetBreedStateEntry > sBattlePetBreedStateStore
NameValidationRegexContainer _nameValidators
Definition: DB2Stores.h:215
uint32_t uint32
Definition: Define.h:150
std::unordered_multimap< uint32, uint32 > ItemToBonusTreeContainer
Definition: DB2Stores.h:149
std::unordered_map< uint32, std::vector< uint32 > > AreaGroupMemberContainer
Definition: DB2Stores.h:142
TC_GAME_API DB2Storage< TaxiNodesEntry > sTaxiNodesStore
std::unordered_map< uint32, std::vector< ItemSpecOverrideEntry const * > > ItemSpecOverridesContainer
Definition: DB2Stores.h:152
TC_GAME_API DB2Storage< ItemCurrencyCostEntry > sItemCurrencyCostStore
TC_GAME_API DB2Storage< SpellMiscEntry > sSpellMiscStore
TC_GAME_API DB2Storage< SpellRuneCostEntry > sSpellRuneCostStore
TC_GAME_API DB2Storage< HolidaysEntry > sHolidaysStore
TC_GAME_API DB2Storage< BarberShopStyleEntry > sBarberShopStyleStore
#define MAX_CLASSES
Definition: SharedDefines.h:181
std::array< uint8, TaxiMaskSize > TaxiMask
Definition: DB2Structure.h:1453
TC_GAME_API DB2Storage< AuctionHouseEntry > sAuctionHouseStore
QuestPackageItemContainer _questPackages
Definition: DB2Stores.h:217
TC_GAME_API DB2Storage< ItemEffectEntry > sItemEffectStore
TC_GAME_API TaxiPathSetBySource sTaxiPathSetBySource
Definition: DB2Stores.cpp:138
TC_GAME_API DB2Storage< ItemExtendedCostEntry > sItemExtendedCostStore
TC_GAME_API DB2Storage< QuestSortEntry > sQuestSortStore
ToyItemIdsContainer _toys
Definition: DB2Stores.h:221
TC_GAME_API DB2Storage< MailTemplateEntry > sMailTemplateStore
std::unordered_map< uint32, std::vector< SpecializationSpellsEntry const * > > SpecializationSpellsContainer
Definition: DB2Stores.h:160
TC_GAME_API DB2Storage< BattlePetBreedQualityEntry > sBattlePetBreedQualityStore
Definition: DB2Store.h:45
TC_GAME_API DB2Storage< TotemCategoryEntry > sTotemCategoryStore
std::unordered_map< uint32, HeirloomEntry const * > HeirloomItemsContainer
Definition: DB2Stores.h:146
TC_GAME_API DB2Storage< DurabilityQualityEntry > sDurabilityQualityStore
HeirloomCurvesContainer _heirloomCurvePoints
Definition: DB2Stores.h:206
TC_GAME_API DB2Storage< ImportPriceQualityEntry > sImportPriceQualityStore
ItemBonusTreeContainer _itemBonusTrees
Definition: DB2Stores.h:208
std::unordered_map< uint32, ItemBonusList > ItemBonusListContainer
Definition: DB2Stores.h:148
#define TC_GAME_API
Definition: Define.h:134
uint32 TableHash
Definition: DB2Stores.h:120
TC_GAME_API DB2Storage< CriteriaTreeEntry > sCriteriaTreeStore
uint8_t uint8
Definition: Define.h:152
Definition: SharedDefines.h:265
TC_GAME_API DB2Storage< ItemRandomSuffixEntry > sItemRandomSuffixStore
std::unordered_map< uint32, std::set< ItemBonusTreeNodeEntry const * > > ItemBonusTreeContainer
Definition: DB2Stores.h:151
TC_GAME_API DB2Storage< BroadcastTextEntry > sBroadcastTextStore
Definition: DB2Structure.h:939
TC_GAME_API DB2Storage< QuestXPEntry > sQuestXPStore
TC_GAME_API DB2Storage< GarrSiteLevelEntry > sGarrSiteLevelStore
HotfixData _hotfixData
Definition: DB2Stores.h:199
std::map< uint32, std::map< uint32, CurvePointEntry const *, std::greater< uint32 > > > HeirloomCurvesContainer
Definition: DB2Stores.h:145
TC_GAME_API DB2Storage< UnitPowerBarEntry > sUnitPowerBarStore
TC_GAME_API DB2Storage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore
TC_GAME_API TaxiMask sTaxiNodesMask
Definition: DB2Stores.cpp:134
TC_GAME_API TaxiMask sOldContinentsNodesMask
Definition: DB2Stores.cpp:135
TC_GAME_API DB2Storage< SpellPowerEntry > sSpellPowerStore
TC_GAME_API DB2Storage< WorldMapOverlayEntry > sWorldMapOverlayStore
TC_GAME_API DB2Storage< ItemSpecEntry > sItemSpecStore
std::unordered_map< uint32, std::vector< QuestPackageItemEntry const * > > QuestPackageItemContainer
Definition: DB2Stores.h:159
#define DEFAULT_LOCALE
Definition: Common.h:134
TC_GAME_API DB2Storage< ItemRandomPropertiesEntry > sItemRandomPropertiesStore
Definition: DB2Structure.h:913
TC_GAME_API DB2Storage< CharStartOutfitEntry > sCharStartOutfitStore
std::unordered_map< uint32, uint32 > ItemDisplayIdContainer
Definition: DB2Stores.h:150
SpellPowerDifficultyContainer _spellPowerDifficulties
Definition: DB2Stores.h:220
TC_GAME_API DB2Storage< GarrFollowerEntry > sGarrFollowerStore
std::array< std::vector< boost::regex >, TOTAL_LOCALES+1 > NameValidationRegexContainer
Definition: DB2Stores.h:157
std::unordered_map< uint32, MountEntry const * > MountContainer
Definition: DB2Stores.h:153
TC_GAME_API DB2Storage< ItemToBattlePetSpeciesEntry > sItemToBattlePetSpeciesStore
TC_GAME_API DB2Storage< AchievementEntry > sAchievementStore
TC_GAME_API TaxiMask sAllianceTaxiNodesMask
Definition: DB2Stores.cpp:137
TC_GAME_API DB2Storage< ToyEntry > sToyStore
ItemBonusListContainer _itemBonusLists
Definition: DB2Stores.h:207