PageRenderTime 46ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/src/server/game/DataStores/DataStorage.h

https://github.com/Titan-Project/TrilliumEMU
C Header | 222 lines | 177 code | 19 blank | 26 comment | 0 complexity | 97c1d8749ce4e4484100b7fa41600c0a MD5 | raw file
  1. /*
  2. * Copyright (C) 2005 - 2011 MaNGOS <http://www.getmangos.org/>
  3. *
  4. * Copyright (C) 2008 - 2011 TrinityCore <http://www.trinitycore.org/>
  5. *
  6. * Copyright (C) 2011 TrilliumEMU <http://www.trilliumemu.org/>
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful, but WITHOUT
  14. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  16. * more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #ifndef TRILLIUM_DBCSTORES_H
  22. #define TRILLIUM_DBCSTORES_H
  23. #include "Common.h"
  24. #include "Storages.h"
  25. #include "DataStructure.h"
  26. #include <list>
  27. typedef std::list<uint32> SimpleFactionsList;
  28. SimpleFactionsList const* GetFactionTeamList(uint32 faction);
  29. char const* GetPetName(uint32 petfamily, uint32 dbclang);
  30. uint32 GetTalentSpellCost(uint32 spellId);
  31. TalentSpellPos const* GetTalentSpellPos(uint32 spellId);
  32. SpellEffectEntry const* GetSpellEffectEntry(uint32 spellId, uint32 effect);
  33. int32 GetAreaFlagByAreaID(uint32 area_id); // -1 if not found
  34. MapEntry const* GetMapEntry(uint32 map_id);
  35. AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
  36. AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id);
  37. uint32 GetAreaFlagByMapId(uint32 mapid);
  38. WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid);
  39. uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId);
  40. enum ContentLevels
  41. {
  42. CONTENT_1_60 = 0,
  43. CONTENT_61_70,
  44. CONTENT_71_80,
  45. CONTENT_81_85
  46. };
  47. ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId);
  48. bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId);
  49. void Zone2MapCoordinates(float &x, float &y, uint32 zone);
  50. void Map2ZoneCoordinates(float &x, float &y, uint32 zone);
  51. typedef std::map<uint32/*pair32(map, diff)*/, MapDifficulty> MapDifficultyMap;
  52. MapDifficulty const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty);
  53. MapDifficulty const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty);
  54. uint32 const* /*[MAX_TALENT_TABS]*/ GetTalentTabPages(uint8 cls);
  55. PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level);
  56. PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id);
  57. extern DataStorage <AchievementEntry> sAchievementStore;
  58. extern DataStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
  59. extern DataStorage <AreaTableEntry> sAreaStore;// recommend access using functions
  60. extern DataStorage <AreaGroupEntry> sAreaGroupStore;
  61. extern DataStorage <AreaPOIEntry> sAreaPOIStore;
  62. extern DataStorage <AreaTriggerEntry> sAreaTriggerStore;
  63. extern DataStorage <ArmorLocationEntry> sArmorLocationStore;
  64. extern DataStorage <AuctionHouseEntry> sAuctionHouseStore;
  65. extern DataStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore;
  66. extern DataStorage <BarberShopStyleEntry> sBarberShopStyleStore;
  67. extern DataStorage <BattlemasterListEntry> sBattlemasterListStore;
  68. extern DataStorage <ChatChannelsEntry> sChatChannelsStore;
  69. extern DataStorage <CharStartOutfitEntry> sCharStartOutfitStore;
  70. extern DataStorage <CharTitlesEntry> sCharTitlesStore;
  71. extern DataStorage <ChrClassesEntry> sChrClassesStore;
  72. extern DataStorage <ChrRacesEntry> sChrRacesStore;
  73. extern DataStorage <ChrPowerTypesEntry> sChrPowerTypesStore;
  74. extern DataStorage <CinematicSequencesEntry> sCinematicSequencesStore;
  75. extern DataStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
  76. extern DataStorage <CreatureFamilyEntry> sCreatureFamilyStore;
  77. extern DataStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
  78. extern DataStorage <CreatureTypeEntry> sCreatureTypeStore;
  79. extern DataStorage <CurrencyTypesEntry> sCurrencyTypesStore;
  80. extern DataStorage <DestructibleModelDataEntry> sDestructibleModelDataStore;
  81. extern DataStorage <DungeonEncounterEntry> sDungeonEncounterStore;
  82. extern DataStorage <DurabilityCostsEntry> sDurabilityCostsStore;
  83. extern DataStorage <DurabilityQualityEntry> sDurabilityQualityStore;
  84. extern DataStorage <EmotesEntry> sEmotesStore;
  85. extern DataStorage <EmotesTextEntry> sEmotesTextStore;
  86. extern DataStorage <FactionEntry> sFactionStore;
  87. extern DataStorage <FactionTemplateEntry> sFactionTemplateStore;
  88. extern DataStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore;
  89. extern DataStorage <GemPropertiesEntry> sGemPropertiesStore;
  90. extern DataStorage <GlyphPropertiesEntry> sGlyphPropertiesStore;
  91. extern DataStorage <GlyphSlotEntry> sGlyphSlotStore;
  92. extern DataStorage <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore;
  93. extern DataStorage <GtCombatRatingsEntry> sGtCombatRatingsStore;
  94. extern DataStorage <GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore;
  95. extern DataStorage <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore;
  96. extern DataStorage <GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore;
  97. extern DataStorage <GtChanceToSpellCritEntry> sGtChanceToSpellCritStore;
  98. extern DataStorage <GtOCTClassCombatRatingScalarEntry> sGtOCTClassCombatRatingScalarStore;
  99. extern DataStorage <GtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore;
  100. extern DataStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
  101. extern DataStorage <GtSpellScalingEntry> sGtSpellScalingStore;
  102. extern DataStorage <HolidaysEntry> sHolidaysStore;
  103. extern DataStorage <ItemArmorQualityEntry> sItemArmorQualityStore;
  104. extern DataStorage <ItemArmorShieldEntry> sItemArmorShieldStore;
  105. extern DataStorage <ItemArmorTotalEntry> sItemArmorTotalStore;
  106. extern DataStorage <ItemBagFamilyEntry> sItemBagFamilyStore;
  107. extern DataStorage <ItemDamageEntry> sItemDamageAmmoStore;
  108. extern DataStorage <ItemDamageEntry> sItemDamageOneHandStore;
  109. extern DataStorage <ItemDamageEntry> sItemDamageOneHandCasterStore;
  110. extern DataStorage <ItemDamageEntry> sItemDamageRangedStore;
  111. extern DataStorage <ItemDamageEntry> sItemDamageThrownStore;
  112. extern DataStorage <ItemDamageEntry> sItemDamageTwoHandStore;
  113. extern DataStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore;
  114. extern DataStorage <ItemDamageEntry> sItemDamageWandStore;
  115. //extern DataStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
  116. extern DataStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
  117. extern DataStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
  118. extern DataStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
  119. extern DataStorage <ItemSetEntry> sItemSetStore;
  120. extern DataStorage <LFGDungeonEntry> sLFGDungeonStore;
  121. extern DataStorage <LockEntry> sLockStore;
  122. extern DataStorage <MailTemplateEntry> sMailTemplateStore;
  123. extern DataStorage <MapEntry> sMapStore;
  124. extern DataStorage <PhaseEntry> sPhaseStore;
  125. //extern DataStorage <MapDifficultyEntry> sMapDifficultyStore; -- use GetMapDifficultyData insteed
  126. extern MapDifficultyMap sMapDifficultyMap;
  127. extern DataStorage <MovieEntry> sMovieStore;
  128. extern DataStorage <OverrideSpellDataEntry> sOverrideSpellDataStore;
  129. extern DataStorage <QuestSortEntry> sQuestSortStore;
  130. extern DataStorage <QuestXPEntry> sQuestXPStore;
  131. extern DataStorage <QuestFactionRewEntry> sQuestFactionRewardStore;
  132. extern DataStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
  133. extern DataStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
  134. extern DataStorage <ScalingStatValuesEntry> sScalingStatValuesStore;
  135. extern DataStorage <SkillLineEntry> sSkillLineStore;
  136. extern DataStorage <SkillLineAbilityEntry> sSkillLineAbilityStore;
  137. extern DataStorage <SoundEntriesEntry> sSoundEntriesStore;
  138. extern DataStorage <SpellCastTimesEntry> sSpellCastTimesStore;
  139. extern DataStorage <SpellDifficultyEntry> sSpellDifficultyStore;
  140. extern DataStorage <SpellDurationEntry> sSpellDurationStore;
  141. extern DataStorage <SpellFocusObjectEntry> sSpellFocusObjectStore;
  142. extern DataStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
  143. extern DataStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore;
  144. extern SpellCategoryStore sSpellCategoryStore;
  145. extern PetFamilySpellsStore sPetFamilySpellsStore;
  146. extern DataStorage <SpellRadiusEntry> sSpellRadiusStore;
  147. extern DataStorage <SpellRangeEntry> sSpellRangeStore;
  148. extern DataStorage <SpellRuneCostEntry> sSpellRuneCostStore;
  149. extern DataStorage <SpellEntry> sSpellStore;
  150. extern DataStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
  151. extern DataStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore;
  152. extern DataStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore;
  153. extern DataStorage <SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore;
  154. extern DataStorage <SpellCastingRequirementsEntry> sSpellCastingRequirementsStore;
  155. extern DataStorage <SpellCategoriesEntry> sSpellCategoriesStore;
  156. extern DataStorage <SpellClassOptionsEntry> sSpellClassOptionsStore;
  157. extern DataStorage <SpellCooldownsEntry> sSpellCooldownsStore;
  158. extern DataStorage <SpellEffectEntry> sSpellEffectStore;
  159. extern DataStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore;
  160. extern DataStorage <SpellInterruptsEntry> sSpellInterruptsStore;
  161. extern DataStorage <SpellLevelsEntry> sSpellLevelsStore;
  162. extern DataStorage <SpellPowerEntry> sSpellPowerStore;
  163. extern DataStorage <SpellReagentsEntry> sSpellReagentsStore;
  164. extern DataStorage <SpellScalingEntry> sSpellScalingStore;
  165. extern DataStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
  166. extern DataStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore;
  167. extern DataStorage <SpellTotemsEntry> sSpellTotemsStore;
  168. //extern DataStorage <StableSlotPricesEntry> sStableSlotPricesStore;
  169. extern DataStorage <SummonPropertiesEntry> sSummonPropertiesStore;
  170. extern DataStorage <TalentEntry> sTalentStore;
  171. extern DataStorage <TalentTabEntry> sTalentTabStore;
  172. extern DataStorage <TalentTreePrimarySpellsEntry> sTalentTreePrimarySpells;
  173. extern DataStorage <TaxiNodesEntry> sTaxiNodesStore;
  174. extern DataStorage <TaxiPathEntry> sTaxiPathStore;
  175. extern TaxiMask sTaxiNodesMask;
  176. extern TaxiMask sOldContinentsNodesMask;
  177. extern TaxiMask sHordeTaxiNodesMask;
  178. extern TaxiMask sAllianceTaxiNodesMask;
  179. extern TaxiMask sDeathKnightTaxiNodesMask;
  180. extern TaxiPathSetBySource sTaxiPathSetBySource;
  181. extern TaxiPathNodesByPath sTaxiPathNodesByPath;
  182. extern DataStorage <TotemCategoryEntry> sTotemCategoryStore;
  183. extern DataStorage <VehicleEntry> sVehicleStore;
  184. extern DataStorage <VehicleSeatEntry> sVehicleSeatStore;
  185. extern DataStorage <WMOAreaTableEntry> sWMOAreaTableStore;
  186. //extern DataStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
  187. extern DataStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
  188. extern DataStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
  189. //DB2 Storage
  190. extern DataStorage <ItemEntry> sItemStore;
  191. extern DataStorage <ItemSparseEntry> sItemSparseStore;
  192. extern DataStorage <ItemExtendedCostEntry> sItemExtendedCostStore;
  193. void LoadDataStorages(const std::string& dataPath);
  194. // script support functions
  195. DataStorage <SoundEntriesEntry> const* GetSoundEntriesStore();
  196. DataStorage <SpellRangeEntry> const* GetSpellRangeStore();
  197. DataStorage <FactionEntry> const* GetFactionStore();
  198. DataStorage <ItemEntry> const* GetItemDisplayStore();
  199. DataStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore();
  200. DataStorage <EmotesEntry> const* GetEmotesStore();
  201. DataStorage <EmotesTextEntry> const* GetEmotesTextStore();
  202. DataStorage <AchievementEntry> const* GetAchievementStore();
  203. #endif