[7986] MaNGOS 0.13 release.
[getmangos.git] / src / game / DBCStores.h
blob222227dcb3143f56ef4b7ac72f2f06dd25b77e7e
1 /*
2 * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef MANGOS_DBCSTORES_H
20 #define MANGOS_DBCSTORES_H
22 #include "Common.h"
23 #include "Database/DBCStore.h"
24 #include "DBCStructure.h"
26 #include <list>
28 typedef std::list<uint32> SimpleFactionsList;
30 SimpleFactionsList const* GetFactionTeamList(uint32 faction);
31 char* GetPetName(uint32 petfamily, uint32 dbclang);
32 uint32 GetTalentSpellCost(uint32 spellId);
33 TalentSpellPos const* GetTalentSpellPos(uint32 spellId);
35 int32 GetAreaFlagByAreaID(uint32 area_id); // -1 if not found
36 AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
37 AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag,uint32 map_id);
38 uint32 GetAreaFlagByMapId(uint32 mapid);
40 uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId);
42 enum ContentLevels
44 CONTENT_1_60 = 0,
45 CONTENT_61_70,
46 CONTENT_71_80
48 ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId);
50 ChatChannelsEntry const* GetChannelEntryFor(uint32 channel_id);
52 bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId);
54 void Zone2MapCoordinates(float& x,float& y,uint32 zone);
55 void Map2ZoneCoordinates(float& x,float& y,uint32 zone);
57 uint32 GetTalentInspectBitPosInTab(uint32 talentId);
58 uint32 GetTalentTabInspectBitSize(uint32 talentTabId);
59 uint32 const* /*[3]*/ GetTalentTabPages(uint32 cls);
61 extern DBCStorage <AchievementEntry> sAchievementStore;
62 extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
63 extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
64 extern DBCStorage <AreaGroupEntry> sAreaGroupStore;
65 extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore;
66 extern DBCStorage <AuctionHouseEntry> sAuctionHouseStore;
67 extern DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore;
68 extern DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore;
69 extern DBCStorage <BattlemasterListEntry> sBattlemasterListStore;
70 //extern DBCStorage <ChatChannelsEntry> sChatChannelsStore; -- accessed using function, no usable index
71 extern DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore;
72 extern DBCStorage <CharTitlesEntry> sCharTitlesStore;
73 extern DBCStorage <ChrClassesEntry> sChrClassesStore;
74 extern DBCStorage <ChrRacesEntry> sChrRacesStore;
75 extern DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore;
76 extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
77 extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
78 extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
79 extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
80 extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
81 extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore;
82 extern DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore;
83 extern DBCStorage <EmotesEntry> sEmotesStore;
84 extern DBCStorage <EmotesTextEntry> sEmotesTextStore;
85 extern DBCStorage <FactionEntry> sFactionStore;
86 extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore;
87 extern DBCStorage <GemPropertiesEntry> sGemPropertiesStore;
88 extern DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore;
89 extern DBCStorage <GlyphSlotEntry> sGlyphSlotStore;
91 extern DBCStorage <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore;
92 extern DBCStorage <GtCombatRatingsEntry> sGtCombatRatingsStore;
93 extern DBCStorage <GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore;
94 extern DBCStorage <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore;
95 extern DBCStorage <GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore;
96 extern DBCStorage <GtChanceToSpellCritEntry> sGtChanceToSpellCritStore;
97 extern DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore;
98 //extern DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore; -- not used currently
99 extern DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore;
100 extern DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
101 extern DBCStorage <HolidaysEntry> sHolidaysStore;
102 extern DBCStorage <ItemEntry> sItemStore;
103 extern DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore;
104 //extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
105 extern DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore;
106 extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
107 extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
108 extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
109 extern DBCStorage <ItemSetEntry> sItemSetStore;
110 extern DBCStorage <LockEntry> sLockStore;
111 extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
112 extern DBCStorage <MapEntry> sMapStore;
113 extern DBCStorage <MovieEntry> sMovieStore;
114 extern DBCStorage <QuestSortEntry> sQuestSortStore;
115 extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
116 extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
117 extern DBCStorage <ScalingStatValuesEntry> sScalingStatValuesStore;
118 extern DBCStorage <SkillLineEntry> sSkillLineStore;
119 extern DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore;
120 extern DBCStorage <SoundEntriesEntry> sSoundEntriesStore;
121 extern DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore;
122 extern DBCStorage <SpellDurationEntry> sSpellDurationStore;
123 extern DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore;
124 extern DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
125 extern DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore;
126 extern SpellCategoryStore sSpellCategoryStore;
127 extern PetFamilySpellsStore sPetFamilySpellsStore;
128 extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
129 extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
130 extern DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore;
131 extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
132 extern DBCStorage <SpellEntry> sSpellStore;
133 extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore;
134 //extern DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore;
135 extern DBCStorage <TalentEntry> sTalentStore;
136 extern DBCStorage <TalentTabEntry> sTalentTabStore;
137 extern DBCStorage <TaxiNodesEntry> sTaxiNodesStore;
138 extern DBCStorage <TaxiPathEntry> sTaxiPathStore;
139 extern TaxiMask sTaxiNodesMask;
140 extern TaxiMask sOldContinentsNodesMask;
141 extern TaxiPathSetBySource sTaxiPathSetBySource;
142 extern TaxiPathNodesByPath sTaxiPathNodesByPath;
143 extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
144 extern DBCStorage <VehicleEntry> sVehicleStore;
145 extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
146 //extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
147 extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
148 extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
150 void LoadDBCStores(const std::string& dataPath);
152 // script support functions
153 MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore();
154 MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore();
155 MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore();
156 MANGOS_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore();
157 MANGOS_DLL_SPEC DBCStorage <ItemEntry> const* GetItemDisplayStore();
158 MANGOS_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore();
159 MANGOS_DLL_SPEC DBCStorage <EmotesEntry> const* GetEmotesStore();
160 MANGOS_DLL_SPEC DBCStorage <EmotesTextEntry> const* GetEmotesTextStore();
161 #endif