OregonCore  revision fb2a440-git
Your Favourite TBC server
DBCStores.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include "DBCStores.h"
19 #include "Log.h"
20 #include "SharedDefines.h"
21 
22 #include "DBCfmt.h"
23 
24 #include <map>
25 
26 typedef std::map<uint16, uint32> AreaFlagByAreaID;
27 typedef std::map<uint32, uint32> AreaFlagByMapID;
28 
30 {
32  {
33  }
34 
35  bool operator <(const WMOAreaTableTripple& b) const
36  {
37  return memcmp(this, &b, sizeof(WMOAreaTableTripple)) < 0;
38  }
39 
40  // ordered by entropy; that way memcmp will have a minimal medium runtime
44 };
45 
46 typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const*> WMOAreaInfoByTripple;
47 
49 static AreaFlagByAreaID sAreaFlagByAreaID;
50 static AreaFlagByMapID sAreaFlagByMapID; // for instances without generated *.map files
51 
52 static WMOAreaInfoByTripple sWMOAreaInfoByTripple;
53 
68 
71 
74 
75 typedef std::map<uint32, SimpleFactionsList> FactionTeamMap;
76 static FactionTeamMap sFactionTeamMap;
79 
82 
90 //DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore(GtOCTRegenMPfmt); -- not used currently
94 //DBCStorage <ItemCondExtCostsEntry> sItemCondExtCostsStore(ItemCondExtCostsEntryfmt);
95 //DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently
100 
103 
106 
108 
110 
113 
115 
121 
133 
134 // store absolute bit position for first rank for talent inspect
135 typedef std::map<uint32, uint32> TalentInspectMap;
136 static TalentInspectMap sTalentPosInInspect;
137 static TalentInspectMap sTalentTabSizeInInspect;
138 static uint32 sTalentTabPages[12/*MAX_CLASSES*/][3];
139 
142 
143 // DBC used only for initialization sTaxiPathSetBySource at startup.
146 
147 // DBC used only for initialization sTaxiPathSetBySource at startup.
149 
150 static DBCStorage <TaxiPathNodeEntry> sTaxiPathNodeStore(TaxiPathNodeEntryfmt);
155 
156 typedef std::list<std::string> StoreProblemList;
157 
159 {
160  uint32 accepted_versions[] = EXPECTED_OREGONCORE_CLIENT_BUILD;
161  for (int i = 0; accepted_versions[i]; ++i)
162  if (build == accepted_versions[i])
163  return true;
164 
165  return false;
166 }
167 
169 {
170  std::ostringstream data;
171  int accepted_versions[] = EXPECTED_OREGONCORE_CLIENT_BUILD;
172  for (int i = 0; accepted_versions[i]; ++i)
173  data << accepted_versions[i] << " ";
174  return data.str();
175 }
176 
177 static bool LoadDBC_assert_print(uint32 fsize, uint32 rsize, const std::string& filename)
178 {
179  sLog.outError("Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
180 
181  // assert must fail after function call
182  return false;
183 }
184 
185 template<class T>
186 inline void LoadDBC(uint32& availableDbcLocales, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename)
187 {
188  // compatibility format and C++ structure sizes
189  ASSERT(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()), sizeof(T), filename));
190 
191  std::string dbc_filename = dbc_path + filename;
192  if (storage.Load(dbc_filename.c_str()))
193  {
194  for (uint8 i = 0; i < MAX_LOCALE; ++i)
195  {
196  if (!(availableDbcLocales & (1 << i)))
197  continue;
198 
199  std::string dbc_filename_loc = dbc_path + localeNames[i] + "/" + filename;
200  if (!storage.LoadStringsFrom(dbc_filename_loc.c_str()))
201  availableDbcLocales &= ~(1 << i); // mark as not available for speedup next checks
202  }
203  }
204  else
205  {
206  // sort problematic dbc to (1) non compatible and (2) non-existed
207  FILE* f = fopen(dbc_filename.c_str(), "rb");
208  if (f)
209  {
210  char buf[100];
211  snprintf(buf, 100, " (exists, but has %d fields instead %d) Wrong client version of DBC files?", storage.GetFieldCount(), strlen(storage.GetFormat()));
212  errlist.push_back(dbc_filename + buf);
213  fclose(f);
214  }
215  else
216  errlist.push_back(dbc_filename);
217  }
218 }
219 
220 void LoadDBCStores(const std::string& dataPath)
221 {
222  std::string dbcPath = dataPath + "dbc/";
223 
224  const uint32 DBCFilesCount = 61;
225 
226 
227  StoreProblemList bad_dbc_files;
228  uint32 availableDbcLocales = 0xFFFFFFFF;
229 
230  LoadDBC(availableDbcLocales, bad_dbc_files, sAreaStore, dbcPath, "AreaTable.dbc");
231 
232  // must be after sAreaStore loading
233  for (uint32 i = 0; i < sAreaStore.GetNumRows(); ++i) // areaflag numbered from 0
234  {
235  if (AreaTableEntry const* area = sAreaStore.LookupEntry(i))
236  {
237  // fill AreaId->DBC records
238  sAreaFlagByAreaID.insert(AreaFlagByAreaID::value_type(uint16(area->ID), area->exploreFlag));
239 
240  // fill MapId->DBC records ( skip sub zones and continents)
241  if (area->zone == 0 && area->mapid != 0 && area->mapid != 1 && area->mapid != 530)
242  sAreaFlagByMapID.insert(AreaFlagByMapID::value_type(area->mapid, area->exploreFlag));
243  }
244  }
245 
246  LoadDBC(availableDbcLocales, bad_dbc_files, sAreaTriggerStore, dbcPath, "AreaTrigger.dbc");
247  LoadDBC(availableDbcLocales, bad_dbc_files, sAuctionHouseStore, dbcPath, "AuctionHouse.dbc");
248  LoadDBC(availableDbcLocales, bad_dbc_files, sBankBagSlotPricesStore, dbcPath, "BankBagSlotPrices.dbc");
249  LoadDBC(availableDbcLocales, bad_dbc_files, sBattlemasterListStore, dbcPath, "BattlemasterList.dbc");
250  LoadDBC(availableDbcLocales, bad_dbc_files, sCharStartOutfitStore, dbcPath, "CharStartOutfit.dbc");
251 
252  LoadDBC(availableDbcLocales, bad_dbc_files, sCharTitlesStore, dbcPath, "CharTitles.dbc");
253  LoadDBC(availableDbcLocales, bad_dbc_files, sChatChannelsStore, dbcPath, "ChatChannels.dbc");
254  LoadDBC(availableDbcLocales, bad_dbc_files, sChrClassesStore, dbcPath, "ChrClasses.dbc");
255  LoadDBC(availableDbcLocales, bad_dbc_files, sChrRacesStore, dbcPath, "ChrRaces.dbc");
256  LoadDBC(availableDbcLocales, bad_dbc_files, sCinematicCameraStore, dbcPath, "CinematicCamera.dbc");
257  LoadDBC(availableDbcLocales, bad_dbc_files, sCinematicSequencesStore, dbcPath, "CinematicSequences.dbc");
258  LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureDisplayInfoStore, dbcPath, "CreatureDisplayInfo.dbc");
259  LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureFamilyStore, dbcPath, "CreatureFamily.dbc");
260  LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureSpellDataStore, dbcPath, "CreatureSpellData.dbc");
261  LoadDBC(availableDbcLocales, bad_dbc_files, sDurabilityCostsStore, dbcPath, "DurabilityCosts.dbc");
262  LoadDBC(availableDbcLocales, bad_dbc_files, sDurabilityQualityStore, dbcPath, "DurabilityQuality.dbc");
263  LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesStore, dbcPath, "Emotes.dbc");
264  LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesTextStore, dbcPath, "EmotesText.dbc");
265  LoadDBC(availableDbcLocales, bad_dbc_files, sFactionStore, dbcPath, "Faction.dbc");
266  for (uint32 i = 0; i < sFactionStore.GetNumRows(); ++i)
267  {
268  FactionEntry const* faction = sFactionStore.LookupEntry(i);
269  if (faction && faction->team)
270  {
271  SimpleFactionsList& flist = sFactionTeamMap[faction->team];
272  flist.push_back(i);
273  }
274  }
275 
276  LoadDBC(availableDbcLocales, bad_dbc_files, sFactionTemplateStore, dbcPath, "FactionTemplate.dbc");
277 
278  LoadDBC(availableDbcLocales, bad_dbc_files,sGameObjectDisplayInfoStore,dbcPath,"GameObjectDisplayInfo.dbc");
279  for (uint32 i = 0; i < sGameObjectDisplayInfoStore.GetNumRows(); ++i)
280  {
281  if (GameObjectDisplayInfoEntry const* info = sGameObjectDisplayInfoStore.LookupEntry(i))
282  {
283  if (info->maxX < info->minX)
284  std::swap(*(float*)(&info->maxX), *(float*)(&info->minX));
285  if (info->maxY < info->minY)
286  std::swap(*(float*)(&info->maxY), *(float*)(&info->minY));
287  if (info->maxZ < info->minZ)
288  std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ));
289  }
290  }
291 
292  LoadDBC(availableDbcLocales, bad_dbc_files, sGemPropertiesStore, dbcPath, "GemProperties.dbc");
293 
294  LoadDBC(availableDbcLocales, bad_dbc_files, sGtCombatRatingsStore, dbcPath, "gtCombatRatings.dbc");
295 
296  LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToMeleeCritBaseStore, dbcPath, "gtChanceToMeleeCritBase.dbc");
297  LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToMeleeCritStore, dbcPath, "gtChanceToMeleeCrit.dbc");
298 
299  LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToSpellCritBaseStore, dbcPath, "gtChanceToSpellCritBase.dbc");
300  LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToSpellCritStore, dbcPath, "gtChanceToSpellCrit.dbc");
301 
302  LoadDBC(availableDbcLocales, bad_dbc_files, sGtOCTRegenHPStore, dbcPath, "gtOCTRegenHP.dbc");
303  LoadDBC(availableDbcLocales, bad_dbc_files, sGtNPCManaCostScalerStore, dbcPath, "gtNPCManaCostScaler.dbc");
304  //LoadDBC(availableDbcLocales,bad_dbc_files,sGtOCTRegenMPStore, dbcPath,"gtOCTRegenMP.dbc"); -- not used currently
305  LoadDBC(availableDbcLocales, bad_dbc_files, sGtRegenHPPerSptStore, dbcPath, "gtRegenHPPerSpt.dbc");
306  LoadDBC(availableDbcLocales, bad_dbc_files, sGtRegenMPPerSptStore, dbcPath, "gtRegenMPPerSpt.dbc");
307  LoadDBC(availableDbcLocales, bad_dbc_files, sItemStore, dbcPath, "Item.dbc");
308  //LoadDBC(availableDbcLocales,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently
309  //LoadDBC(availableDbcLocales,bad_dbc_files,sItemCondExtCostsStore, dbcPath,"ItemCondExtCosts.dbc");
310  LoadDBC(availableDbcLocales, bad_dbc_files, sItemExtendedCostStore, dbcPath, "ItemExtendedCost.dbc");
311  LoadDBC(availableDbcLocales, bad_dbc_files, sItemRandomPropertiesStore, dbcPath, "ItemRandomProperties.dbc");
312  LoadDBC(availableDbcLocales, bad_dbc_files, sItemRandomSuffixStore, dbcPath, "ItemRandomSuffix.dbc");
313  LoadDBC(availableDbcLocales, bad_dbc_files, sItemSetStore, dbcPath, "ItemSet.dbc");
314  LoadDBC(availableDbcLocales, bad_dbc_files, sLockStore, dbcPath, "Lock.dbc");
315  LoadDBC(availableDbcLocales, bad_dbc_files,sLiquidTypeStore, dbcPath,"LiquidType.dbc");
316  LoadDBC(availableDbcLocales, bad_dbc_files, sMailTemplateStore, dbcPath, "MailTemplate.dbc");
317  LoadDBC(availableDbcLocales, bad_dbc_files, sMapStore, dbcPath, "Map.dbc");
318  LoadDBC(availableDbcLocales, bad_dbc_files, sQuestSortStore, dbcPath, "QuestSort.dbc");
319  LoadDBC(availableDbcLocales, bad_dbc_files, sRandomPropertiesPointsStore, dbcPath, "RandPropPoints.dbc");
320  LoadDBC(availableDbcLocales, bad_dbc_files, sSkillLineStore, dbcPath, "SkillLine.dbc");
321  LoadDBC(availableDbcLocales, bad_dbc_files, sSkillLineAbilityStore, dbcPath, "SkillLineAbility.dbc");
322  LoadDBC(availableDbcLocales, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc");
323  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc");
324  for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
325  {
326  SpellEntry const* spell = sSpellStore.LookupEntry(i);
327  if (spell && spell->Category)
328  sSpellCategoryStore[spell->Category].insert(i);
329 
330  // DBC not support uint64 fields but SpellEntry have SpellFamilyFlags mapped at 2 uint32 fields
331  // uint32 field already converted to bigendian if need, but must be swapped for correct uint64 bigendian view
332  #if OREGON_ENDIAN == OREGON_BIGENDIAN
333  std::swap(*((uint32*)(&spell->SpellFamilyFlags)), *(((uint32*)(&spell->SpellFamilyFlags)) + 1));
334  #endif
335  }
336 
337  for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
338  {
339  SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(j);
340 
341  if (!skillLine)
342  continue;
343 
344  SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId);
345 
346  if (spellInfo && (spellInfo->Attributes & 0x1D0) == 0x1D0)
347  {
348  for (unsigned int i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i)
349  {
350  CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(i);
351  if (!cFamily)
352  continue;
353 
354  if (skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1])
355  continue;
356 
357  sPetFamilySpellsStore[i].insert(spellInfo->Id);
358  }
359  }
360  }
361 
362  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCastTimesStore, dbcPath, "SpellCastTimes.dbc");
363  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDurationStore, dbcPath, "SpellDuration.dbc");
364  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellFocusObjectStore, dbcPath, "SpellFocusObject.dbc");
365  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellItemEnchantmentStore, dbcPath, "SpellItemEnchantment.dbc");
366  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellItemEnchantmentConditionStore, dbcPath, "SpellItemEnchantmentCondition.dbc");
367  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRadiusStore, dbcPath, "SpellRadius.dbc");
368  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRangeStore, dbcPath, "SpellRange.dbc");
369  LoadDBC(availableDbcLocales, bad_dbc_files, sSpellShapeshiftStore, dbcPath, "SpellShapeshiftForm.dbc");
370  LoadDBC(availableDbcLocales, bad_dbc_files, sStableSlotPricesStore, dbcPath, "StableSlotPrices.dbc");
371  LoadDBC(availableDbcLocales, bad_dbc_files, sSummonPropertiesStore, dbcPath, "SummonProperties.dbc");
372  LoadDBC(availableDbcLocales, bad_dbc_files, sTalentStore, dbcPath, "Talent.dbc");
373 
374  // create talent spells set
375  for (unsigned int i = 0; i < sTalentStore.GetNumRows(); ++i)
376  {
377  TalentEntry const* talentInfo = sTalentStore.LookupEntry(i);
378  if (!talentInfo) continue;
379  for (int j = 0; j < 5; j++)
380  if (talentInfo->RankID[j])
381  sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(i, j);
382  }
383 
384  LoadDBC(availableDbcLocales, bad_dbc_files, sTalentTabStore, dbcPath, "TalentTab.dbc");
385 
386  // prepare fast data access to bit pos of talent ranks for use at inspecting
387  {
388  // fill table by amount of talent ranks and fill sTalentTabBitSizeInInspect
389  // store in with (row,col,talent)->size key for correct sorting by (row,col)
390  typedef std::map<uint32, uint32> TalentBitSize;
391  TalentBitSize sTalentBitSize;
392  for (uint32 i = 1; i < sTalentStore.GetNumRows(); ++i)
393  {
394  TalentEntry const* talentInfo = sTalentStore.LookupEntry(i);
395  if (!talentInfo) continue;
396 
397  TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry( talentInfo->TalentTab);
398  if (!talentTabInfo)
399  continue;
400 
401  // find talent rank
402  uint32 curtalent_maxrank = 0;
403  for (uint32 k = 5; k > 0; --k)
404  {
405  if (talentInfo->RankID[k - 1])
406  {
407  curtalent_maxrank = k;
408  break;
409  }
410  }
411 
412  sTalentBitSize[(talentInfo->Row << 24) + (talentInfo->Col << 16) + talentInfo->TalentID] = curtalent_maxrank;
413  sTalentTabSizeInInspect[talentInfo->TalentTab] += curtalent_maxrank;
414  }
415 
416  // now have all max ranks (and then bit amount used for store talent ranks in inspect)
417  for (uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId)
418  {
419  TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentTabId);
420  if (!talentTabInfo)
421  continue;
422 
423  // prevent memory corruption; otherwise cls will become 12 below
424  if ((talentTabInfo->ClassMask & CLASSMASK_ALL_PLAYABLE) == 0)
425  continue;
426 
427  // store class talent tab pages
428  uint32 cls = 1;
429  for (uint32 m = 1; !(m & talentTabInfo->ClassMask) && cls < MAX_CLASSES; m <<= 1, ++cls) {}
430 
431  sTalentTabPages[cls][talentTabInfo->tabpage] = talentTabId;
432 
433  // add total amount bits for first rank starting from talent tab first talent rank pos.
434  uint32 pos = 0;
435  for (TalentBitSize::iterator itr = sTalentBitSize.begin(); itr != sTalentBitSize.end(); ++itr)
436  {
437  uint32 talentId = itr->first & 0xFFFF;
438  TalentEntry const* talentInfo = sTalentStore.LookupEntry( talentId);
439  if (!talentInfo)
440  continue;
441 
442  if (talentInfo->TalentTab != talentTabId)
443  continue;
444 
445  sTalentPosInInspect[talentId] = pos;
446  pos += itr->second;
447  }
448  }
449  }
450 
451  LoadDBC(availableDbcLocales, bad_dbc_files, sTaxiNodesStore, dbcPath, "TaxiNodes.dbc");
452 
453  // Initialize global taxinodes mask
454  memset(sTaxiNodesMask, 0, sizeof(sTaxiNodesMask));
455  for (uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
456  {
457  if (sTaxiNodesStore.LookupEntry(i))
458  {
459  uint8 field = (uint8)((i - 1) / 32);
460  uint32 submask = 1 << ((i - 1) % 32);
461  sTaxiNodesMask[field] |= submask;
462  }
463  }
464 
465  LoadDBC(availableDbcLocales, bad_dbc_files, sTaxiPathStore, dbcPath, "TaxiPath.dbc");
466  for (uint32 i = 1; i < sTaxiPathStore.GetNumRows(); ++i)
467  if (TaxiPathEntry const* entry = sTaxiPathStore.LookupEntry(i))
468  sTaxiPathSetBySource[entry->from][entry->to] = TaxiPathBySourceAndDestination(entry->ID, entry->price);
469  uint32 pathCount = sTaxiPathStore.GetNumRows();
470 
471  //## TaxiPathNode.dbc ## Loaded only for initialization different structures
472  LoadDBC(availableDbcLocales, bad_dbc_files, sTaxiPathNodeStore, dbcPath, "TaxiPathNode.dbc");
473  // Calculate path nodes count
474  std::vector<uint32> pathLength;
475  pathLength.resize(pathCount); // 0 and some other indexes not used
476  for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
477  if (TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i))
478  ++pathLength[entry->path];
479  // Set path length
480  sTaxiPathNodesByPath.resize(pathCount); // 0 and some other indexes not used
481  for (uint32 i = 1; i < sTaxiPathNodesByPath.size(); ++i)
482  sTaxiPathNodesByPath[i].resize(pathLength[i]);
483  // fill data
484  for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
485  if (TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i))
486  sTaxiPathNodesByPath[entry->path].set(entry->index, entry);
487 
488  // Initialize global taxinodes mask
489  // include existed nodes that have at least single not spell base (scripted) path
490  {
491  std::set<uint32> spellPaths;
492  for (uint32 i = 1; i < sSpellStore.GetNumRows (); ++i)
493  if (SpellEntry const* sInfo = sSpellStore.LookupEntry (i))
494  for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
495  if (sInfo->Effect[j] == SPELL_EFFECT_SEND_TAXI)
496  spellPaths.insert(sInfo->EffectMiscValue[j]);
497 
498  memset(sTaxiNodesMask, 0, sizeof(sTaxiNodesMask));
499  for (uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
500  {
501  TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
502  if (!node)
503  continue;
504 
505  TaxiPathSetBySource::const_iterator src_i = sTaxiPathSetBySource.find(i);
506  if (src_i != sTaxiPathSetBySource.end() && !src_i->second.empty())
507  {
508  bool ok = false;
509  for (TaxiPathSetForSource::const_iterator dest_i = src_i->second.begin(); dest_i != src_i->second.end(); ++dest_i)
510  {
511  // not spell path
512  if (spellPaths.find(dest_i->second.ID) == spellPaths.end())
513  {
514  ok = true;
515  break;
516  }
517  }
518 
519  if (!ok)
520  continue;
521  }
522 
523  // valid taxi network node
524  uint8 field = (uint8)((i - 1) / 32);
525  uint32 submask = 1 << ((i - 1) % 32);
526  sTaxiNodesMask[field] |= submask;
527  }
528  }
529 
530  LoadDBC(availableDbcLocales, bad_dbc_files, sTotemCategoryStore, dbcPath, "TotemCategory.dbc");
531  LoadDBC(availableDbcLocales, bad_dbc_files, sWMOAreaTableStore, dbcPath, "WMOAreaTable.dbc");
532  for (uint32 i = 0; i < sWMOAreaTableStore.GetNumRows(); ++i)
533  {
534  if (WMOAreaTableEntry const* entry = sWMOAreaTableStore.LookupEntry(i))
535  sWMOAreaInfoByTripple.insert(WMOAreaInfoByTripple::value_type(WMOAreaTableTripple(entry->rootId, entry->adtId, entry->groupId), entry));
536  }
537  LoadDBC(availableDbcLocales, bad_dbc_files, sWorldMapAreaStore, dbcPath, "WorldMapArea.dbc");
538  LoadDBC(availableDbcLocales, bad_dbc_files, sWorldSafeLocsStore, dbcPath, "WorldSafeLocs.dbc");
539 
540  // error checks
541  if (bad_dbc_files.size() >= DBCFilesCount)
542  sLog.outFatal("\nIncorrect DataDir value in Oregond.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFilesCount, dataPath.c_str());
543  else if (!bad_dbc_files.empty())
544  {
545  std::string str;
546  for (std::list<std::string>::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
547  str += *i + "\n";
548 
549  sLog.outFatal("\nSome required *.dbc files (%u from %d) not found or not compatible:\n%s", bad_dbc_files.size(), DBCFilesCount, str.c_str());
550  }
551 
552  // check at up-to-date DBC files (53085 is last added spell in 2.4.3)
553  // check at up-to-date DBC files (17514 is last ID in SkillLineAbilities in 2.4.3)
554  // check at up-to-date DBC files (598 is last map added in 2.4.3)
555  // check at up-to-date DBC files (1127 is last gem property added in 2.4.3)
556  // check at up-to-date DBC files (2425 is last item extended cost added in 2.4.3)
557  // check at up-to-date DBC files (71 is last char title added in 2.4.3)
558  // check at up-to-date DBC files (1768 is last area added in 2.4.3)
559  if ( !sSpellStore.LookupEntry(53085) ||
560  !sSkillLineAbilityStore.LookupEntry(17514) ||
561  !sMapStore.LookupEntry(598) ||
562  !sGemPropertiesStore.LookupEntry(1127) ||
563  !sItemExtendedCostStore.LookupEntry(2425) ||
564  !sCharTitlesStore.LookupEntry(71) ||
565  !sAreaStore.LookupEntry(1768))
566  sLog.outFatal("\nYou have _outdated_ DBC files. Please extract correct versions from 2.4.3 client.");
567 
568  sLog.outString(">> Initialized %d data stores", DBCFilesCount);
569 }
570 
572 {
573  FactionTeamMap::const_iterator itr = sFactionTeamMap.find(faction);
574  if (itr == sFactionTeamMap.end())
575  return NULL;
576  return &itr->second;
577 }
578 
579 char* GetPetName(uint32 petfamily, uint32 dbclang)
580 {
581  if (!petfamily)
582  return NULL;
583  CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(petfamily);
584  if (!pet_family)
585  return NULL;
586  return pet_family->Name[dbclang] ? pet_family->Name[dbclang] : NULL;
587 }
588 
590 {
591  TalentSpellPosMap::const_iterator itr = sTalentSpellPosMap.find(spellId);
592  if (itr == sTalentSpellPosMap.end())
593  return NULL;
594 
595  return &itr->second;
596 }
597 
599 {
600  if (TalentSpellPos const* pos = GetTalentSpellPos(spellId))
601  return pos->rank + 1;
602 
603  return 0;
604 }
605 
607 {
608  AreaFlagByAreaID::iterator i = sAreaFlagByAreaID.find(area_id);
609  if (i == sAreaFlagByAreaID.end())
610  return -1;
611 
612  return i->second;
613 }
614 
616 {
617  WMOAreaInfoByTripple::iterator i = sWMOAreaInfoByTripple.find(WMOAreaTableTripple(rootid, adtid, groupid));
618  if (i == sWMOAreaInfoByTripple.end())
619  return NULL;
620  return i->second;
621 }
622 
624 {
625  int32 areaflag = GetAreaFlagByAreaID(area_id);
626  if (areaflag < 0)
627  return NULL;
628 
629  return sAreaStore.LookupEntry(areaflag);
630 }
631 
633 {
634  if (area_flag)
635  return sAreaStore.LookupEntry(area_flag);
636 
637  if (MapEntry const* mapEntry = sMapStore.LookupEntry(map_id))
638  return GetAreaEntryByAreaID(mapEntry->linked_zone);
639 
640  return NULL;
641 }
642 
644 {
645  AreaFlagByMapID::iterator i = sAreaFlagByMapID.find(mapid);
646  if (i == sAreaFlagByMapID.end())
647  return 0;
648  else
649  return i->second;
650 }
651 
653 {
654  if (mapid != 530) // speed for most cases
655  return mapid;
656 
657  if (WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId))
658  return wma->virtual_map_id >= 0 ? wma->virtual_map_id : wma->map_id;
659 
660  return mapid;
661 }
662 
664 {
665  mapid = GetVirtualMapForMapAndZone(mapid, zoneId);
666  if (mapid < 2)
667  return CONTENT_1_60;
668 
669  MapEntry const* mapEntry = sMapStore.LookupEntry(mapid);
670  if (!mapEntry)
671  return CONTENT_1_60;
672 
673  switch (mapEntry->Expansion())
674  {
675  default:
676  return CONTENT_1_60;
677  case 1:
678  return CONTENT_61_70;
679  }
680 }
681 
683 {
684  // not sorted, numbering index from 0
685  for (uint32 i = 0; i < sChatChannelsStore.GetNumRows(); ++i)
686  {
687  ChatChannelsEntry const* ch = sChatChannelsStore.LookupEntry(i);
688  if (ch && ch->ChannelID == channel_id)
689  return ch;
690  }
691  return NULL;
692 }
693 
694 bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId)
695 {
696  if (requiredTotemCategoryId == 0)
697  return true;
698  if (itemTotemCategoryId == 0)
699  return false;
700 
701  TotemCategoryEntry const* itemEntry = sTotemCategoryStore.LookupEntry(itemTotemCategoryId);
702  if (!itemEntry)
703  return false;
704  TotemCategoryEntry const* reqEntry = sTotemCategoryStore.LookupEntry(requiredTotemCategoryId);
705  if (!reqEntry)
706  return false;
707 
708  if (itemEntry->categoryType != reqEntry->categoryType)
709  return false;
710 
711  return (itemEntry->categoryMask & reqEntry->categoryMask) == reqEntry->categoryMask;
712 }
713 
715 {
716  if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquidType))
717  return 1 << liq->Type;
718 
719  return 0;
720 }
721 
722 void Zone2MapCoordinates(float& x, float& y, uint32 zone)
723 {
724  WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(zone);
725 
726  // if not listed then map coordinates (instance)
727  if (!maEntry)
728  return;
729 
730  std::swap(x, y); // at client map coords swapped
731  x = x * ((maEntry->x2 - maEntry->x1) / 100) + maEntry->x1;
732  y = y * ((maEntry->y2 - maEntry->y1) / 100) + maEntry->y1; // client y coord from top to down
733 }
734 
735 void Map2ZoneCoordinates(float& x, float& y, uint32 zone)
736 {
737  WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(zone);
738 
739  // if not listed then map coordinates (instance)
740  if (!maEntry)
741  return;
742 
743  x = (x - maEntry->x1) / ((maEntry->x2 - maEntry->x1) / 100);
744  y = (y - maEntry->y1) / ((maEntry->y2 - maEntry->y1) / 100); // client y coord from top to down
745  std::swap(x, y); // client have map coords swapped
746 }
747 
749 {
750  TalentInspectMap::const_iterator itr = sTalentPosInInspect.find(talentId);
751  if (itr == sTalentPosInInspect.end())
752  return 0;
753 
754  return itr->second;
755 }
756 
758 {
759  TalentInspectMap::const_iterator itr = sTalentTabSizeInInspect.find(talentTabId);
760  if (itr == sTalentTabSizeInInspect.end())
761  return 0;
762 
763  return itr->second;
764 }
765 
767 {
768  return sTalentTabPages[cls];
769 }
770 
771 // script support functions
773 {
774  return &sSoundEntriesStore;
775 }
777 {
778  return &sSpellStore;
779 }
781 {
782  return &sSpellRangeStore;
783 }
785 {
786  return &sEmotesStore;
787 }
789 {
790  return &sEmotesTextStore;
791 }
792 
uint32 Category
Definition: DBCStructure.h:675
AreaTableEntry const * GetAreaEntryByAreaID(uint32 area_id)
Definition: DBCStores.cpp:623
DBCStorage< WorldSafeLocsEntry > sWorldSafeLocsStore(WorldSafeLocsEntryfmt)
DBCStorage< LiquidTypeEntry > sLiquidTypeStore(LiquidTypefmt)
std::map< WMOAreaTableTripple, WMOAreaTableEntry const * > WMOAreaInfoByTripple
Definition: DBCStores.cpp:46
uint32 GetLiquidFlags(uint32 liquidType)
Definition: DBCStores.cpp:714
const char SpellItemEnchantmentConditionfmt[]
Definition: DBCfmt.h:79
#define snprintf
Definition: Common.h:129
DBCStorage< WMOAreaTableEntry > sWMOAreaTableStore(WMOAreaTableEntryfmt)
std::map< uint32, uint32 > TalentInspectMap
Definition: DBCStores.cpp:135
const char TotemCategoryEntryfmt[]
Definition: DBCfmt.h:90
const char DurabilityQualityfmt[]
Definition: DBCfmt.h:41
DBCStorage< SpellEntry > const * GetSpellStore()
Definition: DBCStores.cpp:776
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< DurabilityCostsEntry > sDurabilityCostsStore(DurabilityCostsfmt)
std::string AcceptableClientBuildsListStr()
Definition: DBCStores.cpp:168
uint32 TaxiMask[TaxiMaskSize]
SimpleFactionsList const * GetFactionTeamList(uint32 faction)
Definition: DBCStores.cpp:571
DBCStorage< ItemSetEntry > sItemSetStore(ItemSetEntryfmt)
DBCStorage< SpellRangeEntry > const * GetSpellRangeStore()
Definition: DBCStores.cpp:780
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId)
Definition: DBCStores.cpp:652
DBCStorage< ChatChannelsEntry > sChatChannelsStore(ChatChannelsEntryfmt)
DBCStorage< SummonPropertiesEntry > sSummonPropertiesStore(SummonPropertiesfmt)
DBCStorage< SpellCastTimesEntry > sSpellCastTimesStore(SpellCastTimefmt)
const char WorldMapAreaEntryfmt[]
Definition: DBCfmt.h:91
TaxiMask sTaxiNodesMask
Definition: DBCStores.cpp:141
bool operator<(const WMOAreaTableTripple &b) const
Definition: DBCStores.cpp:35
DBCStorage< CharStartOutfitEntry > sCharStartOutfitStore(CharStartOutfitEntryfmt)
DBCStorage< EmotesEntry > sEmotesStore(EmotesEntryfmt)
const char GtChanceToSpellCritBasefmt[]
Definition: DBCfmt.h:51
std::map< uint32, TaxiPathSetForSource > TaxiPathSetBySource
DBCStorage< EmotesTextEntry > const * GetEmotesTextStore()
Definition: DBCStores.cpp:788
const char LockEntryfmt[]
Definition: DBCfmt.h:66
DBCStorage< ItemExtendedCostEntry > sItemExtendedCostStore(ItemExtendedCostEntryfmt)
const char CinematicSequencesEntryfmt[]
Definition: DBCfmt.h:36
const char BankBagSlotPricesEntryfmt[]
Definition: DBCfmt.h:24
const char ItemExtendedCostEntryfmt[]
Definition: DBCfmt.h:61
AreaTableEntry const * GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id)
Definition: DBCStores.cpp:632
DBCStorage< BattlemasterListEntry > sBattlemasterListStore(BattlemasterListEntryfmt)
const char FactionTemplateEntryfmt[]
Definition: DBCfmt.h:45
DBCStorage< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
const char TaxiPathEntryfmt[]
Definition: DBCfmt.h:88
DBCStorage< ItemRandomSuffixEntry > sItemRandomSuffixStore(ItemRandomSuffixfmt)
DBCStorage< GtNPCManaCostScalerEntry > sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt)
ChatChannelsEntry const * GetChannelEntryFor(uint32 channel_id)
Definition: DBCStores.cpp:682
DBCStorage< LockEntry > sLockStore(LockEntryfmt)
#define sLog
Log class singleton.
Definition: Log.h:187
WMOAreaTableEntry const * GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid)
Definition: DBCStores.cpp:615
const char GameObjectDisplayInfofmt[]
Definition: DBCfmt.h:46
const char GemPropertiesEntryfmt[]
Definition: DBCfmt.h:47
ACE_INT32 int32
Definition: Define.h:67
DBCStorage< SpellItemEnchantmentConditionEntry > sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt)
const char SpellDurationfmt[]
Definition: DBCfmt.h:75
const char EmotesEntryfmt[]
Definition: DBCfmt.h:42
const char GtChanceToMeleeCritfmt[]
Definition: DBCfmt.h:50
DBCStorage< AreaTriggerEntry > sAreaTriggerStore(AreaTriggerEntryfmt)
std::map< uint32, SpellCategorySet > SpellCategoryStore
Definition: DBCStructure.h:829
const char LiquidTypefmt[]
Definition: DBCfmt.h:65
const char GtChanceToSpellCritfmt[]
Definition: DBCfmt.h:52
TaxiPathNodesByPath sTaxiPathNodesByPath
Definition: DBCStores.cpp:148
char const * GetFormat() const
Definition: DBCStore.h:42
bool LoadStringsFrom(char const *fn)
Definition: DBCStore.h:67
const char ItemRandomPropertiesfmt[]
Definition: DBCfmt.h:62
const char SummonPropertiesfmt[]
Definition: DBCfmt.h:84
const char GtRegenHPPerSptfmt[]
Definition: DBCfmt.h:56
void LoadDBC(uint32 &availableDbcLocales, StoreProblemList &errlist, DBCStorage< T > &storage, const std::string &dbc_path, const std::string &filename)
Definition: DBCStores.cpp:186
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
char const CinematicCameraEntryfmt[]
Definition: DBCfmt.h:35
uint32 const * GetTalentTabPages(uint32 cls)
Definition: DBCStores.cpp:766
DBCStorage< SpellEntry > sSpellStore(SpellEntryfmt)
DBCStorage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore(CreatureDisplayInfofmt)
DBCStorage< BankBagSlotPricesEntry > sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt)
const char SpellRangefmt[]
Definition: DBCfmt.h:81
const char TaxiNodesEntryfmt[]
Definition: DBCfmt.h:87
DBCStorage< ChrClassesEntry > sChrClassesStore(ChrClassesEntryfmt)
const char ChrRacesEntryfmt[]
Definition: DBCfmt.h:34
std::map< uint32, PetFamilySpellsSet > PetFamilySpellsStore
Definition: DBCStructure.h:831
const char CharTitlesEntryfmt[]
Definition: DBCfmt.h:29
char * GetPetName(uint32 petfamily, uint32 dbclang)
Definition: DBCStores.cpp:579
const char AreaTableEntryfmt[]
Definition: DBCfmt.h:21
DBCStorage< CharTitlesEntry > sCharTitlesStore(CharTitlesEntryfmt)
uint32 Attributes
Definition: DBCStructure.h:679
DBCStorage< TalentEntry > sTalentStore(TalentEntryfmt)
const char TalentEntryfmt[]
Definition: DBCfmt.h:85
const char SpellCastTimefmt[]
Definition: DBCfmt.h:74
std::map< uint32, SimpleFactionsList > FactionTeamMap
Definition: DBCStores.cpp:75
uint32 TalentID
Definition: DBCStructure.h:930
char const * localeNames[MAX_LOCALE]
Definition: Common.cpp:20
DBCStorage< ItemRandomPropertiesEntry > sItemRandomPropertiesStore(ItemRandomPropertiesfmt)
bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId)
Definition: DBCStores.cpp:694
ACE_UINT8 uint8
Definition: Define.h:73
DBCStorage< GtRegenHPPerSptEntry > sGtRegenHPPerSptStore(GtRegenHPPerSptfmt)
const char ItemSetEntryfmt[]
Definition: DBCfmt.h:64
DBCStorage< SoundEntriesEntry > const * GetSoundEntriesStore()
Definition: DBCStores.cpp:772
std::list< std::string > StoreProblemList
Definition: DBCStores.cpp:156
DBCStorage< ChrRacesEntry > sChrRacesStore(ChrRacesEntryfmt)
void Zone2MapCoordinates(float &x, float &y, uint32 zone)
Definition: DBCStores.cpp:722
std::map< uint32, TalentSpellPos > TalentSpellPosMap
const char ItemRandomSuffixfmt[]
Definition: DBCfmt.h:63
DBCStorage< MailTemplateEntry > sMailTemplateStore(MailTemplateEntryfmt)
const uint8 MAX_LOCALE
Definition: Common.h:224
SpellCategoryStore sSpellCategoryStore
Definition: DBCStores.cpp:119
const char BattlemasterListEntryfmt[]
Definition: DBCfmt.h:25
TalentSpellPos const * GetTalentSpellPos(uint32 spellId)
Definition: DBCStores.cpp:589
uint32 GetFieldCount() const
Definition: DBCStore.h:46
uint32 TalentTab
Definition: DBCStructure.h:931
const char CreatureFamilyfmt[]
Definition: DBCfmt.h:38
DBCStorage< RandomPropertiesPointsEntry > sRandomPropertiesPointsStore(RandomPropertiesPointsfmt)
DBCStorage< SpellFocusObjectEntry > sSpellFocusObjectStore(SpellFocusObjectfmt)
const char GtCombatRatingsfmt[]
Definition: DBCfmt.h:48
const char SpellEntryfmt[]
Definition: DBCfmt.h:76
DBCStorage< ItemEntry > sItemStore(Itemfmt)
const char SkillLineAbilityfmt[]
Definition: DBCfmt.h:72
DBCStorage< CinematicCameraEntry > sCinematicCameraStore(CinematicCameraEntryfmt)
#define CLASSMASK_ALL_PLAYABLE
Definition: SharedDefines.h:93
uint64 SpellFamilyFlags
Definition: DBCStructure.h:761
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
DBCStorage< GtCombatRatingsEntry > sGtCombatRatingsStore(GtCombatRatingsfmt)
DBCStorage< TotemCategoryEntry > sTotemCategoryStore(TotemCategoryEntryfmt)
DBCStorage< GtChanceToMeleeCritEntry > sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt)
const char ChrClassesEntryfmt[]
Definition: DBCfmt.h:33
const char MailTemplateEntryfmt[]
Definition: DBCfmt.h:67
DBCStorage< CinematicSequencesEntry > sCinematicSequencesStore(CinematicSequencesEntryfmt)
const char AuctionHouseEntryfmt[]
Definition: DBCfmt.h:22
const char SpellShapeshiftfmt[]
Definition: DBCfmt.h:82
DBCStorage< AuctionHouseEntry > sAuctionHouseStore(AuctionHouseEntryfmt)
bool IsAcceptableClientBuild(uint32 build)
Definition: DBCStores.cpp:158
DBCStorage< CreatureSpellDataEntry > sCreatureSpellDataStore(CreatureSpellDatafmt)
DBCStorage< CreatureFamilyEntry > sCreatureFamilyStore(CreatureFamilyfmt)
const char SoundEntriesfmt[]
Definition: DBCfmt.h:73
uint32 GetTalentInspectBitPosInTab(uint32 talentId)
Definition: DBCStores.cpp:748
const char FactionEntryfmt[]
Definition: DBCfmt.h:44
const char GtOCTRegenHPfmt[]
Definition: DBCfmt.h:53
#define MAX_CLASSES
Definition: SharedDefines.h:91
const char CreatureDisplayInfofmt[]
Definition: DBCfmt.h:37
TalentSpellPosMap sTalentSpellPosMap
Definition: DBCStores.cpp:131
DBCStorage< GtRegenMPPerSptEntry > sGtRegenMPPerSptStore(GtRegenMPPerSptfmt)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
DBCStorage< GameObjectDisplayInfoEntry > sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt)
std::map< uint16, uint32 > AreaFlagByAreaID
Definition: DBCStores.cpp:26
DBCStorage< StableSlotPricesEntry > sStableSlotPricesStore(StableSlotPricesfmt)
DBCStorage< GtChanceToMeleeCritBaseEntry > sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt)
DBCStorage< SpellDurationEntry > sSpellDurationStore(SpellDurationfmt)
const char RandomPropertiesPointsfmt[]
Definition: DBCfmt.h:70
static uint32 GetFormatRecordSize(const char *format, int32 *index_pos=NULL)
DBCStorage< GtChanceToSpellCritEntry > sGtChanceToSpellCritStore(GtChanceToSpellCritfmt)
uint32 RankID[5]
Definition: DBCStructure.h:934
DBCStorage< GtOCTRegenHPEntry > sGtOCTRegenHPStore(GtOCTRegenHPfmt)
const char TalentTabEntryfmt[]
Definition: DBCfmt.h:86
DBCStorage< TalentTabEntry > sTalentTabStore(TalentTabEntryfmt)
DBCStorage< DurabilityQualityEntry > sDurabilityQualityStore(DurabilityQualityfmt)
bool Load(char const *fn)
Definition: DBCStore.h:51
DBCStorage< SpellRadiusEntry > sSpellRadiusStore(SpellRadiusfmt)
const char QuestSortEntryfmt[]
Definition: DBCfmt.h:69
const char ChatChannelsEntryfmt[]
Definition: DBCfmt.h:30
DBCStorage< GemPropertiesEntry > sGemPropertiesStore(GemPropertiesEntryfmt)
void Map2ZoneCoordinates(float &x, float &y, uint32 zone)
Definition: DBCStores.cpp:735
TaxiPathSetBySource sTaxiPathSetBySource
Definition: DBCStores.cpp:144
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
uint32 Expansion() const
Definition: DBCStructure.h:545
#define EXPECTED_OREGONCORE_CLIENT_BUILD
uint32 GetTalentSpellCost(uint32 spellId)
Definition: DBCStores.cpp:598
#define ASSERT
Definition: Errors.h:29
DBCStorage< GtChanceToSpellCritBaseEntry > sGtChanceToSpellCritBaseStore(GtChanceToSpellCritBasefmt)
#define MAX_SPELL_EFFECTS
Definition: DBCStructure.h:670
const char SkillLinefmt[]
Definition: DBCfmt.h:71
const char SpellFocusObjectfmt[]
Definition: DBCfmt.h:77
const char MapEntryfmt[]
Definition: DBCfmt.h:68
const char GtNPCManaCostScalerfmt[]
Definition: DBCfmt.h:54
uint32 GetTalentTabInspectBitSize(uint32 talentTabId)
Definition: DBCStores.cpp:757
std::vector< TaxiPathNodeList > TaxiPathNodesByPath
const char GtChanceToMeleeCritBasefmt[]
Definition: DBCfmt.h:49
std::map< uint32, uint32 > AreaFlagByMapID
Definition: DBCStores.cpp:27
const char CharStartOutfitEntryfmt[]
Definition: DBCfmt.h:26
const char EmotesTextEntryfmt[]
Definition: DBCfmt.h:43
ACE_UINT16 uint16
Definition: Define.h:72
void LoadDBCStores(const std::string &dataPath)
Definition: DBCStores.cpp:220
PetFamilySpellsStore sPetFamilySpellsStore
Definition: DBCStores.cpp:120
const char WMOAreaTableEntryfmt[]
Definition: DBCfmt.h:92
const char CreatureSpellDatafmt[]
Definition: DBCfmt.h:39
ACE_UINT32 uint32
Definition: Define.h:71
const char Itemfmt[]
Definition: DBCfmt.h:58
const char SpellRadiusfmt[]
Definition: DBCfmt.h:80
ContentLevels
Definition: DBCStores.h:46
const char SpellItemEnchantmentfmt[]
Definition: DBCfmt.h:78
const char TaxiPathNodeEntryfmt[]
Definition: DBCfmt.h:89
DBCStorage< EmotesTextEntry > sEmotesTextStore(EmotesTextEntryfmt)
DBCStorage< TaxiPathEntry > sTaxiPathStore(TaxiPathEntryfmt)
int32 GetAreaFlagByAreaID(uint32 area_id)
Definition: DBCStores.cpp:606
DBCStorage< WorldMapAreaEntry > sWorldMapAreaStore(WorldMapAreaEntryfmt)
std::list< uint32 > SimpleFactionsList
Definition: DBCStores.h:30
const char GtRegenMPPerSptfmt[]
Definition: DBCfmt.h:57
WMOAreaTableTripple(int32 r, int32 a, int32 g)
Definition: DBCStores.cpp:31
DBCStorage< SpellShapeshiftEntry > sSpellShapeshiftStore(SpellShapeshiftfmt)
DBCStorage< SpellRangeEntry > sSpellRangeStore(SpellRangefmt)
const char DurabilityCostsfmt[]
Definition: DBCfmt.h:40
const char WorldSafeLocsEntryfmt[]
Definition: DBCfmt.h:93
DBCStorage< TaxiNodesEntry > sTaxiNodesStore(TaxiNodesEntryfmt)
uint32 GetAreaFlagByMapId(uint32 mapid)
Definition: DBCStores.cpp:643
const char StableSlotPricesfmt[]
Definition: DBCfmt.h:83
ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId)
Definition: DBCStores.cpp:663
const char AreaTriggerEntryfmt[]
Definition: DBCfmt.h:23
DBCStorage< QuestSortEntry > sQuestSortStore(QuestSortEntryfmt)
DBCStorage< SkillLineAbilityEntry > sSkillLineAbilityStore(SkillLineAbilityfmt)
DBCStorage< AreaTableEntry > sAreaStore(AreaTableEntryfmt)
DBCStorage< EmotesEntry > const * GetEmotesStore()
Definition: DBCStores.cpp:784