[7607] Improvements in support some generic achievement classes
[AHbot.git] / src / game / DBCStores.h
blobb6e13291f4f76205a15afdcd6e148d3e8db99402
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 <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
76 extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
77 extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
78 extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
79 extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
80 extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore;
81 extern DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore;
82 extern DBCStorage <EmotesTextEntry> sEmotesTextStore;
83 extern DBCStorage <FactionEntry> sFactionStore;
84 extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore;
85 extern DBCStorage <GemPropertiesEntry> sGemPropertiesStore;
86 extern DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore;
87 extern DBCStorage <GlyphSlotEntry> sGlyphSlotStore;
89 extern DBCStorage <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore;
90 extern DBCStorage <GtCombatRatingsEntry> sGtCombatRatingsStore;
91 extern DBCStorage <GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore;
92 extern DBCStorage <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore;
93 extern DBCStorage <GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore;
94 extern DBCStorage <GtChanceToSpellCritEntry> sGtChanceToSpellCritStore;
95 extern DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore;
96 //extern DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore; -- not used currently
97 extern DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore;
98 extern DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
99 extern DBCStorage <HolidaysEntry> sHolidaysStore;
100 extern DBCStorage <ItemEntry> sItemStore;
101 extern DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore;
102 //extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
103 extern DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore;
104 extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
105 extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
106 extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
107 extern DBCStorage <ItemSetEntry> sItemSetStore;
108 extern DBCStorage <LockEntry> sLockStore;
109 extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
110 extern DBCStorage <MapEntry> sMapStore;
111 extern DBCStorage <QuestSortEntry> sQuestSortStore;
112 extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
113 extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
114 extern DBCStorage <ScalingStatValuesEntry> sScalingStatValuesStore;
115 extern DBCStorage <SkillLineEntry> sSkillLineStore;
116 extern DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore;
117 extern DBCStorage <SoundEntriesEntry> sSoundEntriesStore;
118 extern DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore;
119 extern DBCStorage <SpellDurationEntry> sSpellDurationStore;
120 extern DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore;
121 extern DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
122 extern DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore;
123 extern SpellCategoryStore sSpellCategoryStore;
124 extern PetFamilySpellsStore sPetFamilySpellsStore;
125 extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
126 extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
127 extern DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore;
128 extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
129 extern DBCStorage <SpellEntry> sSpellStore;
130 extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore;
131 //extern DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore;
132 extern DBCStorage <TalentEntry> sTalentStore;
133 extern DBCStorage <TalentTabEntry> sTalentTabStore;
134 extern DBCStorage <TaxiNodesEntry> sTaxiNodesStore;
135 extern DBCStorage <TaxiPathEntry> sTaxiPathStore;
136 extern TaxiMask sTaxiNodesMask;
137 extern TaxiMask sOldContinentsNodesMask;
138 extern TaxiPathSetBySource sTaxiPathSetBySource;
139 extern TaxiPathNodesByPath sTaxiPathNodesByPath;
140 extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
141 extern DBCStorage <VehicleEntry> sVehicleStore;
142 extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
143 //extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
144 extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
145 extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
147 void LoadDBCStores(const std::string& dataPath);
149 // script support functions
150 MANGOS_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore();
151 MANGOS_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore();
152 MANGOS_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore();
153 MANGOS_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore();
154 MANGOS_DLL_SPEC DBCStorage <ItemEntry> const* GetItemDisplayStore();
155 MANGOS_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore();
156 #endif