35#include <boost/filesystem/directory.hpp>
36#include <boost/filesystem/operations.hpp>
450 std::array<HotfixBlobMap, TOTAL_LOCALES> _hotfixBlob;
452 std::array<std::map<HotfixBlobKey, std::vector<DB2Manager::HotfixOptionalData>>,
TOTAL_LOCALES> _hotfixOptionalData;
460 std::vector<AzeriteItemMilestonePowerEntry const*> _azeriteItemMilestonePowers;
461 std::array<AzeriteItemMilestonePowerEntry const*, MAX_AZERITE_ESSENCE_SLOT> _azeriteItemMilestonePowerByEssenceSlot;
462 std::unordered_map<
uint32 , std::vector<AzeritePowerSetMemberEntry const*>> _azeritePowers;
463 std::unordered_map<std::pair<
uint32 ,
ItemContext>, std::array<uint8, MAX_AZERITE_EMPOWERED_TIER>> _azeriteTierUnlockLevels;
465 std::unordered_map<std::pair<uint8, uint8>,
CharBaseInfoEntry const*> _charBaseInfoByRaceAndClass;
466 std::array<ChrClassUIDisplayEntry const*, MAX_CLASSES> _uiDisplayByClass;
467 std::array<std::array<uint32, MAX_POWERS>,
MAX_CLASSES> _powersByClass;
468 std::unordered_map<
uint32 , std::vector<ChrCustomizationChoiceEntry const*>> _chrCustomizationChoicesByOption;
469 std::unordered_map<std::pair<uint8, uint8>,
ChrModelEntry const*> _chrModelsByRaceAndGender;
471 std::unordered_map<std::pair<
uint8 ,
uint8>, std::vector<ChrCustomizationOptionEntry const*>> _chrCustomizationOptionsByRaceAndGender;
472 std::unordered_map<
uint32 , std::vector<std::pair<
uint32 , std::vector<uint32>>>> _chrCustomizationRequiredChoices;
474 std::unordered_map<int32, ConditionalChrModelEntry const*> _conditionalChrModelsByChrModelId;
475 std::unordered_map<
uint32 , std::vector<ConditionalContentTuningEntry const*>> _conditionalContentTuning;
476 std::unordered_set<std::pair<uint32, int32>> _contentTuningLabels;
477 std::unordered_map<
uint32 , std::vector<int32>> _creatureLabels;
478 std::unordered_multimap<uint32, CurrencyContainerEntry const*> _currencyContainers;
482 std::unordered_map<
uint32 , std::vector<ContentTuningXExpectedEntry const*>> _expectedStatModsByContentTuning;
484 std::unordered_map<uint32, std::set<FriendshipRepReactionEntry const*, DB2Manager::FriendshipRepReactionEntryComparator>> _friendshipRepReactions;
486 std::unordered_map<
uint32 , std::vector<int32>> _gameobjectLabels;
491 std::unordered_set<uint32> _itemsWithCurrencyCost;
496 std::vector<JournalTierEntry const*> _journalTiersByIndex;
498 std::unordered_map<uint32, DB2Manager::MapDifficultyConditionsContainer> _mapDifficultyConditions;
499 std::unordered_map<uint32, MountEntry const*> _mountsBySpellId;
504 std::unordered_map<uint32, ParagonReputationEntry const*> _paragonReputations;
508 std::unordered_map<uint32, uint8> _pvpItemBonus;
510 std::unordered_map<uint32, std::vector<QuestLineXQuestEntry const*>> _questsByQuestLine;
512 std::unordered_map<uint32, std::vector<RewardPackXCurrencyTypeEntry const*>> _rewardPackCurrencyTypes;
513 std::unordered_map<uint32, std::vector<RewardPackXItemEntry const*>> _rewardPackItems;
514 std::unordered_map<uint32, std::vector<SkillLineEntry const*>> _skillLinesByParentSkillLine;
515 std::unordered_map<uint32, std::vector<SkillLineAbilityEntry const*>> _skillLineAbilitiesBySkillupSkill;
519 std::unordered_set<std::pair<int32, uint32>> _specsBySpecSet;
520 std::unordered_set<uint8> _spellFamilyNames;
522 std::unordered_map<int32, std::vector<SpellVisualMissileEntry const*>> _spellVisualMissilesBySet;
524 std::unordered_map<std::pair<uint32, uint32>,
TaxiPathEntry const*> _taxiPaths;
526 std::unordered_map<uint32, TransmogIllusionEntry const*> _transmogIllusionsByEnchantmentId;
527 std::unordered_map<uint32, std::vector<TransmogSetEntry const*>> _transmogSetsByItemModifiedAppearance;
528 std::unordered_map<uint32, std::vector<TransmogSetItemEntry const*>> _transmogSetItemsByTransmogSet;
529 std::unordered_map<int32, UiMapBounds> _uiMapBounds;
530 std::unordered_multimap<int32, UiMapAssignmentEntry const*> _uiMapAssignmentByMap[
MAX_UI_MAP_SYSTEM];
531 std::unordered_multimap<int32, UiMapAssignmentEntry const*> _uiMapAssignmentByArea[
MAX_UI_MAP_SYSTEM];
532 std::unordered_multimap<int32, UiMapAssignmentEntry const*> _uiMapAssignmentByWmoDoodadPlacement[
MAX_UI_MAP_SYSTEM];
533 std::unordered_multimap<int32, UiMapAssignmentEntry const*> _uiMapAssignmentByWmoGroup[
MAX_UI_MAP_SYSTEM];
534 std::unordered_set<int32> _uiMapPhases;
536 std::unordered_map<uint32, std::unordered_set<uint32>> _pvpStatIdsByMap;
539void LoadDB2(std::bitset<TOTAL_LOCALES>& availableDb2Locales, std::vector<std::string>& errlist,
StorageMap& stores,
DB2StorageBase* storage, std::string
const& db2Path,
545 std::string clientMetaString, ourMetaString;
552 clientMetaString += char(
FT_INT);
561 ourMetaString += char(loadInfo->
Fields[i].
Type);
563 ASSERT(clientMetaString == ourMetaString,
564 "%s C++ structure fields %s do not match generated types from the client %s",
565 storage->
GetFileName().c_str(), ourMetaString.c_str(), clientMetaString.c_str());
569 "Size of '%s' set by format string (%u) not equal size of C++ structure (" SZFMTD ").",
575 storage->
Load(db2Path +
localeNames[defaultLocale] +
'/', defaultLocale);
577 catch (std::system_error
const& e)
579 if (e.code() == std::errc::no_such_file_or_directory)
586 catch (std::exception
const& e)
588 errlist.emplace_back(e.what());
597 if (defaultLocale == i || !availableDb2Locales[i])
604 catch (std::system_error
const& e)
606 if (e.code() != std::errc::no_such_file_or_directory)
611 catch (std::exception
const& e)
613 errlist.emplace_back(e.what());
618 if (availableDb2Locales[i])
634 std::string db2Path = dataPath +
"dbc/";
636 std::vector<std::string> loadErrors;
637 std::bitset<TOTAL_LOCALES> availableDb2Locales = [&]()
639 std::bitset<TOTAL_LOCALES> foundLocales;
640 boost::filesystem::directory_iterator db2PathItr(db2Path), end;
641 while (db2PathItr != end)
645 foundLocales[locale] =
true;
652 if (!availableDb2Locales[defaultLocale])
657 LoadDB2(availableDb2Locales, loadErrors, _stores, &store, db2Path, defaultLocale,
sizeof(T));
1010 if (!loadErrors.empty())
1012 sLog->SetSynchronous();
1014 for (std::string
const& error : loadErrors)
1030 TC_LOG_FATAL(
"misc",
"You have _outdated_ DB2 files. Please extract correct versions from current using client.");
1036 return availableDb2Locales.to_ulong();
1044 _areaGroupMembers[areaGroupMember->AreaGroupID].push_back(areaGroupMember->AreaID);
1049 "PLAYER_EXPLORED_ZONES_SIZE must be at least %d", (areaTable->AreaBit + 63) / 64);
1053 _artifactPowers[artifactPower->ArtifactID].push_back(artifactPower);
1057 _artifactPowerLinks[artifactPowerLink->PowerA].push_back(artifactPowerLink->PowerB);
1058 _artifactPowerLinks[artifactPowerLink->PowerB].push_back(artifactPowerLink->PowerA);
1062 _artifactPowerRanks[std::pair<uint32, uint8>{ artifactPowerRank->ArtifactPowerID, artifactPowerRank->RankIndex }] = artifactPowerRank;
1065 _azeriteEmpoweredItems[azeriteEmpoweredItem->ItemID] = azeriteEmpoweredItem;
1068 _azeriteEssencePowersByIdAndRank[std::pair<uint32, uint32>{ azeriteEssencePower->AzeriteEssenceID, azeriteEssencePower->Tier }] = azeriteEssencePower;
1071 _azeriteItemMilestonePowers.push_back(azeriteItemMilestonePower);
1076 uint32 azeriteEssenceSlot = 0;
1083 _azeriteItemMilestonePowerByEssenceSlot[azeriteEssenceSlot] = azeriteItemMilestonePower;
1084 ++azeriteEssenceSlot;
1091 _azeritePowers[azeritePowerSetMember->AzeritePowerSetID].push_back(azeritePowerSetMember);
1094 _azeriteTierUnlockLevels[std::pair<uint32, ItemContext>{ azeriteTierUnlock->AzeriteTierUnlockSetID,
ItemContext(azeriteTierUnlock->ItemCreationContext) }][azeriteTierUnlock->Tier] = azeriteTierUnlock->AzeriteLevel;
1098 if (battlemaster->MaxLevel < battlemaster->MinLevel)
1100 TC_LOG_ERROR(
"db2.hotfix.battlemaster_list",
"Battlemaster ({}) contains bad values for MinLevel ({}) and MaxLevel ({}). Swapping values.", battlemaster->ID, battlemaster->MinLevel, battlemaster->MaxLevel);
1103 if (battlemaster->MaxPlayers < battlemaster->MinPlayers)
1105 TC_LOG_ERROR(
"db2.hotfix.battlemaster_list",
"Battlemaster ({}) contains bad values for MinPlayers ({}) and MaxPlayers ({}). Swapping values.", battlemaster->ID, battlemaster->MinPlayers, battlemaster->MaxPlayers);
1106 int8 minPlayers = battlemaster->MinPlayers;
1114 _broadcastTextDurations[{ broadcastTextDuration->BroadcastTextID,
CascLocaleBit(broadcastTextDuration->Locale) }] = broadcastTextDuration->Duration;
1117 _charBaseInfoByRaceAndClass[{ charBaseInfo->RaceID, charBaseInfo->ClassID }] = charBaseInfo;
1122 _uiDisplayByClass[uiDisplay->ChrClassesID] = uiDisplay;
1126 std::set<ChrClassesXPowerTypesEntry const*, ChrClassesXPowerTypesEntryComparator> powers;
1128 powers.insert(power);
1130 for (std::array<uint32, MAX_POWERS>& powersForClass : _powersByClass)
1137 if (_powersByClass[power->ClassID][j] !=
MAX_POWERS)
1142 _powersByClass[power->ClassID][power->PowerType] = index;
1147 _chrCustomizationChoicesByOption[customizationChoice->ChrCustomizationOptionID].push_back(customizationChoice);
1149 std::unordered_multimap<uint32, std::pair<uint32, uint8>> shapeshiftFormByModel;
1150 std::unordered_map<uint32, ChrCustomizationDisplayInfoEntry const*> displayInfoByCustomizationChoice;
1159 displayInfoByCustomizationChoice[customizationElement->ChrCustomizationChoiceID] = customizationDisplayInfo;
1161 shapeshiftFormByModel.emplace(customizationOption->ChrModelID, std::make_pair(customizationOption->ID,
uint8(customizationDisplayInfo->ShapeshiftFormID)));
1166 std::unordered_map<uint32, std::vector<ChrCustomizationOptionEntry const*>> customizationOptionsByModel;
1168 customizationOptionsByModel[customizationOption->ChrModelID].push_back(customizationOption);
1174 std::vector<std::pair<uint32, std::vector<uint32>>>& requiredChoicesForReq = _chrCustomizationRequiredChoices[reqChoice->ChrCustomizationReqID];
1175 std::vector<uint32>* choices =
nullptr;
1176 for (std::pair<
uint32, std::vector<uint32>>& choicesForOption : requiredChoicesForReq)
1178 if (choicesForOption.first == customizationChoice->ChrCustomizationOptionID)
1180 choices = &choicesForOption.second;
1186 std::pair<uint32, std::vector<uint32>>& choicesForReq = requiredChoicesForReq.emplace_back();
1187 choicesForReq.first = customizationChoice->ChrCustomizationOptionID;
1188 choices = &choicesForReq.second;
1190 choices->push_back(reqChoice->ChrCustomizationChoiceID);
1194 std::unordered_map<uint32, uint32> parentRaces;
1196 if (chrRace->UnalteredVisualRaceID)
1197 parentRaces[chrRace->UnalteredVisualRaceID] = chrRace->ID;
1203 _chrModelsByRaceAndGender[{
uint8(raceModel->ChrRacesID),
uint8(raceModel->Sex) }] = model;
1207 std::vector<ChrCustomizationOptionEntry const*>& raceOptions = _chrCustomizationOptionsByRaceAndGender[{
uint8(raceModel->ChrRacesID),
uint8(raceModel->Sex) }];
1208 raceOptions.insert(raceOptions.end(), customizationOptionsForModel->begin(), customizationOptionsForModel->end());
1212 std::vector<ChrCustomizationOptionEntry const*>& parentRaceOptions = _chrCustomizationOptionsByRaceAndGender[{
uint8(*parentRace),
uint8(raceModel->Sex) }];
1213 parentRaceOptions.insert(parentRaceOptions.end(), customizationOptionsForModel->begin(), customizationOptionsForModel->end());
1220 ShapeshiftFormModelData& data = _chrCustomizationChoicesForShapeshifts[{
uint8(raceModel->ChrRacesID),
uint8(raceModel->Sex), shapeshiftOptionsForModel.second.second }];
1221 data.
OptionID = shapeshiftOptionsForModel.second.first;
1226 for (std::size_t i = 0; i < data.
Choices->size(); ++i)
1233 memset(_chrSpecializationsByIndex, 0,
sizeof(_chrSpecializationsByIndex));
1239 uint32 storageIndex = chrSpec->ClassID;
1242 ASSERT(!chrSpec->ClassID);
1246 _chrSpecializationsByIndex[storageIndex][chrSpec->OrderIndex] = chrSpec;
1250 _conditionalChrModelsByChrModelId[conditionalChrModel->ChrModelID] = conditionalChrModel;
1254 _conditionalContentTuning[conditionalContentTuning->ParentContentTuningID].push_back(conditionalContentTuning);
1256 for (
auto& [parentContentTuningId, conditionalContentTunings] : _conditionalContentTuning)
1262 _expectedStatModsByContentTuning[contentTuningXExpectedStat->ContentTuningID].push_back(contentTuningXExpectedStat);
1265 _contentTuningLabels.emplace(contentTuningXLabel->ContentTuningID, contentTuningXLabel->LabelID);
1268 _creatureLabels[creatureLabel->CreatureDifficultyID].push_back(creatureLabel->LabelID);
1271 _currencyContainers.emplace(currencyContainer->CurrencyTypesID, currencyContainer);
1274 std::unordered_map<
uint32 , std::vector<CurvePointEntry const*>> unsortedPoints;
1277 unsortedPoints[curvePoint->CurveID].push_back(curvePoint);
1279 for (
auto& [curveId, curvePoints] : unsortedPoints)
1282 std::vector<DBCPosition2D>& points = _curvePoints[curveId];
1283 points.resize(curvePoints.size());
1289 _emoteTextSounds[EmotesTextSoundContainer::key_type(emoteTextSound->EmotesTextID, emoteTextSound->RaceID, emoteTextSound->SexID, emoteTextSound->ClassID)] = emoteTextSound;
1292 _expectedStatsByLevel[std::make_pair(expectedStat->Lvl, expectedStat->ExpansionID)] = expectedStat;
1295 if (faction->ParentFactionID)
1296 _factionTeams[faction->ParentFactionID].push_back(faction->ID);
1299 _friendshipRepReactions[friendshipRepReaction->FriendshipRepID].insert(friendshipRepReaction);
1303 if (gameObjectDisplayInfo->GeoBoxMax.X < gameObjectDisplayInfo->GeoBoxMin.X)
1305 if (gameObjectDisplayInfo->GeoBoxMax.Y < gameObjectDisplayInfo->GeoBoxMin.Y)
1307 if (gameObjectDisplayInfo->GeoBoxMax.Z < gameObjectDisplayInfo->GeoBoxMin.Z)
1312 _creatureLabels[gameobjectLabel->GameObjectID].push_back(gameobjectLabel->LabelID);
1315 _heirlooms[heirloom->ItemID] = heirloom;
1318 _glyphBindableSpells[glyphBindableSpell->GlyphPropertiesID].push_back(glyphBindableSpell->SpellID);
1321 _glyphRequiredSpecs[glyphRequiredSpec->GlyphPropertiesID].push_back(
ChrSpecialization(glyphRequiredSpec->ChrSpecializationID));
1325 ASSERT(_itemChildEquipment.find(itemChildEquipment->ParentItemID) == _itemChildEquipment.end(),
"Item must have max 1 child item.");
1326 _itemChildEquipment[itemChildEquipment->ParentItemID] = itemChildEquipment;
1331 ASSERT(itemClass->ClassID <
int32(_itemClassByOldEnum.size()));
1332 ASSERT(!_itemClassByOldEnum[itemClass->ClassID]);
1333 _itemClassByOldEnum[itemClass->ClassID] = itemClass;
1337 _itemsWithCurrencyCost.insert(itemCurrencyCost->ItemID);
1340 _itemCategoryConditions[condition->ParentItemLimitCategoryID].push_back(condition);
1344 ASSERT(appearanceMod->ItemID <= 0xFFFFFF);
1345 _itemModifiedAppearancesByItem[appearanceMod->ItemID | (appearanceMod->ItemAppearanceModifierID << 24)] = appearanceMod;
1349 _itemSetSpells[itemSetSpell->ItemSetID].push_back(itemSetSpell);
1352 _itemSpecOverrides[itemSpecOverride->ItemID].push_back(itemSpecOverride);
1355 _journalTiersByIndex.push_back(journalTier);
1358 _mapDifficulties[entry->MapID][entry->DifficultyID] = entry;
1360 std::vector<MapDifficultyXConditionEntry const*> mapDifficultyConditions;
1363 mapDifficultyConditions.push_back(mapDifficultyCondition);
1369 _mapDifficultyConditions[mapDifficultyCondition->MapDifficultyID].emplace_back(mapDifficultyCondition->ID, playerCondition);
1372 _mountsBySpellId[mount->SourceSpellID] = mount;
1375 _mountCapabilitiesByType[mountTypeCapability->MountTypeID].insert(mountTypeCapability);
1378 _mountDisplays[mountDisplay->MountID].push_back(mountDisplay);
1381 _nameGenData[nameGen->RaceID][nameGen->Sex].push_back(nameGen);
1387 bool conversionResult =
Utf8toWStr(namesProfanity->Name, name);
1388 ASSERT(conversionResult);
1389 if (namesProfanity->Language != -1)
1390 _nameValidators[namesProfanity->Language].emplace_back(name, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize);
1398 _nameValidators[i].emplace_back(name, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize);
1406 bool conversionResult =
Utf8toWStr(namesReserved->Name, name);
1407 ASSERT(conversionResult);
1408 _nameValidators[
TOTAL_LOCALES].emplace_back(name, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize);
1415 bool conversionResult =
Utf8toWStr(namesReserved->Name, name);
1416 ASSERT(conversionResult);
1422 if (namesReserved->LocaleMask & (1 << i))
1423 _nameValidators[i].emplace_back(name, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize);
1429 _paragonReputations[paragonReputation->FactionID] = paragonReputation;
1432 std::unordered_map<
uint32 , std::vector<PathNodeEntry const*>> unsortedNodes;
1435 unsortedNodes[pathNode->PathID].push_back(pathNode);
1437 for (
auto&& [pathId, pathNodes] : unsortedNodes)
1439 PathDb2& path = _paths[pathId];
1441 path.
Locations.resize(pathNodes.size());
1445 return sLocationStore.AssertEntry(node->LocationID)->Pos;
1450 if (
sPathStore.HasRecord(pathProperty->PathID))
1451 _paths[pathProperty->PathID].Properties.push_back(pathProperty);
1456 _phasesByGroup[group->PhaseGroupID].push_back(phase->ID);
1461 ASSERT(!_powerTypes[powerType->PowerTypeEnum]);
1463 _powerTypes[powerType->PowerTypeEnum] = powerType;
1472 _pvpItemBonus[pvpItem->ItemID] = pvpItem->ItemLevelDelta;
1479 if (talentUnlock->Slot & (1 << i))
1481 ASSERT(!_pvpTalentSlotUnlock[i]);
1482 _pvpTalentSlotUnlock[i] = talentUnlock;
1489 _questsByQuestLine[questLineQuest->QuestLineID].push_back(questLineQuest);
1491 for (
auto& [questLineId, questLineQuests] : _questsByQuestLine)
1498 _questPackages[questPackageItem->PackageID].first.push_back(questPackageItem);
1500 _questPackages[questPackageItem->PackageID].second.push_back(questPackageItem);
1504 _rewardPackCurrencyTypes[rewardPackXCurrencyType->RewardPackID].push_back(rewardPackXCurrencyType);
1507 _rewardPackItems[rewardPackXItem->RewardPackID].push_back(rewardPackXItem);
1510 if (skill->ParentSkillLineID)
1511 _skillLinesByParentSkillLine[skill->ParentSkillLineID].push_back(skill);
1514 _skillLineAbilitiesBySkillupSkill[skillLineAbility->SkillupSkillLineID ? skillLineAbility->SkillupSkillLineID : skillLineAbility->SkillLine].push_back(skillLineAbility);
1518 _skillRaceClassInfoBySkill.insert(SkillRaceClassInfoContainer::value_type(entry->SkillID, entry));
1521 _soulbindConduitRanks[{ soulbindConduitRank->SoulbindConduitID, soulbindConduitRank->RankIndex }] = soulbindConduitRank;
1524 _specializationSpellsBySpec[specSpells->SpecID].push_back(specSpells);
1527 _specsBySpecSet.insert(std::make_pair(specSetMember->SpecSetID,
uint32(specSetMember->ChrSpecializationID)));
1530 _spellFamilyNames.insert(classOption->SpellClassSet);
1533 _spellProcsPerMinuteMods[ppmMod->SpellProcsPerMinuteID].push_back(ppmMod);
1536 _spellVisualMissilesBySet[spellVisualMissile->SpellVisualMissileSetID].push_back(spellVisualMissile);
1541 ASSERT(talentInfo->TierID <
MAX_TALENT_TIERS,
"MAX_TALENT_TIERS must be at least %u", talentInfo->TierID + 1);
1542 ASSERT(talentInfo->ColumnIndex <
MAX_TALENT_COLUMNS,
"MAX_TALENT_COLUMNS must be at least %u", talentInfo->ColumnIndex + 1);
1544 _talentsByPosition[talentInfo->ClassID][talentInfo->TierID][talentInfo->ColumnIndex].push_back(talentInfo);
1548 _taxiPaths[{ entry->FromTaxiNode, entry->ToTaxiNode }] = entry;
1553 std::vector<uint32> pathLength;
1554 pathLength.resize(pathCount);
1556 pathLength[entry->PathID] = std::max(pathLength[entry->PathID], entry->NodeIndex + 1u);
1568 _toys.insert(toy->ItemID);
1571 _transmogIllusionsByEnchantmentId[transmogIllusion->SpellItemEnchantmentID] = transmogIllusion;
1579 _transmogSetsByItemModifiedAppearance[transmogSetItem->ItemModifiedAppearanceID].push_back(set);
1580 _transmogSetItemsByTransmogSet[transmogSetItem->TransmogSetID].push_back(transmogSetItem);
1583 std::unordered_multimap<int32, UiMapAssignmentEntry const*> uiMapAssignmentByUiMap;
1586 uiMapAssignmentByUiMap.emplace(uiMapAssignment->UiMapID, uiMapAssignment);
1590 if (uiMapAssignment->MapID >= 0)
1591 _uiMapAssignmentByMap[uiMap->System].emplace(uiMapAssignment->MapID, uiMapAssignment);
1592 if (uiMapAssignment->AreaID)
1593 _uiMapAssignmentByArea[uiMap->System].emplace(uiMapAssignment->AreaID, uiMapAssignment);
1594 if (uiMapAssignment->WmoDoodadPlacementID)
1595 _uiMapAssignmentByWmoDoodadPlacement[uiMap->System].emplace(uiMapAssignment->WmoDoodadPlacementID, uiMapAssignment);
1596 if (uiMapAssignment->WmoGroupID)
1597 _uiMapAssignmentByWmoGroup[uiMap->System].emplace(uiMapAssignment->WmoGroupID, uiMapAssignment);
1601 std::unordered_map<std::pair<uint32, uint32>,
UiMapLinkEntry const*> uiMapLinks;
1603 uiMapLinks[std::make_pair(uiMapLink->ParentUiMapID,
uint32(uiMapLink->ChildUiMapID))] = uiMapLink;
1607 UiMapBounds& bounds = _uiMapBounds[uiMap->ID];
1608 memset(&bounds, 0,
sizeof(bounds));
1618 if (uiMapAssignmentForMap.second->MapID >= 0 &&
1619 uiMapAssignmentForMap.second->Region[1].X - uiMapAssignmentForMap.second->Region[0].X > 0 &&
1620 uiMapAssignmentForMap.second->Region[1].Y - uiMapAssignmentForMap.second->Region[0].Y > 0)
1622 uiMapAssignment = uiMapAssignmentForMap.second;
1627 if (!uiMapAssignment)
1630 for (std::pair<int32 const, UiMapAssignmentEntry const*>
const& uiMapAssignmentForMap :
Trinity::Containers::MapEqualRange(uiMapAssignmentByUiMap, uiMap->ParentUiMapID))
1632 if (uiMapAssignmentForMap.second->MapID == uiMapAssignment->
MapID &&
1633 uiMapAssignmentForMap.second->Region[1].X - uiMapAssignmentForMap.second->Region[0].X > 0 &&
1634 uiMapAssignmentForMap.second->Region[1].Y - uiMapAssignmentForMap.second->Region[0].Y > 0)
1636 parentUiMapAssignment = uiMapAssignmentForMap.second;
1641 if (!parentUiMapAssignment)
1644 float parentXsize = parentUiMapAssignment->
Region[1].X - parentUiMapAssignment->
Region[0].X;
1645 float parentYsize = parentUiMapAssignment->
Region[1].Y - parentUiMapAssignment->
Region[0].Y;
1646 float bound0scale = (uiMapAssignment->
Region[1].X - parentUiMapAssignment->
Region[0].X) / parentXsize;
1647 float bound0 = ((1.0f - bound0scale) * parentUiMapAssignment->
UiMax.
Y) + (bound0scale * parentUiMapAssignment->
UiMin.
Y);
1648 float bound2scale = (uiMapAssignment->
Region[0].X - parentUiMapAssignment->
Region[0].X) / parentXsize;
1649 float bound2 = ((1.0f - bound2scale) * parentUiMapAssignment->
UiMax.
Y) + (bound2scale * parentUiMapAssignment->
UiMin.
Y);
1650 float bound1scale = (uiMapAssignment->
Region[1].Y - parentUiMapAssignment->
Region[0].Y) / parentYsize;
1651 float bound1 = ((1.0f - bound1scale) * parentUiMapAssignment->
UiMax.
X) + (bound1scale * parentUiMapAssignment->
UiMin.
X);
1652 float bound3scale = (uiMapAssignment->
Region[0].Y - parentUiMapAssignment->
Region[0].Y) / parentYsize;
1653 float bound3 = ((1.0f - bound3scale) * parentUiMapAssignment->
UiMax.
X) + (bound3scale * parentUiMapAssignment->
UiMin.
X);
1654 if ((bound3 - bound1) > 0.0f || (bound2 - bound0) > 0.0f)
1656 bounds.Bounds[0] = bound0;
1657 bounds.Bounds[1] = bound1;
1658 bounds.Bounds[2] = bound2;
1659 bounds.Bounds[3] = bound3;
1660 bounds.IsUiAssignment =
true;
1666 bounds.IsUiAssignment =
false;
1667 bounds.IsUiLink =
true;
1668 bounds.Bounds[0] = uiMapLink->UiMin.Y;
1669 bounds.Bounds[1] = uiMapLink->UiMin.X;
1670 bounds.Bounds[2] = uiMapLink->UiMax.Y;
1671 bounds.Bounds[3] = uiMapLink->UiMax.X;
1676 if (uiMapArt->PhaseID)
1677 _uiMapPhases.insert(uiMapArt->PhaseID);
1680 _wmoAreaTableLookup[
WMOAreaTableKey(entry->WmoID, entry->NameSetID, entry->WmoGroupID)] = entry;
1691 if (!node->IsPartOfTaxiNetwork())
1708 if (uiMapId == 985 || uiMapId == 986)
1713 _pvpStatIdsByMap[pvpStat->MapID].insert(pvpStat->ID);
1720 auto itr = _stores.find(type);
1721 if (itr != _stores.end())
1731 QueryResult result =
HotfixDatabase.Query(
"SELECT Id, UniqueId, TableHash, RecordId, Status FROM hotfix_data ORDER BY Id");
1735 TC_LOG_INFO(
"server.loading",
">> Loaded 0 hotfix info entries.");
1741 std::map<std::pair<uint32, int32>,
bool> deletedRecords;
1745 Field* fields = result->Fetch();
1752 std::bitset<TOTAL_LOCALES> availableDb2Locales = localeMask;
1756 for (std::size_t locale = 0; locale <
TOTAL_LOCALES; ++locale)
1758 if (!availableDb2Locales[locale])
1761 if (!_hotfixBlob[locale].
contains(key))
1762 availableDb2Locales[locale] =
false;
1765 if (availableDb2Locales.none())
1767 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 {} with RecordID: {}", tableHash,
id, recordId);
1781 push.
Records.push_back(hotfixRecord);
1787 }
while (result->NextRow());
1789 for (
auto itr = deletedRecords.begin(); itr != deletedRecords.end(); ++itr)
1792 store->EraseRecord(itr->first.second);
1801 QueryResult result =
HotfixDatabase.Query(
"SELECT TableHash, RecordId, locale, `Blob` FROM hotfix_blob ORDER BY TableHash");
1805 TC_LOG_INFO(
"server.loading",
">> Loaded 0 hotfix blob entries.");
1809 std::bitset<TOTAL_LOCALES> availableDb2Locales = localeMask;
1810 uint32 hotfixBlobCount = 0;
1813 Field* fields = result->Fetch();
1816 auto storeItr = _stores.find(tableHash);
1817 if (storeItr != _stores.end())
1819 TC_LOG_ERROR(
"sql.sql",
"Table hash 0x{:X} points to a loaded DB2 store {}, fill related table instead of hotfix_blob",
1820 tableHash, storeItr->second->GetFileName());
1825 std::string localeName = fields[2].
GetString();
1830 TC_LOG_ERROR(
"sql.sql",
"`hotfix_blob` contains invalid locale: {} at TableHash: 0x{:X} and RecordID: {}", localeName, tableHash, recordId);
1834 if (!availableDb2Locales[locale])
1837 _hotfixBlob[locale][std::make_pair(tableHash, recordId)] = fields[3].
GetBinary();
1839 }
while (result->NextRow());
1846 return data.size() == 8 + 16;
1856 QueryResult result =
HotfixDatabase.Query(
"SELECT TableHash, RecordId, locale, `Key`, `Data` FROM hotfix_optional_data ORDER BY TableHash");
1860 TC_LOG_INFO(
"server.loading",
">> Loaded 0 hotfix optional data records.");
1864 std::bitset<TOTAL_LOCALES> availableDb2Locales = localeMask;
1865 uint32 hotfixOptionalDataCount = 0;
1868 Field* fields = result->Fetch();
1872 if (allowedHotfixes.begin() == allowedHotfixes.end())
1874 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);
1879 auto storeItr = _stores.find(tableHash);
1880 if (storeItr == _stores.end())
1882 TC_LOG_ERROR(
"sql.sql",
"Table `hotfix_optional_data` references unknown DB2 store by hash 0x{:X} with RecordID: {}", tableHash, recordId);
1886 std::string localeName = fields[2].
GetString();
1891 TC_LOG_ERROR(
"sql.sql",
"`hotfix_optional_data` contains invalid locale: {} at TableHash: 0x{:X} and RecordID: {}", localeName, tableHash, recordId);
1895 if (!availableDb2Locales[locale])
1900 auto allowedHotfixItr = std::find_if(allowedHotfixes.begin(), allowedHotfixes.end(), [&](std::pair<uint32 const, AllowedHotfixOptionalData>
const& v)
1902 return v.second.first == optionalData.Key;
1904 if (allowedHotfixItr == allowedHotfixes.end())
1906 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: {}",
1907 optionalData.
Key, tableHash, recordId);
1912 if (!allowedHotfixItr->second.second(optionalData.
Data))
1914 TC_LOG_ERROR(
"sql.sql",
"Table `hotfix_optional_data` contains invalid data for DB2 store 0x{:X}, RecordID: {} and Key: 0x{:X}",
1915 tableHash, recordId, optionalData.
Key);
1919 _hotfixOptionalData[locale][std::make_pair(tableHash, recordId)].push_back(std::move(optionalData));
1920 hotfixOptionalDataCount++;
1921 }
while (result->NextRow());
1923 TC_LOG_INFO(
"server.loading",
">> Loaded {} hotfix optional data records in {} ms", hotfixOptionalDataCount,
GetMSTimeDiffToNow(oldMSTime));
1928 return _hotfixData.size();
1965 push.
Records.push_back(hotfixRecord);
1971 auto itr = _areaGroupMembers.find(areaGroupId);
1972 if (itr != _areaGroupMembers.end())
1975 return std::vector<uint32>();
1982 if (objectAreaId == areaId)
1990 }
while (objectAreaId);
2002 return contentTuning;
2013 auto itr = _artifactPowers.find(artifactId);
2014 if (itr != _artifactPowers.end())
2017 return std::vector<ArtifactPowerEntry const*>{};
2048 return _azeriteItemMilestonePowers;
2054 return _azeriteItemMilestonePowerByEssenceSlot[slot];
2068 if (std::array<uint8, MAX_AZERITE_EMPOWERED_TIER>
const* levels =
Trinity::Containers::MapGetValuePtr(_azeriteTierUnlockLevels, std::make_pair(azeriteUnlockSetId, context)))
2069 return (*levels)[tier];
2074 return (*levels)[tier];
2083 if (broadcastText->
Text1[locale][0] !=
'\0')
2084 return broadcastText->
Text1[locale];
2089 if (broadcastText->
Text[locale][0] !=
'\0')
2090 return broadcastText->
Text[locale];
2108 return _uiDisplayByClass[unitClass];
2117 if (classEntry->
Name[locale][0] !=
'\0')
2118 return classEntry->
Name[locale];
2125 return _powersByClass[classId][power];
2159 if (raceEntry->
Name[locale][0] !=
'\0')
2160 return raceEntry->
Name[locale];
2167 return _chrSpecializationsByIndex[class_][index];
2179 if (conditionalContentTuning->RedirectFlag & redirectFlag)
2180 return conditionalContentTuning->RedirectContentTuningID;
2182 return contentTuningId;
2236 return _contentTuningLabels.contains({ contentTuningId, label });
2248 return petFamily->
Name[locale][0] !=
'\0' ? petFamily->
Name[locale] :
nullptr;
2254 return labels ? std::span<int32 const>(*labels) : std::span<int32 const>();
2260 if (quantity >= p.second->MinAmount && (!p.second->MaxAmount || quantity <= p.second->MaxAmount))
2269 return { points->front().X, points->back().X };
2271 return { 0.0f, 0.0f };
2276 switch (curve->
Type)
2282 switch (points.size())
2308 auto itr = _curvePoints.find(curveId);
2309 if (itr == _curvePoints.end())
2313 std::vector<DBCPosition2D>
const& points = itr->second;
2326 std::size_t pointIndex = 0;
2327 while (pointIndex < points.size() && points[pointIndex].X <= x)
2331 if (pointIndex >= points.size())
2332 return points.back().Y;
2333 float xDiff = points[pointIndex].X - points[pointIndex - 1].X;
2335 return points[pointIndex].Y;
2336 return (((x - points[pointIndex - 1].X) / xDiff) * (points[pointIndex].Y - points[pointIndex - 1].Y)) + points[pointIndex - 1].Y;
2340 std::size_t pointIndex = 0;
2341 while (pointIndex < points.size() && points[pointIndex].X <= x)
2345 if (pointIndex >= points.size())
2346 return points.back().Y;
2347 float xDiff = points[pointIndex].X - points[pointIndex - 1].X;
2349 return points[pointIndex].Y;
2350 return ((points[pointIndex].Y - points[pointIndex - 1].Y) * (1.0f - std::cos((x - points[pointIndex - 1].X) / xDiff *
float(
M_PI))) * 0.5f) + points[pointIndex - 1].Y;
2354 std::size_t pointIndex = 1;
2355 while (pointIndex < points.size() && points[pointIndex].X <= x)
2357 if (pointIndex == 1)
2359 if (pointIndex >= points.size() - 1)
2360 return points[points.size() - 2].Y;
2361 float xDiff = points[pointIndex].X - points[pointIndex - 1].X;
2363 return points[pointIndex].Y;
2365 float mu = (x - points[pointIndex - 1].X) / xDiff;
2366 float a0 = -0.5f * points[pointIndex - 2].Y + 1.5f * points[pointIndex - 1].Y - 1.5f * points[pointIndex].Y + 0.5f * points[pointIndex + 1].Y;
2367 float a1 = points[pointIndex - 2].Y - 2.5f * points[pointIndex - 1].Y + 2.0f * points[pointIndex].Y - 0.5f * points[pointIndex + 1].Y;
2368 float a2 = -0.5f * points[pointIndex - 2].Y + 0.5f * points[pointIndex].Y;
2369 float a3 = points[pointIndex - 1].Y;
2371 return a0 * mu * mu * mu + a1 * mu * mu + a2 * mu + a3;
2375 float xDiff = points[2].X - points[0].X;
2378 float mu = (x - points[0].X) / xDiff;
2379 return ((1.0f - mu) * (1.0f - mu) * points[0].Y) + (1.0f - mu) * 2.0f * mu * points[1].Y + mu * mu * points[2].Y;
2383 float xDiff = points[3].X - points[0].X;
2386 float mu = (x - points[0].X) / xDiff;
2387 return (1.0f - mu) * (1.0f - mu) * (1.0f - mu) * points[0].Y
2388 + 3.0f * mu * (1.0f - mu) * (1.0f - mu) * points[1].Y
2389 + 3.0f * mu * mu * (1.0f - mu) * points[2].Y
2390 + mu * mu * mu * points[3].Y;
2394 float xDiff = points.back().X - points[0].X;
2396 return points.back().Y;
2398 std::vector<float> tmp(points.size());
2399 for (std::size_t i = 0; i < points.size(); ++i)
2400 tmp[i] = points[i].Y;
2402 float mu = (x - points[0].X) / xDiff;
2406 for (
int32 k = 0; k < i; ++k)
2408 float val = tmp[k] + mu * (tmp[k + 1] - tmp[k]);
2427 return emotesTextSound;
2430 return emotesTextSound;
2435template<
float(ExpectedStatModEntry::*field)>
2442 if (!contentTuningXExpected)
2447 if (ActiveMilestoneSeason < mythicPlusSeason->MilestoneSeason)
2463 auto expectedStatItr = _expectedStatsByLevel.find(std::make_pair(level, expansion));
2464 if (expectedStatItr == _expectedStatsByLevel.end())
2465 expectedStatItr = _expectedStatsByLevel.find(std::make_pair(level, -2));
2467 if (expectedStatItr == _expectedStatsByLevel.end())
2494 value = expectedStatItr->second->CreatureHealth;
2495 if (contentTuningMods)
2496 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2502 value = expectedStatItr->second->PlayerHealth;
2503 if (contentTuningMods)
2504 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2510 value = expectedStatItr->second->CreatureAutoAttackDps;
2511 if (contentTuningMods)
2512 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2518 value = expectedStatItr->second->CreatureArmor;
2519 if (contentTuningMods)
2520 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2526 value = expectedStatItr->second->PlayerMana;
2527 if (contentTuningMods)
2528 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2534 value = expectedStatItr->second->PlayerPrimaryStat;
2535 if (contentTuningMods)
2536 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2542 value = expectedStatItr->second->PlayerSecondaryStat;
2543 if (contentTuningMods)
2544 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2550 value = expectedStatItr->second->ArmorConstant;
2551 if (contentTuningMods)
2552 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2560 value = expectedStatItr->second->CreatureSpellDamage;
2561 if (contentTuningMods)
2562 value *= std::accumulate(contentTuningMods->begin(), contentTuningMods->end(), 1.0f,
2587 return labels ? std::span<int32 const>(*labels) : std::span<int32 const>();
2593 if (
GlobalCurve(globalCurveEntry->Type) == globalCurveType)
2594 return globalCurveEntry->CurveID;
2621 return _itemClassByOldEnum[itemClass];
2626 return _itemsWithCurrencyCost.count(itemId) > 0;
2638 return itemAppearance->ItemDisplayInfoID;
2645 auto itr = _itemModifiedAppearancesByItem.find(itemId | (appearanceModId << 24));
2646 if (itr != _itemModifiedAppearancesByItem.end())
2650 if (appearanceModId)
2652 itr = _itemModifiedAppearancesByItem.find(itemId);
2653 if (itr != _itemModifiedAppearancesByItem.end())
2677 if (index < _journalTiersByIndex.size())
2678 return _journalTiersByIndex[index];
2685 if (dungeon->MapID ==
int32(mapId) &&
Difficulty(dungeon->DifficultyID) == difficulty)
2709 return 1 << liq->SoundBank;
2717 if (!difficultiesForMap)
2720 auto difficultyEnd = difficultiesForMap->end();
2723 auto foundDifficulty = std::ranges::find_if(difficultiesForMap->begin(), difficultyEnd,
2724 [](std::pair<uint32 const, MapDifficultyEntry const*>
const& p) { return sDifficultyStore.HasRecord(p.first); });
2726 if (foundDifficulty == difficultyEnd)
2732 auto defaultDifficulty = std::ranges::find_if(foundDifficulty, difficultyEnd,
2734 [](std::pair<uint32 const, MapDifficultyEntry const*>
const& p) {
return sDifficultyStore.LookupEntry(p.first); });
2736 if (defaultDifficulty != difficultyEnd)
2737 foundDifficulty = defaultDifficulty;
2741 *difficulty =
Difficulty(foundDifficulty->first);
2743 return foundDifficulty->second;
2748 auto itr = _mapDifficulties.find(mapId);
2749 if (itr == _mapDifficulties.end())
2752 auto diffItr = itr->second.find(difficulty);
2753 if (diffItr == itr->second.end())
2756 return diffItr->second;
2765 uint32 tmpDiff = difficulty;
2810 auto ritr = _nameGenData.find(race);
2811 if (ritr == _nameGenData.end())
2814 if (ritr->second[gender].empty())
2823 if (Trinity::regex_search(name,
regex))
2828 if (Trinity::regex_search(name,
regex))
2837 if (!numTalentsAtLevel)
2840 if (numTalentsAtLevel)
2842 switch (playerClass)
2872 if (entry->MapID != mapid || entry->MinLevel > level)
2876 if (entry->MaxLevel >= level)
2880 if (!maxEntry || maxEntry->
MaxLevel < entry->MaxLevel)
2890 if (entry->MapID == mapid && entry->GetBracketId() ==
id)
2899 if (_pvpTalentSlotUnlock[slot])
2904 return _pvpTalentSlotUnlock[slot]->DeathKnightLevelRequired;
2906 return _pvpTalentSlotUnlock[slot]->DemonHunterLevelRequired;
2910 return _pvpTalentSlotUnlock[slot]->LevelRequired;
2933 auto itr = _questPackages.find(questPackageID);
2934 if (itr != _questPackages.end())
2935 return &itr->second.first;
2942 auto itr = _questPackages.find(questPackageID);
2943 if (itr != _questPackages.end())
2944 return &itr->second.second;
2955 return v2->UniqueBitFlag;
2966 return _powerTypes[power];
2975 if (powerName == name)
2978 powerName.erase(std::remove(powerName.begin(), powerName.end(),
'_'), powerName.end());
2979 if (powerName == name)
2988 auto itr = _pvpItemBonus.find(itemId);
2989 if (itr != _pvpItemBonus.end())
3024 if (!skllRaceClassInfo->RaceMask.IsEmpty() && !(skllRaceClassInfo->RaceMask.HasRace(race)))
3026 if (skllRaceClassInfo->ClassMask && !(skllRaceClassInfo->ClassMask & (1 << (class_ - 1))))
3029 return skllRaceClassInfo;
3037 std::vector<SkillRaceClassInfoEntry const*> result;
3039 result.push_back(skillRaceClassInfo);
3056 return _specsBySpecSet.count(std::make_pair(specSetId, specId)) > 0;
3061 return _spellFamilyNames.count(family) > 0;
3066 auto itr = _spellProcsPerMinuteMods.find(spellprocsPerMinuteId);
3067 if (itr != _spellProcsPerMinuteMods.end())
3070 return std::vector<SpellProcsPerMinuteModEntry const*>();
3080 return _talentsByPosition[class_][tier][column];
3090 if (requiredTotemCategoryId == 0)
3092 if (itemTotemCategoryId == 0)
3106 return requireAllTotems ? sharedMask == reqEntry->
TotemCategoryMask : sharedMask != 0;
3111 return _toys.count(toy) > 0;
3153 return Outside.DistanceToRegionEdgeSquared < std::numeric_limits<float>::epsilon() &&
3154 std::abs(
Outside.DistanceToRegionTop) < std::numeric_limits<float>::epsilon() &&
3155 std::abs(
Outside.DistanceToRegionBottom) < std::numeric_limits<float>::epsilon();
3162 bool rightInside = right.
IsInside();
3163 if (leftInside != rightInside)
3188 if (leftUiSizeX > std::numeric_limits<float>::epsilon() && rightUiSizeX > std::numeric_limits<float>::epsilon())
3192 if (leftScale != rightScale)
3193 return leftScale < rightScale;
3219 if (x < uiMapAssignment->Region[0].X || x > uiMapAssignment->
Region[1].X || y < uiMapAssignment->Region[0].Y || y > uiMapAssignment->
Region[1].Y)
3222 if (x >= uiMapAssignment->
Region[0].X)
3225 if (x > uiMapAssignment->
Region[1].X)
3226 xDiff = x - uiMapAssignment->
Region[0].X;
3229 xDiff = uiMapAssignment->
Region[0].X - x;
3231 if (y >= uiMapAssignment->
Region[0].Y)
3234 if (y > uiMapAssignment->
Region[1].Y)
3235 yDiff = y - uiMapAssignment->
Region[0].Y;
3238 yDiff = uiMapAssignment->
Region[0].Y - y;
3245 (x - (uiMapAssignment->
Region[0].X + uiMapAssignment->
Region[1].X) * 0.5f) * (x - (uiMapAssignment->
Region[0].X + uiMapAssignment->
Region[1].X) * 0.5f)
3246 + (y - (uiMapAssignment->
Region[0].Y + uiMapAssignment->
Region[1].Y) * 0.5f) * (y - (uiMapAssignment->
Region[0].Y + uiMapAssignment->
Region[1].Y) * 0.5f);
3251 if (z < uiMapAssignment->Region[0].Z || z > uiMapAssignment->
Region[1].Z)
3253 if (z < uiMapAssignment->Region[1].Z)
3255 if (z < uiMapAssignment->Region[0].Z)
3268 if (areaId && uiMapAssignment->
AreaID)
3270 int8 areaPriority = 0;
3271 while (areaId != uiMapAssignment->
AreaID)
3275 areaId = areaEntry->ParentAreaID;
3285 if (mapId >= 0 && uiMapAssignment->
MapID >= 0)
3287 if (mapId != uiMapAssignment->
MapID)
3291 if (mapEntry->ParentMapID == uiMapAssignment->
MapID)
3293 else if (mapEntry->CosmeticParentMapID == uiMapAssignment->
MapID)
3305 if (wmoGroupId || wmoDoodadPlacementId)
3309 bool hasDoodadPlacement =
false;
3315 hasDoodadPlacement =
true;
3318 if (wmoGroupId && uiMapAssignment->
WmoGroupID)
3320 if (wmoGroupId != uiMapAssignment->
WmoGroupID)
3323 if (hasDoodadPlacement)
3328 else if (hasDoodadPlacement)
3339 auto iterateUiMapAssignments = [&](std::unordered_multimap<int32, UiMapAssignmentEntry const*>
const& assignments,
int32 id)
3345 if (status < nearestMapAssignment)
3346 nearestMapAssignment = status;
3350 iterateUiMapAssignments(_uiMapAssignmentByWmoGroup[system], wmoGroupId);
3351 iterateUiMapAssignments(_uiMapAssignmentByWmoDoodadPlacement[system], wmoDoodadPlacementId);
3356 iterateUiMapAssignments(_uiMapAssignmentByArea[system], areaEntry->
ID);
3362 iterateUiMapAssignments(_uiMapAssignmentByMap[system], mapEntry->ID);
3363 if (mapEntry->ParentMapID >= 0)
3364 iterateUiMapAssignments(_uiMapAssignmentByMap[system], mapEntry->ParentMapID);
3365 if (mapEntry->CosmeticParentMapID >= 0)
3366 iterateUiMapAssignments(_uiMapAssignmentByMap[system], mapEntry->CosmeticParentMapID);
3381 if (!bounds || !bounds->IsUiAssignment)
3384 uiPosition.
X = ((1.0 - uiPosition.
X) * bounds->Bounds[1]) + (bounds->Bounds[3] * uiPosition.
X);
3385 uiPosition.
Y = ((1.0 - uiPosition.
Y) * bounds->Bounds[0]) + (bounds->Bounds[2] * uiPosition.
Y);
3406 if (!uiMapAssignment)
3410 *uiMapId = uiMapAssignment->
UiMapID;
3414 if (regionSize.X > 0.0f)
3415 relativePosition.X = (x - uiMapAssignment->
Region[0].X) / regionSize.X;
3416 if (regionSize.Y > 0.0f)
3417 relativePosition.Y = (y - uiMapAssignment->
Region[0].Y) / regionSize.Y;
3422 ((1.0f - (1.0f - relativePosition.Y)) * uiMapAssignment->
UiMin.
X) + ((1.0f - relativePosition.Y) * uiMapAssignment->
UiMax.
X),
3423 ((1.0f - (1.0f - relativePosition.X)) * uiMapAssignment->
UiMin.
Y) + ((1.0f - relativePosition.X) * uiMapAssignment->
UiMax.
Y)
3430 *newPos = uiPosition;
3443 if (assignment.second->MapID >= 0 && assignment.second->MapID != areaEntry->
ContinentID)
3446 float tmpY = (y - assignment.second->UiMax.Y) / (assignment.second->UiMin.Y - assignment.second->UiMax.Y);
3447 float tmpX = (x - assignment.second->UiMax.X) / (assignment.second->UiMin.X - assignment.second->UiMax.X);
3448 x = assignment.second->Region[0].X + tmpY * (assignment.second->Region[1].X - assignment.second->Region[0].X);
3449 y = assignment.second->Region[0].Y + tmpX * (assignment.second->Region[1].Y - assignment.second->Region[0].Y);
3460 if (!
GetUiMapPosition(x, y, 0.0f, -1, areaId, 0, 0,
UI_MAP_SYSTEM_WORLD,
true,
nullptr, &zoneCoords))
3463 x = zoneCoords.
Y * 100.0f;
3464 y = zoneCoords.
X * 100.0f;
3469 return _uiMapPhases.find(phaseId) != _uiMapPhases.end();
3494 ASSERT((
_data.size() % 8) == 0,
"TaxiMask size must be aligned to a multiple of uint64");
char const * localeNames[TOTAL_LOCALES]
LocaleConstant GetLocaleByName(std::string_view name)
CascLocaleBit WowLocaleToCascLocaleBit[TOTAL_LOCALES]
constexpr bool IsValidLocale(LocaleConstant locale)
DB2Storage< UISplashScreenEntry > sUISplashScreenStore("UISplashScreen.db2", &UiSplashScreenLoadInfo::Instance)
DB2Storage< LightEntry > sLightStore("Light.db2", &LightLoadInfo::Instance)
DB2Storage< AzeritePowerSetMemberEntry > sAzeritePowerSetMemberStore("AzeritePowerSetMember.db2", &AzeritePowerSetMemberLoadInfo::Instance)
DB2Storage< QuestFactionRewardEntry > sQuestFactionRewardStore("QuestFactionReward.db2", &QuestFactionRewardLoadInfo::Instance)
DB2Storage< PhaseEntry > sPhaseStore("Phase.db2", &PhaseLoadInfo::Instance)
DB2Storage< ArtifactAppearanceEntry > sArtifactAppearanceStore("ArtifactAppearance.db2", &ArtifactAppearanceLoadInfo::Instance)
DB2Storage< BankBagSlotPricesEntry > sBankBagSlotPricesStore("BankBagSlotPrices.db2", &BankBagSlotPricesLoadInfo::Instance)
DB2Storage< SkillRaceClassInfoEntry > sSkillRaceClassInfoStore("SkillRaceClassInfo.db2", &SkillRaceClassInfoLoadInfo::Instance)
DB2Storage< ItemNameDescriptionEntry > sItemNameDescriptionStore("ItemNameDescription.db2", &ItemNameDescriptionLoadInfo::Instance)
DB2Storage< ChrRaceXChrModelEntry > sChrRaceXChrModelStore("ChrRaceXChrModel.db2", &ChrRaceXChrModelLoadInfo::Instance)
DB2Storage< ItemLimitCategoryEntry > sItemLimitCategoryStore("ItemLimitCategory.db2", &ItemLimitCategoryLoadInfo::Instance)
DB2Storage< DifficultyEntry > sDifficultyStore("Difficulty.db2", &DifficultyLoadInfo::Instance)
DB2Storage< WorldMapOverlayEntry > sWorldMapOverlayStore("WorldMapOverlay.db2", &WorldMapOverlayLoadInfo::Instance)
ChrSpecializationEntry const * ChrSpecializationByIndexContainer[MAX_CLASSES+1][MAX_SPECIALIZATIONS]
DB2Storage< ItemModifiedAppearanceExtraEntry > sItemModifiedAppearanceExtraStore("ItemModifiedAppearanceExtra.db2", &ItemModifiedAppearanceExtraLoadInfo::Instance)
DB2Storage< ItemDamageTwoHandCasterEntry > sItemDamageTwoHandCasterStore("ItemDamageTwoHandCaster.db2", &ItemDamageTwoHandCasterLoadInfo::Instance)
DB2Storage< ItemLevelSelectorEntry > sItemLevelSelectorStore("ItemLevelSelector.db2", &ItemLevelSelectorLoadInfo::Instance)
DB2Storage< NamesReservedEntry > sNamesReservedStore("NamesReserved.db2", &NamesReservedLoadInfo::Instance)
DB2Storage< GameObjectDisplayInfoEntry > sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", &GameobjectDisplayInfoLoadInfo::Instance)
DB2Storage< SceneScriptEntry > sSceneScriptStore("SceneScript.db2", &SceneScriptLoadInfo::Instance)
DB2Storage< CharacterLoadoutEntry > sCharacterLoadoutStore("CharacterLoadout.db2", &CharacterLoadoutLoadInfo::Instance)
DB2Storage< SpellVisualEntry > sSpellVisualStore("SpellVisual.db2", &SpellVisualLoadInfo::Instance)
DB2Storage< PVPItemEntry > sPVPItemStore("PVPItem.db2", &PvpItemLoadInfo::Instance)
DB2Storage< ItemEntry > sItemStore("Item.db2", &ItemLoadInfo::Instance)
DB2Storage< Achievement_CategoryEntry > sAchievementCategoryStore("Achievement_Category.db2", &AchievementCategoryLoadInfo::Instance)
DB2Storage< ItemSearchNameEntry > sItemSearchNameStore("ItemSearchName.db2", &ItemSearchNameLoadInfo::Instance)
DB2Storage< PhaseXPhaseGroupEntry > sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", &PhaseXPhaseGroupLoadInfo::Instance)
std::unordered_map< uint32, std::unordered_map< uint32, MapDifficultyEntry const * > > MapDifficultyContainer
DB2Storage< BattlemasterListEntry > sBattlemasterListStore("BattlemasterList.db2", &BattlemasterListLoadInfo::Instance)
DB2Storage< PathEntry > sPathStore("Path.db2", &PathLoadInfo::Instance)
TaxiMask sAllianceTaxiNodesMask
std::unordered_map< uint32, std::vector< DBCPosition2D > > CurvePointsContainer
DB2Storage< AzeriteEssencePowerEntry > sAzeriteEssencePowerStore("AzeriteEssencePower.db2", &AzeriteEssencePowerLoadInfo::Instance)
DB2Storage< SpellInterruptsEntry > sSpellInterruptsStore("SpellInterrupts.db2", &SpellInterruptsLoadInfo::Instance)
DB2Storage< TraitCurrencySourceEntry > sTraitCurrencySourceStore("TraitCurrencySource.db2", &TraitCurrencySourceLoadInfo::Instance)
DB2Storage< SkillLineEntry > sSkillLineStore("SkillLine.db2", &SkillLineLoadInfo::Instance)
DB2Storage< TraitTreeXTraitCostEntry > sTraitTreeXTraitCostStore("TraitTreeXTraitCost.db2", &TraitTreeXTraitCostLoadInfo::Instance)
DB2Storage< OverrideSpellDataEntry > sOverrideSpellDataStore("OverrideSpellData.db2", &OverrideSpellDataLoadInfo::Instance)
DB2Storage< AnimationDataEntry > sAnimationDataStore("AnimationData.db2", &AnimationDataLoadInfo::Instance)
DB2Storage< FriendshipReputationEntry > sFriendshipReputationStore("FriendshipReputation.db2", &FriendshipReputationLoadInfo::Instance)
DB2Storage< BattlePetBreedQualityEntry > sBattlePetBreedQualityStore("BattlePetBreedQuality.db2", &BattlePetBreedQualityLoadInfo::Instance)
DB2Storage< EmotesTextEntry > sEmotesTextStore("EmotesText.db2", &EmotesTextLoadInfo::Instance)
DB2Storage< ArtifactEntry > sArtifactStore("Artifact.db2", &ArtifactLoadInfo::Instance)
DB2Storage< ArtifactPowerPickerEntry > sArtifactPowerPickerStore("ArtifactPowerPicker.db2", &ArtifactPowerPickerLoadInfo::Instance)
DB2Storage< TraitNodeGroupXTraitCondEntry > sTraitNodeGroupXTraitCondStore("TraitNodeGroupXTraitCond.db2", &TraitNodeGroupXTraitCondLoadInfo::Instance)
std::unordered_map< uint32, HeirloomEntry const * > HeirloomItemsContainer
DB2Storage< ArtifactQuestXPEntry > sArtifactQuestXPStore("ArtifactQuestXP.db2", &ArtifactQuestXpLoadInfo::Instance)
DB2Storage< JournalEncounterSectionEntry > sJournalEncounterSectionStore("JournalEncounterSection.db2", &JournalEncounterSectionLoadInfo::Instance)
DB2Storage< BattlePetBreedStateEntry > sBattlePetBreedStateStore("BattlePetBreedState.db2", &BattlePetBreedStateLoadInfo::Instance)
static DBCPosition2D CalculateGlobalUiMapPosition(uint32 uiMapID, DBCPosition2D uiPosition)
DB2Storage< PVPStatEntry > sPVPStatStore("PVPStat.db2", &PvpStatLoadInfo::Instance)
std::unordered_map< uint32, ItemChildEquipmentEntry const * > ItemChildEquipmentContainer
DB2Storage< PvpTalentCategoryEntry > sPvpTalentCategoryStore("PvpTalentCategory.db2", &PvpTalentCategoryLoadInfo::Instance)
DB2Storage< ItemBonusTreeEntry > sItemBonusTreeStore("ItemBonusTree.db2", &ItemBonusTreeLoadInfo::Instance)
DB2Storage< RandPropPointsEntry > sRandPropPointsStore("RandPropPoints.db2", &RandPropPointsLoadInfo::Instance)
DB2Storage< ItemBagFamilyEntry > sItemBagFamilyStore("ItemBagFamily.db2", &ItemBagFamilyLoadInfo::Instance)
DB2Storage< GameObjectsEntry > sGameObjectsStore("GameObjects.db2", &GameobjectsLoadInfo::Instance)
DB2Storage< SpellAuraOptionsEntry > sSpellAuraOptionsStore("SpellAuraOptions.db2", &SpellAuraOptionsLoadInfo::Instance)
std::unordered_map< uint32, std::unordered_map< uint32, std::vector< SpellPowerEntry const * > > > SpellPowerDifficultyContainer
DB2Storage< TraitNodeGroupXTraitNodeEntry > sTraitNodeGroupXTraitNodeStore("TraitNodeGroupXTraitNode.db2", &TraitNodeGroupXTraitNodeLoadInfo::Instance)
DB2Storage< SpellCategoryEntry > sSpellCategoryStore("SpellCategory.db2", &SpellCategoryLoadInfo::Instance)
DB2Storage< AchievementEntry > sAchievementStore("Achievement.db2", &AchievementLoadInfo::Instance)
DB2Storage< ImportPriceWeaponEntry > sImportPriceWeaponStore("ImportPriceWeapon.db2", &ImportPriceWeaponLoadInfo::Instance)
DB2Storage< FriendshipRepReactionEntry > sFriendshipRepReactionStore("FriendshipRepReaction.db2", &FriendshipRepReactionLoadInfo::Instance)
DB2Storage< GarrMissionEntry > sGarrMissionStore("GarrMission.db2", &GarrMissionLoadInfo::Instance)
std::array< ItemClassEntry const *, 20 > ItemClassByOldEnumContainer
DB2Storage< SpellNameEntry > sSpellNameStore("SpellName.db2", &SpellNameLoadInfo::Instance)
DB2Storage< CurveEntry > sCurveStore("Curve.db2", &CurveLoadInfo::Instance)
DB2Storage< PvpSeasonEntry > sPvpSeasonStore("PvpSeason.db2", &PvpSeasonLoadInfo::Instance)
DB2Storage< MapEntry > sMapStore("Map.db2", &MapLoadInfo::Instance)
DB2Storage< TraitNodeEntry > sTraitNodeStore("TraitNode.db2", &TraitNodeLoadInfo::Instance)
DB2Storage< TaxiNodesEntry > sTaxiNodesStore("TaxiNodes.db2", &TaxiNodesLoadInfo::Instance)
std::unordered_map< uint32, ItemModifiedAppearanceEntry const * > ItemModifiedAppearanceByItemContainer
DB2Storage< CreatureModelDataEntry > sCreatureModelDataStore("CreatureModelData.db2", &CreatureModelDataLoadInfo::Instance)
DB2Storage< LiquidTypeEntry > sLiquidTypeStore("LiquidType.db2", &LiquidTypeLoadInfo::Instance)
DB2Storage< ConditionalChrModelEntry > sConditionalChrModelStore("ConditionalChrModel.db2", &ConditionalChrModelLoadInfo::Instance)
DB2Storage< CreatureFamilyEntry > sCreatureFamilyStore("CreatureFamily.db2", &CreatureFamilyLoadInfo::Instance)
std::map< uint32, DB2StorageBase * > StorageMap
DB2Storage< CurvePointEntry > sCurvePointStore("CurvePoint.db2", &CurvePointLoadInfo::Instance)
DB2Storage< SpellXSpellVisualEntry > sSpellXSpellVisualStore("SpellXSpellVisual.db2", &SpellXSpellVisualLoadInfo::Instance)
DB2Storage< CharacterLoadoutItemEntry > sCharacterLoadoutItemStore("CharacterLoadoutItem.db2", &CharacterLoadoutItemLoadInfo::Instance)
DB2Storage< AnimKitEntry > sAnimKitStore("AnimKit.db2", &AnimKitLoadInfo::Instance)
DB2Storage< MapDifficultyEntry > sMapDifficultyStore("MapDifficulty.db2", &MapDifficultyLoadInfo::Instance)
DB2Storage< SpellEquippedItemsEntry > sSpellEquippedItemsStore("SpellEquippedItems.db2", &SpellEquippedItemsLoadInfo::Instance)
DB2Storage< ItemBonusEntry > sItemBonusStore("ItemBonus.db2", &ItemBonusLoadInfo::Instance)
DB2Storage< UiMapLinkEntry > sUiMapLinkStore("UiMapLink.db2", &UiMapLinkLoadInfo::Instance)
static UiMapAssignmentEntry const * FindNearestMapAssignment(float x, float y, float z, int32 mapId, int32 areaId, int32 wmoDoodadPlacementId, int32 wmoGroupId, UiMapSystem system)
static bool CheckUiMapAssignmentStatus(float x, float y, float z, int32 mapId, int32 areaId, int32 wmoDoodadPlacementId, int32 wmoGroupId, UiMapAssignmentEntry const *uiMapAssignment, UiMapAssignmentStatus *status)
DB2Storage< UnitPowerBarEntry > sUnitPowerBarStore("UnitPowerBar.db2", &UnitPowerBarLoadInfo::Instance)
DB2Storage< SpellReagentsEntry > sSpellReagentsStore("SpellReagents.db2", &SpellReagentsLoadInfo::Instance)
DB2Storage< LanguageWordsEntry > sLanguageWordsStore("LanguageWords.db2", &LanguageWordsLoadInfo::Instance)
DB2Storage< SkillLineXTraitTreeEntry > sSkillLineXTraitTreeStore("SkillLineXTraitTree.db2", &SkillLineXTraitTreeLoadInfo::Instance)
std::unordered_map< uint32, std::vector< uint32 > > ArtifactPowerLinksContainer
DB2Storage< TraitCostEntry > sTraitCostStore("TraitCost.db2", &TraitCostLoadInfo::Instance)
DB2Storage< ArtifactCategoryEntry > sArtifactCategoryStore("ArtifactCategory.db2", &ArtifactCategoryLoadInfo::Instance)
DB2Storage< ServerMessagesEntry > sServerMessagesStore("ServerMessages.db2", &ServerMessagesLoadInfo::Instance)
DB2Storage< ItemChildEquipmentEntry > sItemChildEquipmentStore("ItemChildEquipment.db2", &ItemChildEquipmentLoadInfo::Instance)
DB2Storage< SpecSetMemberEntry > sSpecSetMemberStore("SpecSetMember.db2", &SpecSetMemberLoadInfo::Instance)
DB2Storage< GarrBuildingPlotInstEntry > sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", &GarrBuildingPlotInstLoadInfo::Instance)
DB2Storage< ItemBonusTreeNodeEntry > sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", &ItemBonusTreeNodeLoadInfo::Instance)
DB2Storage< CreatureLabelEntry > sCreatureLabelStore("CreatureLabel.db2", &CreatureLabelLoadInfo::Instance)
DB2Storage< ChrCustomizationOptionEntry > sChrCustomizationOptionStore("ChrCustomizationOption.db2", &ChrCustomizationOptionLoadInfo::Instance)
DB2Storage< ItemSpecOverrideEntry > sItemSpecOverrideStore("ItemSpecOverride.db2", &ItemSpecOverrideLoadInfo::Instance)
DB2Storage< CreatureTypeEntry > sCreatureTypeStore("CreatureType.db2", &CreatureTypeLoadInfo::Instance)
DB2Storage< DurabilityQualityEntry > sDurabilityQualityStore("DurabilityQuality.db2", &DurabilityQualityLoadInfo::Instance)
DB2Storage< AreaTriggerActionSetEntry > sAreaTriggerActionSetStore("AreaTriggerActionSet.db2", &AreaTriggerActionSetLoadInfo::Instance)
DB2Storage< ChrCustomizationElementEntry > sChrCustomizationElementStore("ChrCustomizationElement.db2", &ChrCustomizationElementLoadInfo::Instance)
DB2Storage< SpellPowerDifficultyEntry > sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", &SpellPowerDifficultyLoadInfo::Instance)
DB2Storage< ArtifactPowerEntry > sArtifactPowerStore("ArtifactPower.db2", &ArtifactPowerLoadInfo::Instance)
DB2Storage< TraitTreeLoadoutEntry > sTraitTreeLoadoutStore("TraitTreeLoadout.db2", &TraitTreeLoadoutLoadInfo::Instance)
DB2Storage< CriteriaEntry > sCriteriaStore("Criteria.db2", &CriteriaLoadInfo::Instance)
TaxiPathNodesByPath sTaxiPathNodesByPath
DB2Storage< ChallengeModeItemBonusOverrideEntry > sChallengeModeItemBonusOverrideStore("ChallengeModeItemBonusOverride.db2", &ChallengeModeItemBonusOverrideLoadInfo::Instance)
DB2Storage< AzeriteItemMilestonePowerEntry > sAzeriteItemMilestonePowerStore("AzeriteItemMilestonePower.db2", &AzeriteItemMilestonePowerLoadInfo::Instance)
std::pair< uint32, int32 > HotfixBlobKey
DB2Storage< QuestMoneyRewardEntry > sQuestMoneyRewardStore("QuestMoneyReward.db2", &QuestMoneyRewardLoadInfo::Instance)
DB2Storage< ItemXItemEffectEntry > sItemXItemEffectStore("ItemXItemEffect.db2", &ItemXItemEffectLoadInfo::Instance)
DB2Storage< ScenarioEntry > sScenarioStore("Scenario.db2", &ScenarioLoadInfo::Instance)
DB2Storage< TraitNodeXTraitNodeEntryEntry > sTraitNodeXTraitNodeEntryStore("TraitNodeXTraitNodeEntry.db2", &TraitNodeXTraitNodeEntryLoadInfo::Instance)
std::unordered_map< uint32, std::vector< ChrSpecialization > > GlyphRequiredSpecsContainer
DB2Storage< JournalInstanceEntry > sJournalInstanceStore("JournalInstance.db2", &JournalInstanceLoadInfo::Instance)
DB2Storage< ItemDamageOneHandEntry > sItemDamageOneHandStore("ItemDamageOneHand.db2", &ItemDamageOneHandLoadInfo::Instance)
DB2Storage< TransmogIllusionEntry > sTransmogIllusionStore("TransmogIllusion.db2", &TransmogIllusionLoadInfo::Instance)
std::unordered_map< uint32, std::vector< ItemSpecOverrideEntry const * > > ItemSpecOverridesContainer
static CurveInterpolationMode DetermineCurveType(CurveEntry const *curve, std::vector< DBCPosition2D > const &points)
DB2Storage< TransmogSetEntry > sTransmogSetStore("TransmogSet.db2", &TransmogSetLoadInfo::Instance)
DB2Storage< GuildColorEmblemEntry > sGuildColorEmblemStore("GuildColorEmblem.db2", &GuildColorEmblemLoadInfo::Instance)
DB2Storage< GarrBuildingEntry > sGarrBuildingStore("GarrBuilding.db2", &GarrBuildingLoadInfo::Instance)
DB2Storage< TraitNodeGroupXTraitCostEntry > sTraitNodeGroupXTraitCostStore("TraitNodeGroupXTraitCost.db2", &TraitNodeGroupXTraitCostLoadInfo::Instance)
DB2Storage< AzeriteKnowledgeMultiplierEntry > sAzeriteKnowledgeMultiplierStore("AzeriteKnowledgeMultiplier.db2", &AzeriteKnowledgeMultiplierLoadInfo::Instance)
DB2Storage< SpecializationSpellsEntry > sSpecializationSpellsStore("SpecializationSpells.db2", &SpecializationSpellsLoadInfo::Instance)
std::map< WMOAreaTableKey, WMOAreaTableEntry const * > WMOAreaTableLookupContainer
std::unordered_map< uint32, DB2Manager::MountTypeXCapabilitySet > MountCapabilitiesByTypeContainer
DB2Storage< GarrFollowerXAbilityEntry > sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", &GarrFollowerXAbilityLoadInfo::Instance)
DB2Storage< QuestInfoEntry > sQuestInfoStore("QuestInfo.db2", &QuestInfoLoadInfo::Instance)
DB2Storage< ItemArmorTotalEntry > sItemArmorTotalStore("ItemArmorTotal.db2", &ItemArmorTotalLoadInfo::Instance)
DB2Storage< ChrModelEntry > sChrModelStore("ChrModel.db2", &ChrModelLoadInfo::Instance)
std::unordered_map< uint32, std::vector< SpecializationSpellsEntry const * > > SpecializationSpellsContainer
DB2Storage< TraitTreeEntry > sTraitTreeStore("TraitTree.db2", &TraitTreeLoadInfo::Instance)
DB2Storage< GarrTalentTreeEntry > sGarrTalentTreeStore("GarrTalentTree.db2", &GarrTalentTreeLoadInfo::Instance)
DB2Storage< TransportRotationEntry > sTransportRotationStore("TransportRotation.db2", &TransportRotationLoadInfo::Instance)
DB2Storage< SpellRangeEntry > sSpellRangeStore("SpellRange.db2", &SpellRangeLoadInfo::Instance)
DB2Storage< ItemLevelSelectorQualityEntry > sItemLevelSelectorQualityStore("ItemLevelSelectorQuality.db2", &ItemLevelSelectorQualityLoadInfo::Instance)
DB2Storage< RewardPackXItemEntry > sRewardPackXItemStore("RewardPackXItem.db2", &RewardPackXItemLoadInfo::Instance)
DB2Storage< EmotesTextSoundEntry > sEmotesTextSoundStore("EmotesTextSound.db2", &EmotesTextSoundLoadInfo::Instance)
std::array< PowerTypeEntry const *, MAX_POWERS > PowerTypesContainer
bool ValidateBroadcastTextTactKeyOptionalData(std::vector< uint8 > const &data)
DB2Storage< ChrClassesEntry > sChrClassesStore("ChrClasses.db2", &ChrClassesLoadInfo::Instance)
DB2Storage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", &SpellShapeshiftFormLoadInfo::Instance)
DB2Storage< ItemPriceBaseEntry > sItemPriceBaseStore("ItemPriceBase.db2", &ItemPriceBaseLoadInfo::Instance)
DB2Storage< GlobalCurveEntry > sGlobalCurveStore("GlobalCurve.db2", &GlobalCurveLoadInfo::Instance)
DB2Storage< ModifierTreeEntry > sModifierTreeStore("ModifierTree.db2", &ModifierTreeLoadInfo::Instance)
std::unordered_map< uint32, std::vector< uint32 > > FactionTeamContainer
DB2Storage< SpellAuraRestrictionsEntry > sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", &SpellAuraRestrictionsLoadInfo::Instance)
DB2Storage< MountEntry > sMountStore("Mount.db2", &MountLoadInfo::Instance)
DB2Storage< VehicleSeatEntry > sVehicleSeatStore("VehicleSeat.db2", &VehicleSeatLoadInfo::Instance)
DB2Storage< ChrCustomizationDisplayInfoEntry > sChrCustomizationDisplayInfoStore("ChrCustomizationDisplayInfo.db2", &ChrCustomizationDisplayInfoLoadInfo::Instance)
std::unordered_map< uint32, std::vector< SpellProcsPerMinuteModEntry const * > > SpellProcsPerMinuteModContainer
DB2Storage< ArtifactPowerRankEntry > sArtifactPowerRankStore("ArtifactPowerRank.db2", &ArtifactPowerRankLoadInfo::Instance)
DB2Storage< DestructibleModelDataEntry > sDestructibleModelDataStore("DestructibleModelData.db2", &DestructibleModelDataLoadInfo::Instance)
DB2Storage< SpellShapeshiftEntry > sSpellShapeshiftStore("SpellShapeshift.db2", &SpellShapeshiftLoadInfo::Instance)
DB2Storage< GarrSiteLevelPlotInstEntry > sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", &GarrSiteLevelPlotInstLoadInfo::Instance)
TaxiMask sOldContinentsNodesMask
DB2Storage< MountEquipmentEntry > sMountEquipmentStore("MountEquipment.db2", &MountEquipmentLoadInfo::Instance)
DB2Storage< SpellVisualEffectNameEntry > sSpellVisualEffectNameStore("SpellVisualEffectName.db2", &SpellVisualEffectNameLoadInfo::Instance)
DB2Storage< SpellMiscEntry > sSpellMiscStore("SpellMisc.db2", &SpellMiscLoadInfo::Instance)
DB2Storage< WorldStateExpressionEntry > sWorldStateExpressionStore("WorldStateExpression.db2", &WorldStateExpressionLoadInfo::Instance)
DB2Storage< GarrPlotInstanceEntry > sGarrPlotInstanceStore("GarrPlotInstance.db2", &GarrPlotInstanceLoadInfo::Instance)
DB2Storage< LockEntry > sLockStore("Lock.db2", &LockLoadInfo::Instance)
DB2Storage< NamesProfanityEntry > sNamesProfanityStore("NamesProfanity.db2", &NamesProfanityLoadInfo::Instance)
DB2Storage< CharTitlesEntry > sCharTitlesStore("CharTitles.db2", &CharTitlesLoadInfo::Instance)
DB2Storage< GlyphRequiredSpecEntry > sGlyphRequiredSpecStore("GlyphRequiredSpec.db2", &GlyphRequiredSpecLoadInfo::Instance)
DB2Storage< ExpectedStatEntry > sExpectedStatStore("ExpectedStat.db2", &ExpectedStatLoadInfo::Instance)
DB2Storage< BattlePetSpeciesStateEntry > sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", &BattlePetSpeciesStateLoadInfo::Instance)
DB2Storage< NumTalentsAtLevelEntry > sNumTalentsAtLevelStore("NumTalentsAtLevel.db2", &NumTalentsAtLevelLoadInfo::Instance)
std::map< std::tuple< uint32, uint8, uint8, uint8 >, EmotesTextSoundEntry const * > EmotesTextSoundContainer
DB2Storage< ArtifactUnlockEntry > sArtifactUnlockStore("ArtifactUnlock.db2", &ArtifactUnlockLoadInfo::Instance)
DB2Storage< QuestLineXQuestEntry > sQuestLineXQuestStore("QuestLineXQuest.db2", &QuestLineXQuestLoadInfo::Instance)
DB2Storage< TraitCondEntry > sTraitCondStore("TraitCond.db2", &TraitCondLoadInfo::Instance)
DB2Storage< TransportAnimationEntry > sTransportAnimationStore("TransportAnimation.db2", &TransportAnimationLoadInfo::Instance)
std::vector< TalentEntry const * > TalentsByPosition[MAX_CLASSES][MAX_TALENT_TIERS][MAX_TALENT_COLUMNS]
DB2Storage< ContentTuningXExpectedEntry > sContentTuningXExpectedStore("ContentTuningXExpected.db2", &ContentTuningXExpectedLoadInfo::Instance)
DB2Storage< ConditionalContentTuningEntry > sConditionalContentTuningStore("ConditionalContentTuning.db2", &ConditionalContentTuningLoadInfo::Instance)
DB2Storage< WMOAreaTableEntry > sWMOAreaTableStore("WMOAreaTable.db2", &WmoAreaTableLoadInfo::Instance)
DB2Storage< TraitTreeXTraitCurrencyEntry > sTraitTreeXTraitCurrencyStore("TraitTreeXTraitCurrency.db2", &TraitTreeXTraitCurrencyLoadInfo::Instance)
DB2Storage< ItemXBonusTreeEntry > sItemXBonusTreeStore("ItemXBonusTree.db2", &ItemXBonusTreeLoadInfo::Instance)
DB2Storage< ChrSpecializationEntry > sChrSpecializationStore("ChrSpecialization.db2", &ChrSpecializationLoadInfo::Instance)
DB2Storage< Cfg_CategoriesEntry > sCfgCategoriesStore("Cfg_Categories.db2", &CfgCategoriesLoadInfo::Instance)
DB2Storage< ExpectedStatModEntry > sExpectedStatModStore("ExpectedStatMod.db2", &ExpectedStatModLoadInfo::Instance)
DB2Storage< PrestigeLevelInfoEntry > sPrestigeLevelInfoStore("PrestigeLevelInfo.db2", &PrestigeLevelInfoLoadInfo::Instance)
DB2Storage< ChrClassesXPowerTypesEntry > sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", &ChrClassesXPowerTypesLoadInfo::Instance)
DB2Storage< GarrPlotBuildingEntry > sGarrPlotBuildingStore("GarrPlotBuilding.db2", &GarrPlotBuildingLoadInfo::Instance)
DB2Storage< SceneScriptTextEntry > sSceneScriptTextStore("SceneScriptText.db2", &SceneScriptTextLoadInfo::Instance)
DB2Storage< ChrCustomizationReqChoiceEntry > sChrCustomizationReqChoiceStore("ChrCustomizationReqChoice.db2", &ChrCustomizationReqChoiceLoadInfo::Instance)
DB2Storage< GossipNPCOptionEntry > sGossipNPCOptionStore("GossipNPCOption.db2", &GossipNpcOptionLoadInfo::Instance)
DB2Storage< PowerTypeEntry > sPowerTypeStore("PowerType.db2", &PowerTypeLoadInfo::Instance)
DB2Storage< ItemSetEntry > sItemSetStore("ItemSet.db2", &ItemSetLoadInfo::Instance)
DB2Storage< TraitNodeEntryEntry > sTraitNodeEntryStore("TraitNodeEntry.db2", &TraitNodeEntryLoadInfo::Instance)
DB2Storage< QuestSortEntry > sQuestSortStore("QuestSort.db2", &QuestSortLoadInfo::Instance)
DB2Storage< GarrSiteLevelEntry > sGarrSiteLevelStore("GarrSiteLevel.db2", &GarrSiteLevelLoadInfo::Instance)
DB2Storage< SceneScriptPackageEntry > sSceneScriptPackageStore("SceneScriptPackage.db2", &SceneScriptPackageLoadInfo::Instance)
DB2Storage< CreatureDisplayInfoExtraEntry > sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", &CreatureDisplayInfoExtraLoadInfo::Instance)
DB2Storage< TotemCategoryEntry > sTotemCategoryStore("TotemCategory.db2", &TotemCategoryLoadInfo::Instance)
DB2Storage< SpellLevelsEntry > sSpellLevelsStore("SpellLevels.db2", &SpellLevelsLoadInfo::Instance)
DB2Storage< SpellVisualKitEntry > sSpellVisualKitStore("SpellVisualKit.db2", &SpellVisualKitLoadInfo::Instance)
DB2Storage< AdventureMapPOIEntry > sAdventureMapPOIStore("AdventureMapPOI.db2", &AdventureMapPoiLoadInfo::Instance)
DB2Storage< PvpTalentEntry > sPvpTalentStore("PvpTalent.db2", &PvpTalentLoadInfo::Instance)
DB2Storage< ScenarioStepEntry > sScenarioStepStore("ScenarioStep.db2", &ScenarioStepLoadInfo::Instance)
DB2Storage< JournalTierEntry > sJournalTierStore("JournalTier.db2", &JournalTierLoadInfo::Instance)
DB2Storage< BattlePetAbilityEntry > sBattlePetAbilityStore("BattlePetAbility.db2", &BattlePetAbilityLoadInfo::Instance)
DB2Storage< SpellVisualMissileEntry > sSpellVisualMissileStore("SpellVisualMissile.db2", &SpellVisualMissileLoadInfo::Instance)
DB2Storage< ItemEffectEntry > sItemEffectStore("ItemEffect.db2", &ItemEffectLoadInfo::Instance)
std::unordered_map< uint32, std::vector< ArtifactPowerEntry const * > > ArtifactPowersContainer
DB2Storage< PathPropertyEntry > sPathPropertyStore("PathProperty.db2", &PathPropertyLoadInfo::Instance)
DB2Storage< BarberShopStyleEntry > sBarberShopStyleStore("BarberShopStyle.db2", &BarberShopStyleLoadInfo::Instance)
std::unordered_multimap< uint32, SkillRaceClassInfoEntry const * > SkillRaceClassInfoContainer
DB2Storage< ChatChannelsEntry > sChatChannelsStore("ChatChannels.db2", &ChatChannelsLoadInfo::Instance)
std::pair< uint32, bool(*)(std::vector< uint8 > const &data) > AllowedHotfixOptionalData
DB2Storage< MawPowerEntry > sMawPowerStore("MawPower.db2", &MawPowerLoadInfo::Instance)
DB2Storage< ToyEntry > sToyStore("Toy.db2", &ToyLoadInfo::Instance)
DB2Storage< CriteriaTreeEntry > sCriteriaTreeStore("CriteriaTree.db2", &CriteriaTreeLoadInfo::Instance)
DB2Storage< ChrClassUIDisplayEntry > sChrClassUIDisplayStore("ChrClassUIDisplay.db2", &ChrClassUiDisplayLoadInfo::Instance)
DB2Storage< TraitDefinitionEffectPointsEntry > sTraitDefinitionEffectPointsStore("TraitDefinitionEffectPoints.db2", &TraitDefinitionEffectPointsLoadInfo::Instance)
DB2Storage< CorruptionEffectsEntry > sCorruptionEffectsStore("CorruptionEffects.db2", &CorruptionEffectsLoadInfo::Instance)
DB2Storage< ImportPriceShieldEntry > sImportPriceShieldStore("ImportPriceShield.db2", &ImportPriceShieldLoadInfo::Instance)
DB2Storage< LocationEntry > sLocationStore("Location.db2", &LocationLoadInfo::Instance)
DB2Storage< BattlePetSpeciesEntry > sBattlePetSpeciesStore("BattlePetSpecies.db2", &BattlePetSpeciesLoadInfo::Instance)
DB2Storage< ItemArmorShieldEntry > sItemArmorShieldStore("ItemArmorShield.db2", &ItemArmorShieldLoadInfo::Instance)
DB2Storage< AreaTriggerEntry > sAreaTriggerStore("AreaTrigger.db2", &AreaTriggerLoadInfo::Instance)
DB2Storage< SpellDurationEntry > sSpellDurationStore("SpellDuration.db2", &SpellDurationLoadInfo::Instance)
DB2Storage< SpellLearnSpellEntry > sSpellLearnSpellStore("SpellLearnSpell.db2", &SpellLearnSpellLoadInfo::Instance)
DB2Storage< ConversationLineEntry > sConversationLineStore("ConversationLine.db2", &ConversationLineLoadInfo::Instance)
DB2Storage< SpellCooldownsEntry > sSpellCooldownsStore("SpellCooldowns.db2", &SpellCooldownsLoadInfo::Instance)
DB2Storage< MountTypeXCapabilityEntry > sMountTypeXCapabilityStore("MountTypeXCapability.db2", &MountTypeXCapabilityLoadInfo::Instance)
DB2Storage< AdventureJournalEntry > sAdventureJournalStore("AdventureJournal.db2", &AdventureJournalLoadInfo::Instance)
void LoadDB2(std::bitset< TOTAL_LOCALES > &availableDb2Locales, std::vector< std::string > &errlist, StorageMap &stores, DB2StorageBase *storage, std::string const &db2Path, LocaleConstant defaultLocale, std::size_t cppRecordSize)
DB2Storage< MapDifficultyXConditionEntry > sMapDifficultyXConditionStore("MapDifficultyXCondition.db2", &MapDifficultyXConditionLoadInfo::Instance)
DB2Storage< BannedAddonsEntry > sBannedAddonsStore("BannedAddons.db2", &BannedAddonsLoadInfo::Instance)
std::tuple< uint16, uint8, int32 > WMOAreaTableKey
DB2Storage< ItemArmorQualityEntry > sItemArmorQualityStore("ItemArmorQuality.db2", &ItemArmorQualityLoadInfo::Instance)
DB2Storage< UnitConditionEntry > sUnitConditionStore("UnitCondition.db2", &UnitConditionLoadInfo::Instance)
DB2Storage< BattlemasterListXMapEntry > sBattlemasterListXMapStore("BattlemasterListXMap.db2", &BattlemasterListXMapLoadInfo::Instance)
std::unordered_map< uint32, std::vector< uint32 > > AreaGroupMemberContainer
DB2Storage< ItemDamageAmmoEntry > sItemDamageAmmoStore("ItemDamageAmmo.db2", &ItemDamageAmmoLoadInfo::Instance)
DB2Storage< ArtifactTierEntry > sArtifactTierStore("ArtifactTier.db2", &ArtifactTierLoadInfo::Instance)
std::unordered_map< uint32, std::vector< uint32 > > GlyphBindableSpellsContainer
DB2Storage< ItemModifiedAppearanceEntry > sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", &ItemModifiedAppearanceLoadInfo::Instance)
DB2Storage< MailTemplateEntry > sMailTemplateStore("MailTemplate.db2", &MailTemplateLoadInfo::Instance)
DB2Storage< EmotesEntry > sEmotesStore("Emotes.db2", &EmotesLoadInfo::Instance)
std::unordered_map< uint32, std::vector< ItemSetSpellEntry const * > > ItemSetSpellContainer
DB2Storage< ItemSetSpellEntry > sItemSetSpellStore("ItemSetSpell.db2", &ItemSetSpellLoadInfo::Instance)
DB2Storage< Cfg_RegionsEntry > sCfgRegionsStore("Cfg_Regions.db2", &CfgRegionsLoadInfo::Instance)
DB2Storage< UiMapEntry > sUiMapStore("UiMap.db2", &UiMapLoadInfo::Instance)
DB2Storage< SkillLineAbilityEntry > sSkillLineAbilityStore("SkillLineAbility.db2", &SkillLineAbilityLoadInfo::Instance)
DB2Storage< CurrencyContainerEntry > sCurrencyContainerStore("CurrencyContainer.db2", &CurrencyContainerLoadInfo::Instance)
DB2Storage< ItemDisenchantLootEntry > sItemDisenchantLootStore("ItemDisenchantLoot.db2", &ItemDisenchantLootLoadInfo::Instance)
DB2Storage< KeychainEntry > sKeychainStore("Keychain.db2", &KeychainLoadInfo::Instance)
std::unordered_map< uint32, std::pair< std::vector< QuestPackageItemEntry const * >, std::vector< QuestPackageItemEntry const * > > > QuestPackageItemContainer
DB2Storage< TraitEdgeEntry > sTraitEdgeStore("TraitEdge.db2", &TraitEdgeLoadInfo::Instance)
DB2Storage< AzeriteUnlockMappingEntry > sAzeriteUnlockMappingStore("AzeriteUnlockMapping.db2", &AzeriteUnlockMappingLoadInfo::Instance)
DB2Storage< AzeriteTierUnlockEntry > sAzeriteTierUnlockStore("AzeriteTierUnlock.db2", &AzeriteTierUnlockLoadInfo::Instance)
DB2Storage< SummonPropertiesEntry > sSummonPropertiesStore("SummonProperties.db2", &SummonPropertiesLoadInfo::Instance)
DB2Storage< SpellReagentsCurrencyEntry > sSpellReagentsCurrencyStore("SpellReagentsCurrency.db2", &SpellReagentsCurrencyLoadInfo::Instance)
DB2Storage< GuildPerkSpellsEntry > sGuildPerkSpellsStore("GuildPerkSpells.db2", &GuildPerkSpellsLoadInfo::Instance)
DB2Storage< TraitDefinitionEntry > sTraitDefinitionStore("TraitDefinition.db2", &TraitDefinitionLoadInfo::Instance)
DB2Storage< AzeriteLevelInfoEntry > sAzeriteLevelInfoStore("AzeriteLevelInfo.db2", &AzeriteLevelInfoLoadInfo::Instance)
DB2Storage< LFGDungeonsEntry > sLFGDungeonsStore("LFGDungeons.db2", &LfgDungeonsLoadInfo::Instance)
DB2Storage< TaxiPathNodeEntry > sTaxiPathNodeStore("TaxiPathNode.db2", &TaxiPathNodeLoadInfo::Instance)
DB2Storage< SpellFocusObjectEntry > sSpellFocusObjectStore("SpellFocusObject.db2", &SpellFocusObjectLoadInfo::Instance)
DB2Storage< TactKeyEntry > sTactKeyStore("TactKey.db2", &TactKeyLoadInfo::Instance)
DB2Storage< NamesReservedLocaleEntry > sNamesReservedLocaleStore("NamesReservedLocale.db2", &NamesReservedLocaleLoadInfo::Instance)
DB2Storage< ImportPriceQualityEntry > sImportPriceQualityStore("ImportPriceQuality.db2", &ImportPriceQualityLoadInfo::Instance)
DB2Storage< PvpTierEntry > sPvpTierStore("PvpTier.db2", &PvpTierLoadInfo::Instance)
DB2Storage< ItemContextPickerEntryEntry > sItemContextPickerEntryStore("ItemContextPickerEntry.db2", &ItemContextPickerEntryLoadInfo::Instance)
DB2Storage< MountXDisplayEntry > sMountXDisplayStore("MountXDisplay.db2", &MountXDisplayLoadInfo::Instance)
DB2Storage< NameGenEntry > sNameGenStore("NameGen.db2", &NameGenLoadInfo::Instance)
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", &BroadcastTextLoadInfo::Instance)
DB2Storage< SpellCastingRequirementsEntry > sSpellCastingRequirementsStore("SpellCastingRequirements.db2", &SpellCastingRequirementsLoadInfo::Instance)
std::unordered_map< uint32, std::vector< ItemLimitCategoryConditionEntry const * > > ItemLimitCategoryConditionContainer
DB2Storage< SpellEmpowerEntry > sSpellEmpowerStore("SpellEmpower.db2", &SpellEmpowerLoadInfo::Instance)
DB2Storage< MythicPlusSeasonEntry > sMythicPlusSeasonStore("MythicPlusSeason.db2", &MythicPlusSeasonLoadInfo::Instance)
DB2Storage< GameObjectArtKitEntry > sGameObjectArtKitStore("GameObjectArtKit.db2", &GameobjectArtKitLoadInfo::Instance)
DB2Storage< ItemLimitCategoryConditionEntry > sItemLimitCategoryConditionStore("ItemLimitCategoryCondition.db2", &ItemLimitCategoryConditionLoadInfo::Instance)
DB2Storage< ItemExtendedCostEntry > sItemExtendedCostStore("ItemExtendedCost.db2", &ItemExtendedCostLoadInfo::Instance)
DB2Storage< SpellEffectEntry > sSpellEffectStore("SpellEffect.db2", &SpellEffectLoadInfo::Instance)
DB2Storage< ContentTuningXLabelEntry > sContentTuningXLabelStore("ContentTuningXLabel.db2", &ContentTuningXLabelLoadInfo::Instance)
std::array< std::vector< Trinity::wregex >, TOTAL_LOCALES+1 > NameValidationRegexContainer
DB2Storage< GuildColorBackgroundEntry > sGuildColorBackgroundStore("GuildColorBackground.db2", &GuildColorBackgroundLoadInfo::Instance)
DB2Storage< PVPDifficultyEntry > sPVPDifficultyStore("PVPDifficulty.db2", &PvpDifficultyLoadInfo::Instance)
std::map< HotfixBlobKey, std::vector< uint8 > > HotfixBlobMap
DB2Storage< TraitNodeEntryXTraitCondEntry > sTraitNodeEntryXTraitCondStore("TraitNodeEntryXTraitCond.db2", &TraitNodeEntryXTraitCondLoadInfo::Instance)
DB2Storage< QuestV2Entry > sQuestV2Store("QuestV2.db2", &QuestV2LoadInfo::Instance)
DB2Storage< AzeriteEmpoweredItemEntry > sAzeriteEmpoweredItemStore("AzeriteEmpoweredItem.db2", &AzeriteEmpoweredItemLoadInfo::Instance)
DB2Storage< VignetteEntry > sVignetteStore("Vignette.db2", &VignetteLoadInfo::Instance)
DB2Storage< CurrencyTypesEntry > sCurrencyTypesStore("CurrencyTypes.db2", &CurrencyTypesLoadInfo::Instance)
DB2Storage< LanguagesEntry > sLanguagesStore("Languages.db2", &LanguagesLoadInfo::Instance)
DB2Storage< MapChallengeModeEntry > sMapChallengeModeStore("MapChallengeMode.db2", &MapChallengeModeLoadInfo::Instance)