TrinityCore
DB2Manager Class Reference

#include <DB2Stores.h>

Classes

struct  HotfixOptionalData
 
struct  HotfixRecord
 

Public Types

using HotfixContainer = std::unordered_map< int32, std::vector< HotfixRecord > >
 
using FriendshipRepReactionSet = std::set< FriendshipRepReactionEntry const *, FriendshipRepReactionEntryComparator >
 
using ItemBonusList = std::vector< ItemBonusEntry const * >
 
using MapDifficultyContainer = std::unordered_map< uint32, std::unordered_map< uint32, MapDifficultyEntry const * > >
 
using MapDifficultyConditionsContainer = std::vector< std::pair< uint32, PlayerConditionEntry const * > >
 
using MountTypeXCapabilitySet = std::set< MountTypeXCapabilityEntry const *, MountTypeXCapabilityEntryComparator >
 
using MountXDisplayContainer = std::vector< MountXDisplayEntry const * >
 

Public Member Functions

uint32 LoadStores (std::string const &dataPath, LocaleConstant defaultLocale)
 
DB2StorageBase const * GetStorage (uint32 type) const
 
void LoadHotfixData ()
 
void LoadHotfixBlob (uint32 localeMask)
 
void LoadHotfixOptionalData (uint32 localeMask)
 
uint32 GetHotfixCount () const
 
HotfixContainer const & GetHotfixData () const
 
std::vector< uint8 > const * GetHotfixBlobData (uint32 tableHash, int32 recordId, LocaleConstant locale) const
 
std::vector< HotfixOptionalData > const * GetHotfixOptionalData (uint32 tableHash, int32 recordId, LocaleConstant locale) const
 
uint32 GetEmptyAnimStateID () const
 
std::vector< uint32GetAreasForGroup (uint32 areaGroupId) const
 
std::vector< ArtifactPowerEntry const * > GetArtifactPowers (uint8 artifactId) const
 
std::unordered_set< uint32 > const * GetArtifactPowerLinks (uint32 artifactPowerId) const
 
ArtifactPowerRankEntry const * GetArtifactPowerRank (uint32 artifactPowerId, uint8 rank) const
 
AzeriteEmpoweredItemEntry const * GetAzeriteEmpoweredItem (uint32 itemId) const
 
bool IsAzeriteItem (uint32 itemId) const
 
AzeriteEssencePowerEntry const * GetAzeriteEssencePower (uint32 azeriteEssenceId, uint32 rank) const
 
std::vector< AzeriteItemMilestonePowerEntry const * > const & GetAzeriteItemMilestonePowers () const
 
AzeriteItemMilestonePowerEntry const * GetAzeriteItemMilestonePower (uint8 slot) const
 
std::vector< AzeritePowerSetMemberEntry const * > const * GetAzeritePowers (uint32 itemId) const
 
uint32 GetRequiredAzeriteLevelForAzeritePowerTier (uint32 azeriteUnlockSetId, ItemContext context, uint32 tier) const
 
ChrClassUIDisplayEntry const * GetUiDisplayForClass (Classes unitClass) const
 
uint32 GetPowerIndexByClass (Powers power, uint32 classId) const
 
std::vector< ChrCustomizationChoiceEntry const * > const * GetCustomiztionChoices (uint32 chrCustomizationOptionId) const
 
std::vector< ChrCustomizationOptionEntry const * > const * GetCustomiztionOptions (uint8 race, uint8 gender) const
 
std::unordered_map< uint32, std::vector< uint32 > > const * GetRequiredCustomizationChoices (uint32 chrCustomizationReqId) const
 
ChrModelEntry const * GetChrModel (uint8 race, uint8 gender) const
 
ChrSpecializationEntry const * GetChrSpecializationByIndex (uint32 class_, uint32 index) const
 
ChrSpecializationEntry const * GetDefaultChrSpecializationForClass (uint32 class_) const
 
Optional< ContentTuningLevelsGetContentTuningData (uint32 contentTuningId, uint32 replacementConditionMask, bool forItem=false) const
 
float GetCurveValueAt (uint32 curveId, float x) const
 
EmotesTextSoundEntry const * GetTextSoundEmoteFor (uint32 emote, uint8 race, uint8 gender, uint8 class_) const
 
float EvaluateExpectedStat (ExpectedStatType stat, uint32 level, int32 expansion, uint32 contentTuningId, Classes unitClass) const
 
std::vector< uint32 > const * GetFactionTeamList (uint32 faction) const
 
FriendshipRepReactionSet const * GetFriendshipRepReactions (uint32 friendshipRepID) const
 
uint32 GetGlobalCurveId (GlobalCurve globalCurveType) const
 
std::vector< uint32 > const * GetGlyphBindableSpells (uint32 glyphPropertiesId) const
 
std::vector< uint32 > const * GetGlyphRequiredSpecs (uint32 glyphPropertiesId) const
 
HeirloomEntry const * GetHeirloomByItemId (uint32 itemId) const
 
ItemBonusList const * GetItemBonusList (uint32 bonusListId) const
 
uint32 GetItemBonusListForItemLevelDelta (int16 delta) const
 
std::set< uint32GetDefaultItemBonusTree (uint32 itemId, ItemContext itemContext) const
 
std::set< uint32GetAllItemBonusTreeBonuses (uint32 itemBonusTreeId) const
 
ItemChildEquipmentEntry const * GetItemChildEquipment (uint32 itemId) const
 
ItemClassEntry const * GetItemClassByOldEnum (uint32 itemClass) const
 
bool HasItemCurrencyCost (uint32 itemId) const
 
std::vector< ItemLimitCategoryConditionEntry const * > const * GetItemLimitCategoryConditions (uint32 categoryId) const
 
uint32 GetItemDisplayId (uint32 itemId, uint32 appearanceModId) const
 
ItemModifiedAppearanceEntry const * GetItemModifiedAppearance (uint32 itemId, uint32 appearanceModId) const
 
ItemModifiedAppearanceEntry const * GetDefaultItemModifiedAppearance (uint32 itemId) const
 
std::vector< ItemSetSpellEntry const * > const * GetItemSetSpells (uint32 itemSetId) const
 
std::vector< ItemSpecOverrideEntry const * > const * GetItemSpecOverrides (uint32 itemId) const
 
MapDifficultyContainer const & GetMapDifficulties () const
 
MapDifficultyEntry const * GetDefaultMapDifficulty (uint32 mapId, Difficulty *difficulty=nullptr) const
 
MapDifficultyEntry const * GetMapDifficultyData (uint32 mapId, Difficulty difficulty) const
 
MapDifficultyEntry const * GetDownscaledMapDifficultyData (uint32 mapId, Difficulty &difficulty) const
 
MapDifficultyConditionsContainer const * GetMapDifficultyConditions (uint32 mapDifficultyId) const
 
MountEntry const * GetMount (uint32 spellId) const
 
MountEntry const * GetMountById (uint32 id) const
 
MountTypeXCapabilitySet const * GetMountCapabilities (uint32 mountType) const
 
MountXDisplayContainer const * GetMountDisplays (uint32 mountId) const
 
std::string GetNameGenEntry (uint8 race, uint8 gender) const
 
ResponseCodes ValidateName (std::wstring const &name, LocaleConstant locale) const
 
ParagonReputationEntry const * GetParagonReputation (uint32 factionId) const
 
std::vector< uint32 > const * GetPhasesForGroup (uint32 group) const
 
PowerTypeEntry const * GetPowerTypeEntry (Powers power) const
 
PowerTypeEntry const * GetPowerTypeByName (std::string const &name) const
 
uint8 GetPvpItemLevelBonus (uint32 itemId) const
 
uint32 GetRequiredLevelForPvpTalentSlot (uint8 slot, Classes class_) const
 
int32 GetPvpTalentNumSlotsAtLevel (uint32 level, Classes class_) const
 
std::unordered_set< QuestLineXQuestEntry const * > const * GetQuestsForQuestLine (uint32 questLineId) const
 
std::vector< QuestPackageItemEntry const * > const * GetQuestPackageItems (uint32 questPackageID) const
 
std::vector< QuestPackageItemEntry const * > const * GetQuestPackageItemsFallback (uint32 questPackageID) const
 
uint32 GetQuestUniqueBitFlag (uint32 questId)
 
std::vector< RewardPackXCurrencyTypeEntry const * > const * GetRewardPackCurrencyTypesByRewardID (uint32 rewardPackID) const
 
std::vector< RewardPackXItemEntry const * > const * GetRewardPackItemsByRewardID (uint32 rewardPackID) const
 
ShapeshiftFormModelData const * GetShapeshiftFormModelData (uint8 race, uint8 gender, uint8 form) const
 
std::vector< SkillLineEntry const * > const * GetSkillLinesForParentSkill (uint32 parentSkillId) const
 
std::vector< SkillLineAbilityEntry const * > const * GetSkillLineAbilitiesBySkill (uint32 skillId) const
 
SkillRaceClassInfoEntry const * GetSkillRaceClassInfo (uint32 skill, uint8 race, uint8 class_)
 
std::vector< SpecializationSpellsEntry const * > const * GetSpecializationSpells (uint32 specId) const
 
bool IsSpecSetMember (int32 specSetId, uint32 specId) const
 
std::vector< SpellProcsPerMinuteModEntry const * > GetSpellProcsPerMinuteMods (uint32 spellprocsPerMinuteId) const
 
std::vector< TalentEntry const * > const & GetTalentsByPosition (uint32 class_, uint32 tier, uint32 column) const
 
bool IsToyItem (uint32 toy) const
 
std::vector< TransmogSetEntry const * > const * GetTransmogSetsForItemModifiedAppearance (uint32 itemModifiedAppearanceId) const
 
std::vector< TransmogSetItemEntry const * > const * GetTransmogSetItems (uint32 transmogSetId) const
 
void Zone2MapCoordinates (uint32 areaId, float &x, float &y) const
 
void Map2ZoneCoordinates (uint32 areaId, float &x, float &y) const
 
bool IsUiMapPhase (uint32 phaseId) const
 
WMOAreaTableEntry const * GetWMOAreaTable (int32 rootId, int32 adtId, int32 groupId) const
 

Static Public Member Functions

static DB2ManagerInstance ()
 
static bool IsInArea (uint32 objectAreaId, uint32 areaId)
 
static char const * GetBroadcastTextValue (BroadcastTextEntry const *broadcastText, LocaleConstant locale=DEFAULT_LOCALE, uint8 gender=GENDER_MALE, bool forceGender=false)
 
static char const * GetClassName (uint8 class_, LocaleConstant locale=DEFAULT_LOCALE)
 
static char const * GetChrRaceName (uint8 race, LocaleConstant locale=DEFAULT_LOCALE)
 
static char const * GetCreatureFamilyPetName (uint32 petfamily, LocaleConstant locale)
 
static LFGDungeonsEntry const * GetLfgDungeon (uint32 mapId, Difficulty difficulty)
 
static uint32 GetDefaultMapLight (uint32 mapId)
 
static uint32 GetLiquidFlags (uint32 liquidType)
 
static int32 GetNumTalentsAtLevel (uint32 level, Classes playerClass)
 
static PVPDifficultyEntry const * GetBattlegroundBracketByLevel (uint32 mapid, uint32 level)
 
static PVPDifficultyEntry const * GetBattlegroundBracketById (uint32 mapid, BattlegroundBracketId id)
 
static bool IsValidSpellFamiliyName (SpellFamilyNames family)
 
static bool IsTotemCategoryCompatibleWith (uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId)
 
static bool GetUiMapPosition (float x, float y, float z, int32 mapId, int32 areaId, int32 wmoDoodadPlacementId, int32 wmoGroupId, UiMapSystem system, bool local, int32 *uiMapId=nullptr, DBCPosition2D *newPos=nullptr)
 

Private Member Functions

void InsertNewHotfix (uint32 tableHash, uint32 recordId)
 

Private Attributes

int32 _maxHotfixId = 0
 

Friends

class DB2HotfixGeneratorBase
 

Member Typedef Documentation

◆ FriendshipRepReactionSet

using DB2Manager::FriendshipRepReactionSet = std::set<FriendshipRepReactionEntry const*, FriendshipRepReactionEntryComparator>

◆ HotfixContainer

using DB2Manager::HotfixContainer = std::unordered_map<int32, std::vector<HotfixRecord> >

◆ ItemBonusList

using DB2Manager::ItemBonusList = std::vector<ItemBonusEntry const*>

◆ MapDifficultyConditionsContainer

◆ MapDifficultyContainer

using DB2Manager::MapDifficultyContainer = std::unordered_map<uint32, std::unordered_map<uint32, MapDifficultyEntry const*> >

◆ MountTypeXCapabilitySet

using DB2Manager::MountTypeXCapabilitySet = std::set<MountTypeXCapabilityEntry const*, MountTypeXCapabilityEntryComparator>

◆ MountXDisplayContainer

Member Function Documentation

◆ EvaluateExpectedStat()

float DB2Manager::EvaluateExpectedStat ( ExpectedStatType  stat,
uint32  level,
int32  expansion,
uint32  contentTuningId,
Classes  unitClass 
) const
2163 {
2164  auto expectedStatItr = _expectedStatsByLevel.find(std::make_pair(level, expansion));
2165  if (expectedStatItr == _expectedStatsByLevel.end())
2166  expectedStatItr = _expectedStatsByLevel.find(std::make_pair(level, -2));
2167 
2168  if (expectedStatItr == _expectedStatsByLevel.end())
2169  return 1.0f;
2170 
2171  ExpectedStatModEntry const* classMod = nullptr;
2172  switch (unitClass)
2173  {
2174  case CLASS_WARRIOR:
2175  classMod = sExpectedStatModStore.LookupEntry(4);
2176  break;
2177  case CLASS_PALADIN:
2178  classMod = sExpectedStatModStore.LookupEntry(2);
2179  break;
2180  case CLASS_ROGUE:
2181  classMod = sExpectedStatModStore.LookupEntry(3);
2182  break;
2183  case CLASS_MAGE:
2184  classMod = sExpectedStatModStore.LookupEntry(1);
2185  break;
2186  default:
2187  break;
2188  }
2189 
2190  std::vector<ContentTuningXExpectedEntry const*> const* contentTuningMods = Trinity::Containers::MapGetValuePtr(_expectedStatModsByContentTuning, contentTuningId);
2191  float value = 0.0f;
2192  switch (stat)
2193  {
2195  value = expectedStatItr->second->CreatureHealth;
2196  if (contentTuningMods)
2197  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::CreatureHealthMod>());
2198  if (classMod)
2199  value *= classMod->CreatureHealthMod;
2200  break;
2202  value = expectedStatItr->second->PlayerHealth;
2203  if (contentTuningMods)
2204  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::PlayerHealthMod>());
2205  if (classMod)
2206  value *= classMod->PlayerHealthMod;
2207  break;
2209  value = expectedStatItr->second->CreatureAutoAttackDps;
2210  if (contentTuningMods)
2211  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::CreatureAutoAttackDPSMod>());
2212  if (classMod)
2213  value *= classMod->CreatureAutoAttackDPSMod;
2214  break;
2216  value = expectedStatItr->second->CreatureArmor;
2217  if (contentTuningMods)
2218  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::CreatureArmorMod>());
2219  if (classMod)
2220  value *= classMod->CreatureArmorMod;
2221  break;
2223  value = expectedStatItr->second->PlayerMana;
2224  if (contentTuningMods)
2225  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::PlayerManaMod>());
2226  if (classMod)
2227  value *= classMod->PlayerManaMod;
2228  break;
2230  value = expectedStatItr->second->PlayerPrimaryStat;
2231  if (contentTuningMods)
2232  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::PlayerPrimaryStatMod>());
2233  if (classMod)
2234  value *= classMod->PlayerPrimaryStatMod;
2235  break;
2237  value = expectedStatItr->second->PlayerSecondaryStat;
2238  if (contentTuningMods)
2239  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::PlayerSecondaryStatMod>());
2240  if (classMod)
2241  value *= classMod->PlayerSecondaryStatMod;
2242  break;
2244  value = expectedStatItr->second->ArmorConstant;
2245  if (contentTuningMods)
2246  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::ArmorConstantMod>());
2247  if (classMod)
2248  value *= classMod->ArmorConstantMod;
2249  break;
2251  break;
2253  value = expectedStatItr->second->CreatureSpellDamage;
2254  if (contentTuningMods)
2255  value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f, ExpectedStatModReducer<&ExpectedStatModEntry::CreatureSpellDamageMod>());
2256  if (classMod)
2257  value *= classMod->CreatureSpellDamageMod;
2258  break;
2259  default:
2260  break;
2261  }
2262 
2263  return value;
2264 }
Definition: SharedDefines.h:139
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
Definition: SharedDefines.h:138
float CreatureHealthMod
Definition: DB2Structure.h:1391
float CreatureArmorMod
Definition: DB2Structure.h:1394
Definition: DB2Stores.cpp:2139
float PlayerHealthMod
Definition: DB2Structure.h:1392
float PlayerPrimaryStatMod
Definition: DB2Structure.h:1396
Definition: SharedDefines.h:145
float PlayerManaMod
Definition: DB2Structure.h:1395
Definition: SharedDefines.h:141
float CreatureAutoAttackDPSMod
Definition: DB2Structure.h:1393
Definition: DB2Structure.h:1388
float ArmorConstantMod
Definition: DB2Structure.h:1398
float PlayerSecondaryStatMod
Definition: DB2Structure.h:1397
DB2Storage< ExpectedStatModEntry > sExpectedStatModStore("ExpectedStatMod.db2", ExpectedStatModLoadInfo::Instance())
float CreatureSpellDamageMod
Definition: DB2Structure.h:1399
+ Here is the call graph for this function:

◆ GetAllItemBonusTreeBonuses()

std::set< uint32 > DB2Manager::GetAllItemBonusTreeBonuses ( uint32  itemBonusTreeId) const
2419 {
2420  std::set<uint32> bonusListIDs;
2421  VisitItemBonusTree(itemBonusTreeId, true, [&bonusListIDs](ItemBonusTreeNodeEntry const* bonusTreeNode)
2422  {
2423  if (bonusTreeNode->ChildItemBonusListID)
2424  bonusListIDs.insert(bonusTreeNode->ChildItemBonusListID);
2425  });
2426  return bonusListIDs;
2427 }
Definition: DB2Structure.h:1906
void VisitItemBonusTree(uint32 itemBonusTreeId, bool visitChildren, Visitor visitor)
Definition: DB2Stores.cpp:2315
uint16 ChildItemBonusListID
Definition: DB2Structure.h:1911
+ Here is the call graph for this function:

◆ GetAreasForGroup()

std::vector< uint32 > DB2Manager::GetAreasForGroup ( uint32  areaGroupId) const
1738 {
1739  auto itr = _areaGroupMembers.find(areaGroupId);
1740  if (itr != _areaGroupMembers.end())
1741  return itr->second;
1742 
1743  return std::vector<uint32>();
1744 }

◆ GetArtifactPowerLinks()

std::unordered_set< uint32 > const * DB2Manager::GetArtifactPowerLinks ( uint32  artifactPowerId) const
1773 {
1774  return Trinity::Containers::MapGetValuePtr(_artifactPowerLinks, artifactPowerId);
1775 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetArtifactPowerRank()

ArtifactPowerRankEntry const * DB2Manager::GetArtifactPowerRank ( uint32  artifactPowerId,
uint8  rank 
) const
1778 {
1779  return Trinity::Containers::MapGetValuePtr(_artifactPowerRanks, { artifactPowerId, rank });
1780 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetArtifactPowers()

std::vector< ArtifactPowerEntry const * > DB2Manager::GetArtifactPowers ( uint8  artifactId) const
1764 {
1765  auto itr = _artifactPowers.find(artifactId);
1766  if (itr != _artifactPowers.end())
1767  return itr->second;
1768 
1769  return std::vector<ArtifactPowerEntry const*>{};
1770 }

◆ GetAzeriteEmpoweredItem()

AzeriteEmpoweredItemEntry const * DB2Manager::GetAzeriteEmpoweredItem ( uint32  itemId) const
1783 {
1784  return Trinity::Containers::MapGetValuePtr(_azeriteEmpoweredItems, itemId);
1785 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetAzeriteEssencePower()

AzeriteEssencePowerEntry const * DB2Manager::GetAzeriteEssencePower ( uint32  azeriteEssenceId,
uint32  rank 
) const
1794 {
1795  return Trinity::Containers::MapGetValuePtr(_azeriteEssencePowersByIdAndRank, std::make_pair(azeriteEssenceId, rank));
1796 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetAzeriteItemMilestonePower()

AzeriteItemMilestonePowerEntry const * DB2Manager::GetAzeriteItemMilestonePower ( uint8  slot) const
1804 {
1805  ASSERT(slot < MAX_AZERITE_ESSENCE_SLOT, "Slot %u must be lower than MAX_AZERITE_ESSENCE_SLOT (%u)", uint32(slot), MAX_AZERITE_ESSENCE_SLOT);
1806  return _azeriteItemMilestonePowerByEssenceSlot[slot];
1807 }
#define MAX_AZERITE_ESSENCE_SLOT
Definition: DBCEnums.h:179
uint32_t uint32
Definition: Define.h:152
#define ASSERT
Definition: Errors.h:61

◆ GetAzeriteItemMilestonePowers()

std::vector< AzeriteItemMilestonePowerEntry const * > const & DB2Manager::GetAzeriteItemMilestonePowers ( ) const
1799 {
1800  return _azeriteItemMilestonePowers;
1801 }

◆ GetAzeritePowers()

std::vector< AzeritePowerSetMemberEntry const * > const * DB2Manager::GetAzeritePowers ( uint32  itemId) const
1810 {
1811  if (AzeriteEmpoweredItemEntry const* azeriteEmpoweredItem = GetAzeriteEmpoweredItem(itemId))
1812  return Trinity::Containers::MapGetValuePtr(_azeritePowers, azeriteEmpoweredItem->AzeritePowerSetID);
1813 
1814  return nullptr;
1815 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
Definition: DB2Structure.h:325
AzeriteEmpoweredItemEntry const * GetAzeriteEmpoweredItem(uint32 itemId) const
Definition: DB2Stores.cpp:1782
+ Here is the call graph for this function:

◆ GetBattlegroundBracketById()

PVPDifficultyEntry const * DB2Manager::GetBattlegroundBracketById ( uint32  mapid,
BattlegroundBracketId  id 
)
static
2730 {
2731  for (PVPDifficultyEntry const* entry : sPVPDifficultyStore)
2732  if (entry->MapID == mapid && entry->GetBracketId() == id)
2733  return entry;
2734 
2735  return nullptr;
2736 }
Definition: DB2Structure.h:2697
DB2Storage< PVPDifficultyEntry > sPVPDifficultyStore("PVPDifficulty.db2", PvpDifficultyLoadInfo::Instance())
+ Here is the caller graph for this function:

◆ GetBattlegroundBracketByLevel()

PVPDifficultyEntry const * DB2Manager::GetBattlegroundBracketByLevel ( uint32  mapid,
uint32  level 
)
static
2709 {
2710  PVPDifficultyEntry const* maxEntry = nullptr; // used for level > max listed level case
2711  for (PVPDifficultyEntry const* entry : sPVPDifficultyStore)
2712  {
2713  // skip unrelated and too-high brackets
2714  if (entry->MapID != mapid || entry->MinLevel > level)
2715  continue;
2716 
2717  // exactly fit
2718  if (entry->MaxLevel >= level)
2719  return entry;
2720 
2721  // remember for possible out-of-range case (search higher from existed)
2722  if (!maxEntry || maxEntry->MaxLevel < entry->MaxLevel)
2723  maxEntry = entry;
2724  }
2725 
2726  return maxEntry;
2727 }
uint8 MaxLevel
Definition: DB2Structure.h:2702
Definition: DB2Structure.h:2697
DB2Storage< PVPDifficultyEntry > sPVPDifficultyStore("PVPDifficulty.db2", PvpDifficultyLoadInfo::Instance())
+ Here is the caller graph for this function:

◆ GetBroadcastTextValue()

char const * DB2Manager::GetBroadcastTextValue ( BroadcastTextEntry const *  broadcastText,
LocaleConstant  locale = DEFAULT_LOCALE,
uint8  gender = GENDER_MALE,
bool  forceGender = false 
)
static
1832 {
1833  if ((gender == GENDER_FEMALE || gender == GENDER_NONE) && (forceGender || broadcastText->Text1[DEFAULT_LOCALE][0] != '\0'))
1834  {
1835  if (broadcastText->Text1[locale][0] != '\0')
1836  return broadcastText->Text1[locale];
1837 
1838  return broadcastText->Text1[DEFAULT_LOCALE];
1839  }
1840 
1841  if (broadcastText->Text[locale][0] != '\0')
1842  return broadcastText->Text[locale];
1843 
1844  return broadcastText->Text[DEFAULT_LOCALE];
1845 }
Definition: SharedDefines.h:130
#define DEFAULT_LOCALE
Definition: Common.h:99
Definition: SharedDefines.h:131
+ Here is the caller graph for this function:

◆ GetChrModel()

ChrModelEntry const * DB2Manager::GetChrModel ( uint8  race,
uint8  gender 
) const
1886 {
1887  return Trinity::Containers::MapGetValuePtr(_chrModelsByRaceAndGender, { race, gender });
1888 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetChrRaceName()

char const * DB2Manager::GetChrRaceName ( uint8  race,
LocaleConstant  locale = DEFAULT_LOCALE 
)
static
1891 {
1892  ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(race);
1893  if (!raceEntry)
1894  return "";
1895 
1896  if (raceEntry->Name[locale][0] != '\0')
1897  return raceEntry->Name[locale];
1898 
1899  return raceEntry->Name[DEFAULT_LOCALE];
1900 }
Definition: DB2Structure.h:738
DB2Storage< ChrRacesEntry > sChrRacesStore("ChrRaces.db2", ChrRacesLoadInfo::Instance())
#define DEFAULT_LOCALE
Definition: Common.h:99
LocalizedString Name
Definition: DB2Structure.h:743
+ Here is the caller graph for this function:

◆ GetChrSpecializationByIndex()

ChrSpecializationEntry const * DB2Manager::GetChrSpecializationByIndex ( uint32  class_,
uint32  index 
) const
1903 {
1904  return _chrSpecializationsByIndex[class_][index];
1905 }

◆ GetClassName()

char const * DB2Manager::GetClassName ( uint8  class_,
LocaleConstant  locale = DEFAULT_LOCALE 
)
static
1854 {
1855  ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_);
1856  if (!classEntry)
1857  return "";
1858 
1859  if (classEntry->Name[locale][0] != '\0')
1860  return classEntry->Name[locale];
1861 
1862  return classEntry->Name[DEFAULT_LOCALE];
1863 }
LocalizedString Name
Definition: DB2Structure.h:592
DB2Storage< ChrClassesEntry > sChrClassesStore("ChrClasses.db2", ChrClassesLoadInfo::Instance())
Definition: DB2Structure.h:590
#define DEFAULT_LOCALE
Definition: Common.h:99
+ Here is the caller graph for this function:

◆ GetContentTuningData()

Optional< ContentTuningLevels > DB2Manager::GetContentTuningData ( uint32  contentTuningId,
uint32  replacementConditionMask,
bool  forItem = false 
) const
1913 {
1914  ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(contentTuningId);
1915  if (!contentTuning)
1916  return {};
1917 
1918  if (forItem && contentTuning->GetFlags().HasFlag(ContentTuningFlag::DisabledForItem))
1919  return {};
1920 
1921  auto getLevelAdjustment = [](ContentTuningCalcType type) -> int32
1922  {
1923  switch (type)
1924  {
1926  return 1;
1928  return GetMaxLevelForExpansion(sWorld->getIntConfig(CONFIG_EXPANSION));
1929  default:
1930  break;
1931  }
1932 
1933  return 0;
1934  };
1935 
1936  ContentTuningLevels levels;
1937  levels.MinLevel = contentTuning->MinLevel + getLevelAdjustment(static_cast<ContentTuningCalcType>(contentTuning->MinLevelType));
1938  levels.MaxLevel = contentTuning->MaxLevel + getLevelAdjustment(static_cast<ContentTuningCalcType>(contentTuning->MaxLevelType));
1939  levels.MinLevelWithDelta = advstd::clamp<int32>(levels.MinLevel + contentTuning->TargetLevelDelta, 1, MAX_LEVEL);
1940  levels.MaxLevelWithDelta = advstd::clamp<int32>(levels.MaxLevel + contentTuning->TargetLevelMaxDelta, 1, MAX_LEVEL);
1941 
1942  // clamp after calculating levels with delta (delta can bring "overflown" level back into correct range)
1943  levels.MinLevel = advstd::clamp<int32>(levels.MinLevel, 1, MAX_LEVEL);
1944  levels.MaxLevel = advstd::clamp<int32>(levels.MaxLevel, 1, MAX_LEVEL);
1945 
1946  if (contentTuning->TargetLevelMin)
1947  levels.TargetLevelMin = contentTuning->TargetLevelMin;
1948  else
1949  levels.TargetLevelMin = levels.MinLevelWithDelta;
1950 
1951  if (contentTuning->TargetLevelMax)
1952  levels.TargetLevelMax = contentTuning->TargetLevelMax;
1953  else
1954  levels.TargetLevelMax = levels.MaxLevelWithDelta;
1955 
1956  return levels;
1957 }
int32 TargetLevelDelta
Definition: DB2Structure.h:845
int16 TargetLevelMax
Definition: DB2Stores.h:247
int32 MaxLevel
Definition: DB2Structure.h:842
Definition: DB2Structure.h:836
int16 MaxLevelWithDelta
Definition: DB2Stores.h:245
ContentTuningCalcType
Definition: DBCEnums.h:250
DB2Storage< ContentTuningEntry > sContentTuningStore("ContentTuning.db2", ContentTuningLoadInfo::Instance())
int16 MaxLevel
Definition: DB2Stores.h:243
EnumFlag< ContentTuningFlag > GetFlags() const
Definition: DB2Structure.h:851
#define sWorld
Definition: World.h:926
int32 MaxLevelType
Definition: DB2Structure.h:844
int32 TargetLevelMax
Definition: DB2Structure.h:848
int32 MinLevel
Definition: DB2Structure.h:841
int32 MinLevelType
Definition: DB2Structure.h:843
int32_t int32
Definition: Define.h:148
Definition: DBCEnums.h:51
Definition: World.h:296
int16 MinLevel
Definition: DB2Stores.h:242
int16 MinLevelWithDelta
Definition: DB2Stores.h:244
int32 TargetLevelMin
Definition: DB2Structure.h:847
int16 TargetLevelMin
Definition: DB2Stores.h:246
int32 TargetLevelMaxDelta
Definition: DB2Structure.h:846
Definition: DB2Stores.h:240
constexpr uint32 GetMaxLevelForExpansion(uint32 expansion)
Definition: SharedDefines.h:98
+ Here is the call graph for this function:

◆ GetCreatureFamilyPetName()

char const * DB2Manager::GetCreatureFamilyPetName ( uint32  petfamily,
LocaleConstant  locale 
)
static
1960 {
1961  if (!petfamily)
1962  return nullptr;
1963 
1964  CreatureFamilyEntry const* petFamily = sCreatureFamilyStore.LookupEntry(petfamily);
1965  if (!petFamily)
1966  return nullptr;
1967 
1968  return petFamily->Name[locale][0] != '\0' ? petFamily->Name[locale] : nullptr;
1969 }
DB2Storage< CreatureFamilyEntry > sCreatureFamilyStore("CreatureFamily.db2", CreatureFamilyLoadInfo::Instance())
LocalizedString Name
Definition: DB2Structure.h:951
Definition: DB2Structure.h:948
+ Here is the caller graph for this function:

◆ GetCurveValueAt()

float DB2Manager::GetCurveValueAt ( uint32  curveId,
float  x 
) const
2015 {
2016  auto itr = _curvePoints.find(curveId);
2017  if (itr == _curvePoints.end())
2018  return 0.0f;
2019 
2020  CurveEntry const* curve = sCurveStore.AssertEntry(curveId);
2021  std::vector<CurvePointEntry const*> const& points = itr->second;
2022  if (points.empty())
2023  return 0.0f;
2024 
2025  switch (DetermineCurveType(curve, points))
2026  {
2028  {
2029  std::size_t pointIndex = 0;
2030  while (pointIndex < points.size() && points[pointIndex]->Pos.X <= x)
2031  ++pointIndex;
2032  if (!pointIndex)
2033  return points[0]->Pos.Y;
2034  if (pointIndex >= points.size())
2035  return points.back()->Pos.Y;
2036  float xDiff = points[pointIndex]->Pos.X - points[pointIndex - 1]->Pos.X;
2037  if (xDiff == 0.0)
2038  return points[pointIndex]->Pos.Y;
2039  return (((x - points[pointIndex - 1]->Pos.X) / xDiff) * (points[pointIndex]->Pos.Y - points[pointIndex - 1]->Pos.Y)) + points[pointIndex - 1]->Pos.Y;
2040  }
2042  {
2043  std::size_t pointIndex = 0;
2044  while (pointIndex < points.size() && points[pointIndex]->Pos.X <= x)
2045  ++pointIndex;
2046  if (!pointIndex)
2047  return points[0]->Pos.Y;
2048  if (pointIndex >= points.size())
2049  return points.back()->Pos.Y;
2050  float xDiff = points[pointIndex]->Pos.X - points[pointIndex - 1]->Pos.X;
2051  if (xDiff == 0.0)
2052  return points[pointIndex]->Pos.Y;
2053  return ((points[pointIndex]->Pos.Y - points[pointIndex - 1]->Pos.Y) * (1.0f - std::cos((x - points[pointIndex - 1]->Pos.X) / xDiff * float(M_PI))) * 0.5f) + points[pointIndex - 1]->Pos.Y;
2054  }
2056  {
2057  std::size_t pointIndex = 1;
2058  while (pointIndex < points.size() && points[pointIndex]->Pos.X <= x)
2059  ++pointIndex;
2060  if (pointIndex == 1)
2061  return points[1]->Pos.Y;
2062  if (pointIndex >= points.size() - 1)
2063  return points[points.size() - 2]->Pos.Y;
2064  float xDiff = points[pointIndex]->Pos.X - points[pointIndex - 1]->Pos.X;
2065  if (xDiff == 0.0)
2066  return points[pointIndex]->Pos.Y;
2067 
2068  float mu = (x - points[pointIndex - 1]->Pos.X) / xDiff;
2069  float a0 = -0.5f * points[pointIndex - 2]->Pos.Y + 1.5f * points[pointIndex - 1]->Pos.Y - 1.5f * points[pointIndex]->Pos.Y + 0.5f * points[pointIndex + 1]->Pos.Y;
2070  float a1 = points[pointIndex - 2]->Pos.Y - 2.5f * points[pointIndex - 1]->Pos.Y + 2.0f * points[pointIndex]->Pos.Y - 0.5f * points[pointIndex + 1]->Pos.Y;
2071  float a2 = -0.5f * points[pointIndex - 2]->Pos.Y + 0.5f * points[pointIndex]->Pos.Y;
2072  float a3 = points[pointIndex - 1]->Pos.Y;
2073 
2074  return a0 * mu * mu * mu + a1 * mu * mu + a2 * mu + a3;
2075  }
2077  {
2078  float xDiff = points[2]->Pos.X - points[0]->Pos.X;
2079  if (xDiff == 0.0)
2080  return points[1]->Pos.Y;
2081  float mu = (x - points[0]->Pos.X) / xDiff;
2082  return ((1.0f - mu) * (1.0f - mu) * points[0]->Pos.Y) + (1.0f - mu) * 2.0f * mu * points[1]->Pos.Y + mu * mu * points[2]->Pos.Y;
2083  }
2085  {
2086  float xDiff = points[3]->Pos.X - points[0]->Pos.X;
2087  if (xDiff == 0.0)
2088  return points[1]->Pos.Y;
2089  float mu = (x - points[0]->Pos.X) / xDiff;
2090  return (1.0f - mu) * (1.0f - mu) * (1.0f - mu) * points[0]->Pos.Y
2091  + 3.0f * mu * (1.0f - mu) * (1.0f - mu) * points[1]->Pos.Y
2092  + 3.0f * mu * mu * (1.0f - mu) * points[2]->Pos.Y
2093  + mu * mu * mu * points[3]->Pos.Y;
2094  }
2096  {
2097  float xDiff = points.back()->Pos.X - points[0]->Pos.X;
2098  if (xDiff == 0.0f)
2099  return points.back()->Pos.Y;
2100 
2101  std::vector<float> tmp(points.size());
2102  for (std::size_t i = 0; i < points.size(); ++i)
2103  tmp[i] = points[i]->Pos.Y;
2104 
2105  float mu = (x - points[0]->Pos.X) / xDiff;
2106  int32 i = int32(points.size()) - 1;
2107  while (i > 0)
2108  {
2109  for (int32 k = 0; k < i; ++k)
2110  {
2111  float val = tmp[k] + mu * (tmp[k + 1] - tmp[k]);
2112  tmp[k] = val;
2113  }
2114  --i;
2115  }
2116  return tmp[0];
2117  }
2119  return points[0]->Pos.Y;
2120  default:
2121  break;
2122  }
2123 
2124  return 0.0f;
2125 }
static CurveInterpolationMode DetermineCurveType(CurveEntry const *curve, std::vector< CurvePointEntry const *> const &points)
Definition: DB2Stores.cpp:1982
#define M_PI
Definition: Common.h:134
int32_t int32
Definition: Define.h:148
Definition: DB2Structure.h:1252
DB2Storage< CurveEntry > sCurveStore("Curve.db2", CurveLoadInfo::Instance())
+ Here is the call graph for this function:

◆ GetCustomiztionChoices()

std::vector< ChrCustomizationChoiceEntry const * > const * DB2Manager::GetCustomiztionChoices ( uint32  chrCustomizationOptionId) const
1871 {
1872  return Trinity::Containers::MapGetValuePtr(_chrCustomizationChoicesByOption, chrCustomizationOptionId);
1873 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetCustomiztionOptions()

std::vector< ChrCustomizationOptionEntry const * > const * DB2Manager::GetCustomiztionOptions ( uint8  race,
uint8  gender 
) const
1876 {
1877  return Trinity::Containers::MapGetValuePtr(_chrCustomizationOptionsByRaceAndGender, { race,gender });
1878 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetDefaultChrSpecializationForClass()

ChrSpecializationEntry const * DB2Manager::GetDefaultChrSpecializationForClass ( uint32  class_) const
1908 {
1910 }
#define INITIAL_SPECIALIZATION_INDEX
Definition: SharedDefines.h:923
ChrSpecializationEntry const * GetChrSpecializationByIndex(uint32 class_, uint32 index) const
Definition: DB2Stores.cpp:1902

◆ GetDefaultItemBonusTree()

std::set< uint32 > DB2Manager::GetDefaultItemBonusTree ( uint32  itemId,
ItemContext  itemContext 
) const
2330 {
2331  std::set<uint32> bonusListIDs;
2332 
2333  ItemSparseEntry const* proto = sItemSparseStore.LookupEntry(itemId);
2334  if (!proto)
2335  return bonusListIDs;
2336 
2337  auto itemIdRange = _itemToBonusTree.equal_range(itemId);
2338  if (itemIdRange.first == itemIdRange.second)
2339  return bonusListIDs;
2340 
2341  uint16 itemLevelSelectorId = 0;
2342  for (auto itemTreeItr = itemIdRange.first; itemTreeItr != itemIdRange.second; ++itemTreeItr)
2343  {
2344  uint32 matchingNodes = 0;
2345  VisitItemBonusTree(itemTreeItr->second, false, [itemContext, &matchingNodes](ItemBonusTreeNodeEntry const* bonusTreeNode)
2346  {
2347  if (ItemContext(bonusTreeNode->ItemContext) == ItemContext::NONE || itemContext == ItemContext(bonusTreeNode->ItemContext))
2348  ++matchingNodes;
2349  });
2350 
2351  if (matchingNodes != 1)
2352  continue;
2353 
2354  VisitItemBonusTree(itemTreeItr->second, true, [itemContext, &bonusListIDs, &itemLevelSelectorId](ItemBonusTreeNodeEntry const* bonusTreeNode)
2355  {
2356  ItemContext requiredContext = ItemContext(bonusTreeNode->ItemContext) != ItemContext::Force_to_NONE ? ItemContext(bonusTreeNode->ItemContext) : ItemContext::NONE;
2357  if (ItemContext(bonusTreeNode->ItemContext) != ItemContext::NONE && itemContext != requiredContext)
2358  return;
2359 
2360  if (bonusTreeNode->ChildItemBonusListID)
2361  {
2362  bonusListIDs.insert(bonusTreeNode->ChildItemBonusListID);
2363  }
2364  else if (bonusTreeNode->ChildItemLevelSelectorID)
2365  {
2366  itemLevelSelectorId = bonusTreeNode->ChildItemLevelSelectorID;
2367  }
2368  });
2369  }
2370 
2371  if (ItemLevelSelectorEntry const* selector = sItemLevelSelectorStore.LookupEntry(itemLevelSelectorId))
2372  {
2373  int16 delta = int16(selector->MinItemLevel) - proto->ItemLevel;
2374 
2375  if (uint32 bonus = GetItemBonusListForItemLevelDelta(delta))
2376  bonusListIDs.insert(bonus);
2377 
2378  if (ItemLevelSelectorQualitySetEntry const* selectorQualitySet = sItemLevelSelectorQualitySetStore.LookupEntry(selector->ItemLevelSelectorQualitySetID))
2379  {
2380  auto itemSelectorQualities = _itemLevelQualitySelectorQualities.find(selector->ItemLevelSelectorQualitySetID);
2381  if (itemSelectorQualities != _itemLevelQualitySelectorQualities.end())
2382  {
2384  if (selector->MinItemLevel >= selectorQualitySet->IlvlEpic)
2385  quality = ITEM_QUALITY_EPIC;
2386  else if (selector->MinItemLevel >= selectorQualitySet->IlvlRare)
2387  quality = ITEM_QUALITY_RARE;
2388 
2389  auto itemSelectorQuality = std::lower_bound(itemSelectorQualities->second.begin(), itemSelectorQualities->second.end(),
2391 
2392  if (itemSelectorQuality != itemSelectorQualities->second.end())
2393  bonusListIDs.insert((*itemSelectorQuality)->QualityItemBonusListID);
2394  }
2395  }
2396 
2397  if (AzeriteUnlockMappingEntry const* azeriteUnlockMapping = Trinity::Containers::MapGetValuePtr(_azeriteUnlockMappings, std::make_pair(proto->ID, itemContext)))
2398  {
2399  switch (proto->InventoryType)
2400  {
2401  case INVTYPE_HEAD:
2402  bonusListIDs.insert(azeriteUnlockMapping->ItemBonusListHead);
2403  break;
2404  case INVTYPE_SHOULDERS:
2405  bonusListIDs.insert(azeriteUnlockMapping->ItemBonusListShoulders);
2406  break;
2407  case INVTYPE_CHEST:
2408  case INVTYPE_ROBE:
2409  bonusListIDs.insert(azeriteUnlockMapping->ItemBonusListChest);
2410  break;
2411  }
2412  }
2413  }
2414 
2415  return bonusListIDs;
2416 }
Definition: DB2Structure.h:1906
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
Definition: DB2Structure.h:2132
Definition: DB2Structure.h:2035
void VisitItemBonusTree(uint32 itemBonusTreeId, bool visitChildren, Visitor visitor)
Definition: DB2Stores.cpp:2315
uint16 ChildItemLevelSelectorID
Definition: DB2Structure.h:1912
uint8 InventoryType
Definition: DB2Structure.h:2197
DB2Storage< ItemLevelSelectorQualitySetEntry > sItemLevelSelectorQualitySetStore("ItemLevelSelectorQualitySet.db2", ItemLevelSelectorQualitySetLoadInfo::Instance())
uint32 ID
Definition: DB2Structure.h:2134
Definition: ItemTemplate.h:382
Definition: DB2Structure.h:2019
Definition: DB2Structure.h:417
Definition: ItemTemplate.h:380
Definition: ItemTemplate.h:399
uint32 GetItemBonusListForItemLevelDelta(int16 delta) const
Definition: DB2Stores.cpp:2305
uint16 ItemLevel
Definition: DB2Structure.h:2179
uint32_t uint32
Definition: Define.h:152
Definition: SharedDefines.h:340
uint16_t uint16
Definition: Define.h:153
Definition: DB2Stores.cpp:331
ItemQualities
Definition: SharedDefines.h:336
DB2Storage< ItemLevelSelectorEntry > sItemLevelSelectorStore("ItemLevelSelector.db2", ItemLevelSelectorLoadInfo::Instance())
Definition: ItemTemplate.h:384
Definition: SharedDefines.h:341
int16_t int16
Definition: Define.h:149
DB2Storage< ItemSparseEntry > sItemSparseStore("ItemSparse.db2", ItemSparseLoadInfo::Instance())
Definition: SharedDefines.h:342
+ Here is the call graph for this function:

◆ GetDefaultItemModifiedAppearance()

ItemModifiedAppearanceEntry const * DB2Manager::GetDefaultItemModifiedAppearance ( uint32  itemId) const
2512 {
2513  return Trinity::Containers::MapGetValuePtr(_itemModifiedAppearancesByItem, itemId);
2514 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetDefaultMapDifficulty()

MapDifficultyEntry const * DB2Manager::GetDefaultMapDifficulty ( uint32  mapId,
Difficulty difficulty = nullptr 
) const
2564 {
2565  auto itr = _mapDifficulties.find(mapId);
2566  if (itr == _mapDifficulties.end())
2567  return nullptr;
2568 
2569  if (itr->second.empty())
2570  return nullptr;
2571 
2572  for (auto& p : itr->second)
2573  {
2574  DifficultyEntry const* difficultyEntry = sDifficultyStore.LookupEntry(p.first);
2575  if (!difficultyEntry)
2576  continue;
2577 
2578  if (difficultyEntry->Flags & DIFFICULTY_FLAG_DEFAULT)
2579  {
2580  if (difficulty)
2581  *difficulty = Difficulty(p.first);
2582 
2583  return p.second;
2584  }
2585  }
2586 
2587  if (difficulty)
2588  *difficulty = Difficulty(itr->second.begin()->first);
2589 
2590  return itr->second.begin()->second;
2591 }
Difficulty
Definition: DBCEnums.h:617
uint16 Flags
Definition: DB2Structure.h:1305
DB2Storage< DifficultyEntry > sDifficultyStore("Difficulty.db2", DifficultyLoadInfo::Instance())
Definition: DBCEnums.h:662
Definition: DB2Structure.h:1295

◆ GetDefaultMapLight()

uint32 DB2Manager::GetDefaultMapLight ( uint32  mapId)
static
2536 {
2537  for (int32 i = sLightStore.GetNumRows(); i >= 0; --i)
2538  {
2539  LightEntry const* light = sLightStore.LookupEntry(uint32(i));
2540  if (!light)
2541  continue;
2542 
2543  if (light->ContinentID == int32(mapId) && light->GameCoords.X == 0.0f && light->GameCoords.Y == 0.0f && light->GameCoords.Z == 0.0f)
2544  return uint32(i);
2545  }
2546 
2547  return 0;
2548 }
float Z
Definition: DBCEnums.h:37
float Y
Definition: DBCEnums.h:36
DBCPosition3D GameCoords
Definition: DB2Structure.h:2294
int16 ContinentID
Definition: DB2Structure.h:2297
Definition: DB2Structure.h:2291
int32_t int32
Definition: Define.h:148
uint32_t uint32
Definition: Define.h:152
DB2Storage< LightEntry > sLightStore("Light.db2", LightLoadInfo::Instance())
float X
Definition: DBCEnums.h:35

◆ GetDownscaledMapDifficultyData()

MapDifficultyEntry const * DB2Manager::GetDownscaledMapDifficultyData ( uint32  mapId,
Difficulty difficulty 
) const
2607 {
2608  DifficultyEntry const* diffEntry = sDifficultyStore.LookupEntry(difficulty);
2609  if (!diffEntry)
2610  return GetDefaultMapDifficulty(mapId, &difficulty);
2611 
2612  uint32 tmpDiff = difficulty;
2613  MapDifficultyEntry const* mapDiff = GetMapDifficultyData(mapId, Difficulty(tmpDiff));
2614  while (!mapDiff)
2615  {
2616  tmpDiff = diffEntry->FallbackDifficultyID;
2617  diffEntry = sDifficultyStore.LookupEntry(tmpDiff);
2618  if (!diffEntry)
2619  return GetDefaultMapDifficulty(mapId, &difficulty);
2620 
2621  // pull new data
2622  mapDiff = GetMapDifficultyData(mapId, Difficulty(tmpDiff)); // we are 10 normal or 25 normal
2623  }
2624 
2625  difficulty = Difficulty(tmpDiff);
2626  return mapDiff;
2627 }
Difficulty
Definition: DBCEnums.h:617
MapDifficultyEntry const * GetDefaultMapDifficulty(uint32 mapId, Difficulty *difficulty=nullptr) const
Definition: DB2Stores.cpp:2563
DB2Storage< DifficultyEntry > sDifficultyStore("Difficulty.db2", DifficultyLoadInfo::Instance())
uint8 FallbackDifficultyID
Definition: DB2Structure.h:1302
uint32_t uint32
Definition: Define.h:152
MapDifficultyEntry const * GetMapDifficultyData(uint32 mapId, Difficulty difficulty) const
Definition: DB2Stores.cpp:2593
Definition: DB2Structure.h:2404
Definition: DB2Structure.h:1295

◆ GetEmptyAnimStateID()

uint32 DB2Manager::GetEmptyAnimStateID ( ) const
1724 {
1725  return sAnimationDataStore.GetNumRows();
1726 }
DB2Storage< AnimationDataEntry > sAnimationDataStore("AnimationData.db2", AnimationDataLoadInfo::Instance())

◆ GetFactionTeamList()

std::vector< uint32 > const * DB2Manager::GetFactionTeamList ( uint32  faction) const
2267 {
2268  return Trinity::Containers::MapGetValuePtr(_factionTeams, faction);
2269 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetFriendshipRepReactions()

DB2Manager::FriendshipRepReactionSet const * DB2Manager::GetFriendshipRepReactions ( uint32  friendshipRepID) const
2272 {
2273  return Trinity::Containers::MapGetValuePtr(_friendshipRepReactions, friendshipRepID);
2274 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetGlobalCurveId()

uint32 DB2Manager::GetGlobalCurveId ( GlobalCurve  globalCurveType) const
2277 {
2278  for (GlobalCurveEntry const* globalCurveEntry : sGlobalCurveStore)
2279  if (GlobalCurve(globalCurveEntry->Type) == globalCurveType)
2280  return globalCurveEntry->CurveID;
2281 
2282  return 0;
2283 }
GlobalCurve
Definition: DBCEnums.h:731
DB2Storage< GlobalCurveEntry > sGlobalCurveStore("GlobalCurve.db2", GlobalCurveLoadInfo::Instance())
Definition: DB2Structure.h:1698

◆ GetGlyphBindableSpells()

std::vector< uint32 > const * DB2Manager::GetGlyphBindableSpells ( uint32  glyphPropertiesId) const
2286 {
2287  return Trinity::Containers::MapGetValuePtr(_glyphBindableSpells, glyphPropertiesId);
2288 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetGlyphRequiredSpecs()

std::vector< uint32 > const * DB2Manager::GetGlyphRequiredSpecs ( uint32  glyphPropertiesId) const
2291 {
2292  return Trinity::Containers::MapGetValuePtr(_glyphRequiredSpecs, glyphPropertiesId);
2293 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetHeirloomByItemId()

HeirloomEntry const * DB2Manager::GetHeirloomByItemId ( uint32  itemId) const
2296 {
2297  return Trinity::Containers::MapGetValuePtr(_heirlooms, itemId);
2298 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetHotfixBlobData()

std::vector< uint8 > const * DB2Manager::GetHotfixBlobData ( uint32  tableHash,
int32  recordId,
LocaleConstant  locale 
) const
1710 {
1711  ASSERT(IsValidLocale(locale), "Locale %u is invalid locale", uint32(locale));
1712 
1713  return Trinity::Containers::MapGetValuePtr(_hotfixBlob[locale], std::make_pair(tableHash, recordId));
1714 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
constexpr bool IsValidLocale(LocaleConstant locale)
Definition: Common.h:105
uint32_t uint32
Definition: Define.h:152
#define ASSERT
Definition: Errors.h:61
+ Here is the call graph for this function:

◆ GetHotfixCount()

uint32 DB2Manager::GetHotfixCount ( ) const
1700 {
1701  return _hotfixData.size();
1702 }

◆ GetHotfixData()

DB2Manager::HotfixContainer const & DB2Manager::GetHotfixData ( ) const
1705 {
1706  return _hotfixData;
1707 }

◆ GetHotfixOptionalData()

std::vector< DB2Manager::HotfixOptionalData > const * DB2Manager::GetHotfixOptionalData ( uint32  tableHash,
int32  recordId,
LocaleConstant  locale 
) const
1717 {
1718  ASSERT(IsValidLocale(locale), "Locale %u is invalid locale", uint32(locale));
1719 
1720  return Trinity::Containers::MapGetValuePtr(_hotfixOptionalData[locale], std::make_pair(tableHash, recordId));
1721 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
constexpr bool IsValidLocale(LocaleConstant locale)
Definition: Common.h:105
uint32_t uint32
Definition: Define.h:152
#define ASSERT
Definition: Errors.h:61
+ Here is the call graph for this function:

◆ GetItemBonusList()

DB2Manager::ItemBonusList const * DB2Manager::GetItemBonusList ( uint32  bonusListId) const
2301 {
2302  return Trinity::Containers::MapGetValuePtr(_itemBonusLists, bonusListId);
2303 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetItemBonusListForItemLevelDelta()

uint32 DB2Manager::GetItemBonusListForItemLevelDelta ( int16  delta) const
2306 {
2307  auto itr = _itemLevelDeltaToBonusListContainer.find(delta);
2308  if (itr != _itemLevelDeltaToBonusListContainer.end())
2309  return itr->second;
2310 
2311  return 0;
2312 }

◆ GetItemChildEquipment()

ItemChildEquipmentEntry const * DB2Manager::GetItemChildEquipment ( uint32  itemId) const
2466 {
2467  return Trinity::Containers::MapGetValuePtr(_itemChildEquipment, itemId);
2468 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetItemClassByOldEnum()

ItemClassEntry const * DB2Manager::GetItemClassByOldEnum ( uint32  itemClass) const
2471 {
2472  return _itemClassByOldEnum[itemClass];
2473 }

◆ GetItemDisplayId()

uint32 DB2Manager::GetItemDisplayId ( uint32  itemId,
uint32  appearanceModId 
) const
2486 {
2487  if (ItemModifiedAppearanceEntry const* modifiedAppearance = GetItemModifiedAppearance(itemId, appearanceModId))
2488  if (ItemAppearanceEntry const* itemAppearance = sItemAppearanceStore.LookupEntry(modifiedAppearance->ItemAppearanceID))
2489  return itemAppearance->ItemDisplayInfoID;
2490 
2491  return 0;
2492 }
Definition: DB2Structure.h:2058
Definition: DB2Structure.h:1833
DB2Storage< ItemAppearanceEntry > sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceLoadInfo::Instance())
ItemModifiedAppearanceEntry const * GetItemModifiedAppearance(uint32 itemId, uint32 appearanceModId) const
Definition: DB2Stores.cpp:2494

◆ GetItemLimitCategoryConditions()

std::vector< ItemLimitCategoryConditionEntry const * > const * DB2Manager::GetItemLimitCategoryConditions ( uint32  categoryId) const
2481 {
2482  return Trinity::Containers::MapGetValuePtr(_itemCategoryConditions, categoryId);
2483 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetItemModifiedAppearance()

ItemModifiedAppearanceEntry const * DB2Manager::GetItemModifiedAppearance ( uint32  itemId,
uint32  appearanceModId 
) const
2495 {
2496  auto itr = _itemModifiedAppearancesByItem.find(itemId | (appearanceModId << 24));
2497  if (itr != _itemModifiedAppearancesByItem.end())
2498  return itr->second;
2499 
2500  // Fall back to unmodified appearance
2501  if (appearanceModId)
2502  {
2503  itr = _itemModifiedAppearancesByItem.find(itemId);
2504  if (itr != _itemModifiedAppearancesByItem.end())
2505  return itr->second;
2506  }
2507 
2508  return nullptr;
2509 }

◆ GetItemSetSpells()

std::vector< ItemSetSpellEntry const * > const * DB2Manager::GetItemSetSpells ( uint32  itemSetId) const
2517 {
2518  return Trinity::Containers::MapGetValuePtr(_itemSetSpells, itemSetId);
2519 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetItemSpecOverrides()

std::vector< ItemSpecOverrideEntry const * > const * DB2Manager::GetItemSpecOverrides ( uint32  itemId) const
2522 {
2523  return Trinity::Containers::MapGetValuePtr(_itemSpecOverrides, itemId);
2524 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetLfgDungeon()

LFGDungeonsEntry const * DB2Manager::GetLfgDungeon ( uint32  mapId,
Difficulty  difficulty 
)
static
2527 {
2528  for (LFGDungeonsEntry const* dungeon : sLFGDungeonsStore)
2529  if (dungeon->MapID == int32(mapId) && Difficulty(dungeon->DifficultyID) == difficulty)
2530  return dungeon;
2531 
2532  return nullptr;
2533 }
Difficulty
Definition: DBCEnums.h:617
Definition: DB2Structure.h:2254
int32_t int32
Definition: Define.h:148
DB2Storage< LFGDungeonsEntry > sLFGDungeonsStore("LFGDungeons.db2", LfgDungeonsLoadInfo::Instance())
+ Here is the caller graph for this function:

◆ GetLiquidFlags()

uint32 DB2Manager::GetLiquidFlags ( uint32  liquidType)
static
2551 {
2552  if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquidType))
2553  return 1 << liq->SoundBank;
2554 
2555  return 0;
2556 }
DB2Storage< LiquidTypeEntry > sLiquidTypeStore("LiquidType.db2", LiquidTypeLoadInfo::Instance())
Definition: DB2Structure.h:2301
+ Here is the caller graph for this function:

◆ GetMapDifficulties()

DB2Manager::MapDifficultyContainer const & DB2Manager::GetMapDifficulties ( ) const
2559 {
2560  return _mapDifficulties;
2561 }

◆ GetMapDifficultyConditions()

DB2Manager::MapDifficultyConditionsContainer const * DB2Manager::GetMapDifficultyConditions ( uint32  mapDifficultyId) const
2630 {
2631  return Trinity::Containers::MapGetValuePtr(_mapDifficultyConditions, mapDifficultyId);
2632 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetMapDifficultyData()

MapDifficultyEntry const * DB2Manager::GetMapDifficultyData ( uint32  mapId,
Difficulty  difficulty 
) const
2594 {
2595  auto itr = _mapDifficulties.find(mapId);
2596  if (itr == _mapDifficulties.end())
2597  return nullptr;
2598 
2599  auto diffItr = itr->second.find(difficulty);
2600  if (diffItr == itr->second.end())
2601  return nullptr;
2602 
2603  return diffItr->second;
2604 }

◆ GetMount()

MountEntry const * DB2Manager::GetMount ( uint32  spellId) const
2635 {
2636  return Trinity::Containers::MapGetValuePtr(_mountsBySpellId, spellId);
2637 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetMountById()

MountEntry const * DB2Manager::GetMountById ( uint32  id) const
2640 {
2641  return sMountStore.LookupEntry(id);
2642 }
DB2Storage< MountEntry > sMountStore("Mount.db2", MountLoadInfo::Instance())

◆ GetMountCapabilities()

DB2Manager::MountTypeXCapabilitySet const * DB2Manager::GetMountCapabilities ( uint32  mountType) const
2645 {
2646  return Trinity::Containers::MapGetValuePtr(_mountCapabilitiesByType, mountType);
2647 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetMountDisplays()

DB2Manager::MountXDisplayContainer const * DB2Manager::GetMountDisplays ( uint32  mountId) const
2650 {
2651  return Trinity::Containers::MapGetValuePtr(_mountDisplays, mountId);
2652 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetNameGenEntry()

std::string DB2Manager::GetNameGenEntry ( uint8  race,
uint8  gender 
) const
2655 {
2656  ASSERT(gender < GENDER_NONE);
2657  auto ritr = _nameGenData.find(race);
2658  if (ritr == _nameGenData.end())
2659  return "";
2660 
2661  if (ritr->second[gender].empty())
2662  return "";
2663 
2664  return Trinity::Containers::SelectRandomContainerElement(ritr->second[gender])->Name;
2665 }
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:101
#define ASSERT
Definition: Errors.h:61
Definition: SharedDefines.h:131
+ Here is the call graph for this function:

◆ GetNumTalentsAtLevel()

int32 DB2Manager::GetNumTalentsAtLevel ( uint32  level,
Classes  playerClass 
)
static
2682 {
2683  NumTalentsAtLevelEntry const* numTalentsAtLevel = sNumTalentsAtLevelStore.LookupEntry(level);
2684  if (!numTalentsAtLevel)
2685  numTalentsAtLevel = sNumTalentsAtLevelStore.LookupEntry(sNumTalentsAtLevelStore.GetNumRows() - 1);
2686 
2687  if (numTalentsAtLevel)
2688  {
2689  switch (playerClass)
2690  {
2691  case CLASS_DEATH_KNIGHT:
2692  return numTalentsAtLevel->NumTalentsDeathKnight;
2693  case CLASS_DEMON_HUNTER:
2694  return numTalentsAtLevel->NumTalentsDemonHunter;
2695  default:
2696  return numTalentsAtLevel->NumTalents;
2697  }
2698  }
2699 
2700  return 0;
2701 }
int32 NumTalentsDemonHunter
Definition: DB2Structure.h:2539
int32 NumTalents
Definition: DB2Structure.h:2537
Definition: SharedDefines.h:149
Definition: DB2Structure.h:2534
int32 NumTalentsDeathKnight
Definition: DB2Structure.h:2538
Definition: SharedDefines.h:143
DB2Storage< NumTalentsAtLevelEntry > sNumTalentsAtLevelStore("NumTalentsAtLevel.db2", NumTalentsAtLevelLoadInfo::Instance())
+ Here is the caller graph for this function:

◆ GetParagonReputation()

ParagonReputationEntry const * DB2Manager::GetParagonReputation ( uint32  factionId) const
2704 {
2705  return Trinity::Containers::MapGetValuePtr(_paragonReputations, factionId);
2706 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetPhasesForGroup()

std::vector< uint32 > const * DB2Manager::GetPhasesForGroup ( uint32  group) const
2801 {
2802  return Trinity::Containers::MapGetValuePtr(_phasesByGroup, group);
2803 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetPowerIndexByClass()

uint32 DB2Manager::GetPowerIndexByClass ( Powers  power,
uint32  classId 
) const
1866 {
1867  return _powersByClass[classId][power];
1868 }

◆ GetPowerTypeByName()

PowerTypeEntry const * DB2Manager::GetPowerTypeByName ( std::string const &  name) const
2812 {
2813  for (PowerTypeEntry const* powerType : sPowerTypeStore)
2814  {
2815  std::string powerName = powerType->NameGlobalStringTag;
2816  std::transform(powerName.begin(), powerName.end(), powerName.begin(), [](char c) { return char(::tolower(c)); });
2817  if (powerName == name)
2818  return powerType;
2819 
2820  powerName.erase(std::remove(powerName.begin(), powerName.end(), '_'), powerName.end());
2821  if (powerName == name)
2822  return powerType;
2823  }
2824 
2825  return nullptr;
2826 }
Definition: DB2Structure.h:2668
DB2Storage< PowerTypeEntry > sPowerTypeStore("PowerType.db2", PowerTypeLoadInfo::Instance())

◆ GetPowerTypeEntry()

PowerTypeEntry const * DB2Manager::GetPowerTypeEntry ( Powers  power) const
2806 {
2807  ASSERT(power < MAX_POWERS);
2808  return _powerTypes[power];
2809 }
Definition: SharedDefines.h:284
#define ASSERT
Definition: Errors.h:61

◆ GetPvpItemLevelBonus()

uint8 DB2Manager::GetPvpItemLevelBonus ( uint32  itemId) const
2829 {
2830  auto itr = _pvpItemBonus.find(itemId);
2831  if (itr != _pvpItemBonus.end())
2832  return itr->second;
2833 
2834  return 0;
2835 }

◆ GetPvpTalentNumSlotsAtLevel()

int32 DB2Manager::GetPvpTalentNumSlotsAtLevel ( uint32  level,
Classes  class_ 
) const
2759 {
2760  int32 slots = 0;
2761  for (uint8 slot = 0; slot < MAX_PVP_TALENT_SLOTS; ++slot)
2762  if (level >= GetRequiredLevelForPvpTalentSlot(slot, class_))
2763  ++slots;
2764 
2765  return slots;
2766 }
uint32 GetRequiredLevelForPvpTalentSlot(uint8 slot, Classes class_) const
Definition: DB2Stores.cpp:2738
int32_t int32
Definition: Define.h:148
uint8_t uint8
Definition: Define.h:154
#define MAX_PVP_TALENT_SLOTS
Definition: DBCEnums.h:1569

◆ GetQuestPackageItems()

std::vector< QuestPackageItemEntry const * > const * DB2Manager::GetQuestPackageItems ( uint32  questPackageID) const
2774 {
2775  auto itr = _questPackages.find(questPackageID);
2776  if (itr != _questPackages.end())
2777  return &itr->second.first;
2778 
2779  return nullptr;
2780 }

◆ GetQuestPackageItemsFallback()

std::vector< QuestPackageItemEntry const * > const * DB2Manager::GetQuestPackageItemsFallback ( uint32  questPackageID) const
2783 {
2784  auto itr = _questPackages.find(questPackageID);
2785  if (itr != _questPackages.end())
2786  return &itr->second.second;
2787 
2788  return nullptr;
2789 }

◆ GetQuestsForQuestLine()

std::unordered_set< QuestLineXQuestEntry const * > const * DB2Manager::GetQuestsForQuestLine ( uint32  questLineId) const
2769 {
2770  return Trinity::Containers::MapGetValuePtr(_questsByQuestLine, questLineId);
2771 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetQuestUniqueBitFlag()

uint32 DB2Manager::GetQuestUniqueBitFlag ( uint32  questId)
2792 {
2793  QuestV2Entry const* v2 = sQuestV2Store.LookupEntry(questId);
2794  if (!v2)
2795  return 0;
2796 
2797  return v2->UniqueBitFlag;
2798 }
uint16 UniqueBitFlag
Definition: DB2Structure.h:2805
Definition: DB2Structure.h:2802
DB2Storage< QuestV2Entry > sQuestV2Store("QuestV2.db2", QuestV2LoadInfo::Instance())

◆ GetRequiredAzeriteLevelForAzeritePowerTier()

uint32 DB2Manager::GetRequiredAzeriteLevelForAzeritePowerTier ( uint32  azeriteUnlockSetId,
ItemContext  context,
uint32  tier 
) const
1818 {
1820  if (std::array<uint8, MAX_AZERITE_EMPOWERED_TIER> const* levels = Trinity::Containers::MapGetValuePtr(_azeriteTierUnlockLevels, std::make_pair(azeriteUnlockSetId, context)))
1821  return (*levels)[tier];
1822 
1823  AzeriteTierUnlockSetEntry const* azeriteTierUnlockSet = sAzeriteTierUnlockSetStore.LookupEntry(azeriteUnlockSetId);
1824  if (azeriteTierUnlockSet && azeriteTierUnlockSet->Flags & AZERITE_TIER_UNLOCK_SET_FLAG_DEFAULT)
1825  if (std::array<uint8, MAX_AZERITE_EMPOWERED_TIER> const* levels = Trinity::Containers::MapGetValuePtr(_azeriteTierUnlockLevels, std::make_pair(azeriteUnlockSetId, ItemContext::NONE)))
1826  return (*levels)[tier];
1827 
1828  return sAzeriteLevelInfoStore.GetNumRows();
1829 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
DB2Storage< AzeriteLevelInfoEntry > sAzeriteLevelInfoStore("AzeriteLevelInfo.db2", AzeriteLevelInfoLoadInfo::Instance())
DB2Storage< AzeriteTierUnlockSetEntry > sAzeriteTierUnlockSetStore("AzeriteTierUnlockSet.db2", AzeriteTierUnlockSetLoadInfo::Instance())
int32 Flags
Definition: DB2Structure.h:414
Definition: DBCEnums.h:191
Definition: DB2Structure.h:411
#define ASSERT
Definition: Errors.h:61
#define MAX_AZERITE_EMPOWERED_TIER
Definition: DBCEnums.h:177
+ Here is the call graph for this function:

◆ GetRequiredCustomizationChoices()

std::unordered_map< uint32, std::vector< uint32 > > const * DB2Manager::GetRequiredCustomizationChoices ( uint32  chrCustomizationReqId) const
1881 {
1882  return Trinity::Containers::MapGetValuePtr(_chrCustomizationRequiredChoices, chrCustomizationReqId);
1883 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetRequiredLevelForPvpTalentSlot()

uint32 DB2Manager::GetRequiredLevelForPvpTalentSlot ( uint8  slot,
Classes  class_ 
) const
2739 {
2740  ASSERT(slot < MAX_PVP_TALENT_SLOTS);
2741  if (_pvpTalentSlotUnlock[slot])
2742  {
2743  switch (class_)
2744  {
2745  case CLASS_DEATH_KNIGHT:
2746  return _pvpTalentSlotUnlock[slot]->DeathKnightLevelRequired;
2747  case CLASS_DEMON_HUNTER:
2748  return _pvpTalentSlotUnlock[slot]->DemonHunterLevelRequired;
2749  default:
2750  break;
2751  }
2752  return _pvpTalentSlotUnlock[slot]->LevelRequired;
2753  }
2754 
2755  return 0;
2756 }
Definition: SharedDefines.h:149
#define ASSERT
Definition: Errors.h:61
Definition: SharedDefines.h:143
#define MAX_PVP_TALENT_SLOTS
Definition: DBCEnums.h:1569

◆ GetRewardPackCurrencyTypesByRewardID()

std::vector< RewardPackXCurrencyTypeEntry const * > const * DB2Manager::GetRewardPackCurrencyTypesByRewardID ( uint32  rewardPackID) const
2838 {
2839  return Trinity::Containers::MapGetValuePtr(_rewardPackCurrencyTypes, rewardPackID);
2840 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetRewardPackItemsByRewardID()

std::vector< RewardPackXItemEntry const * > const * DB2Manager::GetRewardPackItemsByRewardID ( uint32  rewardPackID) const
2843 {
2844  return Trinity::Containers::MapGetValuePtr(_rewardPackItems, rewardPackID);
2845 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetShapeshiftFormModelData()

ShapeshiftFormModelData const * DB2Manager::GetShapeshiftFormModelData ( uint8  race,
uint8  gender,
uint8  form 
) const
2848 {
2849  return Trinity::Containers::MapGetValuePtr(_chrCustomizationChoicesForShapeshifts, { race, gender, form });
2850 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetSkillLineAbilitiesBySkill()

std::vector< SkillLineAbilityEntry const * > const * DB2Manager::GetSkillLineAbilitiesBySkill ( uint32  skillId) const
2858 {
2859  return Trinity::Containers::MapGetValuePtr(_skillLineAbilitiesBySkillupSkill, skillId);
2860 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetSkillLinesForParentSkill()

std::vector< SkillLineEntry const * > const * DB2Manager::GetSkillLinesForParentSkill ( uint32  parentSkillId) const
2853 {
2854  return Trinity::Containers::MapGetValuePtr(_skillLinesByParentSkillLine, parentSkillId);
2855 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetSkillRaceClassInfo()

SkillRaceClassInfoEntry const * DB2Manager::GetSkillRaceClassInfo ( uint32  skill,
uint8  race,
uint8  class_ 
)
2863 {
2864  auto bounds = _skillRaceClassInfoBySkill.equal_range(skill);
2865  for (auto itr = bounds.first; itr != bounds.second; ++itr)
2866  {
2867  if (itr->second->RaceMask && !(itr->second->RaceMask.HasRace(race)))
2868  continue;
2869  if (itr->second->ClassMask && !(itr->second->ClassMask & (1 << (class_ - 1))))
2870  continue;
2871 
2872  return itr->second;
2873  }
2874 
2875  return nullptr;
2876 }

◆ GetSpecializationSpells()

std::vector< SpecializationSpellsEntry const * > const * DB2Manager::GetSpecializationSpells ( uint32  specId) const
2879 {
2880  return Trinity::Containers::MapGetValuePtr(_specializationSpellsBySpec, specId);
2881 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetSpellProcsPerMinuteMods()

std::vector< SpellProcsPerMinuteModEntry const * > DB2Manager::GetSpellProcsPerMinuteMods ( uint32  spellprocsPerMinuteId) const
2894 {
2895  auto itr = _spellProcsPerMinuteMods.find(spellprocsPerMinuteId);
2896  if (itr != _spellProcsPerMinuteMods.end())
2897  return itr->second;
2898 
2899  return std::vector<SpellProcsPerMinuteModEntry const*>();
2900 }

◆ GetStorage()

DB2StorageBase const * DB2Manager::GetStorage ( uint32  type) const
1509 {
1510  auto itr = _stores.find(type);
1511  if (itr != _stores.end())
1512  return itr->second;
1513 
1514  return nullptr;
1515 }

◆ GetTalentsByPosition()

std::vector< TalentEntry const * > const & DB2Manager::GetTalentsByPosition ( uint32  class_,
uint32  tier,
uint32  column 
) const
2903 {
2904  return _talentsByPosition[class_][tier][column];
2905 }

◆ GetTextSoundEmoteFor()

EmotesTextSoundEntry const * DB2Manager::GetTextSoundEmoteFor ( uint32  emote,
uint8  race,
uint8  gender,
uint8  class_ 
) const
2128 {
2129  if (EmotesTextSoundEntry const* emotesTextSound = Trinity::Containers::MapGetValuePtr(_emoteTextSounds, { emote, race, gender, class_ }))
2130  return emotesTextSound;
2131 
2132  if (EmotesTextSoundEntry const* emotesTextSound = Trinity::Containers::MapGetValuePtr(_emoteTextSounds, { emote, race, gender, uint8(0) }))
2133  return emotesTextSound;
2134 
2135  return nullptr;
2136 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
Definition: DB2Structure.h:1362
uint8_t uint8
Definition: Define.h:154
+ Here is the call graph for this function:

◆ GetTransmogSetItems()

std::vector< TransmogSetItemEntry const * > const * DB2Manager::GetTransmogSetItems ( uint32  transmogSetId) const
2938 {
2939  return Trinity::Containers::MapGetValuePtr(_transmogSetItemsByTransmogSet, transmogSetId);
2940 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetTransmogSetsForItemModifiedAppearance()

std::vector< TransmogSetEntry const * > const * DB2Manager::GetTransmogSetsForItemModifiedAppearance ( uint32  itemModifiedAppearanceId) const
2933 {
2934  return Trinity::Containers::MapGetValuePtr(_transmogSetsByItemModifiedAppearance, itemModifiedAppearanceId);
2935 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
+ Here is the call graph for this function:

◆ GetUiDisplayForClass()

ChrClassUIDisplayEntry const * DB2Manager::GetUiDisplayForClass ( Classes  unitClass) const
1848 {
1849  ASSERT(unitClass < MAX_CLASSES);
1850  return _uiDisplayByClass[unitClass];
1851 }
#define MAX_CLASSES
Definition: SharedDefines.h:153
#define ASSERT
Definition: Errors.h:61

◆ GetUiMapPosition()

bool DB2Manager::GetUiMapPosition ( float  x,
float  y,
float  z,
int32  mapId,
int32  areaId,
int32  wmoDoodadPlacementId,
int32  wmoGroupId,
UiMapSystem  system,
bool  local,
int32 uiMapId = nullptr,
DBCPosition2D newPos = nullptr 
)
static
3208 {
3209  if (uiMapId)
3210  *uiMapId = -1;
3211 
3212  if (newPos)
3213  {
3214  newPos->X = 0.0f;
3215  newPos->Y = 0.0f;
3216  }
3217 
3218  UiMapAssignmentEntry const* uiMapAssignment = FindNearestMapAssignment(x, y, z, mapId, areaId, wmoDoodadPlacementId, wmoGroupId, system);
3219  if (!uiMapAssignment)
3220  return false;
3221 
3222  if (uiMapId)
3223  *uiMapId = uiMapAssignment->UiMapID;
3224 
3225  DBCPosition2D relativePosition{ 0.5f, 0.5f };
3226  DBCPosition2D regionSize{ uiMapAssignment->Region[1].X - uiMapAssignment->Region[0].X, uiMapAssignment->Region[1].Y - uiMapAssignment->Region[0].Y };
3227  if (regionSize.X > 0.0f)
3228  relativePosition.X = (x - uiMapAssignment->Region[0].X) / regionSize.X;
3229  if (regionSize.Y > 0.0f)
3230  relativePosition.Y = (y - uiMapAssignment->Region[0].Y) / regionSize.Y;
3231 
3232  DBCPosition2D uiPosition
3233  {
3234  // x and y are swapped
3235  ((1.0f - (1.0f - relativePosition.Y)) * uiMapAssignment->UiMin.X) + ((1.0f - relativePosition.Y) * uiMapAssignment->UiMax.X),
3236  ((1.0f - (1.0f - relativePosition.X)) * uiMapAssignment->UiMin.Y) + ((1.0f - relativePosition.X) * uiMapAssignment->UiMax.Y)
3237  };
3238 
3239  if (!local)
3240  uiPosition = CalculateGlobalUiMapPosition(uiMapAssignment->UiMapID, uiPosition);
3241 
3242  if (newPos)
3243  *newPos = uiPosition;
3244 
3245  return true;
3246 }
float Y
Definition: DBCEnums.h:36
DBCPosition2D UiMin
Definition: DB2Structure.h:3592
Definition: DBCEnums.h:27
DBCPosition2D UiMax
Definition: DB2Structure.h:3593
float X
Definition: DBCEnums.h:29
int32 UiMapID
Definition: DB2Structure.h:3596
float Y
Definition: DBCEnums.h:30
float X
Definition: DBCEnums.h:35
static UiMapAssignmentEntry const * FindNearestMapAssignment(float x, float y, float z, int32 mapId, int32 areaId, int32 wmoDoodadPlacementId, int32 wmoGroupId, UiMapSystem system)
Definition: DB2Stores.cpp:3149
Definition: DB2Structure.h:3590
DBCPosition3D Region[2]
Definition: DB2Structure.h:3594
static DBCPosition2D CalculateGlobalUiMapPosition(int32 uiMapID, DBCPosition2D uiPosition)
Definition: DB2Stores.cpp:3185
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWMOAreaTable()

WMOAreaTableEntry const * DB2Manager::GetWMOAreaTable ( int32  rootId,
int32  adtId,
int32  groupId 
) const
3284 {
3285  return Trinity::Containers::MapGetValuePtr(_wmoAreaTableLookup, WMOAreaTableKey(int16(rootId), int8(adtId), groupId));
3286 }
int8_t int8
Definition: Define.h:150
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
std::tuple< uint16, uint8, int32 > WMOAreaTableKey
Definition: DB2Stores.cpp:377
int16_t int16
Definition: Define.h:149
+ Here is the call graph for this function:

◆ HasItemCurrencyCost()

bool DB2Manager::HasItemCurrencyCost ( uint32  itemId) const
2476 {
2477  return _itemsWithCurrencyCost.count(itemId) > 0;
2478 }

◆ InsertNewHotfix()

void DB2Manager::InsertNewHotfix ( uint32  tableHash,
uint32  recordId 
)
private
1729 {
1730  HotfixRecord hotfixRecord;
1731  hotfixRecord.TableHash = tableHash;
1732  hotfixRecord.RecordID = recordId;
1733  hotfixRecord.HotfixID = ++_maxHotfixId;
1734  _hotfixData[hotfixRecord.HotfixID].push_back(hotfixRecord);
1735 }
int32 _maxHotfixId
Definition: DB2Stores.h:443

◆ Instance()

DB2Manager & DB2Manager::Instance ( )
static
564 {
565  static DB2Manager instance;
566  return instance;
567 }
Definition: DB2Stores.h:286

◆ IsAzeriteItem()

bool DB2Manager::IsAzeriteItem ( uint32  itemId) const
1788 {
1789  return std::find_if(sAzeriteItemStore.begin(), sAzeriteItemStore.end(),
1790  [&](AzeriteItemEntry const* azeriteItem) { return azeriteItem->ItemID == int32(itemId); }) != sAzeriteItemStore.end();
1791 }
DB2Storage< AzeriteItemEntry > sAzeriteItemStore("AzeriteItem.db2", AzeriteItemLoadInfo::Instance())
Definition: DB2Structure.h:354
int32_t int32
Definition: Define.h:148

◆ IsInArea()

bool DB2Manager::IsInArea ( uint32  objectAreaId,
uint32  areaId 
)
static
1747 {
1748  do
1749  {
1750  if (objectAreaId == areaId)
1751  return true;
1752 
1753  AreaTableEntry const* objectArea = sAreaTableStore.LookupEntry(objectAreaId);
1754  if (!objectArea)
1755  break;
1756 
1757  objectAreaId = objectArea->ParentAreaID;
1758  } while (objectAreaId);
1759 
1760  return false;
1761 }
Definition: DB2Structure.h:125
DB2Storage< AreaTableEntry > sAreaTableStore("AreaTable.db2", AreaTableLoadInfo::Instance())
uint16 ParentAreaID
Definition: DB2Structure.h:131
+ Here is the caller graph for this function:

◆ IsSpecSetMember()

bool DB2Manager::IsSpecSetMember ( int32  specSetId,
uint32  specId 
) const
2884 {
2885  return _specsBySpecSet.count(std::make_pair(specSetId, specId)) > 0;
2886 }

◆ IsTotemCategoryCompatibleWith()

bool DB2Manager::IsTotemCategoryCompatibleWith ( uint32  itemTotemCategoryId,
uint32  requiredTotemCategoryId 
)
static
2908 {
2909  if (requiredTotemCategoryId == 0)
2910  return true;
2911  if (itemTotemCategoryId == 0)
2912  return false;
2913 
2914  TotemCategoryEntry const* itemEntry = sTotemCategoryStore.LookupEntry(itemTotemCategoryId);
2915  if (!itemEntry)
2916  return false;
2917  TotemCategoryEntry const* reqEntry = sTotemCategoryStore.LookupEntry(requiredTotemCategoryId);
2918  if (!reqEntry)
2919  return false;
2920 
2921  if (itemEntry->TotemCategoryType != reqEntry->TotemCategoryType)
2922  return false;
2923 
2924  return (itemEntry->TotemCategoryMask & reqEntry->TotemCategoryMask) == reqEntry->TotemCategoryMask;
2925 }
DB2Storage< TotemCategoryEntry > sTotemCategoryStore("TotemCategory.db2", TotemCategoryLoadInfo::Instance())
uint8 TotemCategoryType
Definition: DB2Structure.h:3495
Definition: DB2Structure.h:3491
int32 TotemCategoryMask
Definition: DB2Structure.h:3496
+ Here is the caller graph for this function:

◆ IsToyItem()

bool DB2Manager::IsToyItem ( uint32  toy) const
2928 {
2929  return _toys.count(toy) > 0;
2930 }

◆ IsUiMapPhase()

bool DB2Manager::IsUiMapPhase ( uint32  phaseId) const
3279 {
3280  return _uiMapPhases.find(phaseId) != _uiMapPhases.end();
3281 }

◆ IsValidSpellFamiliyName()

bool DB2Manager::IsValidSpellFamiliyName ( SpellFamilyNames  family)
static
2889 {
2890  return _spellFamilyNames.count(family) > 0;
2891 }
+ Here is the caller graph for this function:

◆ LoadHotfixBlob()

void DB2Manager::LoadHotfixBlob ( uint32  localeMask)
1571 {
1572  uint32 oldMSTime = getMSTime();
1573 
1574  QueryResult result = HotfixDatabase.Query("SELECT TableHash, RecordId, locale, `Blob` FROM hotfix_blob ORDER BY TableHash");
1575 
1576  if (!result)
1577  {
1578  TC_LOG_INFO("server.loading", ">> Loaded 0 hotfix blob entries.");
1579  return;
1580  }
1581 
1582  std::bitset<TOTAL_LOCALES> availableDb2Locales = localeMask;
1583  uint32 hotfixBlobCount = 0;
1584  do
1585  {
1586  Field* fields = result->Fetch();
1587 
1588  uint32 tableHash = fields[0].GetUInt32();
1589  auto storeItr = _stores.find(tableHash);
1590  if (storeItr != _stores.end())
1591  {
1592  TC_LOG_ERROR("sql.sql", "Table hash 0x%X points to a loaded DB2 store %s, fill related table instead of hotfix_blob",
1593  tableHash, storeItr->second->GetFileName().c_str());
1594  continue;
1595  }
1596 
1597  int32 recordId = fields[1].GetInt32();
1598  std::string localeName = fields[2].GetString();
1599  LocaleConstant locale = GetLocaleByName(localeName);
1600 
1601  if (!IsValidLocale(locale))
1602  {
1603  TC_LOG_ERROR("sql.sql", "`hotfix_blob` contains invalid locale: %s at TableHash: 0x%X and RecordID: %d", localeName.c_str(), tableHash, recordId);
1604  continue;
1605  }
1606 
1607  if (!availableDb2Locales[locale])
1608  continue;
1609 
1610  _hotfixBlob[locale][std::make_pair(tableHash, recordId)] = fields[3].GetBinary();
1611  hotfixBlobCount++;
1612  } while (result->NextRow());
1613 
1614  TC_LOG_INFO("server.loading", ">> Loaded %d hotfix blob records in %u ms", hotfixBlobCount, GetMSTimeDiffToNow(oldMSTime));
1615 }
LocaleConstant GetLocaleByName(std::string const &name)
Definition: Common.cpp:36
constexpr bool IsValidLocale(LocaleConstant locale)
Definition: Common.h:105
Class used to access individual fields of database query result.
Definition: Field.h:81
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:186
uint32 getMSTime()
Definition: Timer.h:24
uint32 GetUInt32() const
Definition: Field.cpp:105
LocaleConstant
Definition: Common.h:80
std::string GetString() const
Definition: Field.cpp:228
int32_t int32
Definition: Define.h:148
uint32_t uint32
Definition: Define.h:152
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:180
std::shared_ptr< ResultSet > QueryResult
Definition: DatabaseEnvFwd.h:28
int32 GetInt32() const
Definition: Field.cpp:123
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
DatabaseWorkerPool< HotfixDatabaseConnection > HotfixDatabase
Accessor to the hotfix database.
Definition: DatabaseEnv.cpp:23
std::vector< uint8 > GetBinary() const
Definition: Field.cpp:240
+ Here is the call graph for this function:

◆ LoadHotfixData()

void DB2Manager::LoadHotfixData ( )
1518 {
1519  uint32 oldMSTime = getMSTime();
1520 
1521  QueryResult result = HotfixDatabase.Query("SELECT Id, TableHash, RecordId, Status FROM hotfix_data ORDER BY Id");
1522 
1523  if (!result)
1524  {
1525  TC_LOG_INFO("server.loading", ">> Loaded 0 hotfix info entries.");
1526  return;
1527  }
1528 
1529  uint32 count = 0;
1530 
1531  std::map<std::pair<uint32, int32>, bool> deletedRecords;
1532 
1533  do
1534  {
1535  Field* fields = result->Fetch();
1536 
1537  int32 id = fields[0].GetInt32();
1538  uint32 tableHash = fields[1].GetUInt32();
1539  int32 recordId = fields[2].GetInt32();
1540  HotfixRecord::Status status = static_cast<HotfixRecord::Status>(fields[3].GetUInt8());
1541  if (status == HotfixRecord::Status::Valid && _stores.find(tableHash) == _stores.end())
1542  {
1543  HotfixBlobKey key = std::make_pair(tableHash, recordId);
1544  if (std::none_of(_hotfixBlob.begin(), _hotfixBlob.end(), [key](HotfixBlobMap const& blob) { return blob.find(key) != blob.end(); }))
1545  {
1546  TC_LOG_ERROR("sql.sql", "Table `hotfix_data` references unknown DB2 store by hash 0x%X and has no reference to `hotfix_blob` in hotfix id %d with RecordID: %d", tableHash, id, recordId);
1547  continue;
1548  }
1549  }
1550 
1551  _maxHotfixId = std::max(_maxHotfixId, id);
1552  HotfixRecord hotfixRecord;
1553  hotfixRecord.TableHash = tableHash;
1554  hotfixRecord.RecordID = recordId;
1555  hotfixRecord.HotfixID = id;
1556  hotfixRecord.HotfixStatus = status;
1557  _hotfixData[id].push_back(hotfixRecord);
1558  deletedRecords[std::make_pair(tableHash, recordId)] = status == HotfixRecord::Status::RecordRemoved;
1559  ++count;
1560  } while (result->NextRow());
1561 
1562  for (auto itr = deletedRecords.begin(); itr != deletedRecords.end(); ++itr)
1563  if (itr->second)
1564  if (DB2StorageBase* store = Trinity::Containers::MapGetValuePtr(_stores, itr->first.first))
1565  store->EraseRecord(itr->first.second);
1566 
1567  TC_LOG_INFO("server.loading", ">> Loaded " SZFMTD " hotfix records in %u ms", _hotfixData.size(), GetMSTimeDiffToNow(oldMSTime));
1568 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
#define SZFMTD
Definition: Define.h:145
Class used to access individual fields of database query result.
Definition: Field.h:81
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:186
std::map< HotfixBlobKey, std::vector< uint8 > > HotfixBlobMap
Definition: DB2Stores.cpp:380
uint32 getMSTime()
Definition: Timer.h:24
Status
Definition: DB2Stores.h:294
uint32 GetUInt32() const
Definition: Field.cpp:105
Interface class for common access.
Definition: DB2Store.h:30
std::pair< uint32, int32 > HotfixBlobKey
Definition: DB2Stores.cpp:379
int32_t int32
Definition: Define.h:148
uint32_t uint32
Definition: Define.h:152
int32 _maxHotfixId
Definition: DB2Stores.h:443
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:180
std::shared_ptr< ResultSet > QueryResult
Definition: DatabaseEnvFwd.h:28
int32 GetInt32() const
Definition: Field.cpp:123
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
uint8 GetUInt8() const
Definition: Field.cpp:33
DatabaseWorkerPool< HotfixDatabaseConnection > HotfixDatabase
Accessor to the hotfix database.
Definition: DatabaseEnv.cpp:23
+ Here is the call graph for this function:

◆ LoadHotfixOptionalData()

void DB2Manager::LoadHotfixOptionalData ( uint32  localeMask)
1623 {
1624  // Register allowed optional data keys
1625  _allowedHotfixOptionalData.emplace(sBroadcastTextStore.GetTableHash(), std::make_pair(sTactKeyStore.GetTableHash(), &ValidateBroadcastTextTactKeyOptionalData));
1626 
1627  uint32 oldMSTime = getMSTime();
1628 
1629  QueryResult result = HotfixDatabase.Query("SELECT TableHash, RecordId, locale, `Key`, `Data` FROM hotfix_optional_data ORDER BY TableHash");
1630 
1631  if (!result)
1632  {
1633  TC_LOG_INFO("server.loading", ">> Loaded 0 hotfix optional data records.");
1634  return;
1635  }
1636 
1637  std::bitset<TOTAL_LOCALES> availableDb2Locales = localeMask;
1638  uint32 hotfixOptionalDataCount = 0;
1639  do
1640  {
1641  Field* fields = result->Fetch();
1642 
1643  uint32 tableHash = fields[0].GetUInt32();
1644  auto allowedHotfixes = Trinity::Containers::MapEqualRange(_allowedHotfixOptionalData, tableHash);
1645  if (allowedHotfixes.begin() == allowedHotfixes.end())
1646  {
1647  TC_LOG_ERROR("sql.sql", "Table `hotfix_optional_data` references DB2 store by hash 0x%X that is not allowed to have optional data", tableHash);
1648  continue;
1649  }
1650 
1651  uint32 recordId = fields[1].GetInt32();
1652  auto storeItr = _stores.find(tableHash);
1653  if (storeItr == _stores.end())
1654  {
1655  TC_LOG_ERROR("sql.sql", "Table `hotfix_optional_data` references unknown DB2 store by hash 0x%X with RecordID: %u", tableHash, recordId);
1656  continue;
1657  }
1658 
1659  std::string localeName = fields[2].GetString();
1660  LocaleConstant locale = GetLocaleByName(localeName);
1661 
1662  if (!IsValidLocale(locale))
1663  {
1664  TC_LOG_ERROR("sql.sql", "`hotfix_optional_data` contains invalid locale: %s at TableHash: 0x%X and RecordID: %u", localeName.c_str(), tableHash, recordId);
1665  continue;
1666  }
1667 
1668  if (!availableDb2Locales[locale])
1669  continue;
1670 
1671  DB2Manager::HotfixOptionalData optionalData;
1672  optionalData.Key = fields[3].GetUInt32();
1673  auto allowedHotfixItr = std::find_if(allowedHotfixes.begin(), allowedHotfixes.end(), [&](std::pair<uint32 const, AllowedHotfixOptionalData> const& v)
1674  {
1675  return v.second.first == optionalData.Key;
1676  });
1677  if (allowedHotfixItr == allowedHotfixes.end())
1678  {
1679  TC_LOG_ERROR("sql.sql", "Table `hotfix_optional_data` references non-allowed optional data key 0x%X for DB2 store by hash 0x%X and RecordID: %u",
1680  optionalData.Key, tableHash, recordId);
1681  continue;
1682  }
1683 
1684  optionalData.Data = fields[4].GetBinary();
1685  if (!allowedHotfixItr->second.second(optionalData.Data))
1686  {
1687  TC_LOG_ERROR("sql.sql", "Table `hotfix_optional_data` contains invalid data for DB2 store 0x%X, RecordID: %u and Key: 0x%X",
1688  tableHash, recordId, optionalData.Key);
1689  continue;
1690  }
1691 
1692  _hotfixOptionalData[locale][std::make_pair(tableHash, recordId)].push_back(std::move(optionalData));
1693  hotfixOptionalDataCount++;
1694  } while (result->NextRow());
1695 
1696  TC_LOG_INFO("server.loading", ">> Loaded %d hotfix optional data records in %u ms", hotfixOptionalDataCount, GetMSTimeDiffToNow(oldMSTime));
1697 }
LocaleConstant GetLocaleByName(std::string const &name)
Definition: Common.cpp:36
bool ValidateBroadcastTextTactKeyOptionalData(std::vector< uint8 > const &data)
Definition: DB2Stores.cpp:1617
DB2Storage< TactKeyEntry > sTactKeyStore("TactKey.db2", TactKeyLoadInfo::Instance())
constexpr bool IsValidLocale(LocaleConstant locale)
Definition: Common.h:105
auto MapEqualRange(M &map, typename M::key_type const &key) -> IteratorPair< decltype(map.begin())>
Definition: IteratorPair.h:61
Class used to access individual fields of database query result.
Definition: Field.h:81
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:186
std::vector< uint8 > Data
Definition: DB2Stores.h:317
uint32 getMSTime()
Definition: Timer.h:24
uint32 GetUInt32() const
Definition: Field.cpp:105
Definition: DB2Stores.h:314
LocaleConstant
Definition: Common.h:80
std::string GetString() const
Definition: Field.cpp:228
uint32_t uint32
Definition: Define.h:152
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:180
std::shared_ptr< ResultSet > QueryResult
Definition: DatabaseEnvFwd.h:28
int32 GetInt32() const
Definition: Field.cpp:123
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", BroadcastTextLoadInfo::Instance())
uint32 Key
Definition: DB2Stores.h:316
DatabaseWorkerPool< HotfixDatabaseConnection > HotfixDatabase
Accessor to the hotfix database.
Definition: DatabaseEnv.cpp:23
std::vector< uint8 > GetBinary() const
Definition: Field.cpp:240
+ Here is the call graph for this function:

◆ LoadStores()

uint32 DB2Manager::LoadStores ( std::string const &  dataPath,
LocaleConstant  defaultLocale 
)
570 {
571  uint32 oldMSTime = getMSTime();
572 
573  std::string db2Path = dataPath + "dbc/";
574 
575  std::vector<std::string> loadErrors;
576  std::bitset<TOTAL_LOCALES> availableDb2Locales = [&]()
577  {
578  std::bitset<TOTAL_LOCALES> foundLocales;
579  boost::filesystem::directory_iterator db2PathItr(db2Path), end;
580  while (db2PathItr != end)
581  {
582  LocaleConstant locale = GetLocaleByName(db2PathItr->path().filename().string());
583  if (IsValidLocale(locale))
584  foundLocales[locale] = true;
585 
586  ++db2PathItr;
587  }
588  return foundLocales;
589  }();
590 
591  if (!availableDb2Locales[defaultLocale])
592  return 0;
593 
594 #define LOAD_DB2(store) LoadDB2(availableDb2Locales, loadErrors, _stores, &store, db2Path, defaultLocale, GetCppRecordSize(store))
595 
872 
873 #undef LOAD_DB2
874 
875  // error checks
876  if (!loadErrors.empty())
877  {
878  sLog->SetSynchronous(); // server will shut down after this, so set sync logging to prevent messages from getting lost
879 
880  for (std::string const& error : loadErrors)
881  TC_LOG_ERROR("misc", "%s", error.c_str());
882 
883  return 0;
884  }
885 
886  // Check loaded DB2 files proper version
887  if (!sAreaTableStore.LookupEntry(13574) || // last area added in 9.0.2 (37176)
888  !sCharTitlesStore.LookupEntry(694) || // last char title added in 9.0.2 (37176)
889  !sGemPropertiesStore.LookupEntry(3825) || // last gem property added in 9.0.2 (37176)
890  !sItemStore.LookupEntry(184869) || // last item added in 9.0.2 (37176)
891  !sItemExtendedCostStore.LookupEntry(7048) || // last item extended cost added in 9.0.2 (37176)
892  !sMapStore.LookupEntry(2453) || // last map added in 9.0.2 (37176)
893  !sSpellNameStore.LookupEntry(349043)) // last spell added in 9.0.2 (37176)
894  {
895  TC_LOG_ERROR("misc", "You have _outdated_ DB2 files. Please extract correct versions from current using client.");
896  exit(1);
897  }
898 
899  for (AreaGroupMemberEntry const* areaGroupMember : sAreaGroupMemberStore)
900  _areaGroupMembers[areaGroupMember->AreaGroupID].push_back(areaGroupMember->AreaID);
901 
902  for (ArtifactPowerEntry const* artifactPower : sArtifactPowerStore)
903  _artifactPowers[artifactPower->ArtifactID].push_back(artifactPower);
904 
905  for (ArtifactPowerLinkEntry const* artifactPowerLink : sArtifactPowerLinkStore)
906  {
907  _artifactPowerLinks[artifactPowerLink->PowerA].insert(artifactPowerLink->PowerB);
908  _artifactPowerLinks[artifactPowerLink->PowerB].insert(artifactPowerLink->PowerA);
909  }
910 
911  for (ArtifactPowerRankEntry const* artifactPowerRank : sArtifactPowerRankStore)
912  _artifactPowerRanks[std::pair<uint32, uint8>{ artifactPowerRank->ArtifactPowerID, artifactPowerRank->RankIndex }] = artifactPowerRank;
913 
914  for (AzeriteEmpoweredItemEntry const* azeriteEmpoweredItem : sAzeriteEmpoweredItemStore)
915  _azeriteEmpoweredItems[azeriteEmpoweredItem->ItemID] = azeriteEmpoweredItem;
916 
917  for (AzeriteEssencePowerEntry const* azeriteEssencePower : sAzeriteEssencePowerStore)
918  _azeriteEssencePowersByIdAndRank[std::pair<uint32, uint32>{ azeriteEssencePower->AzeriteEssenceID, azeriteEssencePower->Tier }] = azeriteEssencePower;
919 
920  for (AzeriteItemMilestonePowerEntry const* azeriteItemMilestonePower : sAzeriteItemMilestonePowerStore)
921  _azeriteItemMilestonePowers.push_back(azeriteItemMilestonePower);
922 
923  std::sort(_azeriteItemMilestonePowers.begin(), _azeriteItemMilestonePowers.end(), [](AzeriteItemMilestonePowerEntry const* a1, AzeriteItemMilestonePowerEntry const* a2)
924  {
925  return a1->RequiredLevel < a2->RequiredLevel;
926  });
927 
928  {
929  uint32 azeriteEssenceSlot = 0;
930  for (AzeriteItemMilestonePowerEntry const* azeriteItemMilestonePower : _azeriteItemMilestonePowers)
931  {
932  AzeriteItemMilestoneType type = AzeriteItemMilestoneType(azeriteItemMilestonePower->Type);
934  {
935  ASSERT(azeriteEssenceSlot < MAX_AZERITE_ESSENCE_SLOT);
936  _azeriteItemMilestonePowerByEssenceSlot[azeriteEssenceSlot] = azeriteItemMilestonePower;
937  ++azeriteEssenceSlot;
938  }
939  }
940  }
941 
942  for (AzeritePowerSetMemberEntry const* azeritePowerSetMember : sAzeritePowerSetMemberStore)
943  if (sAzeritePowerStore.LookupEntry(azeritePowerSetMember->AzeritePowerID))
944  _azeritePowers[azeritePowerSetMember->AzeritePowerSetID].push_back(azeritePowerSetMember);
945 
946  for (AzeriteTierUnlockEntry const* azeriteTierUnlock : sAzeriteTierUnlockStore)
947  _azeriteTierUnlockLevels[std::pair<uint32, ItemContext>{ azeriteTierUnlock->AzeriteTierUnlockSetID, ItemContext(azeriteTierUnlock->ItemCreationContext) }][azeriteTierUnlock->Tier] = azeriteTierUnlock->AzeriteLevel;
948 
949  std::unordered_map<int32, std::vector<AzeriteUnlockMappingEntry const*>> azeriteUnlockMappings;
950  for (AzeriteUnlockMappingEntry const* azeriteUnlockMapping : sAzeriteUnlockMappingStore)
951  azeriteUnlockMappings[azeriteUnlockMapping->AzeriteUnlockMappingSetID].push_back(azeriteUnlockMapping);
952 
953  for (BattlemasterListEntry const* battlemaster : sBattlemasterListStore)
954  {
955  if (battlemaster->MaxLevel < battlemaster->MinLevel)
956  {
957  TC_LOG_ERROR("db2.hotfix.battlemaster_list", "Battlemaster (%u) contains bad values for MinLevel (%u) and MaxLevel (%u). Swapping values.", battlemaster->ID, battlemaster->MinLevel, battlemaster->MaxLevel);
958  std::swap(*(int8*)&battlemaster->MaxLevel, *(int8*)&battlemaster->MinLevel);
959  }
960  if (battlemaster->MaxPlayers < battlemaster->MinPlayers)
961  {
962  TC_LOG_ERROR("db2.hotfix.battlemaster_list", "Battlemaster (%u) contains bad values for MinPlayers (%u) and MaxPlayers (%u). Swapping values.", battlemaster->ID, battlemaster->MinPlayers, battlemaster->MaxPlayers);
963  std::swap(*(int8*)&battlemaster->MaxPlayers, *(int8*)&battlemaster->MinPlayers);
964  }
965  }
966 
968  "BATTLE_PET_SPECIES_MAX_ID (%d) must be equal to or greater than %u", BATTLE_PET_SPECIES_MAX_ID, sBattlePetSpeciesStore.GetNumRows());
969 
970  for (ChrClassUIDisplayEntry const* uiDisplay : sChrClassUIDisplayStore)
971  {
972  ASSERT(uiDisplay->ChrClassesID < MAX_CLASSES);
973  _uiDisplayByClass[uiDisplay->ChrClassesID] = uiDisplay;
974  }
975 
976  {
977  std::set<ChrClassesXPowerTypesEntry const*, ChrClassesXPowerTypesEntryComparator> powers;
979  powers.insert(power);
980 
981  for (std::size_t i = 0; i < _powersByClass.size(); ++i)
982  _powersByClass[i].fill(MAX_POWERS);
983 
984  for (ChrClassesXPowerTypesEntry const* power : powers)
985  {
986  uint32 index = 0;
987  for (uint32 j = 0; j < MAX_POWERS; ++j)
988  if (_powersByClass[power->ClassID][j] != MAX_POWERS)
989  ++index;
990 
991  ASSERT(power->ClassID < MAX_CLASSES);
992  ASSERT(power->PowerType < MAX_POWERS);
993  _powersByClass[power->ClassID][power->PowerType] = index;
994  }
995  }
996 
997  for (ChrCustomizationChoiceEntry const* customizationChoice : sChrCustomizationChoiceStore)
998  _chrCustomizationChoicesByOption[customizationChoice->ChrCustomizationOptionID].push_back(customizationChoice);
999 
1000  std::unordered_multimap<uint32, std::pair<uint32, uint8>> shapeshiftFormByModel;
1001  std::unordered_map<uint32, ChrCustomizationDisplayInfoEntry const*> displayInfoByCustomizationChoice;
1002 
1003  // build shapeshift form model lookup
1004  for (ChrCustomizationElementEntry const* customizationElement : sChrCustomizationElementStore)
1005  {
1006  if (ChrCustomizationDisplayInfoEntry const* customizationDisplayInfo = sChrCustomizationDisplayInfoStore.LookupEntry(customizationElement->ChrCustomizationDisplayInfoID))
1007  {
1008  if (ChrCustomizationChoiceEntry const* customizationChoice = sChrCustomizationChoiceStore.LookupEntry(customizationElement->ChrCustomizationChoiceID))
1009  {
1010  displayInfoByCustomizationChoice[customizationElement->ChrCustomizationChoiceID] = customizationDisplayInfo;
1011  if (ChrCustomizationOptionEntry const* customizationOption = sChrCustomizationOptionStore.LookupEntry(customizationChoice->ChrCustomizationOptionID))
1012  shapeshiftFormByModel.emplace(customizationOption->ChrModelID, std::make_pair(customizationOption->ID, uint8(customizationDisplayInfo->ShapeshiftFormID)));
1013  }
1014  }
1015  }
1016 
1017  std::unordered_map<uint32, std::vector<ChrCustomizationOptionEntry const*>> customizationOptionsByModel;
1018  for (ChrCustomizationOptionEntry const* customizationOption : sChrCustomizationOptionStore)
1019  customizationOptionsByModel[customizationOption->ChrModelID].push_back(customizationOption);
1020 
1022  if (ChrCustomizationChoiceEntry const* customizationChoice = sChrCustomizationChoiceStore.LookupEntry(reqChoice->ChrCustomizationChoiceID))
1023  _chrCustomizationRequiredChoices[reqChoice->ChrCustomizationReqID][customizationChoice->ChrCustomizationOptionID].push_back(reqChoice->ChrCustomizationChoiceID);
1024 
1025  std::unordered_map<uint32, uint32> parentRaces;
1026  for (ChrRacesEntry const* chrRace : sChrRacesStore)
1027  if (chrRace->UnalteredVisualRaceID)
1028  parentRaces[chrRace->UnalteredVisualRaceID] = chrRace->ID;
1029 
1030  for (ChrRaceXChrModelEntry const* raceModel : sChrRaceXChrModelStore)
1031  {
1032  if (ChrModelEntry const* model = sChrModelStore.LookupEntry(raceModel->ChrModelID))
1033  {
1034  _chrModelsByRaceAndGender[{ uint8(raceModel->ChrRacesID), uint8(model->Sex) }] = model;
1035 
1036  if (std::vector<ChrCustomizationOptionEntry const*> const* customizationOptionsForModel = Trinity::Containers::MapGetValuePtr(customizationOptionsByModel, model->ID))
1037  {
1038  std::vector<ChrCustomizationOptionEntry const*>& raceOptions = _chrCustomizationOptionsByRaceAndGender[{ uint8(raceModel->ChrRacesID), uint8(model->Sex) }];
1039  raceOptions.insert(raceOptions.end(), customizationOptionsForModel->begin(), customizationOptionsForModel->end());
1040 
1041  if (uint32 const* parentRace = Trinity::Containers::MapGetValuePtr(parentRaces, raceModel->ChrRacesID))
1042  {
1043  std::vector<ChrCustomizationOptionEntry const*>& parentRaceOptions = _chrCustomizationOptionsByRaceAndGender[{ uint8(*parentRace), uint8(model->Sex) }];
1044  parentRaceOptions.insert(parentRaceOptions.end(), customizationOptionsForModel->begin(), customizationOptionsForModel->end());
1045  }
1046  }
1047 
1048  // link shapeshift displays to race/gender/form
1049  for (std::pair<uint32 const, std::pair<uint32, uint8>> const& shapeshiftOptionsForModel : Trinity::Containers::MapEqualRange(shapeshiftFormByModel, model->ID))
1050  {
1051  ShapeshiftFormModelData& data = _chrCustomizationChoicesForShapeshifts[{ uint8(raceModel->ChrRacesID), uint8(model->Sex), shapeshiftOptionsForModel.second.second }];
1052  data.OptionID = shapeshiftOptionsForModel.second.first;
1053  data.Choices = Trinity::Containers::MapGetValuePtr(_chrCustomizationChoicesByOption, shapeshiftOptionsForModel.second.first);
1054  if (data.Choices)
1055  {
1056  data.Displays.resize(data.Choices->size());
1057  for (std::size_t i = 0; i < data.Choices->size(); ++i)
1058  data.Displays[i] = Trinity::Containers::MapGetValuePtr(displayInfoByCustomizationChoice, (*data.Choices)[i]->ID);
1059  }
1060  }
1061  }
1062  }
1063 
1064  memset(_chrSpecializationsByIndex, 0, sizeof(_chrSpecializationsByIndex));
1065  for (ChrSpecializationEntry const* chrSpec : sChrSpecializationStore)
1066  {
1067  ASSERT(chrSpec->ClassID < MAX_CLASSES);
1068  ASSERT(chrSpec->OrderIndex < MAX_SPECIALIZATIONS);
1069 
1070  uint32 storageIndex = chrSpec->ClassID;
1071  if (chrSpec->Flags & CHR_SPECIALIZATION_FLAG_PET_OVERRIDE_SPEC)
1072  {
1073  ASSERT(!chrSpec->ClassID);
1074  storageIndex = PET_SPEC_OVERRIDE_CLASS_INDEX;
1075  }
1076 
1077  _chrSpecializationsByIndex[storageIndex][chrSpec->OrderIndex] = chrSpec;
1078  }
1079 
1080  for (ContentTuningXExpectedEntry const* contentTuningXExpectedStat : sContentTuningXExpectedStore)
1081  if (sExpectedStatModStore.LookupEntry(contentTuningXExpectedStat->ExpectedStatModID))
1082  _expectedStatModsByContentTuning[contentTuningXExpectedStat->ContentTuningID].push_back(contentTuningXExpectedStat);
1083 
1084  for (CurvePointEntry const* curvePoint : sCurvePointStore)
1085  if (sCurveStore.LookupEntry(curvePoint->CurveID))
1086  _curvePoints[curvePoint->CurveID].push_back(curvePoint);
1087 
1088  for (auto itr = _curvePoints.begin(); itr != _curvePoints.end(); ++itr)
1089  std::sort(itr->second.begin(), itr->second.end(), [](CurvePointEntry const* point1, CurvePointEntry const* point2) { return point1->OrderIndex < point2->OrderIndex; });
1090 
1091  for (EmotesTextSoundEntry const* emoteTextSound : sEmotesTextSoundStore)
1092  _emoteTextSounds[EmotesTextSoundContainer::key_type(emoteTextSound->EmotesTextID, emoteTextSound->RaceID, emoteTextSound->SexID, emoteTextSound->ClassID)] = emoteTextSound;
1093 
1094  for (ExpectedStatEntry const* expectedStat : sExpectedStatStore)
1095  _expectedStatsByLevel[std::make_pair(expectedStat->Lvl, expectedStat->ExpansionID)] = expectedStat;
1096 
1097  for (FactionEntry const* faction : sFactionStore)
1098  if (faction->ParentFactionID)
1099  _factionTeams[faction->ParentFactionID].push_back(faction->ID);
1100 
1101  for (FriendshipRepReactionEntry const* friendshipRepReaction : sFriendshipRepReactionStore)
1102  _friendshipRepReactions[friendshipRepReaction->FriendshipRepID].insert(friendshipRepReaction);
1103 
1104  for (GameObjectDisplayInfoEntry const* gameObjectDisplayInfo : sGameObjectDisplayInfoStore)
1105  {
1106  if (gameObjectDisplayInfo->GeoBoxMax.X < gameObjectDisplayInfo->GeoBoxMin.X)
1107  std::swap(*(float*)(&gameObjectDisplayInfo->GeoBoxMax.X), *(float*)(&gameObjectDisplayInfo->GeoBoxMin.X));
1108  if (gameObjectDisplayInfo->GeoBoxMax.Y < gameObjectDisplayInfo->GeoBoxMin.Y)
1109  std::swap(*(float*)(&gameObjectDisplayInfo->GeoBoxMax.Y), *(float*)(&gameObjectDisplayInfo->GeoBoxMin.Y));
1110  if (gameObjectDisplayInfo->GeoBoxMax.Z < gameObjectDisplayInfo->GeoBoxMin.Z)
1111  std::swap(*(float*)(&gameObjectDisplayInfo->GeoBoxMax.Z), *(float*)(&gameObjectDisplayInfo->GeoBoxMin.Z));
1112  }
1113 
1114  for (HeirloomEntry const* heirloom : sHeirloomStore)
1115  _heirlooms[heirloom->ItemID] = heirloom;
1116 
1117  for (GlyphBindableSpellEntry const* glyphBindableSpell : sGlyphBindableSpellStore)
1118  _glyphBindableSpells[glyphBindableSpell->GlyphPropertiesID].push_back(glyphBindableSpell->SpellID);
1119 
1120  for (GlyphRequiredSpecEntry const* glyphRequiredSpec : sGlyphRequiredSpecStore)
1121  _glyphRequiredSpecs[glyphRequiredSpec->GlyphPropertiesID].push_back(glyphRequiredSpec->ChrSpecializationID);
1122 
1123  for (ItemBonusEntry const* bonus : sItemBonusStore)
1124  _itemBonusLists[bonus->ParentItemBonusListID].push_back(bonus);
1125 
1126  for (ItemBonusListLevelDeltaEntry const* itemBonusListLevelDelta : sItemBonusListLevelDeltaStore)
1127  _itemLevelDeltaToBonusListContainer[itemBonusListLevelDelta->ItemLevelDelta] = itemBonusListLevelDelta->ID;
1128 
1129  for (ItemBonusTreeNodeEntry const* bonusTreeNode : sItemBonusTreeNodeStore)
1130  _itemBonusTrees[bonusTreeNode->ParentItemBonusTreeID].insert(bonusTreeNode);
1131 
1132  for (ItemChildEquipmentEntry const* itemChildEquipment : sItemChildEquipmentStore)
1133  {
1134  ASSERT(_itemChildEquipment.find(itemChildEquipment->ParentItemID) == _itemChildEquipment.end(), "Item must have max 1 child item.");
1135  _itemChildEquipment[itemChildEquipment->ParentItemID] = itemChildEquipment;
1136  }
1137 
1138  for (ItemClassEntry const* itemClass : sItemClassStore)
1139  {
1140  ASSERT(itemClass->ClassID < int32(_itemClassByOldEnum.size()));
1141  ASSERT(!_itemClassByOldEnum[itemClass->ClassID]);
1142  _itemClassByOldEnum[itemClass->ClassID] = itemClass;
1143  }
1144 
1145  for (ItemCurrencyCostEntry const* itemCurrencyCost : sItemCurrencyCostStore)
1146  _itemsWithCurrencyCost.insert(itemCurrencyCost->ItemID);
1147 
1149  _itemCategoryConditions[condition->ParentItemLimitCategoryID].push_back(condition);
1150 
1151  for (ItemLevelSelectorQualityEntry const* itemLevelSelectorQuality : sItemLevelSelectorQualityStore)
1152  _itemLevelQualitySelectorQualities[itemLevelSelectorQuality->ParentILSQualitySetID].insert(itemLevelSelectorQuality);
1153 
1154  for (ItemModifiedAppearanceEntry const* appearanceMod : sItemModifiedAppearanceStore)
1155  {
1156  ASSERT(appearanceMod->ItemID <= 0xFFFFFF);
1157  _itemModifiedAppearancesByItem[appearanceMod->ItemID | (appearanceMod->ItemAppearanceModifierID << 24)] = appearanceMod;
1158  }
1159 
1160  for (ItemSetSpellEntry const* itemSetSpell : sItemSetSpellStore)
1161  _itemSetSpells[itemSetSpell->ItemSetID].push_back(itemSetSpell);
1162 
1163  for (ItemSpecOverrideEntry const* itemSpecOverride : sItemSpecOverrideStore)
1164  _itemSpecOverrides[itemSpecOverride->ItemID].push_back(itemSpecOverride);
1165 
1166  for (ItemXBonusTreeEntry const* itemBonusTreeAssignment : sItemXBonusTreeStore)
1167  _itemToBonusTree.insert({ itemBonusTreeAssignment->ItemID, itemBonusTreeAssignment->ItemBonusTreeID });
1168 
1169  for (auto&& kvp : _azeriteEmpoweredItems)
1170  LoadAzeriteEmpoweredItemUnlockMappings(azeriteUnlockMappings, kvp.first);
1171 
1172  for (MapDifficultyEntry const* entry : sMapDifficultyStore)
1173  _mapDifficulties[entry->MapID][entry->DifficultyID] = entry;
1174  _mapDifficulties[0][0] = _mapDifficulties[1][0]; // map 0 is missing from MapDifficulty.dbc so we cheat a bit
1175 
1176  std::vector<MapDifficultyXConditionEntry const*> mapDifficultyConditions;
1177  mapDifficultyConditions.reserve(sMapDifficultyXConditionStore.GetNumRows());
1178  for (MapDifficultyXConditionEntry const* mapDifficultyCondition : sMapDifficultyXConditionStore)
1179  mapDifficultyConditions.push_back(mapDifficultyCondition);
1180 
1181  std::sort(mapDifficultyConditions.begin(), mapDifficultyConditions.end(), [](MapDifficultyXConditionEntry const* left, MapDifficultyXConditionEntry const* right)
1182  {
1183  return left->OrderIndex < right->OrderIndex;
1184  });
1185 
1186  for (MapDifficultyXConditionEntry const* mapDifficultyCondition : mapDifficultyConditions)
1187  if (PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(mapDifficultyCondition->PlayerConditionID))
1188  _mapDifficultyConditions[mapDifficultyCondition->MapDifficultyID].emplace_back(mapDifficultyCondition->ID, playerCondition);
1189 
1190  for (MountEntry const* mount : sMountStore)
1191  _mountsBySpellId[mount->SourceSpellID] = mount;
1192 
1193  for (MountTypeXCapabilityEntry const* mountTypeCapability : sMountTypeXCapabilityStore)
1194  _mountCapabilitiesByType[mountTypeCapability->MountTypeID].insert(mountTypeCapability);
1195 
1196  for (MountXDisplayEntry const* mountDisplay : sMountXDisplayStore)
1197  _mountDisplays[mountDisplay->MountID].push_back(mountDisplay);
1198 
1199  for (NameGenEntry const* nameGen : sNameGenStore)
1200  _nameGenData[nameGen->RaceID][nameGen->Sex].push_back(nameGen);
1201 
1202  for (NamesProfanityEntry const* namesProfanity : sNamesProfanityStore)
1203  {
1204  ASSERT(namesProfanity->Language < TOTAL_LOCALES || namesProfanity->Language == -1);
1205  std::wstring name;
1206  bool conversionResult = Utf8toWStr(namesProfanity->Name, name);
1207  ASSERT(conversionResult);
1208  if (namesProfanity->Language != -1)
1209  _nameValidators[namesProfanity->Language].emplace_back(name, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize);
1210  else
1211  {
1212  for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
1213  {
1214  if (i == LOCALE_none)
1215  continue;
1216 
1217  _nameValidators[i].emplace_back(name, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize);
1218  }
1219  }
1220  }
1221 
1222  for (NamesReservedEntry const* namesReserved : sNamesReservedStore)
1223  {
1224  std::wstring name;
1225  bool conversionResult = Utf8toWStr(namesReserved->Name, name);
1226  ASSERT(conversionResult);
1227  _nameValidators[TOTAL_LOCALES].emplace_back(name, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize);
1228  }
1229 
1230  for (NamesReservedLocaleEntry const* namesReserved : sNamesReservedLocaleStore)
1231  {
1232  ASSERT(!(namesReserved->LocaleMask & ~((1u << TOTAL_LOCALES) - 1)));
1233  std::wstring name;
1234  bool conversionResult = Utf8toWStr(namesReserved->Name, name);
1235  ASSERT(conversionResult);
1236  for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
1237  {
1238  if (i == LOCALE_none)
1239  continue;
1240 
1241  if (namesReserved->LocaleMask & (1 << i))
1242  _nameValidators[i].emplace_back(name, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize);
1243  }
1244  }
1245 
1246  for (ParagonReputationEntry const* paragonReputation : sParagonReputationStore)
1247  if (sFactionStore.HasRecord(paragonReputation->FactionID))
1248  _paragonReputations[paragonReputation->FactionID] = paragonReputation;
1249 
1250  for (PhaseXPhaseGroupEntry const* group : sPhaseXPhaseGroupStore)
1251  if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseID))
1252  _phasesByGroup[group->PhaseGroupID].push_back(phase->ID);
1253 
1254  for (PowerTypeEntry const* powerType : sPowerTypeStore)
1255  {
1256  ASSERT(powerType->PowerTypeEnum < MAX_POWERS);
1257  ASSERT(!_powerTypes[powerType->PowerTypeEnum]);
1258 
1259  _powerTypes[powerType->PowerTypeEnum] = powerType;
1260  }
1261 
1262  for (PVPDifficultyEntry const* entry : sPVPDifficultyStore)
1263  {
1264  ASSERT(entry->RangeIndex < MAX_BATTLEGROUND_BRACKETS, "PvpDifficulty bracket (%d) exceeded max allowed value (%d)", entry->RangeIndex, MAX_BATTLEGROUND_BRACKETS);
1265  }
1266 
1267  for (PVPItemEntry const* pvpItem : sPVPItemStore)
1268  _pvpItemBonus[pvpItem->ItemID] = pvpItem->ItemLevelDelta;
1269 
1270  for (PvpTalentSlotUnlockEntry const* talentUnlock : sPvpTalentSlotUnlockStore)
1271  {
1272  ASSERT(talentUnlock->Slot < (1 << MAX_PVP_TALENT_SLOTS));
1273  for (int8 i = 0; i < MAX_PVP_TALENT_SLOTS; ++i)
1274  {
1275  if (talentUnlock->Slot & (1 << i))
1276  {
1277  ASSERT(!_pvpTalentSlotUnlock[i]);
1278  _pvpTalentSlotUnlock[i] = talentUnlock;
1279  }
1280  }
1281  }
1282 
1283  for (QuestLineXQuestEntry const* questLineQuest : sQuestLineXQuestStore)
1284  _questsByQuestLine[questLineQuest->QuestLineID].insert(questLineQuest);
1285 
1286  for (QuestPackageItemEntry const* questPackageItem : sQuestPackageItemStore)
1287  {
1288  if (questPackageItem->DisplayType != QUEST_PACKAGE_FILTER_UNMATCHED)
1289  _questPackages[questPackageItem->PackageID].first.push_back(questPackageItem);
1290  else
1291  _questPackages[questPackageItem->PackageID].second.push_back(questPackageItem);
1292  }
1293 
1294  for (RewardPackXCurrencyTypeEntry const* rewardPackXCurrencyType : sRewardPackXCurrencyTypeStore)
1295  _rewardPackCurrencyTypes[rewardPackXCurrencyType->RewardPackID].push_back(rewardPackXCurrencyType);
1296 
1297  for (RewardPackXItemEntry const* rewardPackXItem : sRewardPackXItemStore)
1298  _rewardPackItems[rewardPackXItem->RewardPackID].push_back(rewardPackXItem);
1299 
1300  for (SkillLineEntry const* skill : sSkillLineStore)
1301  if (skill->ParentSkillLineID)
1302  _skillLinesByParentSkillLine[skill->ParentSkillLineID].push_back(skill);
1303 
1304  for (SkillLineAbilityEntry const* skillLineAbility : sSkillLineAbilityStore)
1305  _skillLineAbilitiesBySkillupSkill[skillLineAbility->SkillupSkillLineID ? skillLineAbility->SkillupSkillLineID : skillLineAbility->SkillLine].push_back(skillLineAbility);
1306 
1308  if (sSkillLineStore.LookupEntry(entry->SkillID))
1309  _skillRaceClassInfoBySkill.insert(SkillRaceClassInfoContainer::value_type(entry->SkillID, entry));
1310 
1311  for (SpecializationSpellsEntry const* specSpells : sSpecializationSpellsStore)
1312  _specializationSpellsBySpec[specSpells->SpecID].push_back(specSpells);
1313 
1314  for (SpecSetMemberEntry const* specSetMember : sSpecSetMemberStore)
1315  _specsBySpecSet.insert(std::make_pair(specSetMember->SpecSetID, uint32(specSetMember->ChrSpecializationID)));
1316 
1317  for (SpellClassOptionsEntry const* classOption : sSpellClassOptionsStore)
1318  _spellFamilyNames.insert(classOption->SpellClassSet);
1319 
1321  _spellProcsPerMinuteMods[ppmMod->SpellProcsPerMinuteID].push_back(ppmMod);
1322 
1323  for (TalentEntry const* talentInfo : sTalentStore)
1324  {
1325  ASSERT(talentInfo->ClassID < MAX_CLASSES);
1326  ASSERT(talentInfo->TierID < MAX_TALENT_TIERS, "MAX_TALENT_TIERS must be at least %u", talentInfo->TierID + 1);
1327  ASSERT(talentInfo->ColumnIndex < MAX_TALENT_COLUMNS, "MAX_TALENT_COLUMNS must be at least %u", talentInfo->ColumnIndex + 1);
1328 
1329  _talentsByPosition[talentInfo->ClassID][talentInfo->TierID][talentInfo->ColumnIndex].push_back(talentInfo);
1330  }
1331 
1332  for (TaxiPathEntry const* entry : sTaxiPathStore)
1333  sTaxiPathSetBySource[entry->FromTaxiNode][entry->ToTaxiNode] = TaxiPathBySourceAndDestination(entry->ID, entry->Cost);
1334 
1335  uint32 pathCount = sTaxiPathStore.GetNumRows();
1336 
1337  // Calculate path nodes count
1338  std::vector<uint32> pathLength;
1339  pathLength.resize(pathCount); // 0 and some other indexes not used
1340  for (TaxiPathNodeEntry const* entry : sTaxiPathNodeStore)
1341  if (pathLength[entry->PathID] < entry->NodeIndex + 1u)
1342  pathLength[entry->PathID] = entry->NodeIndex + 1u;
1343 
1344  // Set path length
1345  sTaxiPathNodesByPath.resize(pathCount); // 0 and some other indexes not used
1346  for (uint32 i = 0; i < sTaxiPathNodesByPath.size(); ++i)
1347  sTaxiPathNodesByPath[i].resize(pathLength[i]);
1348 
1349  // fill data
1350  for (TaxiPathNodeEntry const* entry : sTaxiPathNodeStore)
1351  sTaxiPathNodesByPath[entry->PathID][entry->NodeIndex] = entry;
1352 
1353  for (ToyEntry const* toy : sToyStore)
1354  _toys.insert(toy->ItemID);
1355 
1356  for (TransmogSetItemEntry const* transmogSetItem : sTransmogSetItemStore)
1357  {
1358  TransmogSetEntry const* set = sTransmogSetStore.LookupEntry(transmogSetItem->TransmogSetID);
1359  if (!set)
1360  continue;
1361 
1362  _transmogSetsByItemModifiedAppearance[transmogSetItem->ItemModifiedAppearanceID].push_back(set);
1363  _transmogSetItemsByTransmogSet[transmogSetItem->TransmogSetID].push_back(transmogSetItem);
1364  }
1365 
1366  std::unordered_multimap<int32, UiMapAssignmentEntry const*> uiMapAssignmentByUiMap;
1367  for (UiMapAssignmentEntry const* uiMapAssignment : sUiMapAssignmentStore)
1368  {
1369  uiMapAssignmentByUiMap.emplace(uiMapAssignment->UiMapID, uiMapAssignment);
1370  if (UiMapEntry const* uiMap = sUiMapStore.LookupEntry(uiMapAssignment->UiMapID))
1371  {
1372  ASSERT(uiMap->System < MAX_UI_MAP_SYSTEM, "MAX_UI_MAP_SYSTEM must be at least %u", uiMap->System + 1);
1373  if (uiMapAssignment->MapID >= 0)
1374  _uiMapAssignmentByMap[uiMap->System].emplace(uiMapAssignment->MapID, uiMapAssignment);
1375  if (uiMapAssignment->AreaID)
1376  _uiMapAssignmentByArea[uiMap->System].emplace(uiMapAssignment->AreaID, uiMapAssignment);
1377  if (uiMapAssignment->WmoDoodadPlacementID)
1378  _uiMapAssignmentByWmoDoodadPlacement[uiMap->System].emplace(uiMapAssignment->WmoDoodadPlacementID, uiMapAssignment);
1379  if (uiMapAssignment->WmoGroupID)
1380  _uiMapAssignmentByWmoGroup[uiMap->System].emplace(uiMapAssignment->WmoGroupID, uiMapAssignment);
1381  }
1382  }
1383 
1384  std::unordered_map<std::pair<int32, uint32>, UiMapLinkEntry const*> uiMapLinks;
1385  for (UiMapLinkEntry const* uiMapLink : sUiMapLinkStore)
1386  uiMapLinks[std::make_pair(uiMapLink->ParentUiMapID, uint32(uiMapLink->ChildUiMapID))] = uiMapLink;
1387 
1388  for (UiMapEntry const* uiMap : sUiMapStore)
1389  {
1390  UiMapBounds& bounds = _uiMapBounds[uiMap->ID];
1391  memset(&bounds, 0, sizeof(bounds));
1392  if (UiMapEntry const* parentUiMap = sUiMapStore.LookupEntry(uiMap->ParentUiMapID))
1393  {
1394  if (parentUiMap->GetFlags().HasFlag(UiMapFlag::NoWorldPositions))
1395  continue;
1396 
1397  UiMapAssignmentEntry const* uiMapAssignment = nullptr;
1398  UiMapAssignmentEntry const* parentUiMapAssignment = nullptr;
1399  for (std::pair<int32 const, UiMapAssignmentEntry const*> const& uiMapAssignmentForMap : Trinity::Containers::MapEqualRange(uiMapAssignmentByUiMap, uiMap->ID))
1400  {
1401  if (uiMapAssignmentForMap.second->MapID >= 0 &&
1402  uiMapAssignmentForMap.second->Region[1].X - uiMapAssignmentForMap.second->Region[0].X > 0 &&
1403  uiMapAssignmentForMap.second->Region[1].Y - uiMapAssignmentForMap.second->Region[0].Y > 0)
1404  {
1405  uiMapAssignment = uiMapAssignmentForMap.second;
1406  break;
1407  }
1408  }
1409 
1410  if (!uiMapAssignment)
1411  continue;
1412 
1413  for (std::pair<int32 const, UiMapAssignmentEntry const*> const& uiMapAssignmentForMap : Trinity::Containers::MapEqualRange(uiMapAssignmentByUiMap, uiMap->ParentUiMapID))
1414  {
1415  if (uiMapAssignmentForMap.second->MapID == uiMapAssignment->MapID &&
1416  uiMapAssignmentForMap.second->Region[1].X - uiMapAssignmentForMap.second->Region[0].X > 0 &&
1417  uiMapAssignmentForMap.second->Region[1].Y - uiMapAssignmentForMap.second->Region[0].Y > 0)
1418  {
1419  parentUiMapAssignment = uiMapAssignmentForMap.second;
1420  break;
1421  }
1422  }
1423 
1424  if (!parentUiMapAssignment)
1425  continue;
1426 
1427  float parentXsize = parentUiMapAssignment->Region[1].X - parentUiMapAssignment->Region[0].X;
1428  float parentYsize = parentUiMapAssignment->Region[1].Y - parentUiMapAssignment->Region[0].Y;
1429  float bound0scale = (uiMapAssignment->Region[1].X - parentUiMapAssignment->Region[0].X) / parentXsize;
1430  float bound0 = ((1.0f - bound0scale) * parentUiMapAssignment->UiMax.Y) + (bound0scale * parentUiMapAssignment->UiMin.Y);
1431  float bound2scale = (uiMapAssignment->Region[0].X - parentUiMapAssignment->Region[0].X) / parentXsize;
1432  float bound2 = ((1.0f - bound2scale) * parentUiMapAssignment->UiMax.Y) + (bound2scale * parentUiMapAssignment->UiMin.Y);
1433  float bound1scale = (uiMapAssignment->Region[1].Y - parentUiMapAssignment->Region[0].Y) / parentYsize;
1434  float bound1 = ((1.0f - bound1scale) * parentUiMapAssignment->UiMax.X) + (bound1scale * parentUiMapAssignment->UiMin.X);
1435  float bound3scale = (uiMapAssignment->Region[0].Y - parentUiMapAssignment->Region[0].Y) / parentYsize;
1436  float bound3 = ((1.0f - bound3scale) * parentUiMapAssignment->UiMax.X) + (bound3scale * parentUiMapAssignment->UiMin.X);
1437  if ((bound3 - bound1) > 0.0f || (bound2 - bound0) > 0.0f)
1438  {
1439  bounds.Bounds[0] = bound0;
1440  bounds.Bounds[1] = bound1;
1441  bounds.Bounds[2] = bound2;
1442  bounds.Bounds[3] = bound3;
1443  bounds.IsUiAssignment = true;
1444  }
1445  }
1446 
1447  if (UiMapLinkEntry const* uiMapLink = Trinity::Containers::MapGetValuePtr(uiMapLinks, std::make_pair(uiMap->ParentUiMapID, uiMap->ID)))
1448  {
1449  bounds.IsUiAssignment = false;
1450  bounds.IsUiLink = true;
1451  bounds.Bounds[0] = uiMapLink->UiMin.Y;
1452  bounds.Bounds[1] = uiMapLink->UiMin.X;
1453  bounds.Bounds[2] = uiMapLink->UiMax.Y;
1454  bounds.Bounds[3] = uiMapLink->UiMax.X;
1455  }
1456  }
1457 
1458  for (UiMapXMapArtEntry const* uiMapArt : sUiMapXMapArtStore)
1459  if (uiMapArt->PhaseID)
1460  _uiMapPhases.insert(uiMapArt->PhaseID);
1461 
1462  for (WMOAreaTableEntry const* entry : sWMOAreaTableStore)
1463  _wmoAreaTableLookup[WMOAreaTableKey(entry->WmoID, entry->NameSetID, entry->WmoGroupID)] = entry;
1464 
1465  // Initialize global taxinodes mask
1466  // include existed nodes that have at least single not spell base (scripted) path
1467  {
1468  if (sTaxiNodesStore.GetNumRows())
1469  {
1470  ASSERT(TaxiMaskSize >= ((sTaxiNodesStore.GetNumRows() - 1) / 8) + 1,
1471  "TaxiMaskSize is not large enough to contain all taxi nodes! (current value %d, required %d)",
1472  TaxiMaskSize, (((sTaxiNodesStore.GetNumRows() - 1) / 8) + 1));
1473  }
1474 
1475  sTaxiNodesMask.fill(0);
1476  sOldContinentsNodesMask.fill(0);
1477  sHordeTaxiNodesMask.fill(0);
1478  sAllianceTaxiNodesMask.fill(0);
1479  for (TaxiNodesEntry const* node : sTaxiNodesStore)
1480  {
1481  if (!(node->Flags & (TAXI_NODE_FLAG_ALLIANCE | TAXI_NODE_FLAG_HORDE)))
1482  continue;
1483 
1484  // valid taxi network node
1485  uint32 field = uint32((node->ID - 1) / 8);
1486  uint32 submask = 1 << ((node->ID - 1) % 8);
1487 
1488  sTaxiNodesMask[field] |= submask;
1489  if (node->Flags & TAXI_NODE_FLAG_HORDE)
1490  sHordeTaxiNodesMask[field] |= submask;
1491  if (node->Flags & TAXI_NODE_FLAG_ALLIANCE)
1492  sAllianceTaxiNodesMask[field] |= submask;
1493 
1494  int32 uiMapId = -1;
1495  if (!GetUiMapPosition(node->Pos.X, node->Pos.Y, node->Pos.Z, node->ContinentID, 0, 0, 0, UI_MAP_SYSTEM_ADVENTURE, false, &uiMapId))
1496  GetUiMapPosition(node->Pos.X, node->Pos.Y, node->Pos.Z, node->ContinentID, 0, 0, 0, UI_MAP_SYSTEM_TAXI, false, &uiMapId);
1497 
1498  if (uiMapId == 985 || uiMapId == 986)
1499  sOldContinentsNodesMask[field] |= submask;
1500  }
1501  }
1502 
1503  TC_LOG_INFO("server.loading", ">> Initialized " SZFMTD " DB2 data stores in %u ms", _stores.size(), GetMSTimeDiffToNow(oldMSTime));
1504 
1505  return availableDb2Locales.to_ulong();
1506 }
Definition: DB2Structure.h:2735
DB2Storage< AnimationDataEntry > sAnimationDataStore("AnimationData.db2", AnimationDataLoadInfo::Instance())
DB2Storage< CriteriaEntry > sCriteriaStore("Criteria.db2", CriteriaLoadInfo::Instance())
DB2Storage< SkillLineEntry > sSkillLineStore("SkillLine.db2", SkillLineLoadInfo::Instance())
int32 OrderIndex
Definition: DB2Structure.h:2433
Definition: DB2Structure.h:118
#define TaxiMaskSize
Definition: DBCEnums.h:1496
Definition: DB2Structure.h:2915
DB2Storage< ImportPriceShieldEntry > sImportPriceShieldStore("ImportPriceShield.db2", ImportPriceShieldLoadInfo::Instance())
Definition: DBCEnums.h:1611
Definition: DB2Structure.h:2027
Definition: DBCEnums.h:1406
#define MAX_AZERITE_ESSENCE_SLOT
Definition: DBCEnums.h:179
DB2Storage< GarrBuildingPlotInstEntry > sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstLoadInfo::Instance())
DB2Storage< ChrRaceXChrModelEntry > sChrRaceXChrModelStore("ChrRaceXChrModel.db2", ChrRaceXChrModelLoadInfo::Instance())
Definition: DB2Structure.h:1935
LocaleConstant GetLocaleByName(std::string const &name)
Definition: Common.cpp:36
DB2Storage< SceneScriptEntry > sSceneScriptStore("SceneScript.db2", SceneScriptLoadInfo::Instance())
Definition: DB2Structure.h:1906
DB2Storage< SkillLineAbilityEntry > sSkillLineAbilityStore("SkillLineAbility.db2", SkillLineAbilityLoadInfo::Instance())
DB2Storage< ArtifactEntry > sArtifactStore("Artifact.db2", ArtifactLoadInfo::Instance())
DB2Storage< CorruptionEffectsEntry > sCorruptionEffectsStore("CorruptionEffects.db2", CorruptionEffectsLoadInfo::Instance())
Definition: DB2Structure.h:2985
Definition: DBCEnums.h:64
DB2Storage< SpellCastTimesEntry > sSpellCastTimesStore("SpellCastTimes.db2", SpellCastTimesLoadInfo::Instance())
float Y
Definition: DBCEnums.h:36
DB2Storage< SpellPowerEntry > sSpellPowerStore("SpellPower.db2", SpellPowerLoadInfo::Instance())
DB2Storage< UiMapEntry > sUiMapStore("UiMap.db2", UiMapLoadInfo::Instance())
int8_t int8
Definition: Define.h:150
TaxiMask sOldContinentsNodesMask
Definition: DB2Stores.cpp:323
DB2Storage< ItemLimitCategoryConditionEntry > sItemLimitCategoryConditionStore("ItemLimitCategoryCondition.db2", ItemLimitCategoryConditionLoadInfo::Instance())
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:227
DB2Storage< CreatureFamilyEntry > sCreatureFamilyStore("CreatureFamily.db2", CreatureFamilyLoadInfo::Instance())
DB2Storage< SpellProcsPerMinuteModEntry > sSpellProcsPerMinuteModStore("SpellProcsPerMinuteMod.db2", SpellProcsPerMinuteModLoadInfo::Instance())
DB2Storage< ItemSpecOverrideEntry > sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideLoadInfo::Instance())
DB2Storage< SpellCastingRequirementsEntry > sSpellCastingRequirementsStore("SpellCastingRequirements.db2", SpellCastingRequirementsLoadInfo::Instance())
DB2Storage< ItemBagFamilyEntry > sItemBagFamilyStore("ItemBagFamily.db2", ItemBagFamilyLoadInfo::Instance())
DB2Storage< AzeriteEssenceEntry > sAzeriteEssenceStore("AzeriteEssence.db2", AzeriteEssenceLoadInfo::Instance())
DB2Storage< AzeriteUnlockMappingEntry > sAzeriteUnlockMappingStore("AzeriteUnlockMapping.db2", AzeriteUnlockMappingLoadInfo::Instance())
Definition: DB2Structure.h:2566
Definition: DB2Structure.h:2428
DB2Storage< ChrClassesEntry > sChrClassesStore("ChrClasses.db2", ChrClassesLoadInfo::Instance())
DB2Storage< ItemArmorTotalEntry > sItemArmorTotalStore("ItemArmorTotal.db2", ItemArmorTotalLoadInfo::Instance())
DB2Storage< MapDifficultyEntry > sMapDifficultyStore("MapDifficulty.db2", MapDifficultyLoadInfo::Instance())
Definition: DB2Structure.h:738
DB2Storage< TactKeyEntry > sTactKeyStore("TactKey.db2", TactKeyLoadInfo::Instance())
Definition: DB2Structure.h:1918
Definition: DB2Structure.h:1705
DB2Storage< AdventureJournalEntry > sAdventureJournalStore("AdventureJournal.db2", AdventureJournalLoadInfo::Instance())
DB2Storage< EmotesEntry > sEmotesStore("Emotes.db2", EmotesLoadInfo::Instance())
DB2Storage< TotemCategoryEntry > sTotemCategoryStore("TotemCategory.db2", TotemCategoryLoadInfo::Instance())
DB2Storage< BattlePetSpeciesEntry > sBattlePetSpeciesStore("BattlePetSpecies.db2", BattlePetSpeciesLoadInfo::Instance())
DB2Storage< ChrSpecializationEntry > sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationLoadInfo::Instance())
DB2Storage< TaxiPathEntry > sTaxiPathStore("TaxiPath.db2", TaxiPathLoadInfo::Instance())
DB2Storage< AreaTriggerEntry > sAreaTriggerStore("AreaTrigger.db2", AreaTriggerLoadInfo::Instance())
Definition: DBCEnums.h:1574
DBCPosition2D UiMin
Definition: DB2Structure.h:3592
DB2Storage< ItemBonusTreeNodeEntry > sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", ItemBonusTreeNodeLoadInfo::Instance())
DB2Storage< VehicleEntry > sVehicleStore("Vehicle.db2", VehicleLoadInfo::Instance())
DB2Storage< ContentTuningEntry > sContentTuningStore("ContentTuning.db2", ContentTuningLoadInfo::Instance())
DB2Storage< DurabilityQualityEntry > sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityLoadInfo::Instance())
DB2Storage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", SpellShapeshiftFormLoadInfo::Instance())
DB2Storage< PowerDisplayEntry > sPowerDisplayStore("PowerDisplay.db2", PowerDisplayLoadInfo::Instance())
#define SZFMTD
Definition: Define.h:145
Definition: DB2Structure.h:1362
DB2Storage< SpellScalingEntry > sSpellScalingStore("SpellScaling.db2", SpellScalingLoadInfo::Instance())
DB2Storage< ParagonReputationEntry > sParagonReputationStore("ParagonReputation.db2", ParagonReputationLoadInfo::Instance())
DB2Storage< AzeriteEmpoweredItemEntry > sAzeriteEmpoweredItemStore("AzeriteEmpoweredItem.db2", AzeriteEmpoweredItemLoadInfo::Instance())
Definition: DB2Structure.h:640
DB2Storage< RewardPackXItemEntry > sRewardPackXItemStore("RewardPackXItem.db2", RewardPackXItemLoadInfo::Instance())
DB2Storage< PvpTalentEntry > sPvpTalentStore("PvpTalent.db2", PvpTalentLoadInfo::Instance())
TaxiMask sTaxiNodesMask
Definition: DB2Stores.cpp:322
DB2Storage< ChrCustomizationReqChoiceEntry > sChrCustomizationReqChoiceStore("ChrCustomizationReqChoice.db2", ChrCustomizationReqChoiceLoadInfo::Instance())
constexpr bool IsValidLocale(LocaleConstant locale)
Definition: Common.h:105
Definition: DB2Structure.h:2840
DB2Storage< ChrCustomizationReqEntry > sChrCustomizationReqStore("ChrCustomizationReq.db2", ChrCustomizationReqLoadInfo::Instance())
constexpr auto data(C &c)
Definition: advstd.h:96
DB2Storage< SpellEffectEntry > sSpellEffectStore("SpellEffect.db2", SpellEffectLoadInfo::Instance())
DB2Storage< ItemModifiedAppearanceExtraEntry > sItemModifiedAppearanceExtraStore("ItemModifiedAppearanceExtra.db2", ItemModifiedAppearanceExtraLoadInfo::Instance())
auto MapEqualRange(M &map, typename M::key_type const &key) -> IteratorPair< decltype(map.begin())>
Definition: IteratorPair.h:61
Definition: DB2Structure.h:2848
DB2Storage< GlyphRequiredSpecEntry > sGlyphRequiredSpecStore("GlyphRequiredSpec.db2", GlyphRequiredSpecLoadInfo::Instance())
DB2Storage< ItemBonusListLevelDeltaEntry > sItemBonusListLevelDeltaStore("ItemBonusListLevelDelta.db2", ItemBonusListLevelDeltaLoadInfo::Instance())
Definition: DB2Structure.h:2058
AzeriteItemMilestoneType
Definition: DBCEnums.h:182
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:186
Definition: DB2Structure.h:2668
DB2Storage< SpellTotemsEntry > sSpellTotemsStore("SpellTotems.db2", SpellTotemsLoadInfo::Instance())
Definition: DBCEnums.h:1610
DB2Storage< SpellInterruptsEntry > sSpellInterruptsStore("SpellInterrupts.db2", SpellInterruptsLoadInfo::Instance())
DB2Storage< MountXDisplayEntry > sMountXDisplayStore("MountXDisplay.db2", MountXDisplayLoadInfo::Instance())
Definition: DB2Structure.h:2995
std::vector< ChrCustomizationChoiceEntry const * > const * Choices
Definition: DB2Stores.h:253
DB2Storage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore("SpellItemEnchantment.db2", SpellItemEnchantmentLoadInfo::Instance())
Definition: DB2Structure.h:866
DB2Storage< ChrCustomizationOptionEntry > sChrCustomizationOptionStore("ChrCustomizationOption.db2", ChrCustomizationOptionLoadInfo::Instance())
DB2Storage< ChrRacesEntry > sChrRacesStore("ChrRaces.db2", ChrRacesLoadInfo::Instance())
uint32 getMSTime()
Definition: Timer.h:24
DB2Storage< ItemLevelSelectorQualitySetEntry > sItemLevelSelectorQualitySetStore("ItemLevelSelectorQualitySet.db2", ItemLevelSelectorQualitySetLoadInfo::Instance())
TaxiMask sHordeTaxiNodesMask
Definition: DB2Stores.cpp:324
Definition: DB2Structure.h:731
DB2Storage< MountCapabilityEntry > sMountCapabilityStore("MountCapability.db2", MountCapabilityLoadInfo::Instance())
Definition: DB2Structure.h:1893
DB2Storage< DungeonEncounterEntry > sDungeonEncounterStore("DungeonEncounter.db2", DungeonEncounterLoadInfo::Instance())
#define sLog
Definition: Log.h:131
#define PET_SPEC_OVERRIDE_CLASS_INDEX
Definition: SharedDefines.h:922
DB2Storage< ArtifactPowerPickerEntry > sArtifactPowerPickerStore("ArtifactPowerPicker.db2", ArtifactPowerPickerLoadInfo::Instance())
DB2Storage< AzeriteLevelInfoEntry > sAzeriteLevelInfoStore("AzeriteLevelInfo.db2", AzeriteLevelInfoLoadInfo::Instance())
DB2Storage< MailTemplateEntry > sMailTemplateStore("MailTemplate.db2", MailTemplateLoadInfo::Instance())
Definition: DB2Structure.h:1758
DB2Storage< LiquidTypeEntry > sLiquidTypeStore("LiquidType.db2", LiquidTypeLoadInfo::Instance())
Definition: DB2Structure.h:1485
Definition: DB2Structure.h:710
Definition: DB2Structure.h:280
DB2Storage< CinematicCameraEntry > sCinematicCameraStore("CinematicCamera.db2", CinematicCameraLoadInfo::Instance())
DB2Storage< ConversationLineEntry > sConversationLineStore("ConversationLine.db2", ConversationLineLoadInfo::Instance())
DB2Storage< GlobalCurveEntry > sGlobalCurveStore("GlobalCurve.db2", GlobalCurveLoadInfo::Instance())
Definition: SharedDefines.h:284
DB2Storage< ChatChannelsEntry > sChatChannelsStore("ChatChannels.db2", ChatChannelsLoadInfo::Instance())
DB2Storage< CharTitlesEntry > sCharTitlesStore("CharTitles.db2", CharTitlesLoadInfo::Instance())
uint32 OptionID
Definition: DB2Stores.h:252
std::vector< ChrCustomizationDisplayInfoEntry const * > Displays
Definition: DB2Stores.h:254
DB2Storage< ChrCustomizationChoiceEntry > sChrCustomizationChoiceStore("ChrCustomizationChoice.db2", ChrCustomizationChoiceLoadInfo::Instance())
DB2Storage< AdventureMapPOIEntry > sAdventureMapPOIStore("AdventureMapPOI.db2", AdventureMapPoiLoadInfo::Instance())
int32 RequiredLevel
Definition: DB2Structure.h:363
DB2Storage< ItemArmorQualityEntry > sItemArmorQualityStore("ItemArmorQuality.db2", ItemArmorQualityLoadInfo::Instance())
DB2Storage< ImportPriceArmorEntry > sImportPriceArmorStore("ImportPriceArmor.db2", ImportPriceArmorLoadInfo::Instance())
DBCPosition2D UiMax
Definition: DB2Structure.h:3593
Definition: DB2Structure.h:1259
TaxiPathNodesByPath sTaxiPathNodesByPath
Definition: DB2Stores.cpp:327
#define MAX_TALENT_TIERS
Definition: DBCEnums.h:1567
Definition: DB2Structure.h:2786
DB2Storage< ArtifactPowerLinkEntry > sArtifactPowerLinkStore("ArtifactPowerLink.db2", ArtifactPowerLinkLoadInfo::Instance())
DB2Storage< QuestPackageItemEntry > sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemLoadInfo::Instance())
DB2Storage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoLoadInfo::Instance())
Definition: DB2Structure.h:2709
DB2Storage< ArtifactPowerEntry > sArtifactPowerStore("ArtifactPower.db2", ArtifactPowerLoadInfo::Instance())
DB2Storage< TransmogIllusionEntry > sTransmogIllusionStore("TransmogIllusion.db2", TransmogIllusionLoadInfo::Instance())
DB2Storage< WorldMapOverlayEntry > sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayLoadInfo::Instance())
DB2Storage< KeychainEntry > sKeychainStore("Keychain.db2", KeychainLoadInfo::Instance())
bool Utf8toWStr(char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize)
Definition: Util.cpp:281
DB2Storage< NamesReservedLocaleEntry > sNamesReservedLocaleStore("NamesReservedLocale.db2", NamesReservedLocaleLoadInfo::Instance())
DB2Storage< LanguageWordsEntry > sLanguageWordsStore("LanguageWords.db2", LanguageWordsLoadInfo::Instance())
DB2Storage< ItemCurrencyCostEntry > sItemCurrencyCostStore("ItemCurrencyCost.db2", ItemCurrencyCostLoadInfo::Instance())
float X
Definition: DBCEnums.h:29
DB2Storage< CurvePointEntry > sCurvePointStore("CurvePoint.db2", CurvePointLoadInfo::Instance())
DB2Storage< GuildPerkSpellsEntry > sGuildPerkSpellsStore("GuildPerkSpells.db2", GuildPerkSpellsLoadInfo::Instance())
DB2Storage< PvpTalentCategoryEntry > sPvpTalentCategoryStore("PvpTalentCategory.db2", PvpTalentCategoryLoadInfo::Instance())
DB2Storage< MapDifficultyXConditionEntry > sMapDifficultyXConditionStore("MapDifficultyXCondition.db2", MapDifficultyXConditionLoadInfo::Instance())
Definition: DB2Structure.h:2552
DB2Storage< EmotesTextSoundEntry > sEmotesTextSoundStore("EmotesTextSound.db2", EmotesTextSoundLoadInfo::Instance())
std::tuple< uint16, uint8, int32 > WMOAreaTableKey
Definition: DB2Stores.cpp:377
DB2Storage< GarrFollowerEntry > sGarrFollowerStore("GarrFollower.db2", GarrFollowerLoadInfo::Instance())
DB2Storage< GuildColorEmblemEntry > sGuildColorEmblemStore("GuildColorEmblem.db2", GuildColorEmblemLoadInfo::Instance())
Definition: DB2Structure.h:3523
Definition: DB2Structure.h:2521
DB2Storage< Achievement_CategoryEntry > sAchievementCategoryStore("Achievement_Category.db2", AchievementCategoryLoadInfo::Instance())
Definition: DB2Structure.h:2212
DB2Storage< GarrPlotInstanceEntry > sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceLoadInfo::Instance())
DB2Storage< CinematicSequencesEntry > sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesLoadInfo::Instance())
DB2Storage< QuestMoneyRewardEntry > sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardLoadInfo::Instance())
DB2Storage< ChrClassesXPowerTypesEntry > sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesLoadInfo::Instance())
DB2Storage< TransmogHolidayEntry > sTransmogHolidayStore("TransmogHoliday.db2", TransmogHolidayLoadInfo::Instance())
DB2Storage< LockEntry > sLockStore("Lock.db2", LockLoadInfo::Instance())
DB2Storage< ScenarioStepEntry > sScenarioStepStore("ScenarioStep.db2", ScenarioStepLoadInfo::Instance())
DB2Storage< DifficultyEntry > sDifficultyStore("Difficulty.db2", DifficultyLoadInfo::Instance())
Definition: DB2Structure.h:582
DB2Storage< ItemSpecEntry > sItemSpecStore("ItemSpec.db2", ItemSpecLoadInfo::Instance())
Definition: DB2Structure.h:325
DB2Storage< CreatureDisplayInfoExtraEntry > sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraLoadInfo::Instance())
DB2Storage< SpellXSpellVisualEntry > sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualLoadInfo::Instance())
Definition: DB2Structure.h:633
DB2Storage< ItemXBonusTreeEntry > sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeLoadInfo::Instance())
DB2Storage< SpellRadiusEntry > sSpellRadiusStore("SpellRadius.db2", SpellRadiusLoadInfo::Instance())
DB2Storage< ScenarioEntry > sScenarioStore("Scenario.db2", ScenarioLoadInfo::Instance())
DB2Storage< AzeriteItemEntry > sAzeriteItemStore("AzeriteItem.db2", AzeriteItemLoadInfo::Instance())
DB2Storage< GameObjectsEntry > sGameObjectsStore("GameObjects.db2", GameobjectsLoadInfo::Instance())
LocaleConstant
Definition: Common.h:80
DB2Storage< BattlePetSpeciesStateEntry > sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", BattlePetSpeciesStateLoadInfo::Instance())
#define MAX_SPECIALIZATIONS
Definition: SharedDefines.h:921
Definition: DB2Structure.h:417
DB2Storage< GemPropertiesEntry > sGemPropertiesStore("GemProperties.db2", GemPropertiesLoadInfo::Instance())
Definition: DB2Structure.h:3749
Definition: DB2Structure.h:3287
DB2Storage< CriteriaTreeEntry > sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeLoadInfo::Instance())
DB2Storage< CharacterLoadoutEntry > sCharacterLoadoutStore("CharacterLoadout.db2", CharacterLoadoutLoadInfo::Instance())
DB2Storage< ArmorLocationEntry > sArmorLocationStore("ArmorLocation.db2", ArmorLocationLoadInfo::Instance())
DB2Storage< ArtifactAppearanceSetEntry > sArtifactAppearanceSetStore("ArtifactAppearanceSet.db2", ArtifactAppearanceSetLoadInfo::Instance())
DB2Storage< WMOAreaTableEntry > sWMOAreaTableStore("WMOAreaTable.db2", WmoAreaTableLoadInfo::Instance())
DB2Storage< AzeriteItemMilestonePowerEntry > sAzeriteItemMilestonePowerStore("AzeriteItemMilestonePower.db2", AzeriteItemMilestonePowerLoadInfo::Instance())
DB2Storage< CharacterLoadoutItemEntry > sCharacterLoadoutItemStore("CharacterLoadoutItem.db2", CharacterLoadoutItemLoadInfo::Instance())
Definition: DB2Structure.h:798
DB2Storage< BattlemasterListEntry > sBattlemasterListStore("BattlemasterList.db2", BattlemasterListLoadInfo::Instance())
DB2Storage< SpellShapeshiftEntry > sSpellShapeshiftStore("SpellShapeshift.db2", SpellShapeshiftLoadInfo::Instance())
DB2Storage< SpellItemEnchantmentConditionEntry > sSpellItemEnchantmentConditionStore("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionLoadInfo::Instance())
DB2Storage< BattlePetBreedStateEntry > sBattlePetBreedStateStore("BattlePetBreedState.db2", BattlePetBreedStateLoadInfo::Instance())
DB2Storage< SpellNameEntry > sSpellNameStore("SpellName.db2", SpellNameLoadInfo::Instance())
Definition: DB2Structure.h:3546
DB2Storage< DestructibleModelDataEntry > sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataLoadInfo::Instance())
DB2Storage< ItemDamageOneHandCasterEntry > sItemDamageOneHandCasterStore("ItemDamageOneHandCaster.db2", ItemDamageOneHandCasterLoadInfo::Instance())
DB2Storage< SpellLevelsEntry > sSpellLevelsStore("SpellLevels.db2", SpellLevelsLoadInfo::Instance())
Definition: Common.h:91
float Y
Definition: DBCEnums.h:30
DB2Storage< ItemDisenchantLootEntry > sItemDisenchantLootStore("ItemDisenchantLoot.db2", ItemDisenchantLootLoadInfo::Instance())
DB2Storage< UnitPowerBarEntry > sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarLoadInfo::Instance())
DB2Storage< TalentEntry > sTalentStore("Talent.db2", TalentLoadInfo::Instance())
DB2Storage< GarrSiteLevelEntry > sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelLoadInfo::Instance())
DB2Storage< WorldStateExpressionEntry > sWorldStateExpressionStore("WorldStateExpression.db2", WorldStateExpressionLoadInfo::Instance())
DB2Storage< BattlePetBreedQualityEntry > sBattlePetBreedQualityStore("BattlePetBreedQuality.db2", BattlePetBreedQualityLoadInfo::Instance())
Definition: DB2Stores.h:250
DB2Storage< ArtifactAppearanceEntry > sArtifactAppearanceStore("ArtifactAppearance.db2", ArtifactAppearanceLoadInfo::Instance())
DB2Storage< ExpectedStatEntry > sExpectedStatStore("ExpectedStat.db2", ExpectedStatLoadInfo::Instance())
DB2Storage< UiMapLinkEntry > sUiMapLinkStore("UiMapLink.db2", UiMapLinkLoadInfo::Instance())
DB2Storage< PhaseXPhaseGroupEntry > sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupLoadInfo::Instance())
DB2Storage< NamesProfanityEntry > sNamesProfanityStore("NamesProfanity.db2", NamesProfanityLoadInfo::Instance())
DB2Storage< ChrCustomizationElementEntry > sChrCustomizationElementStore("ChrCustomizationElement.db2", ChrCustomizationElementLoadInfo::Instance())
Definition: DBCEnums.h:1613
DB2Storage< BarberShopStyleEntry > sBarberShopStyleStore("BarberShopStyle.db2", BarberShopStyleLoadInfo::Instance())
DB2Storage< FriendshipReputationEntry > sFriendshipReputationStore("FriendshipReputation.db2", FriendshipReputationLoadInfo::Instance())
DB2Storage< QuestXPEntry > sQuestXPStore("QuestXP.db2", QuestXpLoadInfo::Instance())
DB2Storage< AreaGroupMemberEntry > sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberLoadInfo::Instance())
TaxiMask sAllianceTaxiNodesMask
Definition: DB2Stores.cpp:325
Definition: DBCEnums.h:1573
DB2Storage< EmotesTextEntry > sEmotesTextStore("EmotesText.db2", EmotesTextLoadInfo::Instance())
DB2Storage< CreatureTypeEntry > sCreatureTypeStore("CreatureType.db2", CreatureTypeLoadInfo::Instance())
DB2Storage< SkillRaceClassInfoEntry > sSkillRaceClassInfoStore("SkillRaceClassInfo.db2", SkillRaceClassInfoLoadInfo::Instance())
DB2Storage< ItemClassEntry > sItemClassStore("ItemClass.db2", ItemClassLoadInfo::Instance())
DB2Storage< BankBagSlotPricesEntry > sBankBagSlotPricesStore("BankBagSlotPrices.db2", BankBagSlotPricesLoadInfo::Instance())
Definition: DB2Structure.h:360
DB2Storage< PvpTierEntry > sPvpTierStore("PvpTier.db2", PvpTierLoadInfo::Instance())
DB2Storage< GameObjectDisplayInfoEntry > sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", GameobjectDisplayInfoLoadInfo::Instance())
DB2Storage< SpellLearnSpellEntry > sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellLoadInfo::Instance())
DB2Storage< AnimKitEntry > sAnimKitStore("AnimKit.db2", AnimKitLoadInfo::Instance())
Definition: DB2Structure.h:1506
Definition: DB2Structure.h:2527
int32_t int32
Definition: Define.h:148
Definition: DB2Structure.h:2123
DB2Storage< SpellMiscEntry > sSpellMiscStore("SpellMisc.db2", SpellMiscLoadInfo::Instance())
uint32_t uint32
Definition: Define.h:152
DB2Storage< SpellReagentsEntry > sSpellReagentsStore("SpellReagents.db2", SpellReagentsLoadInfo::Instance())
DB2Storage< SpellAuraOptionsEntry > sSpellAuraOptionsStore("SpellAuraOptions.db2", SpellAuraOptionsLoadInfo::Instance())
DB2Storage< GarrAbilityEntry > sGarrAbilityStore("GarrAbility.db2", GarrAbilityLoadInfo::Instance())
Definition: DB2Structure.h:2219
DB2Storage< SpellCategoryEntry > sSpellCategoryStore("SpellCategory.db2", SpellCategoryLoadInfo::Instance())
DB2Storage< LightEntry > sLightStore("Light.db2", LightLoadInfo::Instance())
void LoadAzeriteEmpoweredItemUnlockMappings(std::unordered_map< int32, std::vector< AzeriteUnlockMappingEntry const *>> const &azeriteUnlockMappingsBySet, uint32 itemId)
Definition: DB2Stores.cpp:2429
DB2Storage< GarrClassSpecEntry > sGarrClassSpecStore("GarrClassSpec.db2", GarrClassSpecLoadInfo::Instance())
Definition: DB2Structure.h:2953
DB2Storage< ImportPriceQualityEntry > sImportPriceQualityStore("ImportPriceQuality.db2", ImportPriceQualityLoadInfo::Instance())
DB2Storage< ChrModelEntry > sChrModelStore("ChrModel.db2", ChrModelLoadInfo::Instance())
DB2Storage< RewardPackXCurrencyTypeEntry > sRewardPackXCurrencyTypeStore("RewardPackXCurrencyType.db2", RewardPackXCurrencyTypeLoadInfo::Instance())
float X
Definition: DBCEnums.h:35
DB2Storage< ItemXItemEffectEntry > sItemXItemEffectStore("ItemXItemEffect.db2", ItemXItemEffectLoadInfo::Instance())
Definition: DB2Structure.h:1872
Definition: DB2Structure.h:2050
DB2Storage< AzeriteEssencePowerEntry > sAzeriteEssencePowerStore("AzeriteEssencePower.db2", AzeriteEssencePowerLoadInfo::Instance())
DB2Storage< RandPropPointsEntry > sRandPropPointsStore("RandPropPoints.db2", RandPropPointsLoadInfo::Instance())
iterator end()
Definition: GridRefManager.h:36
DB2Storage< RewardPackEntry > sRewardPackStore("RewardPack.db2", RewardPackLoadInfo::Instance())
DB2Storage< AreaTableEntry > sAreaTableStore("AreaTable.db2", AreaTableLoadInfo::Instance())
DB2Storage< GarrPlotBuildingEntry > sGarrPlotBuildingStore("GarrPlotBuilding.db2", GarrPlotBuildingLoadInfo::Instance())
Definition: DB2Structure.h:3478
DB2Storage< ItemNameDescriptionEntry > sItemNameDescriptionStore("ItemNameDescription.db2", ItemNameDescriptionLoadInfo::Instance())
DB2Storage< LFGDungeonsEntry > sLFGDungeonsStore("LFGDungeons.db2", LfgDungeonsLoadInfo::Instance())
DB2Storage< FactionTemplateEntry > sFactionTemplateStore("FactionTemplate.db2", FactionTemplateLoadInfo::Instance())
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:180
DB2Storage< ItemDamageTwoHandCasterEntry > sItemDamageTwoHandCasterStore("ItemDamageTwoHandCaster.db2", ItemDamageTwoHandCasterLoadInfo::Instance())
DB2Storage< ToyEntry > sToyStore("Toy.db2", ToyLoadInfo::Instance())
DB2Storage< MountEntry > sMountStore("Mount.db2", MountLoadInfo::Instance())
DB2Storage< ItemDamageAmmoEntry > sItemDamageAmmoStore("ItemDamageAmmo.db2", ItemDamageAmmoLoadInfo::Instance())
#define MAX_CLASSES
Definition: SharedDefines.h:153
DB2Storage< QuestFactionRewardEntry > sQuestFactionRewardStore("QuestFactionReward.db2", QuestFactionRewardLoadInfo::Instance())
DB2Storage< ItemEntry > sItemStore("Item.db2", ItemLoadInfo::Instance())
DB2Storage< SpellAuraRestrictionsEntry > sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", SpellAuraRestrictionsLoadInfo::Instance())
Definition: DB2Structure.h:2560
static bool GetUiMapPosition(float x, float y, float z, int32 mapId, int32 areaId, int32 wmoDoodadPlacementId, int32 wmoGroupId, UiMapSystem system, bool local, int32 *uiMapId=nullptr, DBCPosition2D *newPos=nullptr)
Definition: DB2Stores.cpp:3206
Definition: DB2Structure.h:1402
#define MAX_TALENT_COLUMNS
Definition: DBCEnums.h:1568
DB2Storage< ItemArmorShieldEntry > sItemArmorShieldStore("ItemArmorShield.db2", ItemArmorShieldLoadInfo::Instance())
DB2Storage< GlyphPropertiesEntry > sGlyphPropertiesStore("GlyphProperties.db2", GlyphPropertiesLoadInfo::Instance())
DB2Storage< ItemSearchNameEntry > sItemSearchNameStore("ItemSearchName.db2", ItemSearchNameLoadInfo::Instance())
DB2Storage< SceneScriptTextEntry > sSceneScriptTextStore("SceneScriptText.db2", SceneScriptTextLoadInfo::Instance())
DB2Storage< AzeriteTierUnlockSetEntry > sAzeriteTierUnlockSetStore("AzeriteTierUnlockSet.db2", AzeriteTierUnlockSetLoadInfo::Instance())
DB2Storage< PrestigeLevelInfoEntry > sPrestigeLevelInfoStore("PrestigeLevelInfo.db2", PrestigeLevelInfoLoadInfo::Instance())
DB2Storage< SpellReagentsCurrencyEntry > sSpellReagentsCurrencyStore("SpellReagentsCurrency.db2", SpellReagentsCurrencyLoadInfo::Instance())
DB2Storage< FriendshipRepReactionEntry > sFriendshipRepReactionStore("FriendshipRepReaction.db2", FriendshipRepReactionLoadInfo::Instance())
DB2Storage< GarrPlotEntry > sGarrPlotStore("GarrPlot.db2", GarrPlotLoadInfo::Instance())
#define BATTLE_PET_SPECIES_MAX_ID
Definition: DBCEnums.h:194
Definition: DB2Structure.h:1721
Definition: DB2Structure.h:3590
DB2Storage< ItemSetSpellEntry > sItemSetSpellStore("ItemSetSpell.db2", ItemSetSpellLoadInfo::Instance())
DB2Storage< NameGenEntry > sNameGenStore("NameGen.db2", NameGenLoadInfo::Instance())
DB2Storage< TaxiNodesEntry > sTaxiNodesStore("TaxiNodes.db2", TaxiNodesLoadInfo::Instance())
DB2Storage< GlyphBindableSpellEntry > sGlyphBindableSpellStore("GlyphBindableSpell.db2", GlyphBindableSpellLoadInfo::Instance())
DB2Storage< ChrClassUIDisplayEntry > sChrClassUIDisplayStore("ChrClassUIDisplay.db2", ChrClassUiDisplayLoadInfo::Instance())
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
int32 MapID
Definition: DB2Structure.h:3598
DB2Storage< ItemLevelSelectorEntry > sItemLevelSelectorStore("ItemLevelSelector.db2", ItemLevelSelectorLoadInfo::Instance())
Definition: DB2Structure.h:3470
DB2Storage< ItemDamageOneHandEntry > sItemDamageOneHandStore("ItemDamageOneHand.db2", ItemDamageOneHandLoadInfo::Instance())
DB2Storage< ItemSetEntry > sItemSetStore("ItemSet.db2", ItemSetLoadInfo::Instance())
Definition: DB2Structure.h:661
Definition: DB2Structure.h:2404
Definition: DB2Structure.h:3571
Definition: DB2Structure.h:3604
DB2Storage< ExpectedStatModEntry > sExpectedStatModStore("ExpectedStatMod.db2", ExpectedStatModLoadInfo::Instance())
Definition: Common.h:95
Definition: DB2Structure.h:256
Definition: DB2Structure.h:2932
DB2Storage< TransmogSetEntry > sTransmogSetStore("TransmogSet.db2", TransmogSetLoadInfo::Instance())
DB2Storage< SpellPowerDifficultyEntry > sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", SpellPowerDifficultyLoadInfo::Instance())
DB2Storage< AzeriteTierUnlockEntry > sAzeriteTierUnlockStore("AzeriteTierUnlock.db2", AzeriteTierUnlockLoadInfo::Instance())
DB2Storage< ItemBonusEntry > sItemBonusStore("ItemBonus.db2", ItemBonusLoadInfo::Instance())
DB2Storage< FactionEntry > sFactionStore("Faction.db2", FactionLoadInfo::Instance())
DB2Storage< SummonPropertiesEntry > sSummonPropertiesStore("SummonProperties.db2", SummonPropertiesLoadInfo::Instance())
DB2Storage< VehicleSeatEntry > sVehicleSeatStore("VehicleSeat.db2", VehicleSeatLoadInfo::Instance())
DB2Storage< ItemAppearanceEntry > sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceLoadInfo::Instance())
DB2Storage< AzeritePowerEntry > sAzeritePowerStore("AzeritePower.db2", AzeritePowerLoadInfo::Instance())
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", BroadcastTextLoadInfo::Instance())
DB2Storage< PowerTypeEntry > sPowerTypeStore("PowerType.db2", PowerTypeLoadInfo::Instance())
DB2Storage< OverrideSpellDataEntry > sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataLoadInfo::Instance())
Definition: DB2Structure.h:3451
TaxiPathSetBySource sTaxiPathSetBySource
Definition: DB2Stores.cpp:326
DB2Storage< ItemEffectEntry > sItemEffectStore("ItemEffect.db2", ItemEffectLoadInfo::Instance())
uint8_t uint8
Definition: Define.h:154
DB2Storage< DurabilityCostsEntry > sDurabilityCostsStore("DurabilityCosts.db2", DurabilityCostsLoadInfo::Instance())
DB2Storage< ItemChildEquipmentEntry > sItemChildEquipmentStore("ItemChildEquipment.db2", ItemChildEquipmentLoadInfo::Instance())
DB2Storage< SpecializationSpellsEntry > sSpecializationSpellsStore("SpecializationSpells.db2", SpecializationSpellsLoadInfo::Instance())
DB2Storage< TransmogSetItemEntry > sTransmogSetItemStore("TransmogSetItem.db2", TransmogSetItemLoadInfo::Instance())
Definition: DB2Structure.h:2514
#define ASSERT
Definition: Errors.h:61
DB2Storage< ItemDamageTwoHandEntry > sItemDamageTwoHandStore("ItemDamageTwoHand.db2", ItemDamageTwoHandLoadInfo::Instance())
#define LOAD_DB2(store)
DB2Storage< SpellDurationEntry > sSpellDurationStore("SpellDuration.db2", SpellDurationLoadInfo::Instance())
DB2Storage< SpellClassOptionsEntry > sSpellClassOptionsStore("SpellClassOptions.db2", SpellClassOptionsLoadInfo::Instance())
DBCPosition3D Region[2]
Definition: DB2Structure.h:3594
DB2Storage< SpellTargetRestrictionsEntry > sSpellTargetRestrictionsStore("SpellTargetRestrictions.db2", SpellTargetRestrictionsLoadInfo::Instance())
Definition: DB2Structure.h:2573
DB2Storage< QuestInfoEntry > sQuestInfoStore("QuestInfo.db2", QuestInfoLoadInfo::Instance())
DB2Storage< AuctionHouseEntry > sAuctionHouseStore("AuctionHouse.db2", AuctionHouseLoadInfo::Instance())
DB2Storage< HeirloomEntry > sHeirloomStore("Heirloom.db2", HeirloomLoadInfo::Instance())
DB2Storage< NamesReservedEntry > sNamesReservedStore("NamesReserved.db2", NamesReservedLoadInfo::Instance())
DB2Storage< SceneScriptGlobalTextEntry > sSceneScriptGlobalTextStore("SceneScriptGlobalText.db2", SceneScriptGlobalTextLoadInfo::Instance())
Definition: DB2Structure.h:402
Definition: DB2Structure.h:675
DB2Storage< CurrencyTypesEntry > sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesLoadInfo::Instance())
DB2Storage< SoundKitEntry > sSoundKitStore("SoundKit.db2", SoundKitLoadInfo::Instance())
Definition: DB2Structure.h:2481
Definition: DB2Structure.h:703
Definition: DB2Structure.h:341
DB2Storage< AzeriteKnowledgeMultiplierEntry > sAzeriteKnowledgeMultiplierStore("AzeriteKnowledgeMultiplier.db2", AzeriteKnowledgeMultiplierLoadInfo::Instance())
DB2Storage< GarrSiteLevelPlotInstEntry > sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstLoadInfo::Instance())
DB2Storage< ItemModifiedAppearanceEntry > sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceLoadInfo::Instance())
Definition: DB2Structure.h:2697
DB2Storage< CreatureModelDataEntry > sCreatureModelDataStore("CreatureModelData.db2", CreatureModelDataLoadInfo::Instance())
DB2Storage< NumTalentsAtLevelEntry > sNumTalentsAtLevelStore("NumTalentsAtLevel.db2", NumTalentsAtLevelLoadInfo::Instance())
Definition: DB2Structure.h:267
DB2Storage< QuestLineXQuestEntry > sQuestLineXQuestStore("QuestLineXQuest.db2", QuestLineXQuestLoadInfo::Instance())
DB2Storage< PvpTalentSlotUnlockEntry > sPvpTalentSlotUnlockStore("PvpTalentSlotUnlock.db2", PvpTalentSlotUnlockLoadInfo::Instance())
Definition: DB2Stores.h:257
DB2Storage< GarrBuildingEntry > sGarrBuildingStore("GarrBuilding.db2", GarrBuildingLoadInfo::Instance())
DB2Storage< ArtifactPowerRankEntry > sArtifactPowerRankStore("ArtifactPowerRank.db2", ArtifactPowerRankLoadInfo::Instance())
DB2Storage< CurveEntry > sCurveStore("Curve.db2", CurveLoadInfo::Instance())
DB2Storage< SpellCategoriesEntry > sSpellCategoriesStore("SpellCategories.db2", SpellCategoriesLoadInfo::Instance())
DB2Storage< PlayerConditionEntry > sPlayerConditionStore("PlayerCondition.db2", PlayerConditionLoadInfo::Instance())
Definition: DB2Structure.h:3074
#define MAX_PVP_TALENT_SLOTS
Definition: DBCEnums.h:1569
DB2Storage< MapEntry > sMapStore("Map.db2", MapLoadInfo::Instance())
DB2Storage< Cfg_RegionsEntry > sCfgRegionsStore("Cfg_Regions.db2", CfgRegionsLoadInfo::Instance())
Definition: DB2Structure.h:1372
uint8 OrderIndex
Definition: DB2Structure.h:1265
DB2Storage< SceneScriptPackageEntry > sSceneScriptPackageStore("SceneScriptPackage.db2", SceneScriptPackageLoadInfo::Instance())
DB2Storage< ItemSparseEntry > sItemSparseStore("ItemSparse.db2", ItemSparseLoadInfo::Instance())
DB2Storage< GarrFollowerXAbilityEntry > sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", GarrFollowerXAbilityLoadInfo::Instance())
DB2Storage< TaxiPathNodeEntry > sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeLoadInfo::Instance())
DB2Storage< ArtifactUnlockEntry > sArtifactUnlockStore("ArtifactUnlock.db2", ArtifactUnlockLoadInfo::Instance())
DB2Storage< SpellEquippedItemsEntry > sSpellEquippedItemsStore("SpellEquippedItems.db2", SpellEquippedItemsLoadInfo::Instance())
Definition: DB2Structure.h:3437
DB2Storage< SpellRangeEntry > sSpellRangeStore("SpellRange.db2", SpellRangeLoadInfo::Instance())
DB2Storage< HolidaysEntry > sHolidaysStore("Holidays.db2", HolidaysLoadInfo::Instance())
DB2Storage< AchievementEntry > sAchievementStore("Achievement.db2", AchievementLoadInfo::Instance())
DB2Storage< UiMapAssignmentEntry > sUiMapAssignmentStore("UiMapAssignment.db2", UiMapAssignmentLoadInfo::Instance())
DB2Storage< AzeritePowerSetMemberEntry > sAzeritePowerSetMemberStore("AzeritePowerSetMember.db2", AzeritePowerSetMemberLoadInfo::Instance())
DB2Storage< MovieEntry > sMovieStore("Movie.db2", MovieLoadInfo::Instance())
Definition: DB2Structure.h:3617
DB2Storage< SpellProcsPerMinuteEntry > sSpellProcsPerMinuteStore("SpellProcsPerMinute.db2", SpellProcsPerMinuteLoadInfo::Instance())
DB2Storage< ItemLimitCategoryEntry > sItemLimitCategoryStore("ItemLimitCategory.db2", ItemLimitCategoryLoadInfo::Instance())
DB2Storage< LanguagesEntry > sLanguagesStore("Languages.db2", LanguagesLoadInfo::Instance())
DB2Storage< SpellLabelEntry > sSpellLabelStore("SpellLabel.db2", SpellLabelLoadInfo::Instance())
Definition: DB2Structure.h:2772
DB2Storage< PVPItemEntry > sPVPItemStore("PVPItem.db2", PvpItemLoadInfo::Instance())
DB2Storage< PhaseEntry > sPhaseStore("Phase.db2", PhaseLoadInfo::Instance())
DB2Storage< ModifierTreeEntry > sModifierTreeStore("ModifierTree.db2", ModifierTreeLoadInfo::Instance())
DB2Storage< ChrCustomizationDisplayInfoEntry > sChrCustomizationDisplayInfoStore("ChrCustomizationDisplayInfo.db2", ChrCustomizationDisplayInfoLoadInfo::Instance())
ItemContext
Definition: DBCEnums.h:855
DB2Storage< TransportAnimationEntry > sTransportAnimationStore("TransportAnimation.db2", TransportAnimationLoadInfo::Instance())
DB2Storage< GuildColorBackgroundEntry > sGuildColorBackgroundStore("GuildColorBackground.db2", GuildColorBackgroundLoadInfo::Instance())
Definition: DB2Structure.h:2449
DB2Storage< BannedAddonsEntry > sBannedAddonsStore("BannedAddons.db2", BannedAddonsLoadInfo::Instance())
DB2Storage< ContentTuningXExpectedEntry > sContentTuningXExpectedStore("ContentTuningXExpected.db2", ContentTuningXExpectedLoadInfo::Instance())
DB2Storage< ArtifactTierEntry > sArtifactTierStore("ArtifactTier.db2", ArtifactTierLoadInfo::Instance())
Definition: DB2Structure.h:1926
Definition: DB2Structure.h:494
Definition: DB2Structure.h:392
DB2Storage< TransmogSetGroupEntry > sTransmogSetGroupStore("TransmogSetGroup.db2", TransmogSetGroupLoadInfo::Instance())
Definition: DB2Structure.h:2489
Definition: DB2Structure.h:2506
DB2Storage< ImportPriceWeaponEntry > sImportPriceWeaponStore("ImportPriceWeapon.db2", ImportPriceWeaponLoadInfo::Instance())
DB2Storage< UiMapXMapArtEntry > sUiMapXMapArtStore("UiMapXMapArt.db2", UiMapXMapArtLoadInfo::Instance())
Definition: DB2Structure.h:652
Definition: DB2Structure.h:3499
DB2Storage< ItemExtendedCostEntry > sItemExtendedCostStore("ItemExtendedCost.db2", ItemExtendedCostLoadInfo::Instance())
DB2Storage< TransportRotationEntry > sTransportRotationStore("TransportRotation.db2", TransportRotationLoadInfo::Instance())
DB2Storage< MountTypeXCapabilityEntry > sMountTypeXCapabilityStore("MountTypeXCapability.db2", MountTypeXCapabilityLoadInfo::Instance())
DB2Storage< GuildColorBorderEntry > sGuildColorBorderStore("GuildColorBorder.db2", GuildColorBorderLoadInfo::Instance())
DB2Storage< SpellVisualKitEntry > sSpellVisualKitStore("SpellVisualKit.db2", SpellVisualKitLoadInfo::Instance())
DB2Storage< SpellFocusObjectEntry > sSpellFocusObjectStore("SpellFocusObject.db2", SpellFocusObjectLoadInfo::Instance())
DB2Storage< QuestSortEntry > sQuestSortStore("QuestSort.db2", QuestSortLoadInfo::Instance())
DB2Storage< SpellCooldownsEntry > sSpellCooldownsStore("SpellCooldowns.db2", SpellCooldownsLoadInfo::Instance())
DB2Storage< QuestV2Entry > sQuestV2Store("QuestV2.db2", QuestV2LoadInfo::Instance())
DB2Storage< PVPDifficultyEntry > sPVPDifficultyStore("PVPDifficulty.db2", PvpDifficultyLoadInfo::Instance())
DB2Storage< SpecSetMemberEntry > sSpecSetMemberStore("SpecSetMember.db2", SpecSetMemberLoadInfo::Instance())
DB2Storage< ItemLevelSelectorQualityEntry > sItemLevelSelectorQualityStore("ItemLevelSelectorQuality.db2", ItemLevelSelectorQualityLoadInfo::Instance())
DB2Storage< WorldEffectEntry > sWorldEffectStore("WorldEffect.db2", WorldEffectLoadInfo::Instance())
DB2Storage< ItemPriceBaseEntry > sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseLoadInfo::Instance())
DB2Storage< ArtifactCategoryEntry > sArtifactCategoryStore("ArtifactCategory.db2", ArtifactCategoryLoadInfo::Instance())
+ Here is the call graph for this function:

◆ Map2ZoneCoordinates()

void DB2Manager::Map2ZoneCoordinates ( uint32  areaId,
float &  x,
float &  y 
) const
3269 {
3270  DBCPosition2D zoneCoords;
3271  if (!GetUiMapPosition(x, y, 0.0f, -1, areaId, 0, 0, UI_MAP_SYSTEM_WORLD, true, nullptr, &zoneCoords))
3272  return;
3273 
3274  x = zoneCoords.Y * 100.0f;
3275  y = zoneCoords.X * 100.0f;
3276 }
Definition: DBCEnums.h:1609
Definition: DBCEnums.h:27
float X
Definition: DBCEnums.h:29
float Y
Definition: DBCEnums.h:30
static bool GetUiMapPosition(float x, float y, float z, int32 mapId, int32 areaId, int32 wmoDoodadPlacementId, int32 wmoGroupId, UiMapSystem system, bool local, int32 *uiMapId=nullptr, DBCPosition2D *newPos=nullptr)
Definition: DB2Stores.cpp:3206

◆ ValidateName()

ResponseCodes DB2Manager::ValidateName ( std::wstring const &  name,
LocaleConstant  locale 
) const
2668 {
2669  for (Trinity::wregex const& regex : _nameValidators[locale])
2670  if (Trinity::regex_search(name, regex))
2671  return CHAR_NAME_PROFANE;
2672 
2673  // regexes at TOTAL_LOCALES are loaded from NamesReserved which is not locale specific
2674  for (Trinity::wregex const& regex : _nameValidators[TOTAL_LOCALES])
2675  if (Trinity::regex_search(name, regex))
2676  return CHAR_NAME_RESERVED;
2677 
2678  return CHAR_NAME_SUCCESS;
2679 }
Definition: SharedDefines.h:5872
Definition: SharedDefines.h:5865
Definition: SharedDefines.h:5873
TC_REGEX_NAMESPACE ::wregex wregex
Definition: Regex.h:33
TC_REGEX_NAMESPACE ::regex regex
Definition: Regex.h:32
Definition: Common.h:95

◆ Zone2MapCoordinates()

void DB2Manager::Zone2MapCoordinates ( uint32  areaId,
float &  x,
float &  y 
) const
3249 {
3250  AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
3251  if (!areaEntry)
3252  return;
3253 
3254  for (auto assignment : Trinity::Containers::MapEqualRange(_uiMapAssignmentByArea[UI_MAP_SYSTEM_WORLD], areaId))
3255  {
3256  if (assignment.second->MapID >= 0 && assignment.second->MapID != areaEntry->ContinentID)
3257  continue;
3258 
3259  float tmpY = (y - assignment.second->UiMax.Y) / (assignment.second->UiMin.Y - assignment.second->UiMax.Y);
3260  float tmpX = (x - assignment.second->UiMax.X) / (assignment.second->UiMin.X - assignment.second->UiMax.X);
3261  x = assignment.second->Region[0].X + tmpY * (assignment.second->Region[1].X - assignment.second->Region[0].X);
3262  y = assignment.second->Region[0].Y + tmpX * (assignment.second->Region[1].Y - assignment.second->Region[0].Y);
3263 
3264  break;
3265  }
3266 }
Definition: DB2Structure.h:125
Definition: DBCEnums.h:1609
auto MapEqualRange(M &map, typename M::key_type const &key) -> IteratorPair< decltype(map.begin())>
Definition: IteratorPair.h:61
uint16 ContinentID
Definition: DB2Structure.h:130
DB2Storage< AreaTableEntry > sAreaTableStore("AreaTable.db2", AreaTableLoadInfo::Instance())
+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ DB2HotfixGeneratorBase

friend class DB2HotfixGeneratorBase
friend

Member Data Documentation

◆ _maxHotfixId

int32 DB2Manager::_maxHotfixId = 0
private

The documentation for this class was generated from the following files: