aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/server/game/Chat/Commands/Level1.cpp4
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp4
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.h2
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp8
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp2
-rw-r--r--src/server/game/Entities/Vehicle/VehicleDefines.h2
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp640
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.h489
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp8
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.cpp8
-rw-r--r--src/server/game/Tools/PlayerDump.cpp26
11 files changed, 592 insertions, 601 deletions
diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp
index 57d5e8cfa94..cb42863ca73 100755
--- a/src/server/game/Chat/Commands/Level1.cpp
+++ b/src/server/game/Chat/Commands/Level1.cpp
@@ -558,8 +558,8 @@ bool ChatHandler::HandleLookupTeleCommand(const char * args)
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
bool limitReached = false;
- GameTeleMap const & teleMap = sObjectMgr->GetGameTeleMap();
- for (GameTeleMap::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
+ GameTeleContainer const & teleMap = sObjectMgr->GetGameTeleMap();
+ for (GameTeleContainer::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
{
GameTele const* tele = &itr->second;
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 6f380bb5d8a..88327a08eec 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -756,7 +756,7 @@ bool ConditionMgr::addToGossipMenus(Condition* cond)
if (pMenuBounds.first != pMenuBounds.second)
{
- for (GossipMenusMap::iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
+ for (GossipMenusContainer::iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
{
if ((*itr).second.entry == cond->mSourceGroup && (*itr).second.text_id == cond->mSourceEntry)
{
@@ -775,7 +775,7 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond)
GossipMenuItemsMapBoundsNonConst pMenuItemBounds = sObjectMgr->GetGossipMenuItemsMapBoundsNonConst(cond->mSourceGroup);
if (pMenuItemBounds.first != pMenuItemBounds.second)
{
- for (GossipMenuItemsMap::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
+ for (GossipMenuItemsContainer::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
{
if ((*itr).second.MenuId == cond->mSourceGroup && (*itr).second.OptionIndex == cond->mSourceEntry)
{
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index e622c48761c..1e360342852 100755
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -209,7 +209,7 @@ struct CreatureBaseStats
static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
};
-typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsMap;
+typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsContainer;
struct CreatureLocale
{
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 630551cfc2a..733c8426630 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14086,7 +14086,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
if (source->ToGameObject()->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
PrepareQuestMenu(source->GetGUID());
- for (GossipMenuItemsMap::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
+ for (GossipMenuItemsContainer::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
{
bool canTalk = true;
if (!sConditionMgr->IsObjectMeetToConditions(this, itr->second.Conditions))
@@ -14390,7 +14390,7 @@ uint32 Player::GetGossipTextId(uint32 menuId)
GossipMenusMapBounds menuBounds = sObjectMgr->GetGossipMenusMapBounds(menuId);
- for (GossipMenusMap::const_iterator itr = menuBounds.first; itr != menuBounds.second; ++itr)
+ for (GossipMenusContainer::const_iterator itr = menuBounds.first; itr != menuBounds.second; ++itr)
if (sConditionMgr->IsObjectMeetToConditions(this, itr->second.conditions))
textId = itr->second.text_id;
@@ -22384,7 +22384,7 @@ void Player::UpdateForQuestWorldObjects()
continue;
SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(obj->GetEntry());
- for (SpellClickInfoMap::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
+ for (SpellClickInfoContainer::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
if (_itr->second.questStart || _itr->second.questEnd)
{
obj->BuildCreateUpdateBlockForPlayer(&udata, this);
@@ -24161,7 +24161,7 @@ bool Player::canSeeSpellClickOn(Creature const* c) const
if (clickPair.first == clickPair.second)
return true;
- for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
+ for (SpellClickInfoContainer::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
if (itr->second.IsFitToRequirements(this, c))
return true;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 3859c8dcafe..29484f2695a 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -16853,7 +16853,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
bool success = false;
uint32 spellClickEntry = GetVehicleKit() ? GetVehicleKit()->GetCreatureEntry() : GetEntry();
SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(spellClickEntry);
- for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
+ for (SpellClickInfoContainer::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
{
if (itr->second.IsFitToRequirements(clicker, this))
{
diff --git a/src/server/game/Entities/Vehicle/VehicleDefines.h b/src/server/game/Entities/Vehicle/VehicleDefines.h
index 2b1d27243a8..c70ce0b9367 100644
--- a/src/server/game/Entities/Vehicle/VehicleDefines.h
+++ b/src/server/game/Entities/Vehicle/VehicleDefines.h
@@ -72,7 +72,7 @@ struct VehicleAccessory
};
typedef std::vector<VehicleAccessory> VehicleAccessoryList;
-typedef std::map<uint32, VehicleAccessoryList> VehicleAccessoryMap;
+typedef std::map<uint32, VehicleAccessoryList> VehicleAccessoryContainer;
typedef std::map<int8, VehicleSeat> SeatMap;
#endif
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 99dc7466db2..52b33cf1e6f 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -251,32 +251,32 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke
return true;
}
-ObjectMgr::ObjectMgr(): m_auctionid(1), m_equipmentSetGuid(1),
- m_ItemTextId(1), m_mailid(1), m_hiPetNumber(1), m_hiCharGuid(1),
- m_hiCreatureGuid(1), m_hiPetGuid(1), m_hiVehicleGuid(1), m_hiItemGuid(1),
- m_hiGoGuid(1), m_hiDoGuid(1), m_hiCorpseGuid(1), m_hiMoTransGuid(1)
+ObjectMgr::ObjectMgr(): _auctionId(1), _equipmentSetGuid(1),
+ _itemTextId(1), _mailId(1), _hiPetNumber(1), _hiCharGuid(1),
+ _hiCreatureGuid(1), _hiPetGuid(1), _hiVehicleGuid(1), _hiItemGuid(1),
+ _hiGoGuid(1), _hiDoGuid(1), _hiCorpseGuid(1), _hiMoTransGuid(1)
{}
ObjectMgr::~ObjectMgr()
{
- for (QuestMap::iterator i = mQuestTemplates.begin(); i != mQuestTemplates.end(); ++i)
+ for (QuestMap::iterator i = _questTemplates.begin(); i != _questTemplates.end(); ++i)
delete i->second;
- for (PetLevelInfoMap::iterator i = petInfo.begin(); i != petInfo.end(); ++i)
+ for (PetLevelInfoContainer::iterator i = _petInfoStore.begin(); i != _petInfoStore.end(); ++i)
delete[] i->second;
// free only if loaded
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
- delete[] playerClassInfo[class_].levelInfo;
+ delete[] _playerClassInfo[class_].levelInfo;
for (int race = 0; race < MAX_RACES; ++race)
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
- delete[] playerInfo[race][class_].levelInfo;
+ delete[] _playerInfo[race][class_].levelInfo;
- for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
+ for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr)
itr->second.Clear();
- m_mCacheTrainerSpellMap.clear();
+ _cacheTrainerSpellStore.clear();
}
void ObjectMgr::AddLocaleString(std::string const& s, LocaleConstant locale, StringVector& data)
@@ -294,7 +294,7 @@ void ObjectMgr::LoadCreatureLocales()
{
uint32 oldMSTime = getMSTime();
- mCreatureLocaleMap.clear(); // need for reload case
+ _creatureLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, name_loc1, subname_loc1, name_loc2, subname_loc2, name_loc3, subname_loc3, name_loc4, subname_loc4, name_loc5, subname_loc5, name_loc6, subname_loc6, name_loc7, subname_loc7, name_loc8, subname_loc8 FROM locales_creature");
@@ -307,7 +307,7 @@ void ObjectMgr::LoadCreatureLocales()
uint32 entry = fields[0].GetUInt32();
- CreatureLocale& data = mCreatureLocaleMap[entry];
+ CreatureLocale& data = _creatureLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -317,7 +317,7 @@ void ObjectMgr::LoadCreatureLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu creature locale strings in %u ms", (unsigned long)mCreatureLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -325,7 +325,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
{
uint32 oldMSTime = getMSTime();
- mGossipMenuItemsLocaleMap.clear(); // need for reload case
+ _gossipMenuItemsLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT menu_id, id, "
"option_text_loc1, box_text_loc1, option_text_loc2, box_text_loc2, "
@@ -344,7 +344,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
uint16 menuId = fields[0].GetUInt16();
uint16 id = fields[1].GetUInt16();
- GossipMenuItemsLocale& data = mGossipMenuItemsLocaleMap[MAKE_PAIR32(menuId, id)];
+ GossipMenuItemsLocale& data = _gossipMenuItemsLocaleStore[MAKE_PAIR32(menuId, id)];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -354,7 +354,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)mGossipMenuItemsLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -362,7 +362,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
{
uint32 oldMSTime = getMSTime();
- mPointOfInterestLocaleMap.clear(); // need for reload case
+ _pointOfInterestLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, icon_name_loc1, icon_name_loc2, icon_name_loc3, icon_name_loc4, icon_name_loc5, icon_name_loc6, icon_name_loc7, icon_name_loc8 FROM locales_points_of_interest");
@@ -375,13 +375,13 @@ void ObjectMgr::LoadPointOfInterestLocales()
uint32 entry = fields[0].GetUInt32();
- PointOfInterestLocale& data = mPointOfInterestLocaleMap[entry];
+ PointOfInterestLocale& data = _pointOfInterestLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.IconName);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)mPointOfInterestLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -422,7 +422,7 @@ void ObjectMgr::LoadCreatureTemplates()
uint32 entry = fields[0].GetUInt32();
- CreatureTemplate& creatureTemplate = CreatureTemplateStore[entry];
+ CreatureTemplate& creatureTemplate = _creatureTemplateStore[entry];
creatureTemplate.Entry = entry;
@@ -507,7 +507,7 @@ void ObjectMgr::LoadCreatureTemplates()
while (result->NextRow());
// Checking needs to be done after loading because of the difficulty self referencing
- for (CreatureTemplateContainer::const_iterator itr = CreatureTemplateStore.begin(); itr != CreatureTemplateStore.end(); ++itr)
+ for (CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.begin(); itr != _creatureTemplateStore.end(); ++itr)
CheckCreatureTemplate(&itr->second);
sLog->outString(">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -541,7 +541,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
continue;
}
- CreatureAddon& creatureAddon = CreatureTemplateAddonStore[entry];
+ CreatureAddon& creatureAddon = _creatureTemplateAddonStore[entry];
creatureAddon.path_id = fields[1].GetUInt32();
creatureAddon.mount = fields[2].GetUInt32();
@@ -607,20 +607,20 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
for (uint32 diff2 = 0; diff2 < MAX_DIFFICULTY - 1 && ok2; ++diff2)
{
ok2 = false;
- if (difficultyEntries[diff2].find(cInfo->Entry) != difficultyEntries[diff2].end())
+ if (_difficultyEntries[diff2].find(cInfo->Entry) != _difficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.",
cInfo->Entry, diff2 + 1, cInfo->DifficultyEntry[diff], diff + 1);
continue;
}
- if (difficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != difficultyEntries[diff2].end())
+ if (_difficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _difficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) already listed as `difficulty_entry_%u` for another entry.", cInfo->DifficultyEntry[diff], diff2 + 1);
continue;
}
- if (hasDifficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != hasDifficultyEntries[diff2].end())
+ if (_hasDifficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _hasDifficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u has itself a value in `difficulty_entry_%u`.",
cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff], cInfo->DifficultyEntry[diff], diff2 + 1);
@@ -682,8 +682,8 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
continue;
}
- hasDifficultyEntries[diff].insert(cInfo->Entry);
- difficultyEntries[diff].insert(cInfo->DifficultyEntry[diff]);
+ _hasDifficultyEntries[diff].insert(cInfo->Entry);
+ _difficultyEntries[diff].insert(cInfo->DifficultyEntry[diff]);
ok = true;
}
@@ -903,13 +903,13 @@ void ObjectMgr::LoadCreatureAddons()
uint32 guid = fields[0].GetUInt32();
- if (mCreatureDataMap.find(guid) == mCreatureDataMap.end())
+ if (_creatureDataStore.find(guid) == _creatureDataStore.end())
{
sLog->outErrorDb("Creature (GUID: %u) does not exist but has a record in `creature_addon`", guid);
continue;
}
- CreatureAddon& creatureAddon = CreatureAddonStore[guid];
+ CreatureAddon& creatureAddon = _creatureAddonStore[guid];
creatureAddon.path_id = fields[1].GetUInt32();
creatureAddon.mount = fields[2].GetUInt32();
@@ -953,8 +953,8 @@ void ObjectMgr::LoadCreatureAddons()
CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid)
{
- CreatureAddonContainer::const_iterator itr = CreatureAddonStore.find(lowguid);
- if (itr != CreatureAddonStore.end())
+ CreatureAddonContainer::const_iterator itr = _creatureAddonStore.find(lowguid);
+ if (itr != _creatureAddonStore.end())
return &(itr->second);
return NULL;
@@ -962,8 +962,8 @@ CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid)
CreatureAddon const* ObjectMgr::GetCreatureTemplateAddon(uint32 entry)
{
- CreatureAddonContainer::const_iterator itr = CreatureTemplateAddonStore.find(entry);
- if (itr != CreatureTemplateAddonStore.end())
+ CreatureAddonContainer::const_iterator itr = _creatureTemplateAddonStore.find(entry);
+ if (itr != _creatureTemplateAddonStore.end())
return &(itr->second);
return NULL;
@@ -971,8 +971,8 @@ CreatureAddon const* ObjectMgr::GetCreatureTemplateAddon(uint32 entry)
EquipmentInfo const* ObjectMgr::GetEquipmentInfo(uint32 entry)
{
- EquipmentInfoContainer::const_iterator itr = EquipmentInfoStore.find(entry);
- if (itr != EquipmentInfoStore.end())
+ EquipmentInfoContainer::const_iterator itr = _equipmentInfoStore.find(entry);
+ if (itr != _equipmentInfoStore.end())
return &(itr->second);
return NULL;
@@ -998,7 +998,7 @@ void ObjectMgr::LoadEquipmentTemplates()
uint16 entry = fields[0].GetUInt16();
- EquipmentInfo& equipmentInfo = EquipmentInfoStore[entry];
+ EquipmentInfo& equipmentInfo = _equipmentInfoStore[entry];
equipmentInfo.ItemEntry[0] = fields[1].GetUInt32();
equipmentInfo.ItemEntry[1] = fields[2].GetUInt32();
@@ -1045,8 +1045,8 @@ void ObjectMgr::LoadEquipmentTemplates()
CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId)
{
- CreatureModelContainer::const_iterator itr = CreatureModelStore.find(modelId);
- if (itr != CreatureModelStore.end())
+ CreatureModelContainer::const_iterator itr = _creatureModelStore.find(modelId);
+ if (itr != _creatureModelStore.end())
return &(itr->second);
return NULL;
@@ -1130,7 +1130,7 @@ void ObjectMgr::LoadCreatureModelInfo()
uint32 modelId = fields[0].GetUInt32();
- CreatureModelInfo& modelInfo = CreatureModelStore[modelId];
+ CreatureModelInfo& modelInfo = _creatureModelStore[modelId];
modelInfo.bounding_radius = fields[1].GetFloat();
modelInfo.combat_reach = fields[2].GetFloat();
@@ -1171,7 +1171,7 @@ void ObjectMgr::LoadLinkedRespawn()
{
uint32 oldMSTime = getMSTime();
- mLinkedRespawnMap.clear();
+ _linkedRespawnStore.clear();
QueryResult result = WorldDatabase.Query("SELECT guid, linkedGuid, linkType FROM linked_respawn ORDER BY guid ASC");
if (!result)
@@ -1344,12 +1344,12 @@ void ObjectMgr::LoadLinkedRespawn()
}
if (!error)
- mLinkedRespawnMap[guid] = linkedGuid;
+ _linkedRespawnStore[guid] = linkedGuid;
}
while (result->NextRow());
- sLog->outString(">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(mLinkedRespawnMap.size()), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1363,7 +1363,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
if (!linkedGuidLow) // we're removing the linking
{
- mLinkedRespawnMap.erase(guid);
+ _linkedRespawnStore.erase(guid);
PreparedStatement *stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CRELINKED_RESPAWN);
stmt->setUInt32(0, guidLow);
WorldDatabase.Execute(stmt);
@@ -1387,7 +1387,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
uint64 linkedGuid = MAKE_NEW_GUID(linkedGuidLow, slave->id, HIGHGUID_UNIT);
- mLinkedRespawnMap[guid] = linkedGuid;
+ _linkedRespawnStore[guid] = linkedGuid;
PreparedStatement *stmt = WorldDatabase.GetPreparedStatement(WORLD_REP_CREATURE_LINKED_RESPAWN);
stmt->setUInt32(0, guidLow);
stmt->setUInt32(1, linkedGuidLow);
@@ -1437,7 +1437,7 @@ void ObjectMgr::LoadCreatures()
continue;
}
- CreatureData& data = mCreatureDataMap[guid];
+ CreatureData& data = _creatureDataStore[guid];
data.id = entry;
data.mapid = fields[ 2].GetUInt32();
@@ -1474,7 +1474,7 @@ void ObjectMgr::LoadCreatures()
bool ok = true;
for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1 && ok; ++diff)
{
- if (difficultyEntries[diff].find(data.id) != difficultyEntries[diff].end())
+ if (_difficultyEntries[diff].find(data.id) != _difficultyEntries[diff].end())
{
sLog->outErrorDb("Table `creature` have creature (GUID: %u) that listed as difficulty %u template (entry: %u) in `creature_template`, skipped.",
guid, diff + 1, data.id);
@@ -1548,7 +1548,7 @@ void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.creatures.insert(guid);
}
}
@@ -1562,7 +1562,7 @@ void ObjectMgr::RemoveCreatureFromGrid(uint32 guid, CreatureData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.creatures.erase(guid);
}
}
@@ -1765,7 +1765,7 @@ void ObjectMgr::LoadGameobjects()
continue;
}
- GameObjectData& data = mGameObjectDataMap[guid];
+ GameObjectData& data = _gameObjectDataStore[guid];
data.id = entry;
data.mapid = fields[ 2].GetUInt32();
@@ -1841,7 +1841,7 @@ void ObjectMgr::LoadGameobjects()
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gameobjects in %u ms", (unsigned long)mGameObjectDataMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1853,7 +1853,7 @@ void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.gameobjects.insert(guid);
}
}
@@ -1867,7 +1867,7 @@ void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.gameobjects.erase(guid);
}
}
@@ -1895,12 +1895,12 @@ void ObjectMgr::LoadCreatureRespawnTimes()
uint32 respawn_time = fields[1].GetUInt32();
uint32 instance = fields[2].GetUInt32();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
++count;
} while (result->NextRow());
- sLog->outString(">> Loaded %lu creature respawn times in %u ms", (unsigned long)mCreatureRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu creature respawn times in %u ms", (unsigned long)_creatureRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1929,13 +1929,13 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
uint32 respawn_time = fields[1].GetUInt32();
uint32 instance = fields[2].GetUInt32();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
++count;
} while (result->NextRow());
sLog->outString();
- sLog->outString(">> Loaded %lu gameobject respawn times in %u ms", (unsigned long)mGORespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobject respawn times in %u ms", (unsigned long)_goRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
}
Player* ObjectMgr::GetPlayerByLowGUID(uint32 lowguid) const
@@ -2032,7 +2032,7 @@ void ObjectMgr::LoadItemLocales()
{
uint32 oldMSTime = getMSTime();
- mItemLocaleMap.clear(); // need for reload case
+ _itemLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, name_loc1, description_loc1, name_loc2, description_loc2, name_loc3, description_loc3, name_loc4, description_loc4, name_loc5, description_loc5, name_loc6, description_loc6, name_loc7, description_loc7, name_loc8, description_loc8 FROM locales_item");
@@ -2045,7 +2045,7 @@ void ObjectMgr::LoadItemLocales()
uint32 entry = fields[0].GetUInt32();
- ItemLocale& data = mItemLocaleMap[entry];
+ ItemLocale& data = _itemLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -2055,7 +2055,7 @@ void ObjectMgr::LoadItemLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu Item locale strings in %u ms", (unsigned long)mItemLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -2112,7 +2112,7 @@ void ObjectMgr::LoadItemTemplates()
uint32 entry = fields[0].GetUInt32();
- ItemTemplate& itemTemplate = ItemTemplateStore[entry];
+ ItemTemplate& itemTemplate = _itemTemplateStore[entry];
itemTemplate.ItemId = entry;
itemTemplate.Class = uint32(fields[1].GetUInt8());
@@ -2658,8 +2658,8 @@ void ObjectMgr::LoadItemTemplates()
ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry)
{
- ItemTemplateContainer::const_iterator itr = ItemTemplateStore.find(entry);
- if (itr != ItemTemplateStore.end())
+ ItemTemplateContainer::const_iterator itr = _itemTemplateStore.find(entry);
+ if (itr != _itemTemplateStore.end())
return &(itr->second);
return NULL;
@@ -2669,7 +2669,7 @@ void ObjectMgr::LoadItemSetNameLocales()
{
uint32 oldMSTime = getMSTime();
- mItemSetNameLocaleMap.clear(); // need for reload case
+ _itemSetNameLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT `entry`, `name_loc1`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc5`, `name_loc6`, `name_loc7`, `name_loc8` FROM `locales_item_set_names`");
@@ -2682,13 +2682,13 @@ void ObjectMgr::LoadItemSetNameLocales()
uint32 entry = fields[0].GetUInt32();
- ItemSetNameLocale& data = mItemSetNameLocaleMap[entry];
+ ItemSetNameLocale& data = _itemSetNameLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
} while (result->NextRow());
- sLog->outString(">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(mItemSetNameLocaleMap.size()), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -2696,7 +2696,7 @@ void ObjectMgr::LoadItemSetNames()
{
uint32 oldMSTime = getMSTime();
- mItemSetNameMap.clear(); // needed for reload case
+ _itemSetNameStore.clear(); // needed for reload case
std::set<uint32> itemSetItems;
@@ -2734,7 +2734,7 @@ void ObjectMgr::LoadItemSetNames()
continue;
}
- ItemSetNameEntry &data = mItemSetNameMap[entry];
+ ItemSetNameEntry &data = _itemSetNameStore[entry];
data.name = fields[1].GetString();
uint32 invType = fields[2].GetUInt32();
@@ -2760,7 +2760,7 @@ void ObjectMgr::LoadItemSetNames()
if (pProto)
{
sLog->outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry);
- ItemSetNameEntry &data = mItemSetNameMap[entry];
+ ItemSetNameEntry &data = _itemSetNameStore[entry];
data.name = pProto->Name1;
data.InventoryType = pProto->InventoryType;
++count;
@@ -2778,7 +2778,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
{
uint32 oldMSTime = getMSTime();
- m_VehicleTemplateAccessoryMap.clear(); // needed for reload case
+ _vehicleTemplateAccessoryStore.clear(); // needed for reload case
uint32 count = 0;
@@ -2814,13 +2814,13 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
continue;
}
- if (mSpellClickInfoMap.find(uiEntry) == mSpellClickInfoMap.end())
+ if (_spellClickInfoStore.find(uiEntry) == _spellClickInfoStore.end())
{
sLog->outErrorDb("Table `vehicle_template_accessory`: creature template entry %u has no data in npc_spellclick_spells", uiEntry);
continue;
}
- m_VehicleTemplateAccessoryMap[uiEntry].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
+ _vehicleTemplateAccessoryStore[uiEntry].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
++count;
}
@@ -2834,7 +2834,7 @@ void ObjectMgr::LoadVehicleAccessories()
{
uint32 oldMSTime = getMSTime();
- m_VehicleAccessoryMap.clear(); // needed for reload case
+ _vehicleAccessoryStore.clear(); // needed for reload case
uint32 count = 0;
@@ -2864,7 +2864,7 @@ void ObjectMgr::LoadVehicleAccessories()
continue;
}
- m_VehicleAccessoryMap[uiGUID].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
+ _vehicleAccessoryStore[uiGUID].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
++count;
}
@@ -2919,7 +2919,7 @@ void ObjectMgr::LoadPetLevelInfo()
continue;
}
- PetLevelInfo*& pInfoMapEntry = petInfo[creature_id];
+ PetLevelInfo*& pInfoMapEntry = _petInfoStore[creature_id];
if (pInfoMapEntry == NULL)
pInfoMapEntry = new PetLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -2941,7 +2941,7 @@ void ObjectMgr::LoadPetLevelInfo()
while (result->NextRow());
// Fill gaps and check integrity
- for (PetLevelInfoMap::iterator itr = petInfo.begin(); itr != petInfo.end(); ++itr)
+ for (PetLevelInfoContainer::iterator itr = _petInfoStore.begin(); itr != _petInfoStore.end(); ++itr)
{
PetLevelInfo* pInfo = itr->second;
@@ -2972,8 +2972,8 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
- PetLevelInfoMap::const_iterator itr = petInfo.find(creature_id);
- if (itr == petInfo.end())
+ PetLevelInfoContainer::const_iterator itr = _petInfoStore.find(creature_id);
+ if (itr == _petInfoStore.end())
return NULL;
return &itr->second[level-1]; // data for level 1 stored in [0] array element, ...
@@ -2982,7 +2982,7 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count)
{
if (count > 0)
- playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
+ _playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
else
{
if (count < -1)
@@ -3089,7 +3089,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
pInfo->mapId = mapId;
pInfo->areaId = areaId;
@@ -3228,10 +3228,10 @@ void ObjectMgr::LoadPlayerInfo()
uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
for (uint32 r = min_race; r < max_race; ++r)
for (uint32 c = min_class; c < max_class; ++c)
- playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
+ _playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
}
else
- playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
+ _playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
++count;
}
@@ -3277,7 +3277,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
pInfo->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt8(), fields[3].GetUInt32(), fields[4].GetUInt8()));
++count;
@@ -3325,7 +3325,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerClassInfo* pClassInfo = &playerClassInfo[current_class];
+ PlayerClassInfo* pClassInfo = &_playerClassInfo[current_class];
if (!pClassInfo->levelInfo)
pClassInfo->levelInfo = new PlayerClassLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -3346,7 +3346,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!sChrClassesStore.LookupEntry(class_))
continue;
- PlayerClassInfo* pClassInfo = &playerClassInfo[class_];
+ PlayerClassInfo* pClassInfo = &_playerClassInfo[class_];
// fatal error if no level 1 data
if (!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0)
@@ -3418,7 +3418,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
if (!pInfo->levelInfo)
pInfo->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -3447,7 +3447,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!sChrClassesStore.LookupEntry(class_))
continue;
- PlayerInfo* pInfo = &playerInfo[race][class_];
+ PlayerInfo* pInfo = &_playerInfo[race][class_];
// skip non loaded combinations
if (!pInfo->displayId_m || !pInfo->displayId_f)
@@ -3489,9 +3489,9 @@ void ObjectMgr::LoadPlayerInfo()
{
uint32 oldMSTime = getMSTime();
- mPlayerXPperLevel.resize(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
+ _playerXPperLevel.resize(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
for (uint8 level = 0; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
- mPlayerXPperLevel[level] = 0;
+ _playerXPperLevel[level] = 0;
// 0 1
QueryResult result = WorldDatabase.Query("SELECT lvl, xp_for_next_level FROM player_xp_for_level");
@@ -3524,7 +3524,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
//PlayerXPperLevel
- mPlayerXPperLevel[current_level] = current_xp;
+ _playerXPperLevel[current_level] = current_xp;
++count;
}
while (result->NextRow());
@@ -3532,10 +3532,10 @@ void ObjectMgr::LoadPlayerInfo()
// fill level gaps
for (uint8 level = 1; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
{
- if (mPlayerXPperLevel[level] == 0)
+ if (_playerXPperLevel[level] == 0)
{
sLog->outErrorDb("Level %i does not have XP for level data. Using data of level [%i] + 100.", level+1, level);
- mPlayerXPperLevel[level] = mPlayerXPperLevel[level-1]+100;
+ _playerXPperLevel[level] = _playerXPperLevel[level-1]+100;
}
}
@@ -3549,7 +3549,7 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassL
if (level < 1 || class_ >= MAX_CLASSES)
return;
- PlayerClassInfo const* pInfo = &playerClassInfo[class_];
+ PlayerClassInfo const* pInfo = &_playerClassInfo[class_];
if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
@@ -3562,7 +3562,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES)
return;
- PlayerInfo const* pInfo = &playerInfo[race][class_];
+ PlayerInfo const* pInfo = &_playerInfo[race][class_];
if (pInfo->displayId_m == 0 || pInfo->displayId_f == 0)
return;
@@ -3575,7 +3575,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, PlayerLevelInfo* info) const
{
// base data (last known level)
- *info = playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
+ *info = _playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
// if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32
for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl)
@@ -3653,9 +3653,9 @@ void ObjectMgr::LoadQuests()
uint32 oldMSTime = getMSTime();
// For reload case
- for (QuestMap::const_iterator itr=mQuestTemplates.begin(); itr != mQuestTemplates.end(); ++itr)
+ for (QuestMap::const_iterator itr=_questTemplates.begin(); itr != _questTemplates.end(); ++itr)
delete itr->second;
- mQuestTemplates.clear();
+ _questTemplates.clear();
mExclusiveQuestGroups.clear();
@@ -3710,13 +3710,13 @@ void ObjectMgr::LoadQuests()
Field* fields = result->Fetch();
Quest * newQuest = new Quest(fields);
- mQuestTemplates[newQuest->GetQuestId()] = newQuest;
+ _questTemplates[newQuest->GetQuestId()] = newQuest;
} while (result->NextRow());
std::map<uint32, uint32> usedMailTemplates;
// Post processing
- for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); ++iter)
+ for (QuestMap::iterator iter = _questTemplates.begin(); iter != _questTemplates.end(); ++iter)
{
// skip post-loading checks for disabled quests
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, iter->first, NULL))
@@ -4252,8 +4252,8 @@ void ObjectMgr::LoadQuests()
if (qinfo->NextQuestIdChain)
{
- QuestMap::iterator qNextItr = mQuestTemplates.find(qinfo->NextQuestIdChain);
- if (qNextItr == mQuestTemplates.end())
+ QuestMap::iterator qNextItr = _questTemplates.find(qinfo->NextQuestIdChain);
+ if (qNextItr == _questTemplates.end())
{
sLog->outErrorDb("Quest %u has `NextQuestIdChain` = %u but quest %u does not exist, quest chain will not work.",
qinfo->GetQuestId(), qinfo->NextQuestIdChain, qinfo->NextQuestIdChain);
@@ -4266,7 +4266,7 @@ void ObjectMgr::LoadQuests()
// fill additional data stores
if (qinfo->PrevQuestId)
{
- if (mQuestTemplates.find(abs(qinfo->GetPrevQuestId())) == mQuestTemplates.end())
+ if (_questTemplates.find(abs(qinfo->GetPrevQuestId())) == _questTemplates.end())
{
sLog->outErrorDb("Quest %d has PrevQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetPrevQuestId());
}
@@ -4278,8 +4278,8 @@ void ObjectMgr::LoadQuests()
if (qinfo->NextQuestId)
{
- QuestMap::iterator qNextItr = mQuestTemplates.find(abs(qinfo->GetNextQuestId()));
- if (qNextItr == mQuestTemplates.end())
+ QuestMap::iterator qNextItr = _questTemplates.find(abs(qinfo->GetNextQuestId()));
+ if (qNextItr == _questTemplates.end())
{
sLog->outErrorDb("Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
}
@@ -4328,7 +4328,7 @@ void ObjectMgr::LoadQuests()
}
}
- sLog->outString(">> Loaded %lu quests definitions in %u ms", (unsigned long)mQuestTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -4336,7 +4336,7 @@ void ObjectMgr::LoadQuestLocales()
{
uint32 oldMSTime = getMSTime();
- mQuestLocaleMap.clear(); // need for reload case
+ _questLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"Title_loc1, Details_loc1, Objectives_loc1, OfferRewardText_loc1, RequestItemsText_loc1, EndText_loc1, CompletedText_loc1, ObjectiveText1_loc1, ObjectiveText2_loc1, ObjectiveText3_loc1, ObjectiveText4_loc1, "
@@ -4358,7 +4358,7 @@ void ObjectMgr::LoadQuestLocales()
uint32 entry = fields[0].GetUInt32();
- QuestLocale& data = mQuestLocaleMap[entry];
+ QuestLocale& data = _questLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -4377,7 +4377,7 @@ void ObjectMgr::LoadQuestLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu Quest locale strings in %u ms", (unsigned long)mQuestLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -4837,7 +4837,7 @@ void ObjectMgr::LoadSpellScriptNames()
{
uint32 oldMSTime = getMSTime();
- mSpellScripts.clear(); // need for reload case
+ _spellScriptsStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT spell_id, ScriptName FROM spell_script_names");
@@ -4881,12 +4881,12 @@ void ObjectMgr::LoadSpellScriptNames()
}
while (spellInfo)
{
- mSpellScripts.insert(SpellScriptsMap::value_type(spellInfo->Id, GetScriptId(scriptName)));
+ _spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, GetScriptId(scriptName)));
spellInfo = sSpellMgr->GetSpellInfo(spellInfo->Id)->GetNextRankSpell();
}
}
else
- mSpellScripts.insert(SpellScriptsMap::value_type(spellInfo->Id, GetScriptId(scriptName)));
+ _spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, GetScriptId(scriptName)));
++count;
}
while (result->NextRow());
@@ -4899,7 +4899,7 @@ void ObjectMgr::ValidateSpellScripts()
{
uint32 oldMSTime = getMSTime();
- if (mSpellScripts.empty())
+ if (_spellScriptsStore.empty())
{
sLog->outString(">> Validated 0 scripts.");
sLog->outString();
@@ -4908,14 +4908,14 @@ void ObjectMgr::ValidateSpellScripts()
uint32 count = 0;
- for (SpellScriptsMap::iterator itr = mSpellScripts.begin(); itr != mSpellScripts.end();)
+ for (SpellScriptsContainer::iterator itr = _spellScriptsStore.begin(); itr != _spellScriptsStore.end();)
{
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(itr->first);
- std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> > SpellScriptLoaders;
+ std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::iterator> > SpellScriptLoaders;
sScriptMgr->CreateSpellScriptLoaders(itr->first, SpellScriptLoaders);
- itr = mSpellScripts.upper_bound(itr->first);
+ itr = _spellScriptsStore.upper_bound(itr->first);
- for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr)
+ for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr)
{
SpellScript* spellScript = sitr->first->GetSpellScript();
AuraScript* auraScript = sitr->first->GetAuraScript();
@@ -4943,7 +4943,7 @@ void ObjectMgr::ValidateSpellScripts()
}
if (!valid)
{
- mSpellScripts.erase(sitr->second);
+ _spellScriptsStore.erase(sitr->second);
}
}
++count;
@@ -4971,7 +4971,7 @@ void ObjectMgr::LoadPageTexts()
{
Field* fields = result->Fetch();
- PageText& pageText = PageTextStore[fields[0].GetUInt32()];
+ PageText& pageText = _pageTextStore[fields[0].GetUInt32()];
pageText.Text = fields[1].GetString();
pageText.NextPage = fields[2].GetInt16();
@@ -4980,12 +4980,12 @@ void ObjectMgr::LoadPageTexts()
}
while (result->NextRow());
- for (PageTextContainer::const_iterator itr = PageTextStore.begin(); itr != PageTextStore.end(); ++itr)
+ for (PageTextContainer::const_iterator itr = _pageTextStore.begin(); itr != _pageTextStore.end(); ++itr)
{
if (itr->second.NextPage)
{
- PageTextContainer::const_iterator itr2 = PageTextStore.find(itr->second.NextPage);
- if (itr2 == PageTextStore.end())
+ PageTextContainer::const_iterator itr2 = _pageTextStore.find(itr->second.NextPage);
+ if (itr2 == _pageTextStore.end())
sLog->outErrorDb("Page text (Id: %u) has not existing next page (Id: %u)", itr->first, itr->second.NextPage);
}
@@ -4997,8 +4997,8 @@ void ObjectMgr::LoadPageTexts()
PageText const* ObjectMgr::GetPageText(uint32 pageEntry)
{
- PageTextContainer::const_iterator itr = PageTextStore.find(pageEntry);
- if (itr != PageTextStore.end())
+ PageTextContainer::const_iterator itr = _pageTextStore.find(pageEntry);
+ if (itr != _pageTextStore.end())
return &(itr->second);
return NULL;
@@ -5008,7 +5008,7 @@ void ObjectMgr::LoadPageTextLocales()
{
uint32 oldMSTime = getMSTime();
- mPageTextLocaleMap.clear(); // need for reload case
+ _pageTextLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, text_loc1, text_loc2, text_loc3, text_loc4, text_loc5, text_loc6, text_loc7, text_loc8 FROM locales_page_text");
@@ -5021,13 +5021,13 @@ void ObjectMgr::LoadPageTextLocales()
uint32 entry = fields[0].GetUInt32();
- PageTextLocale& data = mPageTextLocaleMap[entry];
+ PageTextLocale& data = _pageTextLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Text);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu PageText locale strings in %u ms", (unsigned long)mPageTextLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -5063,7 +5063,7 @@ void ObjectMgr::LoadInstanceTemplate()
instanceTemplate.Parent = uint32(fields[1].GetUInt16());
instanceTemplate.ScriptId = sObjectMgr->GetScriptId(fields[2].GetCString());
- InstanceTemplateStore[mapID] = instanceTemplate;
+ _instanceTemplateStore[mapID] = instanceTemplate;
++count;
}
@@ -5075,8 +5075,8 @@ void ObjectMgr::LoadInstanceTemplate()
InstanceTemplate const* ObjectMgr::GetInstanceTemplate(uint32 mapID)
{
- InstanceTemplateContainer::const_iterator itr = InstanceTemplateStore.find(uint16(mapID));
- if (itr != InstanceTemplateStore.end())
+ InstanceTemplateContainer::const_iterator itr = _instanceTemplateStore.find(uint16(mapID));
+ if (itr != _instanceTemplateStore.end())
return &(itr->second);
return NULL;
@@ -5153,7 +5153,7 @@ void ObjectMgr::LoadInstanceEncounters()
continue;
}
- DungeonEncounterList& encounters = mDungeonEncounters[MAKE_PAIR32(dungeonEncounter->mapId, dungeonEncounter->difficulty)];
+ DungeonEncounterList& encounters = _dungeonEncounterStore[MAKE_PAIR32(dungeonEncounter->mapId, dungeonEncounter->difficulty)];
encounters.push_back(new DungeonEncounter(dungeonEncounter, EncounterCreditType(creditType), creditEntry, lastEncounterDungeon));
++count;
} while (result->NextRow());
@@ -5164,8 +5164,8 @@ void ObjectMgr::LoadInstanceEncounters()
GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const
{
- GossipTextMap::const_iterator itr = mGossipText.find(Text_ID);
- if (itr != mGossipText.end())
+ GossipTextContainer::const_iterator itr = _gossipTextStore.find(Text_ID);
+ if (itr != _gossipTextStore.end())
return &itr->second;
return NULL;
}
@@ -5201,7 +5201,7 @@ void ObjectMgr::LoadGossipText()
continue;
}
- GossipText& gText = mGossipText[Text_ID];
+ GossipText& gText = _gossipTextStore[Text_ID];
for (int i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; i++)
{
@@ -5227,7 +5227,7 @@ void ObjectMgr::LoadNpcTextLocales()
{
uint32 oldMSTime = getMSTime();
- mNpcTextLocaleMap.clear(); // need for reload case
+ _npcTextLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"Text0_0_loc1, Text0_1_loc1, Text1_0_loc1, Text1_1_loc1, Text2_0_loc1, Text2_1_loc1, Text3_0_loc1, Text3_1_loc1, Text4_0_loc1, Text4_1_loc1, Text5_0_loc1, Text5_1_loc1, Text6_0_loc1, Text6_1_loc1, Text7_0_loc1, Text7_1_loc1, "
@@ -5249,7 +5249,7 @@ void ObjectMgr::LoadNpcTextLocales()
uint32 entry = fields[0].GetUInt32();
- NpcTextLocale& data = mNpcTextLocaleMap[entry];
+ NpcTextLocale& data = _npcTextLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -5262,7 +5262,7 @@ void ObjectMgr::LoadNpcTextLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)mNpcTextLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -5401,7 +5401,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
{
uint32 oldMSTime = getMSTime();
- mQuestAreaTriggerMap.clear(); // need for reload case
+ _questAreaTriggerStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id, quest FROM areatrigger_involvedrelation");
@@ -5448,7 +5448,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
// continue; - quest modified to required objective and trigger can be allowed.
}
- mQuestAreaTriggerMap[trigger_ID] = quest_ID;
+ _questAreaTriggerStore[trigger_ID] = quest_ID;
} while (result->NextRow());
@@ -5460,7 +5460,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
{
uint32 oldMSTime = getMSTime();
- mTavernAreaTriggerSet.clear(); // need for reload case
+ _tavernAreaTriggerStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id FROM areatrigger_tavern");
@@ -5488,7 +5488,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
continue;
}
- mTavernAreaTriggerSet.insert(Trigger_ID);
+ _tavernAreaTriggerStore.insert(Trigger_ID);
} while (result->NextRow());
sLog->outString(">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -5499,7 +5499,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
{
uint32 oldMSTime = getMSTime();
- mAreaTriggerScripts.clear(); // need for reload case
+ _areaTriggerScriptStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, ScriptName FROM areatrigger_scripts");
if (!result)
@@ -5526,7 +5526,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
sLog->outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
continue;
}
- mAreaTriggerScripts[Trigger_ID] = GetScriptId(scriptName);
+ _areaTriggerScriptStore[Trigger_ID] = GetScriptId(scriptName);
} while (result->NextRow());
sLog->outString(">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -5641,7 +5641,7 @@ void ObjectMgr::LoadGraveyardZones()
{
uint32 oldMSTime = getMSTime();
- mGraveYardMap.clear(); // need for reload case
+ GraveYardStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id, ghost_zone, faction FROM game_graveyard_zone");
@@ -5734,8 +5734,8 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
// then check faction
// if mapId != graveyard.mapId (ghost in instance) and search any graveyard associated
// then check faction
- GraveYardMap::const_iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::const_iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::const_iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::const_iterator graveUp = GraveYardStore.upper_bound(zoneId);
MapEntry const* map = sMapStore.LookupEntry(MapId);
// not need to check validity of map object; MapId _MUST_ be valid here
@@ -5760,7 +5760,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
MapEntry const* mapEntry = sMapStore.LookupEntry(MapId);
- for (GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
+ for (GraveYardContainer::const_iterator itr = graveLow; itr != graveUp; ++itr)
{
GraveYardData const& data = itr->second;
@@ -5840,10 +5840,10 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
GraveYardData const* ObjectMgr::FindGraveYardData(uint32 id, uint32 zoneId)
{
- GraveYardMap::const_iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::const_iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::const_iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::const_iterator graveUp = GraveYardStore.upper_bound(zoneId);
- for (GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
+ for (GraveYardContainer::const_iterator itr = graveLow; itr != graveUp; ++itr)
{
if (itr->second.safeLocId == id)
return &itr->second;
@@ -5862,7 +5862,7 @@ bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool per
data.safeLocId = id;
data.team = team;
- mGraveYardMap.insert(GraveYardMap::value_type(zoneId, data));
+ GraveYardStore.insert(GraveYardContainer::value_type(zoneId, data));
// add link to DB
if (persist)
@@ -5881,8 +5881,8 @@ bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool per
void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool persist /*= false*/)
{
- GraveYardMap::iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::iterator graveUp = GraveYardStore.upper_bound(zoneId);
if (graveLow == graveUp)
{
//sLog->outErrorDb("Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team);
@@ -5891,7 +5891,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
bool found = false;
- GraveYardMap::iterator itr;
+ GraveYardContainer::iterator itr;
for (itr = graveLow; itr != graveUp; ++itr)
{
@@ -5915,7 +5915,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
return;
// remove from links
- mGraveYardMap.erase(itr);
+ GraveYardStore.erase(itr);
// remove link from DB
if (persist)
@@ -5936,7 +5936,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
{
uint32 oldMSTime = getMSTime();
- mAreaTriggers.clear(); // need for reload case
+ _areaTriggerStore.clear(); // need for reload case
// 0 1 2 3 4 5
QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
@@ -5985,7 +5985,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
continue;
}
- mAreaTriggers[Trigger_ID] = at;
+ _areaTriggerStore[Trigger_ID] = at;
} while (result->NextRow());
@@ -5997,7 +5997,7 @@ void ObjectMgr::LoadAccessRequirements()
{
uint32 oldMSTime = getMSTime();
- mAccessRequirements.clear(); // need for reload case
+ _accessRequirementStore.clear(); // need for reload case
// 0 1 2 3 4 5 6 7 8 9
QueryResult result = WorldDatabase.Query("SELECT mapid, difficulty, level_min, level_max, item, item2, quest_done_A, quest_done_H, completed_achievement, quest_failed_text FROM access_requirement");
@@ -6078,7 +6078,7 @@ void ObjectMgr::LoadAccessRequirements()
}
}
- mAccessRequirements[requirement_ID] = ar;
+ _accessRequirementStore[requirement_ID] = ar;
} while (result->NextRow());
sLog->outString(">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -6108,7 +6108,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
}
uint32 entrance_map = uint32(mapEntry->entrance_map);
- for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
+ for (AreaTriggerContainer::const_iterator itr = _areaTriggerStore.begin(); itr != _areaTriggerStore.end(); ++itr)
if ((!useParentDbValue && itr->second.target_mapId == entrance_map) || (useParentDbValue && itr->second.target_mapId == parentId))
{
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first);
@@ -6123,7 +6123,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
*/
AreaTrigger const* ObjectMgr::GetMapEntranceTrigger(uint32 Map) const
{
- for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
+ for (AreaTriggerContainer::const_iterator itr = _areaTriggerStore.begin(); itr != _areaTriggerStore.end(); ++itr)
{
if (itr->second.target_mapId == Map)
{
@@ -6139,41 +6139,41 @@ void ObjectMgr::SetHighestGuids()
{
QueryResult result = CharacterDatabase.Query("SELECT MAX(guid) FROM characters");
if (result)
- m_hiCharGuid = (*result)[0].GetUInt32()+1;
+ _hiCharGuid = (*result)[0].GetUInt32()+1;
result = WorldDatabase.Query("SELECT MAX(guid) FROM creature");
if (result)
- m_hiCreatureGuid = (*result)[0].GetUInt32()+1;
+ _hiCreatureGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(guid) FROM item_instance");
if (result)
- m_hiItemGuid = (*result)[0].GetUInt32()+1;
+ _hiItemGuid = (*result)[0].GetUInt32()+1;
- // Cleanup other tables from not existed guids ( >= m_hiItemGuid)
- CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '%u'", m_hiItemGuid); // One-time query
+ // Cleanup other tables from not existed guids ( >= _hiItemGuid)
+ CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '%u'", _hiItemGuid); // One-time query
result = WorldDatabase.Query("SELECT MAX(guid) FROM gameobject");
if (result)
- m_hiGoGuid = (*result)[0].GetUInt32()+1;
+ _hiGoGuid = (*result)[0].GetUInt32()+1;
result = WorldDatabase.Query("SELECT MAX(guid) FROM transports");
if (result)
- m_hiMoTransGuid = (*result)[0].GetUInt32()+1;
+ _hiMoTransGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(id) FROM auctionhouse");
if (result)
- m_auctionid = (*result)[0].GetUInt32()+1;
+ _auctionId = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(id) FROM mail");
if (result)
- m_mailid = (*result)[0].GetUInt32()+1;
+ _mailId = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(corpseGuid) FROM corpse");
if (result)
- m_hiCorpseGuid = (*result)[0].GetUInt32()+1;
+ _hiCorpseGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(arenateamid) FROM arena_team");
if (result)
@@ -6181,7 +6181,7 @@ void ObjectMgr::SetHighestGuids()
result = CharacterDatabase.Query("SELECT MAX(setguid) FROM character_equipmentsets");
if (result)
- m_equipmentSetGuid = (*result)[0].GetUInt64()+1;
+ _equipmentSetGuid = (*result)[0].GetUInt64()+1;
result = CharacterDatabase.Query("SELECT MAX(guildId) FROM guild");
if (result)
@@ -6194,32 +6194,32 @@ void ObjectMgr::SetHighestGuids()
uint32 ObjectMgr::GenerateAuctionID()
{
- if (m_auctionid >= 0xFFFFFFFE)
+ if (_auctionId >= 0xFFFFFFFE)
{
sLog->outError("Auctions ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_auctionid++;
+ return _auctionId++;
}
uint64 ObjectMgr::GenerateEquipmentSetGuid()
{
- if (m_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL))
+ if (_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL))
{
sLog->outError("EquipmentSet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_equipmentSetGuid++;
+ return _equipmentSetGuid++;
}
uint32 ObjectMgr::GenerateMailID()
{
- if (m_mailid >= 0xFFFFFFFE)
+ if (_mailId >= 0xFFFFFFFE)
{
sLog->outError("Mail ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_mailid++;
+ return _mailId++;
}
uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
@@ -6227,68 +6227,68 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
switch (guidhigh)
{
case HIGHGUID_ITEM:
- if (m_hiItemGuid >= 0xFFFFFFFE)
+ if (_hiItemGuid >= 0xFFFFFFFE)
{
sLog->outError("Item guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiItemGuid++;
+ return _hiItemGuid++;
case HIGHGUID_UNIT:
- if (m_hiCreatureGuid >= 0x00FFFFFE)
+ if (_hiCreatureGuid >= 0x00FFFFFE)
{
sLog->outError("Creature guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCreatureGuid++;
+ return _hiCreatureGuid++;
case HIGHGUID_PET:
- if (m_hiPetGuid >= 0x00FFFFFE)
+ if (_hiPetGuid >= 0x00FFFFFE)
{
sLog->outError("Pet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiPetGuid++;
+ return _hiPetGuid++;
case HIGHGUID_VEHICLE:
- if (m_hiVehicleGuid >= 0x00FFFFFF)
+ if (_hiVehicleGuid >= 0x00FFFFFF)
{
sLog->outError("Vehicle guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiVehicleGuid++;
+ return _hiVehicleGuid++;
case HIGHGUID_PLAYER:
- if (m_hiCharGuid >= 0xFFFFFFFE)
+ if (_hiCharGuid >= 0xFFFFFFFE)
{
sLog->outError("Players guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCharGuid++;
+ return _hiCharGuid++;
case HIGHGUID_GAMEOBJECT:
- if (m_hiGoGuid >= 0x00FFFFFE)
+ if (_hiGoGuid >= 0x00FFFFFE)
{
sLog->outError("Gameobject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiGoGuid++;
+ return _hiGoGuid++;
case HIGHGUID_CORPSE:
- if (m_hiCorpseGuid >= 0xFFFFFFFE)
+ if (_hiCorpseGuid >= 0xFFFFFFFE)
{
sLog->outError("Corpse guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCorpseGuid++;
+ return _hiCorpseGuid++;
case HIGHGUID_DYNAMICOBJECT:
- if (m_hiDoGuid >= 0xFFFFFFFE)
+ if (_hiDoGuid >= 0xFFFFFFFE)
{
sLog->outError("DynamicObject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiDoGuid++;
+ return _hiDoGuid++;
case HIGHGUID_MO_TRANSPORT:
- if (m_hiMoTransGuid >= 0xFFFFFFFE)
+ if (_hiMoTransGuid >= 0xFFFFFFFE)
{
sLog->outError("MO Transport guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiMoTransGuid++;
+ return _hiMoTransGuid++;
default:
ASSERT(0);
}
@@ -6301,7 +6301,7 @@ void ObjectMgr::LoadGameObjectLocales()
{
uint32 oldMSTime = getMSTime();
- mGameObjectLocaleMap.clear(); // need for reload case
+ _gameObjectLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"name_loc1, name_loc2, name_loc3, name_loc4, name_loc5, name_loc6, name_loc7, name_loc8, "
@@ -6317,7 +6317,7 @@ void ObjectMgr::LoadGameObjectLocales()
uint32 entry = fields[0].GetUInt32();
- GameObjectLocale& data = mGameObjectLocaleMap[entry];
+ GameObjectLocale& data = _gameObjectLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
@@ -6326,7 +6326,7 @@ void ObjectMgr::LoadGameObjectLocales()
AddLocaleString(fields[i + (TOTAL_LOCALES - 1)].GetString(), LocaleConstant(i), data.CastBarCaption);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)mGameObjectLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -6415,7 +6415,7 @@ void ObjectMgr::LoadGameObjectTemplate()
uint32 entry = fields[0].GetUInt32();
- GameObjectTemplate& got = GameObjectTemplateStore[entry];
+ GameObjectTemplate& got = _gameObjectTemplateStore[entry];
got.entry = entry;
got.type = uint32(fields[1].GetUInt8());
@@ -6601,7 +6601,7 @@ void ObjectMgr::LoadExplorationBaseXP()
Field* fields = result->Fetch();
uint8 level = fields[0].GetUInt8();
uint32 basexp = fields[1].GetUInt32();
- mBaseXPTable[level] = basexp;
+ _baseXPTable[level] = basexp;
++count;
}
while (result->NextRow());
@@ -6612,13 +6612,13 @@ void ObjectMgr::LoadExplorationBaseXP()
uint32 ObjectMgr::GetBaseXP(uint8 level)
{
- return mBaseXPTable[level] ? mBaseXPTable[level] : 0;
+ return _baseXPTable[level] ? _baseXPTable[level] : 0;
}
uint32 ObjectMgr::GetXPForLevel(uint8 level)
{
- if (level < mPlayerXPperLevel.size())
- return mPlayerXPperLevel[level];
+ if (level < _playerXPperLevel.size())
+ return _playerXPperLevel[level];
return 0;
}
@@ -6645,9 +6645,9 @@ void ObjectMgr::LoadPetNames()
uint32 entry = fields[1].GetUInt32();
bool half = fields[2].GetBool();
if (half)
- PetHalfName1[entry].push_back(word);
+ _petHalfName1[entry].push_back(word);
else
- PetHalfName0[entry].push_back(word);
+ _petHalfName0[entry].push_back(word);
++count;
}
while (result->NextRow());
@@ -6664,17 +6664,17 @@ void ObjectMgr::LoadPetNumber()
if (result)
{
Field* fields = result->Fetch();
- m_hiPetNumber = fields[0].GetUInt32()+1;
+ _hiPetNumber = fields[0].GetUInt32()+1;
}
- sLog->outString(">> Loaded the max pet number: %d in %u ms", m_hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
std::string ObjectMgr::GeneratePetName(uint32 entry)
{
- StringVector & list0 = PetHalfName0[entry];
- StringVector & list1 = PetHalfName1[entry];
+ StringVector & list0 = _petHalfName0[entry];
+ StringVector & list1 = _petHalfName1[entry];
if (list0.empty() || list1.empty())
{
@@ -6691,7 +6691,7 @@ std::string ObjectMgr::GeneratePetName(uint32 entry)
uint32 ObjectMgr::GeneratePetNumber()
{
- return ++m_hiPetNumber;
+ return ++_hiPetNumber;
}
void ObjectMgr::LoadCorpses()
@@ -6738,7 +6738,7 @@ void ObjectMgr::LoadReputationRewardRate()
{
uint32 oldMSTime = getMSTime();
- m_RepRewardRateMap.clear(); // for reload case
+ _repRewardRateStore.clear(); // for reload case
uint32 count = 0;
QueryResult result = WorldDatabase.Query("SELECT faction, quest_rate, creature_rate, spell_rate FROM reputation_reward_rate");
@@ -6788,7 +6788,7 @@ void ObjectMgr::LoadReputationRewardRate()
continue;
}
- m_RepRewardRateMap[factionId] = repRate;
+ _repRewardRateStore[factionId] = repRate;
++count;
}
@@ -6803,7 +6803,7 @@ void ObjectMgr::LoadReputationOnKill()
uint32 oldMSTime = getMSTime();
// For reload case
- mRepOnKill.clear();
+ _repOnKillStore.clear();
uint32 count = 0;
@@ -6863,7 +6863,7 @@ void ObjectMgr::LoadReputationOnKill()
}
}
- mRepOnKill[creature_id] = repOnKill;
+ _repOnKillStore[creature_id] = repOnKill;
++count;
} while (result->NextRow());
@@ -6876,7 +6876,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
{
uint32 oldMSTime = getMSTime();
- m_RepSpilloverTemplateMap.clear(); // for reload case
+ _repSpilloverTemplateStore.clear(); // for reload case
uint32 count = 0;
QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4 FROM reputation_spillover_template");
@@ -6975,7 +6975,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
continue;
}
- m_RepSpilloverTemplateMap[factionId] = repTemplate;
+ _repSpilloverTemplateStore[factionId] = repTemplate;
++count;
}
@@ -6989,7 +6989,7 @@ void ObjectMgr::LoadPointsOfInterest()
{
uint32 oldMSTime = getMSTime();
- mPointsOfInterest.clear(); // need for reload case
+ _pointsOfInterestStore.clear(); // need for reload case
uint32 count = 0;
@@ -7023,7 +7023,7 @@ void ObjectMgr::LoadPointsOfInterest()
continue;
}
- mPointsOfInterest[point_id] = POI;
+ _pointsOfInterestStore[point_id] = POI;
++count;
} while (result->NextRow());
@@ -7036,7 +7036,7 @@ void ObjectMgr::LoadQuestPOI()
{
uint32 oldMSTime = getMSTime();
- mQuestPOIMap.clear(); // need for reload case
+ _questPOIStore.clear(); // need for reload case
uint32 count = 0;
@@ -7096,7 +7096,7 @@ void ObjectMgr::LoadQuestPOI()
QuestPOI POI(id, objIndex, mapId, WorldMapAreaId, FloorId, unk3, unk4);
POI.points = POIs[questId][id];
- mQuestPOIMap[questId].push_back(POI);
+ _questPOIStore[questId].push_back(POI);
++count;
} while (result->NextRow());
@@ -7109,7 +7109,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
{
uint32 oldMSTime = getMSTime();
- mSpellClickInfoMap.clear();
+ _spellClickInfoStore.clear();
// 0 1 2 3 4 5 6 7 8
QueryResult result = WorldDatabase.Query("SELECT npc_entry, spell_id, quest_start, quest_start_active, quest_end, cast_flags, aura_required, aura_forbidden, user_type FROM npc_spellclick_spells");
@@ -7169,7 +7169,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
// quest might be 0 to enable spellclick independent of any quest
if (quest_start)
{
- if (mQuestTemplates.find(quest_start) == mQuestTemplates.end())
+ if (_questTemplates.find(quest_start) == _questTemplates.end())
{
sLog->outErrorDb("Table npc_spellclick_spells references unknown start quest %u. Skipping entry.", quest_start);
continue;
@@ -7182,7 +7182,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
// quest might be 0 to enable spellclick active infinity after start quest
if (quest_end)
{
- if (mQuestTemplates.find(quest_end) == mQuestTemplates.end())
+ if (_questTemplates.find(quest_end) == _questTemplates.end())
{
sLog->outErrorDb("Table npc_spellclick_spells references unknown end quest %u. Skipping entry.", quest_end);
continue;
@@ -7203,7 +7203,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
info.auraRequired = auraRequired;
info.auraForbidden = auraForbidden;
info.userType = SpellClickUserTypes(userType);
- mSpellClickInfoMap.insert(SpellClickInfoMap::value_type(npc_entry, info));
+ _spellClickInfoStore.insert(SpellClickInfoContainer::value_type(npc_entry, info));
++count;
}
@@ -7214,7 +7214,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
{
- if ((itr->second.npcflag & UNIT_NPC_FLAG_SPELLCLICK) && mSpellClickInfoMap.find(itr->second.Entry) == mSpellClickInfoMap.end())
+ if ((itr->second.npcflag & UNIT_NPC_FLAG_SPELLCLICK) && _spellClickInfoStore.find(itr->second.Entry) == _spellClickInfoStore.end())
{
sLog->outErrorDb("npc_spellclick_spells: Creature template %u has UNIT_NPC_FLAG_SPELLCLICK but no data in spellclick table! Removing flag", itr->second.Entry);
const_cast<CreatureTemplate*>(&itr->second)->npcflag &= ~UNIT_NPC_FLAG_SPELLCLICK;
@@ -7236,9 +7236,9 @@ void ObjectMgr::SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t
// This function can be called from various map threads concurrently
{
- m_CreatureRespawnTimesMtx.acquire();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.acquire();
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CREATURE_RESPAWN);
@@ -7252,9 +7252,9 @@ void ObjectMgr::RemoveCreatureRespawnTime(uint32 loguid, uint32 instance)
{
// This function can be called from various map threads concurrently
{
- m_CreatureRespawnTimesMtx.acquire();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.acquire();
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN);
@@ -7270,7 +7270,7 @@ void ObjectMgr::DeleteCreatureData(uint32 guid)
if (data)
RemoveCreatureFromGrid(guid, data);
- mCreatureDataMap.erase(guid);
+ _creatureDataStore.erase(guid);
}
void ObjectMgr::SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t)
@@ -7284,9 +7284,9 @@ void ObjectMgr::SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t)
// This function can be called from different map threads concurrently
{
- m_GORespawnTimesMtx.acquire();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.acquire();
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
+ _goRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GO_RESPAWN);
@@ -7300,9 +7300,9 @@ void ObjectMgr::RemoveGORespawnTime(uint32 loguid, uint32 instance)
{
// This function can be called from different map threads concurrently
{
- m_GORespawnTimesMtx.acquire();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.acquire();
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
+ _goRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GO_RESPAWN);
@@ -7317,28 +7317,28 @@ void ObjectMgr::DeleteRespawnTimeForInstance(uint32 instance)
RespawnTimes::iterator next;
{
- m_GORespawnTimesMtx.acquire();
- for (RespawnTimes::iterator itr = mGORespawnTimes.begin(); itr != mGORespawnTimes.end(); itr = next)
+ _goRespawnTimesMutex.acquire();
+ for (RespawnTimes::iterator itr = _goRespawnTimes.begin(); itr != _goRespawnTimes.end(); itr = next)
{
next = itr;
++next;
if (GUID_HIPART(itr->first) == instance)
- mGORespawnTimes.erase(itr);
+ _goRespawnTimes.erase(itr);
}
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.release();
}
{
- m_CreatureRespawnTimesMtx.acquire();
- for (RespawnTimes::iterator itr = mCreatureRespawnTimes.begin(); itr != mCreatureRespawnTimes.end(); itr = next)
+ _creatureRespawnTimesMutex.acquire();
+ for (RespawnTimes::iterator itr = _creatureRespawnTimes.begin(); itr != _creatureRespawnTimes.end(); itr = next)
{
next = itr;
++next;
if (GUID_HIPART(itr->first) == instance)
- mCreatureRespawnTimes.erase(itr);
+ _creatureRespawnTimes.erase(itr);
}
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN_BY_INSTANCE);
stmt->setUInt32(0, instance);
@@ -7355,20 +7355,20 @@ void ObjectMgr::DeleteGOData(uint32 guid)
if (data)
RemoveGameobjectFromGrid(guid, data);
- mGameObjectDataMap.erase(guid);
+ _gameObjectDataStore.erase(guid);
}
void ObjectMgr::AddCorpseCellData(uint32 mapid, uint32 cellid, uint32 player_guid, uint32 instance)
{
// corpses are always added to spawn mode 0 and they are spawned by their instance id
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(mapid, 0)][cellid];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(mapid, 0)][cellid];
cell_guids.corpses[player_guid] = instance;
}
void ObjectMgr::DeleteCorpseCellData(uint32 mapid, uint32 cellid, uint32 player_guid)
{
// corpses are always added to spawn mode 0 and they are spawned by their instance id
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(mapid, 0)][cellid];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(mapid, 0)][cellid];
cell_guids.corpses.erase(player_guid);
}
@@ -7400,7 +7400,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table,
uint32 quest = result->Fetch()[1].GetUInt32();
uint32 poolId = result->Fetch()[2].GetUInt32();
- if (mQuestTemplates.find(quest) == mQuestTemplates.end())
+ if (_questTemplates.find(quest) == _questTemplates.end())
{
sLog->outErrorDb("Table `%s`: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id);
continue;
@@ -7420,9 +7420,9 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table,
void ObjectMgr::LoadGameobjectQuestRelations()
{
- LoadQuestRelationsHelper(mGOQuestRelations, "gameobject_questrelation", true, true);
+ LoadQuestRelationsHelper(_goQuestRelations, "gameobject_questrelation", true, true);
- for (QuestRelations::iterator itr = mGOQuestRelations.begin(); itr != mGOQuestRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _goQuestRelations.begin(); itr != _goQuestRelations.end(); ++itr)
{
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
if (!goInfo)
@@ -7434,9 +7434,9 @@ void ObjectMgr::LoadGameobjectQuestRelations()
void ObjectMgr::LoadGameobjectInvolvedRelations()
{
- LoadQuestRelationsHelper(mGOQuestInvolvedRelations, "gameobject_involvedrelation", false, true);
+ LoadQuestRelationsHelper(_goQuestInvolvedRelations, "gameobject_involvedrelation", false, true);
- for (QuestRelations::iterator itr = mGOQuestInvolvedRelations.begin(); itr != mGOQuestInvolvedRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _goQuestInvolvedRelations.begin(); itr != _goQuestInvolvedRelations.end(); ++itr)
{
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
if (!goInfo)
@@ -7448,9 +7448,9 @@ void ObjectMgr::LoadGameobjectInvolvedRelations()
void ObjectMgr::LoadCreatureQuestRelations()
{
- LoadQuestRelationsHelper(mCreatureQuestRelations, "creature_questrelation", true, false);
+ LoadQuestRelationsHelper(_creatureQuestRelations, "creature_questrelation", true, false);
- for (QuestRelations::iterator itr = mCreatureQuestRelations.begin(); itr != mCreatureQuestRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _creatureQuestRelations.begin(); itr != _creatureQuestRelations.end(); ++itr)
{
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
if (!cInfo)
@@ -7462,9 +7462,9 @@ void ObjectMgr::LoadCreatureQuestRelations()
void ObjectMgr::LoadCreatureInvolvedRelations()
{
- LoadQuestRelationsHelper(mCreatureQuestInvolvedRelations, "creature_involvedrelation", false, false);
+ LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, "creature_involvedrelation", false, false);
- for (QuestRelations::iterator itr = mCreatureQuestInvolvedRelations.begin(); itr != mCreatureQuestInvolvedRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _creatureQuestInvolvedRelations.begin(); itr != _creatureQuestInvolvedRelations.end(); ++itr)
{
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
if (!cInfo)
@@ -7478,7 +7478,7 @@ void ObjectMgr::LoadReservedPlayersNames()
{
uint32 oldMSTime = getMSTime();
- m_ReservedNames.clear(); // need for reload case
+ _reservedNamesStore.clear(); // need for reload case
QueryResult result = CharacterDatabase.Query("SELECT name FROM reserved_name");
@@ -7506,7 +7506,7 @@ void ObjectMgr::LoadReservedPlayersNames()
wstrToLower(wstr);
- m_ReservedNames.insert(wstr);
+ _reservedNamesStore.insert(wstr);
++count;
}
while (result->NextRow());
@@ -7523,7 +7523,7 @@ bool ObjectMgr::IsReservedName(const std::string& name) const
wstrToLower(wstr);
- return m_ReservedNames.find(wstr) != m_ReservedNames.end();
+ return _reservedNamesStore.find(wstr) != _reservedNamesStore.end();
}
enum LanguageType
@@ -7661,7 +7661,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
uint32 oldMSTime = getMSTime();
- mGameObjectForQuestSet.clear(); // need for reload case
+ _gameObjectForQuestStore.clear(); // need for reload case
if (sObjectMgr->GetGameObjectTemplates()->empty())
{
@@ -7686,7 +7686,7 @@ void ObjectMgr::LoadGameObjectForQuests()
// find quest loot for GO
if (itr->second.chest.questId || LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
++count;
}
break;
@@ -7695,7 +7695,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
if (itr->second._generic.questID > 0) //quests objects
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
count++;
}
break;
@@ -7704,7 +7704,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
if (itr->second.goober.questId > 0) //quests objects
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
count++;
}
break;
@@ -7748,10 +7748,10 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max
}
// cleanup affected map part for reloading case
- for (TrinityStringLocaleMap::iterator itr = mTrinityStringLocaleMap.begin(); itr != mTrinityStringLocaleMap.end();)
+ for (TrinityStringLocaleContainer::iterator itr = _trinityStringLocaleStore.begin(); itr != _trinityStringLocaleStore.end();)
{
if (itr->first >= start_value && itr->first < end_value)
- mTrinityStringLocaleMap.erase(itr++);
+ _trinityStringLocaleStore.erase(itr++);
else
++itr;
}
@@ -7788,7 +7788,7 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max
continue;
}
- TrinityStringLocale& data = mTrinityStringLocaleMap[entry];
+ TrinityStringLocale& data = _trinityStringLocaleStore[entry];
if (!data.Content.empty())
{
@@ -7833,7 +7833,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
{
uint32 oldMSTime = getMSTime();
- mFishingBaseForArea.clear(); // for reload case
+ _fishingBaseForAreaStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, skill FROM skill_fishing_base_level");
@@ -7860,7 +7860,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
continue;
}
- mFishingBaseForArea[entry] = skill;
+ _fishingBaseForAreaStore[entry] = skill;
++count;
}
while (result->NextRow());
@@ -7895,15 +7895,15 @@ bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& n
uint32 ObjectMgr::GetAreaTriggerScriptId(uint32 trigger_id)
{
- AreaTriggerScriptMap::const_iterator i = mAreaTriggerScripts.find(trigger_id);
- if (i!= mAreaTriggerScripts.end())
+ AreaTriggerScriptContainer::const_iterator i = _areaTriggerScriptStore.find(trigger_id);
+ if (i!= _areaTriggerScriptStore.end())
return i->second;
return 0;
}
SpellScriptsBounds ObjectMgr::GetSpellScriptsBounds(uint32 spell_id)
{
- return SpellScriptsBounds(mSpellScripts.lower_bound(spell_id), mSpellScripts.upper_bound(spell_id));
+ return SpellScriptsBounds(_spellScriptsStore.lower_bound(spell_id), _spellScriptsStore.upper_bound(spell_id));
}
SkillRangeType GetSkillRangeType(SkillLineEntry const* pSkill, bool racial)
@@ -7942,7 +7942,7 @@ void ObjectMgr::LoadGameTele()
{
uint32 oldMSTime = getMSTime();
- m_GameTeleMap.clear(); // for reload case
+ _gameTeleStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, map, name FROM game_tele");
@@ -7985,7 +7985,7 @@ void ObjectMgr::LoadGameTele()
wstrToLower(gt.wnameLow);
- m_GameTeleMap[id] = gt;
+ _gameTeleStore[id] = gt;
++count;
}
@@ -8007,7 +8007,7 @@ GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
// Alternative first GameTele what contains wnameLow as substring in case no GameTele location found
const GameTele* alt = NULL;
- for (GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::const_iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
{
if (itr->second.wnameLow == wname)
return &itr->second;
@@ -8022,7 +8022,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
{
// find max id
uint32 new_id = 0;
- for (GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::const_iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
if (itr->first > new_id)
new_id = itr->first;
@@ -8034,7 +8034,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
wstrToLower(tele.wnameLow);
- m_GameTeleMap[new_id] = tele;
+ _gameTeleStore[new_id] = tele;
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_GAME_TELE);
@@ -8061,7 +8061,7 @@ bool ObjectMgr::DeleteGameTele(const std::string& name)
// converting string that we try to find to lower case
wstrToLower(wname);
- for (GameTeleMap::iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
{
if (itr->second.wnameLow == wname)
{
@@ -8071,7 +8071,7 @@ bool ObjectMgr::DeleteGameTele(const std::string& name)
WorldDatabase.Execute(stmt);
- m_GameTeleMap.erase(itr);
+ _gameTeleStore.erase(itr);
return true;
}
}
@@ -8083,7 +8083,7 @@ void ObjectMgr::LoadMailLevelRewards()
{
uint32 oldMSTime = getMSTime();
- m_mailLevelRewardMap.clear(); // for reload case
+ _mailLevelRewardStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT level, raceMask, mailTemplateId, senderEntry FROM mail_level_reward");
@@ -8130,7 +8130,7 @@ void ObjectMgr::LoadMailLevelRewards()
continue;
}
- m_mailLevelRewardMap[level].push_back(MailLevelReward(raceMask, mailTemplateId, senderEntry));
+ _mailLevelRewardStore[level].push_back(MailLevelReward(raceMask, mailTemplateId, senderEntry));
++count;
}
@@ -8177,7 +8177,7 @@ void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost,
return;
}
- TrainerSpellData& data = m_mCacheTrainerSpellMap[entry];
+ TrainerSpellData& data = _cacheTrainerSpellStore[entry];
TrainerSpell& trainerSpell = data.spellList[spell];
trainerSpell.spell = spell;
@@ -8223,7 +8223,7 @@ void ObjectMgr::LoadTrainerSpell()
uint32 oldMSTime = getMSTime();
// For reload case
- m_mCacheTrainerSpellMap.clear();
+ _cacheTrainerSpellStore.clear();
std::set<uint32> skip_trainers;
@@ -8289,7 +8289,7 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32> *s
if (!IsVendorItemValid(vendor, item_id, maxcount, incrtime, ExtendedCost, NULL, skip_vendors))
continue;
- VendorItemData& vList = m_mCacheVendorItemMap[vendor];
+ VendorItemData& vList = _cacheVendorItemStore[vendor];
vList.AddItem(item_id, maxcount, incrtime, ExtendedCost);
++count;
@@ -8305,9 +8305,9 @@ void ObjectMgr::LoadVendors()
uint32 oldMSTime = getMSTime();
// For reload case
- for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
+ for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr)
itr->second.Clear();
- m_mCacheVendorItemMap.clear();
+ _cacheVendorItemStore.clear();
std::set<uint32> skip_vendors;
@@ -8340,7 +8340,7 @@ void ObjectMgr::LoadVendors()
if (!IsVendorItemValid(entry, item_id, maxcount, incrtime, ExtendedCost, NULL, &skip_vendors))
continue;
- VendorItemData& vList = m_mCacheVendorItemMap[entry];
+ VendorItemData& vList = _cacheVendorItemStore[entry];
vList.AddItem(item_id, maxcount, incrtime, ExtendedCost);
++count;
@@ -8357,7 +8357,7 @@ void ObjectMgr::LoadGossipMenu()
{
uint32 oldMSTime = getMSTime();
- m_mGossipMenusMap.clear();
+ _gossipMenusStore.clear();
QueryResult result = WorldDatabase.Query("SELECT entry, text_id FROM gossip_menu");
@@ -8386,7 +8386,7 @@ void ObjectMgr::LoadGossipMenu()
continue;
}
- m_mGossipMenusMap.insert(GossipMenusMap::value_type(gMenu.entry, gMenu));
+ _gossipMenusStore.insert(GossipMenusContainer::value_type(gMenu.entry, gMenu));
++count;
}
@@ -8400,7 +8400,7 @@ void ObjectMgr::LoadGossipMenuItems()
{
uint32 oldMSTime = getMSTime();
- m_mGossipMenuItemsMap.clear();
+ _gossipMenuItemsStore.clear();
QueryResult result = WorldDatabase.Query(
"SELECT menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, "
@@ -8449,7 +8449,7 @@ void ObjectMgr::LoadGossipMenuItems()
gMenuItem.ActionPoiId = 0;
}
- m_mGossipMenuItemsMap.insert(GossipMenuItemsMap::value_type(gMenuItem.MenuId, gMenuItem));
+ _gossipMenuItemsStore.insert(GossipMenuItemsContainer::value_type(gMenuItem.MenuId, gMenuItem));
++count;
}
while (result->NextRow());
@@ -8460,7 +8460,7 @@ void ObjectMgr::LoadGossipMenuItems()
void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/)
{
- VendorItemData& vList = m_mCacheVendorItemMap[entry];
+ VendorItemData& vList = _cacheVendorItemStore[entry];
vList.AddItem(item, maxcount, incrtime, extendedCost);
if (persist)
@@ -8479,8 +8479,8 @@ void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32
bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool persist /*= true*/)
{
- CacheVendorItemMap::iterator iter = m_mCacheVendorItemMap.find(entry);
- if (iter == m_mCacheVendorItemMap.end())
+ CacheVendorItemContainer::iterator iter = _cacheVendorItemStore.find(entry);
+ if (iter == _cacheVendorItemStore.end())
return false;
if (!iter->second.RemoveItem(item))
@@ -8590,7 +8590,7 @@ void ObjectMgr::LoadScriptNames()
{
uint32 oldMSTime = getMSTime();
- m_scriptNames.push_back("");
+ _scriptNamesStore.push_back("");
QueryResult result = WorldDatabase.Query(
"SELECT DISTINCT(ScriptName) FROM achievement_criteria_data WHERE ScriptName <> '' AND type = 11 "
"UNION "
@@ -8627,12 +8627,12 @@ void ObjectMgr::LoadScriptNames()
do
{
- m_scriptNames.push_back((*result)[0].GetString());
+ _scriptNamesStore.push_back((*result)[0].GetString());
++count;
}
while (result->NextRow());
- std::sort(m_scriptNames.begin(), m_scriptNames.end());
+ std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end());
sLog->outString(">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -8642,10 +8642,10 @@ uint32 ObjectMgr::GetScriptId(const char *name)
// use binary search to find the script name in the sorted vector
// assume "" is the first element
if (!name) return 0;
- ScriptNameMap::const_iterator itr =
- std::lower_bound(m_scriptNames.begin(), m_scriptNames.end(), name);
- if (itr == m_scriptNames.end() || *itr != name) return 0;
- return uint32(itr - m_scriptNames.begin());
+ ScriptNameContainer::const_iterator itr =
+ std::lower_bound(_scriptNamesStore.begin(), _scriptNamesStore.end(), name);
+ if (itr == _scriptNamesStore.end() || *itr != name) return 0;
+ return uint32(itr - _scriptNamesStore.begin());
}
void ObjectMgr::CheckScripts(ScriptsType type, std::set<int32>& ids)
@@ -8706,9 +8706,9 @@ bool LoadTrinityStrings(char const* table, int32 start_value, int32 end_value)
CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint8 level, uint8 unitClass)
{
- CreatureBaseStatsMap::const_iterator it = m_creatureBaseStatsMap.find(MAKE_PAIR16(level, unitClass));
+ CreatureBaseStatsContainer::const_iterator it = _creatureBaseStatsStore.find(MAKE_PAIR16(level, unitClass));
- if (it != m_creatureBaseStatsMap.end())
+ if (it != _creatureBaseStatsStore.end())
return &(it->second);
struct DefaultCreatureBaseStats : public CreatureBaseStats
@@ -8766,7 +8766,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
}
}
- m_creatureBaseStatsMap[MAKE_PAIR16(Level, Class)] = stats;
+ _creatureBaseStatsStore[MAKE_PAIR16(Level, Class)] = stats;
++count;
}
@@ -8777,7 +8777,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
{
for (uint16 lvl = itr->second.minlevel; lvl <= itr->second.maxlevel; ++lvl)
{
- if (m_creatureBaseStatsMap.find(MAKE_PAIR16(lvl, itr->second.unit_class)) == m_creatureBaseStatsMap.end())
+ if (_creatureBaseStatsStore.find(MAKE_PAIR16(lvl, itr->second.unit_class)) == _creatureBaseStatsStore.end())
sLog->outErrorDb("Missing base stats for creature class %u level %u", itr->second.unit_class, lvl);
}
}
@@ -8813,7 +8813,7 @@ void ObjectMgr::LoadFactionChangeAchievements()
else if (!sAchievementStore.LookupEntry(horde))
sLog->outErrorDb("Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde);
else
- factionchange_achievements[alliance] = horde;
+ FactionChange_Achievements[alliance] = horde;
++count;
}
@@ -8850,7 +8850,7 @@ void ObjectMgr::LoadFactionChangeItems()
else if (!GetItemTemplate(horde))
sLog->outErrorDb("Item %u referenced in `player_factionchange_items` does not exist, pair skipped!", horde);
else
- factionchange_items[alliance] = horde;
+ FactionChange_Items[alliance] = horde;
++count;
}
@@ -8887,7 +8887,7 @@ void ObjectMgr::LoadFactionChangeSpells()
else if (!sSpellMgr->GetSpellInfo(horde))
sLog->outErrorDb("Spell %u referenced in `player_factionchange_spells` does not exist, pair skipped!", horde);
else
- factionchange_spells[alliance] = horde;
+ FactionChange_Spells[alliance] = horde;
++count;
}
@@ -8924,7 +8924,7 @@ void ObjectMgr::LoadFactionChangeReputations()
else if (!sFactionStore.LookupEntry(horde))
sLog->outErrorDb("Reputation %u referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde);
else
- factionchange_reputations[alliance] = horde;
+ FactionChange_Reputation[alliance] = horde;
++count;
}
@@ -8936,8 +8936,8 @@ void ObjectMgr::LoadFactionChangeReputations()
GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
{
- GameObjectTemplateContainer::const_iterator itr = GameObjectTemplateStore.find(entry);
- if (itr != GameObjectTemplateStore.end())
+ GameObjectTemplateContainer::const_iterator itr = _gameObjectTemplateStore.find(entry);
+ if (itr != _gameObjectTemplateStore.end())
return &(itr->second);
return NULL;
@@ -8945,8 +8945,8 @@ GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
CreatureTemplate const* ObjectMgr::GetCreatureTemplate(uint32 entry)
{
- CreatureTemplateContainer::const_iterator itr = CreatureTemplateStore.find(entry);
- if (itr != CreatureTemplateStore.end())
+ CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.find(entry);
+ if (itr != _creatureTemplateStore.end())
return &(itr->second);
return NULL;
@@ -8957,14 +8957,14 @@ VehicleAccessoryList const* ObjectMgr::GetVehicleAccessoryList(Vehicle* veh) con
if (Creature* cre = veh->GetBase()->ToCreature())
{
// Give preference to GUID-based accessories
- VehicleAccessoryMap::const_iterator itr = m_VehicleAccessoryMap.find(cre->GetDBTableGUIDLow());
- if (itr != m_VehicleAccessoryMap.end())
+ VehicleAccessoryContainer::const_iterator itr = _vehicleAccessoryStore.find(cre->GetDBTableGUIDLow());
+ if (itr != _vehicleAccessoryStore.end())
return &itr->second;
}
// Otherwise return entry-based
- VehicleAccessoryMap::const_iterator itr = m_VehicleTemplateAccessoryMap.find(veh->GetCreatureEntry());
- if (itr != m_VehicleTemplateAccessoryMap.end())
+ VehicleAccessoryContainer::const_iterator itr = _vehicleTemplateAccessoryStore.find(veh->GetCreatureEntry());
+ if (itr != _vehicleTemplateAccessoryStore.end())
return &itr->second;
return NULL;
}
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 126cca59ef0..b69a234fcbf 100755
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -82,7 +82,7 @@ struct GameTele
std::wstring wnameLow;
};
-typedef UNORDERED_MAP<uint32, GameTele > GameTeleMap;
+typedef UNORDERED_MAP<uint32, GameTele > GameTeleContainer;
enum ScriptsType
{
@@ -321,8 +321,8 @@ struct ScriptInfo
typedef std::multimap<uint32, ScriptInfo> ScriptMap;
typedef std::map<uint32, ScriptMap > ScriptMapMap;
-typedef std::multimap<uint32, uint32> SpellScriptsMap;
-typedef std::pair<SpellScriptsMap::iterator, SpellScriptsMap::iterator> SpellScriptsBounds;
+typedef std::multimap<uint32, uint32> SpellScriptsContainer;
+typedef std::pair<SpellScriptsContainer::iterator, SpellScriptsContainer::iterator> SpellScriptsBounds;
extern ScriptMapMap sQuestEndScripts;
extern ScriptMapMap sQuestStartScripts;
extern ScriptMapMap sSpellScripts;
@@ -349,8 +349,8 @@ struct SpellClickInfo
bool IsFitToRequirements(Unit const* clicker, Unit const* clickee) const;
};
-typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoMap;
-typedef std::pair<SpellClickInfoMap::const_iterator, SpellClickInfoMap::const_iterator> SpellClickInfoMapBounds;
+typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoContainer;
+typedef std::pair<SpellClickInfoContainer::const_iterator, SpellClickInfoContainer::const_iterator> SpellClickInfoMapBounds;
struct AreaTrigger
{
@@ -390,24 +390,22 @@ struct TrinityStringLocale
StringVector Content;
};
-typedef std::map<uint64, uint64> LinkedRespawnMap;
-typedef UNORDERED_MAP<uint32, CreatureData> CreatureDataMap;
-typedef UNORDERED_MAP<uint32, GameObjectData> GameObjectDataMap;
-typedef UNORDERED_MAP<uint32, CreatureLocale> CreatureLocaleMap;
-typedef UNORDERED_MAP<uint32, GameObjectLocale> GameObjectLocaleMap;
-typedef UNORDERED_MAP<uint32, ItemLocale> ItemLocaleMap;
-typedef UNORDERED_MAP<uint32, ItemSetNameLocale> ItemSetNameLocaleMap;
-typedef UNORDERED_MAP<uint32, QuestLocale> QuestLocaleMap;
-typedef UNORDERED_MAP<uint32, NpcTextLocale> NpcTextLocaleMap;
-typedef UNORDERED_MAP<uint32, PageTextLocale> PageTextLocaleMap;
-typedef UNORDERED_MAP<int32, TrinityStringLocale> TrinityStringLocaleMap;
-typedef UNORDERED_MAP<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleMap;
-typedef UNORDERED_MAP<uint32, PointOfInterestLocale> PointOfInterestLocaleMap;
+typedef std::map<uint64, uint64> LinkedRespawnContainer;
+typedef UNORDERED_MAP<uint32, CreatureData> CreatureDataContainer;
+typedef UNORDERED_MAP<uint32, GameObjectData> GameObjectDataContainer;
+typedef UNORDERED_MAP<uint32, CreatureLocale> CreatureLocaleContainer;
+typedef UNORDERED_MAP<uint32, GameObjectLocale> GameObjectLocaleContainer;
+typedef UNORDERED_MAP<uint32, ItemLocale> ItemLocaleContainer;
+typedef UNORDERED_MAP<uint32, ItemSetNameLocale> ItemSetNameLocaleContainer;
+typedef UNORDERED_MAP<uint32, QuestLocale> QuestLocaleContainer;
+typedef UNORDERED_MAP<uint32, NpcTextLocale> NpcTextLocaleContainer;
+typedef UNORDERED_MAP<uint32, PageTextLocale> PageTextLocaleContainer;
+typedef UNORDERED_MAP<int32, TrinityStringLocale> TrinityStringLocaleContainer;
+typedef UNORDERED_MAP<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer;
+typedef UNORDERED_MAP<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer;
typedef std::multimap<uint32, uint32> QuestRelations;
typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds;
-typedef std::multimap<uint32, ItemRequiredTarget> ItemRequiredTargetMap;
-typedef std::pair<ItemRequiredTargetMap::const_iterator, ItemRequiredTargetMap::const_iterator> ItemRequiredTargetMapBounds;
struct PetLevelInfo
{
@@ -430,7 +428,7 @@ struct MailLevelReward
};
typedef std::list<MailLevelReward> MailLevelRewardList;
-typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardMap;
+typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardContainer;
// We assume the rate is in general the same for all three types below, but chose to keep three for scalability and customization
struct RepRewardRate
@@ -494,12 +492,12 @@ struct GossipMenus
ConditionList conditions;
};
-typedef std::multimap<uint32, GossipMenus> GossipMenusMap;
-typedef std::pair<GossipMenusMap::const_iterator, GossipMenusMap::const_iterator> GossipMenusMapBounds;
-typedef std::pair<GossipMenusMap::iterator, GossipMenusMap::iterator> GossipMenusMapBoundsNonConst;
-typedef std::multimap<uint32, GossipMenuItems> GossipMenuItemsMap;
-typedef std::pair<GossipMenuItemsMap::const_iterator, GossipMenuItemsMap::const_iterator> GossipMenuItemsMapBounds;
-typedef std::pair<GossipMenuItemsMap::iterator, GossipMenuItemsMap::iterator> GossipMenuItemsMapBoundsNonConst;
+typedef std::multimap<uint32, GossipMenus> GossipMenusContainer;
+typedef std::pair<GossipMenusContainer::const_iterator, GossipMenusContainer::const_iterator> GossipMenusMapBounds;
+typedef std::pair<GossipMenusContainer::iterator, GossipMenusContainer::iterator> GossipMenusMapBoundsNonConst;
+typedef std::multimap<uint32, GossipMenuItems> GossipMenuItemsContainer;
+typedef std::pair<GossipMenuItemsContainer::const_iterator, GossipMenuItemsContainer::const_iterator> GossipMenuItemsMapBounds;
+typedef std::pair<GossipMenuItemsContainer::iterator, GossipMenuItemsContainer::iterator> GossipMenuItemsMapBoundsNonConst;
struct QuestPOIPoint
{
@@ -526,17 +524,17 @@ struct QuestPOI
};
typedef std::vector<QuestPOI> QuestPOIVector;
-typedef UNORDERED_MAP<uint32, QuestPOIVector> QuestPOIMap;
+typedef UNORDERED_MAP<uint32, QuestPOIVector> QuestPOIContainer;
struct GraveYardData
{
uint32 safeLocId;
uint32 team;
};
-typedef std::multimap<uint32, GraveYardData> GraveYardMap;
+typedef std::multimap<uint32, GraveYardData> GraveYardContainer;
-typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemMap;
-typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellMap;
+typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemContainer;
+typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellContainer;
enum SkillRangeType
{
@@ -584,7 +582,7 @@ struct DungeonEncounter
};
typedef std::list<DungeonEncounter const*> DungeonEncounterList;
-typedef UNORDERED_MAP<uint32, DungeonEncounterList> DungeonEncounterMap;
+typedef UNORDERED_MAP<uint32, DungeonEncounterList> DungeonEncounterContainer;
class PlayerDumpReader;
@@ -602,33 +600,33 @@ class ObjectMgr
typedef UNORDERED_MAP<uint32, Quest*> QuestMap;
- typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerMap;
+ typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerContainer;
- typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptMap;
+ typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer;
- typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementMap;
+ typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementContainer;
- typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateMap;
- typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillMap;
- typedef UNORDERED_MAP<uint32, RepSpilloverTemplate> RepSpilloverTemplateMap;
+ typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateContainer;
+ typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillContainer;
+ typedef UNORDERED_MAP<uint32, RepSpilloverTemplate> RepSpilloverTemplateContainer;
- typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestMap;
+ typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestContainer;
- typedef std::vector<std::string> ScriptNameMap;
+ typedef std::vector<std::string> ScriptNameContainer;
typedef std::map<uint32, uint32> CharacterConversionMap;
Player* GetPlayerByLowGUID(uint32 lowguid) const;
GameObjectTemplate const* GetGameObjectTemplate(uint32 entry);
- GameObjectTemplateContainer const* GetGameObjectTemplates() { return &GameObjectTemplateStore; }
+ GameObjectTemplateContainer const* GetGameObjectTemplates() { return &_gameObjectTemplateStore; }
int LoadReferenceVendor(int32 vendor, int32 item_id, std::set<uint32> *skip_vendors);
void LoadGameObjectTemplate();
void AddGameobjectInfo(GameObjectTemplate* goinfo);
CreatureTemplate const* GetCreatureTemplate(uint32 entry);
- CreatureTemplateContainer const* GetCreatureTemplates() { return &CreatureTemplateStore; }
+ CreatureTemplateContainer const* GetCreatureTemplates() { return &_creatureTemplateStore; }
CreatureModelInfo const* GetCreatureModelInfo(uint32 modelId);
CreatureModelInfo const* GetCreatureModelRandomGender(uint32* displayID);
static uint32 ChooseDisplayId(uint32 team, const CreatureTemplate* cinfo, const CreatureData* data = NULL);
@@ -637,12 +635,12 @@ class ObjectMgr
CreatureAddon const* GetCreatureAddon(uint32 lowguid);
CreatureAddon const* GetCreatureTemplateAddon(uint32 entry);
ItemTemplate const* GetItemTemplate(uint32 entry);
- ItemTemplateContainer const* GetItemTemplateStore() { return &ItemTemplateStore; }
+ ItemTemplateContainer const* GetItemTemplateStore() { return &_itemTemplateStore; }
ItemSetNameEntry const* GetItemSetNameEntry(uint32 itemId)
{
- ItemSetNameMap::iterator itr = mItemSetNameMap.find(itemId);
- if (itr != mItemSetNameMap.end())
+ ItemSetNameContainer::iterator itr = _itemSetNameStore.find(itemId);
+ if (itr != _itemSetNameStore.end())
return &itr->second;
return NULL;
}
@@ -655,7 +653,7 @@ class ObjectMgr
{
if (class_ >= MAX_CLASSES)
return NULL;
- return &playerClassInfo[class_];
+ return &_playerClassInfo[class_];
}
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const;
@@ -665,7 +663,7 @@ class ObjectMgr
return NULL;
if (class_ >= MAX_CLASSES)
return NULL;
- PlayerInfo const* info = &playerInfo[race][class_];
+ PlayerInfo const* info = &_playerInfo[race][class_];
if (info->displayId_m == 0 || info->displayId_f == 0)
return NULL;
return info;
@@ -685,28 +683,28 @@ class ObjectMgr
Quest const* GetQuestTemplate(uint32 quest_id) const
{
- QuestMap::const_iterator itr = mQuestTemplates.find(quest_id);
- return itr != mQuestTemplates.end() ? itr->second : NULL;
+ QuestMap::const_iterator itr = _questTemplates.find(quest_id);
+ return itr != _questTemplates.end() ? itr->second : NULL;
}
- QuestMap const& GetQuestTemplates() const { return mQuestTemplates; }
+ QuestMap const& GetQuestTemplates() const { return _questTemplates; }
uint32 GetQuestForAreaTrigger(uint32 Trigger_ID) const
{
- QuestAreaTriggerMap::const_iterator itr = mQuestAreaTriggerMap.find(Trigger_ID);
- if (itr != mQuestAreaTriggerMap.end())
+ QuestAreaTriggerContainer::const_iterator itr = _questAreaTriggerStore.find(Trigger_ID);
+ if (itr != _questAreaTriggerStore.end())
return itr->second;
return 0;
}
bool IsTavernAreaTrigger(uint32 Trigger_ID) const
{
- return mTavernAreaTriggerSet.find(Trigger_ID) != mTavernAreaTriggerSet.end();
+ return _tavernAreaTriggerStore.find(Trigger_ID) != _tavernAreaTriggerStore.end();
}
bool IsGameObjectForQuests(uint32 entry) const
{
- return mGameObjectForQuestSet.find(entry) != mGameObjectForQuestSet.end();
+ return _gameObjectForQuestStore.find(entry) != _gameObjectForQuestStore.end();
}
GossipText const* GetGossipText(uint32 Text_ID) const;
@@ -720,16 +718,16 @@ class ObjectMgr
AreaTrigger const* GetAreaTrigger(uint32 trigger) const
{
- AreaTriggerMap::const_iterator itr = mAreaTriggers.find(trigger);
- if (itr != mAreaTriggers.end())
+ AreaTriggerContainer::const_iterator itr = _areaTriggerStore.find(trigger);
+ if (itr != _areaTriggerStore.end())
return &itr->second;
return NULL;
}
AccessRequirement const* GetAccessRequirement(uint32 mapid, Difficulty difficulty) const
{
- AccessRequirementMap::const_iterator itr = mAccessRequirements.find(MAKE_PAIR32(mapid, difficulty));
- if (itr != mAccessRequirements.end())
+ AccessRequirementContainer::const_iterator itr = _accessRequirementStore.find(MAKE_PAIR32(mapid, difficulty));
+ if (itr != _accessRequirementStore.end())
return &itr->second;
return NULL;
}
@@ -742,8 +740,8 @@ class ObjectMgr
RepRewardRate const* GetRepRewardRate(uint32 factionId) const
{
- RepRewardRateMap::const_iterator itr = m_RepRewardRateMap.find(factionId);
- if (itr != m_RepRewardRateMap.end())
+ RepRewardRateContainer::const_iterator itr = _repRewardRateStore.find(factionId);
+ if (itr != _repRewardRateStore.end())
return &itr->second;
return NULL;
@@ -751,16 +749,16 @@ class ObjectMgr
ReputationOnKillEntry const* GetReputationOnKilEntry(uint32 id) const
{
- RepOnKillMap::const_iterator itr = mRepOnKill.find(id);
- if (itr != mRepOnKill.end())
+ RepOnKillContainer::const_iterator itr = _repOnKillStore.find(id);
+ if (itr != _repOnKillStore.end())
return &itr->second;
return NULL;
}
RepSpilloverTemplate const* GetRepSpilloverTemplate(uint32 factionId) const
{
- RepSpilloverTemplateMap::const_iterator itr = m_RepSpilloverTemplateMap.find(factionId);
- if (itr != m_RepSpilloverTemplateMap.end())
+ RepSpilloverTemplateContainer::const_iterator itr = _repSpilloverTemplateStore.find(factionId);
+ if (itr != _repSpilloverTemplateStore.end())
return &itr->second;
return NULL;
@@ -768,16 +766,16 @@ class ObjectMgr
PointOfInterest const* GetPointOfInterest(uint32 id) const
{
- PointOfInterestMap::const_iterator itr = mPointsOfInterest.find(id);
- if (itr != mPointsOfInterest.end())
+ PointOfInterestContainer::const_iterator itr = _pointsOfInterestStore.find(id);
+ if (itr != _pointsOfInterestStore.end())
return &itr->second;
return NULL;
}
QuestPOIVector const* GetQuestPOIVector(uint32 questId)
{
- QuestPOIMap::const_iterator itr = mQuestPOIMap.find(questId);
- if (itr != mQuestPOIMap.end())
+ QuestPOIContainer::const_iterator itr = _questPOIStore.find(questId);
+ if (itr != _questPOIStore.end())
return &itr->second;
return NULL;
}
@@ -786,8 +784,8 @@ class ObjectMgr
DungeonEncounterList const* GetDungeonEncounterList(uint32 mapId, Difficulty difficulty)
{
- UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = mDungeonEncounters.find(MAKE_PAIR32(mapId, difficulty));
- if (itr != mDungeonEncounters.end())
+ UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = _dungeonEncounterStore.find(MAKE_PAIR32(mapId, difficulty));
+ if (itr != _dungeonEncounterStore.end())
return &itr->second;
return NULL;
}
@@ -811,32 +809,32 @@ class ObjectMgr
QuestRelations* GetGOQuestRelationMap()
{
- return &mGOQuestRelations;
+ return &_goQuestRelations;
}
QuestRelationBounds GetGOQuestRelationBounds(uint32 go_entry)
{
- return mGOQuestRelations.equal_range(go_entry);
+ return _goQuestRelations.equal_range(go_entry);
}
QuestRelationBounds GetGOQuestInvolvedRelationBounds(uint32 go_entry)
{
- return mGOQuestInvolvedRelations.equal_range(go_entry);
+ return _goQuestInvolvedRelations.equal_range(go_entry);
}
QuestRelations* GetCreatureQuestRelationMap()
{
- return &mCreatureQuestRelations;
+ return &_creatureQuestRelations;
}
QuestRelationBounds GetCreatureQuestRelationBounds(uint32 creature_entry)
{
- return mCreatureQuestRelations.equal_range(creature_entry);
+ return _creatureQuestRelations.equal_range(creature_entry);
}
QuestRelationBounds GetCreatureQuestInvolvedRelationBounds(uint32 creature_entry)
{
- return mCreatureQuestInvolvedRelations.equal_range(creature_entry);
+ return _creatureQuestInvolvedRelations.equal_range(creature_entry);
}
void LoadGameObjectScripts();
@@ -926,8 +924,8 @@ class ObjectMgr
int32 GetFishingBaseSkillLevel(uint32 entry) const
{
- FishingBaseSkillMap::const_iterator itr = mFishingBaseForArea.find(entry);
- return itr != mFishingBaseForArea.end() ? itr->second : 0;
+ FishingBaseSkillContainer::const_iterator itr = _fishingBaseForAreaStore.find(entry);
+ return itr != _fishingBaseForAreaStore.end() ? itr->second : 0;
}
void ReturnOrDeleteOldMails(bool serverUp);
@@ -946,8 +944,8 @@ class ObjectMgr
MailLevelReward const* GetMailLevelReward(uint32 level, uint32 raceMask)
{
- MailLevelRewardMap::const_iterator map_itr = m_mailLevelRewardMap.find(level);
- if (map_itr == m_mailLevelRewardMap.end())
+ MailLevelRewardContainer::const_iterator map_itr = _mailLevelRewardStore.find(level);
+ if (map_itr == _mailLevelRewardStore.end())
return NULL;
for (MailLevelRewardList::const_iterator set_itr = map_itr->second.begin(); set_itr != map_itr->second.end(); ++set_itr)
@@ -959,81 +957,81 @@ class ObjectMgr
CellObjectGuids const& GetCellObjectGuids(uint16 mapid, uint8 spawnMode, uint32 cell_id)
{
- return mMapObjectGuids[MAKE_PAIR32(mapid, spawnMode)][cell_id];
+ return _mapObjectGuidsStore[MAKE_PAIR32(mapid, spawnMode)][cell_id];
}
CreatureData const* GetCreatureData(uint32 guid) const
{
- CreatureDataMap::const_iterator itr = mCreatureDataMap.find(guid);
- if (itr == mCreatureDataMap.end()) return NULL;
+ CreatureDataContainer::const_iterator itr = _creatureDataStore.find(guid);
+ if (itr == _creatureDataStore.end()) return NULL;
return &itr->second;
}
- CreatureData& NewOrExistCreatureData(uint32 guid) { return mCreatureDataMap[guid]; }
+ CreatureData& NewOrExistCreatureData(uint32 guid) { return _creatureDataStore[guid]; }
void DeleteCreatureData(uint32 guid);
uint64 GetLinkedRespawnGuid(uint64 guid) const
{
- LinkedRespawnMap::const_iterator itr = mLinkedRespawnMap.find(guid);
- if (itr == mLinkedRespawnMap.end()) return 0;
+ LinkedRespawnContainer::const_iterator itr = _linkedRespawnStore.find(guid);
+ if (itr == _linkedRespawnStore.end()) return 0;
return itr->second;
}
CreatureLocale const* GetCreatureLocale(uint32 entry) const
{
- CreatureLocaleMap::const_iterator itr = mCreatureLocaleMap.find(entry);
- if (itr == mCreatureLocaleMap.end()) return NULL;
+ CreatureLocaleContainer::const_iterator itr = _creatureLocaleStore.find(entry);
+ if (itr == _creatureLocaleStore.end()) return NULL;
return &itr->second;
}
GameObjectLocale const* GetGameObjectLocale(uint32 entry) const
{
- GameObjectLocaleMap::const_iterator itr = mGameObjectLocaleMap.find(entry);
- if (itr == mGameObjectLocaleMap.end()) return NULL;
+ GameObjectLocaleContainer::const_iterator itr = _gameObjectLocaleStore.find(entry);
+ if (itr == _gameObjectLocaleStore.end()) return NULL;
return &itr->second;
}
ItemLocale const* GetItemLocale(uint32 entry) const
{
- ItemLocaleMap::const_iterator itr = mItemLocaleMap.find(entry);
- if (itr == mItemLocaleMap.end()) return NULL;
+ ItemLocaleContainer::const_iterator itr = _itemLocaleStore.find(entry);
+ if (itr == _itemLocaleStore.end()) return NULL;
return &itr->second;
}
ItemSetNameLocale const* GetItemSetNameLocale(uint32 entry) const
{
- ItemSetNameLocaleMap::const_iterator itr = mItemSetNameLocaleMap.find(entry);
- if (itr == mItemSetNameLocaleMap.end())return NULL;
+ ItemSetNameLocaleContainer::const_iterator itr = _itemSetNameLocaleStore.find(entry);
+ if (itr == _itemSetNameLocaleStore.end())return NULL;
return &itr->second;
}
QuestLocale const* GetQuestLocale(uint32 entry) const
{
- QuestLocaleMap::const_iterator itr = mQuestLocaleMap.find(entry);
- if (itr == mQuestLocaleMap.end()) return NULL;
+ QuestLocaleContainer::const_iterator itr = _questLocaleStore.find(entry);
+ if (itr == _questLocaleStore.end()) return NULL;
return &itr->second;
}
NpcTextLocale const* GetNpcTextLocale(uint32 entry) const
{
- NpcTextLocaleMap::const_iterator itr = mNpcTextLocaleMap.find(entry);
- if (itr == mNpcTextLocaleMap.end()) return NULL;
+ NpcTextLocaleContainer::const_iterator itr = _npcTextLocaleStore.find(entry);
+ if (itr == _npcTextLocaleStore.end()) return NULL;
return &itr->second;
}
PageTextLocale const* GetPageTextLocale(uint32 entry) const
{
- PageTextLocaleMap::const_iterator itr = mPageTextLocaleMap.find(entry);
- if (itr == mPageTextLocaleMap.end()) return NULL;
+ PageTextLocaleContainer::const_iterator itr = _pageTextLocaleStore.find(entry);
+ if (itr == _pageTextLocaleStore.end()) return NULL;
return &itr->second;
}
GossipMenuItemsLocale const* GetGossipMenuItemsLocale(uint32 entry) const
{
- GossipMenuItemsLocaleMap::const_iterator itr = mGossipMenuItemsLocaleMap.find(entry);
- if (itr == mGossipMenuItemsLocaleMap.end()) return NULL;
+ GossipMenuItemsLocaleContainer::const_iterator itr = _gossipMenuItemsLocaleStore.find(entry);
+ if (itr == _gossipMenuItemsLocaleStore.end()) return NULL;
return &itr->second;
}
PointOfInterestLocale const* GetPointOfInterestLocale(uint32 poi_id) const
{
- PointOfInterestLocaleMap::const_iterator itr = mPointOfInterestLocaleMap.find(poi_id);
- if (itr == mPointOfInterestLocaleMap.end()) return NULL;
+ PointOfInterestLocaleContainer::const_iterator itr = _pointOfInterestLocaleStore.find(poi_id);
+ if (itr == _pointOfInterestLocaleStore.end()) return NULL;
return &itr->second;
}
bool IsGoOfSpecificEntrySpawned(uint32 entry) const
{
- for (GameObjectDataMap::const_iterator it = mGameObjectDataMap.begin(); it != mGameObjectDataMap.end(); ++it)
+ for (GameObjectDataContainer::const_iterator it = _gameObjectDataStore.begin(); it != _gameObjectDataStore.end(); ++it)
if (it->second.id == entry)
return true;
@@ -1042,17 +1040,17 @@ class ObjectMgr
GameObjectData const* GetGOData(uint32 guid) const
{
- GameObjectDataMap::const_iterator itr = mGameObjectDataMap.find(guid);
- if (itr == mGameObjectDataMap.end()) return NULL;
+ GameObjectDataContainer::const_iterator itr = _gameObjectDataStore.find(guid);
+ if (itr == _gameObjectDataStore.end()) return NULL;
return &itr->second;
}
- GameObjectData& NewGOData(uint32 guid) { return mGameObjectDataMap[guid]; }
+ GameObjectData& NewGOData(uint32 guid) { return _gameObjectDataStore[guid]; }
void DeleteGOData(uint32 guid);
TrinityStringLocale const* GetTrinityStringLocale(int32 entry) const
{
- TrinityStringLocaleMap::const_iterator itr = mTrinityStringLocaleMap.find(entry);
- if (itr == mTrinityStringLocaleMap.end()) return NULL;
+ TrinityStringLocaleContainer::const_iterator itr = _trinityStringLocaleStore.find(entry);
+ if (itr == _trinityStringLocaleStore.end()) return NULL;
return &itr->second;
}
const char *GetTrinityString(int32 entry, LocaleConstant locale_idx) const;
@@ -1079,15 +1077,15 @@ class ObjectMgr
time_t GetCreatureRespawnTime(uint32 loguid, uint32 instance)
{
- TRINITY_GUARD(ACE_Thread_Mutex, m_CreatureRespawnTimesMtx);
- return mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)];
+ TRINITY_GUARD(ACE_Thread_Mutex, _creatureRespawnTimesMutex);
+ return _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)];
}
void SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t);
void RemoveCreatureRespawnTime(uint32 loguid, uint32 instance);
time_t GetGORespawnTime(uint32 loguid, uint32 instance)
{
- TRINITY_GUARD(ACE_Thread_Mutex, m_GORespawnTimesMtx);
- return mGORespawnTimes[MAKE_PAIR64(loguid, instance)];
+ TRINITY_GUARD(ACE_Thread_Mutex, _goRespawnTimesMutex);
+ return _goRespawnTimes[MAKE_PAIR64(loguid, instance)];
}
void SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t);
void RemoveGORespawnTime(uint32 loguid, uint32 instance);
@@ -1115,19 +1113,19 @@ class ObjectMgr
GameTele const* GetGameTele(uint32 id) const
{
- GameTeleMap::const_iterator itr = m_GameTeleMap.find(id);
- if (itr == m_GameTeleMap.end()) return NULL;
+ GameTeleContainer::const_iterator itr = _gameTeleStore.find(id);
+ if (itr == _gameTeleStore.end()) return NULL;
return &itr->second;
}
GameTele const* GetGameTele(const std::string& name) const;
- GameTeleMap const& GetGameTeleMap() const { return m_GameTeleMap; }
+ GameTeleContainer const& GetGameTeleMap() const { return _gameTeleStore; }
bool AddGameTele(GameTele& data);
bool DeleteGameTele(const std::string& name);
TrainerSpellData const* GetNpcTrainerSpells(uint32 entry) const
{
- CacheTrainerSpellMap::const_iterator iter = m_mCacheTrainerSpellMap.find(entry);
- if (iter == m_mCacheTrainerSpellMap.end())
+ CacheTrainerSpellContainer::const_iterator iter = _cacheTrainerSpellStore.find(entry);
+ if (iter == _cacheTrainerSpellStore.end())
return NULL;
return &iter->second;
@@ -1135,8 +1133,8 @@ class ObjectMgr
VendorItemData const* GetNpcVendorItemList(uint32 entry) const
{
- CacheVendorItemMap::const_iterator iter = m_mCacheVendorItemMap.find(entry);
- if (iter == m_mCacheVendorItemMap.end())
+ CacheVendorItemContainer::const_iterator iter = _cacheVendorItemStore.find(entry);
+ if (iter == _cacheVendorItemStore.end())
return NULL;
return &iter->second;
@@ -1146,36 +1144,36 @@ class ObjectMgr
bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0) const;
void LoadScriptNames();
- ScriptNameMap &GetScriptNames() { return m_scriptNames; }
- const char * GetScriptName(uint32 id) { return id < m_scriptNames.size() ? m_scriptNames[id].c_str() : ""; }
+ ScriptNameContainer &GetScriptNames() { return _scriptNamesStore; }
+ const char * GetScriptName(uint32 id) { return id < _scriptNamesStore.size() ? _scriptNamesStore[id].c_str() : ""; }
uint32 GetScriptId(const char *name);
SpellClickInfoMapBounds GetSpellClickInfoMapBounds(uint32 creature_id) const
{
- return SpellClickInfoMapBounds(mSpellClickInfoMap.lower_bound(creature_id), mSpellClickInfoMap.upper_bound(creature_id));
+ return SpellClickInfoMapBounds(_spellClickInfoStore.lower_bound(creature_id), _spellClickInfoStore.upper_bound(creature_id));
}
GossipMenusMapBounds GetGossipMenusMapBounds(uint32 uiMenuId) const
{
- return GossipMenusMapBounds(m_mGossipMenusMap.lower_bound(uiMenuId), m_mGossipMenusMap.upper_bound(uiMenuId));
+ return GossipMenusMapBounds(_gossipMenusStore.lower_bound(uiMenuId), _gossipMenusStore.upper_bound(uiMenuId));
}
GossipMenusMapBoundsNonConst GetGossipMenusMapBoundsNonConst(uint32 uiMenuId)
{
- return GossipMenusMapBoundsNonConst(m_mGossipMenusMap.lower_bound(uiMenuId), m_mGossipMenusMap.upper_bound(uiMenuId));
+ return GossipMenusMapBoundsNonConst(_gossipMenusStore.lower_bound(uiMenuId), _gossipMenusStore.upper_bound(uiMenuId));
}
GossipMenuItemsMapBounds GetGossipMenuItemsMapBounds(uint32 uiMenuId) const
{
- return GossipMenuItemsMapBounds(m_mGossipMenuItemsMap.lower_bound(uiMenuId), m_mGossipMenuItemsMap.upper_bound(uiMenuId));
+ return GossipMenuItemsMapBounds(_gossipMenuItemsStore.lower_bound(uiMenuId), _gossipMenuItemsStore.upper_bound(uiMenuId));
}
GossipMenuItemsMapBoundsNonConst GetGossipMenuItemsMapBoundsNonConst(uint32 uiMenuId)
{
- return GossipMenuItemsMapBoundsNonConst(m_mGossipMenuItemsMap.lower_bound(uiMenuId), m_mGossipMenuItemsMap.upper_bound(uiMenuId));
+ return GossipMenuItemsMapBoundsNonConst(_gossipMenuItemsStore.lower_bound(uiMenuId), _gossipMenuItemsStore.upper_bound(uiMenuId));
}
// for wintergrasp only
- GraveYardMap mGraveYardMap;
+ GraveYardContainer GraveYardStore;
static void AddLocaleString(const std::string& s, LocaleConstant locale, StringVector& data);
static inline void GetLocaleString(const StringVector& data, int loc_idx, std::string& value)
@@ -1184,10 +1182,10 @@ class ObjectMgr
value = data[loc_idx];
}
- CharacterConversionMap factionchange_achievements;
- CharacterConversionMap factionchange_items;
- CharacterConversionMap factionchange_spells;
- CharacterConversionMap factionchange_reputations;
+ CharacterConversionMap FactionChange_Achievements;
+ CharacterConversionMap FactionChange_Items;
+ CharacterConversionMap FactionChange_Spells;
+ CharacterConversionMap FactionChange_Reputation;
void LoadFactionChangeAchievements();
void LoadFactionChangeItems();
@@ -1196,80 +1194,73 @@ class ObjectMgr
private:
// first free id for selected id type
- uint32 m_auctionid;
- uint64 m_equipmentSetGuid;
- uint32 m_ItemTextId;
- uint32 m_mailid;
- uint32 m_hiPetNumber;
+ uint32 _auctionId;
+ uint64 _equipmentSetGuid;
+ uint32 _itemTextId;
+ uint32 _mailId;
+ uint32 _hiPetNumber;
// first free low guid for selected guid type
- uint32 m_hiCharGuid;
- uint32 m_hiCreatureGuid;
- uint32 m_hiPetGuid;
- uint32 m_hiVehicleGuid;
- uint32 m_hiItemGuid;
- uint32 m_hiGoGuid;
- uint32 m_hiDoGuid;
- uint32 m_hiCorpseGuid;
- uint32 m_hiMoTransGuid;
-
- QuestMap mQuestTemplates;
-
- typedef UNORDERED_MAP<uint32, GossipText> GossipTextMap;
- typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerMap;
- typedef std::set<uint32> TavernAreaTriggerSet;
- typedef std::set<uint32> GameObjectForQuestSet;
-
- QuestAreaTriggerMap mQuestAreaTriggerMap;
- TavernAreaTriggerSet mTavernAreaTriggerSet;
- GameObjectForQuestSet mGameObjectForQuestSet;
- GossipTextMap mGossipText;
- AreaTriggerMap mAreaTriggers;
- AreaTriggerScriptMap mAreaTriggerScripts;
- AccessRequirementMap mAccessRequirements;
- DungeonEncounterMap mDungeonEncounters;
-
- RepRewardRateMap m_RepRewardRateMap;
- RepOnKillMap mRepOnKill;
- RepSpilloverTemplateMap m_RepSpilloverTemplateMap;
-
- GossipMenusMap m_mGossipMenusMap;
- GossipMenuItemsMap m_mGossipMenuItemsMap;
- PointOfInterestMap mPointsOfInterest;
-
- QuestPOIMap mQuestPOIMap;
-
- QuestRelations mGOQuestRelations;
- QuestRelations mGOQuestInvolvedRelations;
- QuestRelations mCreatureQuestRelations;
- QuestRelations mCreatureQuestInvolvedRelations;
+ uint32 _hiCharGuid;
+ uint32 _hiCreatureGuid;
+ uint32 _hiPetGuid;
+ uint32 _hiVehicleGuid;
+ uint32 _hiItemGuid;
+ uint32 _hiGoGuid;
+ uint32 _hiDoGuid;
+ uint32 _hiCorpseGuid;
+ uint32 _hiMoTransGuid;
+
+ QuestMap _questTemplates;
+
+ typedef UNORDERED_MAP<uint32, GossipText> GossipTextContainer;
+ typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerContainer;
+ typedef std::set<uint32> TavernAreaTriggerContainer;
+ typedef std::set<uint32> GameObjectForQuestContainer;
+
+ QuestAreaTriggerContainer _questAreaTriggerStore;
+ TavernAreaTriggerContainer _tavernAreaTriggerStore;
+ GameObjectForQuestContainer _gameObjectForQuestStore;
+ GossipTextContainer _gossipTextStore;
+ AreaTriggerContainer _areaTriggerStore;
+ AreaTriggerScriptContainer _areaTriggerScriptStore;
+ AccessRequirementContainer _accessRequirementStore;
+ DungeonEncounterContainer _dungeonEncounterStore;
+
+ RepRewardRateContainer _repRewardRateStore;
+ RepOnKillContainer _repOnKillStore;
+ RepSpilloverTemplateContainer _repSpilloverTemplateStore;
+
+ GossipMenusContainer _gossipMenusStore;
+ GossipMenuItemsContainer _gossipMenuItemsStore;
+ PointOfInterestContainer _pointsOfInterestStore;
+
+ QuestPOIContainer _questPOIStore;
+
+ QuestRelations _goQuestRelations;
+ QuestRelations _goQuestInvolvedRelations;
+ QuestRelations _creatureQuestRelations;
+ QuestRelations _creatureQuestInvolvedRelations;
//character reserved names
- typedef std::set<std::wstring> ReservedNamesMap;
- ReservedNamesMap m_ReservedNames;
+ typedef std::set<std::wstring> ReservedNamesContainer;
+ ReservedNamesContainer _reservedNamesStore;
-// GraveYardMap mGraveYardMap;
+ GameTeleContainer _gameTeleStore;
- GameTeleMap m_GameTeleMap;
+ ScriptNameContainer _scriptNamesStore;
- ScriptNameMap m_scriptNames;
+ SpellClickInfoContainer _spellClickInfoStore;
- SpellClickInfoMap mSpellClickInfoMap;
+ SpellScriptsContainer _spellScriptsStore;
- SpellScriptsMap mSpellScripts;
-
- ItemRequiredTargetMap m_ItemRequiredTarget;
-
- VehicleAccessoryMap m_VehicleTemplateAccessoryMap;
- VehicleAccessoryMap m_VehicleAccessoryMap;
-
- typedef std::vector<LocaleConstant> LocalForIndex;
- LocalForIndex m_LocalForIndex;
+ VehicleAccessoryContainer _vehicleTemplateAccessoryStore;
+ VehicleAccessoryContainer _vehicleAccessoryStore;
LocaleConstant DBCLocaleIndex;
- PageTextContainer PageTextStore;
- InstanceTemplateContainer InstanceTemplateStore;
+ PageTextContainer _pageTextStore;
+ InstanceTemplateContainer _instanceTemplateStore;
private:
void LoadScripts(ScriptsType type);
@@ -1277,68 +1268,68 @@ class ObjectMgr
void LoadQuestRelationsHelper(QuestRelations& map, std::string table, bool starter, bool go);
void PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count);
- MailLevelRewardMap m_mailLevelRewardMap;
+ MailLevelRewardContainer _mailLevelRewardStore;
- CreatureBaseStatsMap m_creatureBaseStatsMap;
+ CreatureBaseStatsContainer _creatureBaseStatsStore;
- typedef std::map<uint32, PetLevelInfo*> PetLevelInfoMap;
- // PetLevelInfoMap[creature_id][level]
- PetLevelInfoMap petInfo; // [creature_id][level]
+ typedef std::map<uint32, PetLevelInfo*> PetLevelInfoContainer;
+ // PetLevelInfoContainer[creature_id][level]
+ PetLevelInfoContainer _petInfoStore; // [creature_id][level]
- PlayerClassInfo playerClassInfo[MAX_CLASSES];
+ PlayerClassInfo _playerClassInfo[MAX_CLASSES];
void BuildPlayerLevelInfo(uint8 race, uint8 class_, uint8 level, PlayerLevelInfo* plinfo) const;
- PlayerInfo playerInfo[MAX_RACES][MAX_CLASSES];
+ PlayerInfo _playerInfo[MAX_RACES][MAX_CLASSES];
typedef std::vector<uint32> PlayerXPperLevel; // [level]
- PlayerXPperLevel mPlayerXPperLevel;
-
- typedef std::map<uint32, uint32> BaseXPMap; // [area level][base xp]
- BaseXPMap mBaseXPTable;
-
- typedef std::map<uint32, int32> FishingBaseSkillMap; // [areaId][base skill level]
- FishingBaseSkillMap mFishingBaseForArea;
-
- typedef std::map<uint32, StringVector> HalfNameMap;
- HalfNameMap PetHalfName0;
- HalfNameMap PetHalfName1;
-
- typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameMap;
- ItemSetNameMap mItemSetNameMap;
-
- MapObjectGuids mMapObjectGuids;
- CreatureDataMap mCreatureDataMap;
- CreatureTemplateContainer CreatureTemplateStore;
- CreatureModelContainer CreatureModelStore;
- CreatureAddonContainer CreatureAddonStore;
- CreatureAddonContainer CreatureTemplateAddonStore;
- EquipmentInfoContainer EquipmentInfoStore;
- LinkedRespawnMap mLinkedRespawnMap;
- CreatureLocaleMap mCreatureLocaleMap;
- GameObjectDataMap mGameObjectDataMap;
- GameObjectLocaleMap mGameObjectLocaleMap;
- GameObjectTemplateContainer GameObjectTemplateStore;
-
- ItemTemplateContainer ItemTemplateStore;
- ItemLocaleMap mItemLocaleMap;
- ItemSetNameLocaleMap mItemSetNameLocaleMap;
- QuestLocaleMap mQuestLocaleMap;
- NpcTextLocaleMap mNpcTextLocaleMap;
- PageTextLocaleMap mPageTextLocaleMap;
- TrinityStringLocaleMap mTrinityStringLocaleMap;
- GossipMenuItemsLocaleMap mGossipMenuItemsLocaleMap;
- PointOfInterestLocaleMap mPointOfInterestLocaleMap;
- RespawnTimes mCreatureRespawnTimes;
- ACE_Thread_Mutex m_CreatureRespawnTimesMtx;
- RespawnTimes mGORespawnTimes;
- ACE_Thread_Mutex m_GORespawnTimesMtx;
-
- CacheVendorItemMap m_mCacheVendorItemMap;
- CacheTrainerSpellMap m_mCacheTrainerSpellMap;
-
- std::set<uint32> difficultyEntries[MAX_DIFFICULTY - 1]; // already loaded difficulty 1 value in creatures, used in CheckCreatureTemplate
- std::set<uint32> hasDifficultyEntries[MAX_DIFFICULTY - 1]; // already loaded creatures with difficulty 1 values, used in CheckCreatureTemplate
+ PlayerXPperLevel _playerXPperLevel;
+
+ typedef std::map<uint32, uint32> BaseXPContainer; // [area level][base xp]
+ BaseXPContainer _baseXPTable;
+
+ typedef std::map<uint32, int32> FishingBaseSkillContainer; // [areaId][base skill level]
+ FishingBaseSkillContainer _fishingBaseForAreaStore;
+
+ typedef std::map<uint32, StringVector> HalfNameContainer;
+ HalfNameContainer _petHalfName0;
+ HalfNameContainer _petHalfName1;
+
+ typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameContainer;
+ ItemSetNameContainer _itemSetNameStore;
+
+ MapObjectGuids _mapObjectGuidsStore;
+ CreatureDataContainer _creatureDataStore;
+ CreatureTemplateContainer _creatureTemplateStore;
+ CreatureModelContainer _creatureModelStore;
+ CreatureAddonContainer _creatureAddonStore;
+ CreatureAddonContainer _creatureTemplateAddonStore;
+ EquipmentInfoContainer _equipmentInfoStore;
+ LinkedRespawnContainer _linkedRespawnStore;
+ CreatureLocaleContainer _creatureLocaleStore;
+ GameObjectDataContainer _gameObjectDataStore;
+ GameObjectLocaleContainer _gameObjectLocaleStore;
+ GameObjectTemplateContainer _gameObjectTemplateStore;
+
+ ItemTemplateContainer _itemTemplateStore;
+ ItemLocaleContainer _itemLocaleStore;
+ ItemSetNameLocaleContainer _itemSetNameLocaleStore;
+ QuestLocaleContainer _questLocaleStore;
+ NpcTextLocaleContainer _npcTextLocaleStore;
+ PageTextLocaleContainer _pageTextLocaleStore;
+ TrinityStringLocaleContainer _trinityStringLocaleStore;
+ GossipMenuItemsLocaleContainer _gossipMenuItemsLocaleStore;
+ PointOfInterestLocaleContainer _pointOfInterestLocaleStore;
+ RespawnTimes _creatureRespawnTimes;
+ ACE_Thread_Mutex _creatureRespawnTimesMutex;
+ RespawnTimes _goRespawnTimes;
+ ACE_Thread_Mutex _goRespawnTimesMutex;
+
+ CacheVendorItemContainer _cacheVendorItemStore;
+ CacheTrainerSpellContainer _cacheTrainerSpellStore;
+
+ std::set<uint32> _difficultyEntries[MAX_DIFFICULTY - 1]; // already loaded difficulty 1 value in creatures, used in CheckCreatureTemplate
+ std::set<uint32> _hasDifficultyEntries[MAX_DIFFICULTY - 1]; // already loaded creatures with difficulty 1 values, used in CheckCreatureTemplate
enum CreatureLinkedRespawnType
{
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 0094c20d927..310bda92739 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1853,7 +1853,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
trans->Append(stmt);
// Achievement conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_achievements.begin(); it != sObjectMgr->factionchange_achievements.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Achievements.begin(); it != sObjectMgr->FactionChange_Achievements.end(); ++it)
{
uint32 achiev_alliance = it->first;
uint32 achiev_horde = it->second;
@@ -1864,7 +1864,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Item conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_items.begin(); it != sObjectMgr->factionchange_items.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Items.begin(); it != sObjectMgr->FactionChange_Items.end(); ++it)
{
uint32 item_alliance = it->first;
uint32 item_horde = it->second;
@@ -1873,7 +1873,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Spell conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_spells.begin(); it != sObjectMgr->factionchange_spells.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Spells.begin(); it != sObjectMgr->FactionChange_Spells.end(); ++it)
{
uint32 spell_alliance = it->first;
uint32 spell_horde = it->second;
@@ -1884,7 +1884,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Reputation conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_reputations.begin(); it != sObjectMgr->factionchange_reputations.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Reputation.begin(); it != sObjectMgr->FactionChange_Reputation.end(); ++it)
{
uint32 reputation_alliance = it->first;
uint32 reputation_horde = it->second;
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index b40319358b6..f993ed6843c 100755
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -395,7 +395,7 @@ void ScriptMgr::CreateSpellScripts(uint32 spellId, std::list<SpellScript*>& scri
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -416,7 +416,7 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -433,12 +433,12 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
}
}
-void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsMap::iterator> >& scriptVector)
+void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsContainer::iterator> >& scriptVector)
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
scriptVector.reserve(std::distance(bounds.first, bounds.second));
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index b076447dd90..4d9c5a93875 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -404,15 +404,15 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
// make sure the same guid doesn't already exist and is safe to use
bool incHighest = true;
- if (guid != 0 && guid < sObjectMgr->m_hiCharGuid)
+ if (guid != 0 && guid < sObjectMgr->_hiCharGuid)
{
result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE guid = '%d'", guid);
if (result)
- guid = sObjectMgr->m_hiCharGuid; // use first free if exists
+ guid = sObjectMgr->_hiCharGuid; // use first free if exists
else incHighest = false;
}
else
- guid = sObjectMgr->m_hiCharGuid;
+ guid = sObjectMgr->_hiCharGuid;
// normalize the name if specified and check if it exists
if (!normalizePlayerName(name))
@@ -564,15 +564,15 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
if (!changenth(line, 1, newguid)) // character_inventory.guid update
ROLLBACK(DUMP_FILE_BROKEN);
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid, true))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid, true))
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.bag update
- if (!changeGuid(line, 4, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 4, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.item update
break;
}
case DTT_MAIL: // mail
{
- if (!changeGuid(line, 1, mails, sObjectMgr->m_mailid))
+ if (!changeGuid(line, 1, mails, sObjectMgr->_mailId))
ROLLBACK(DUMP_FILE_BROKEN); // mail.id update
if (!changenth(line, 6, newguid)) // mail.receiver update
ROLLBACK(DUMP_FILE_BROKEN);
@@ -580,9 +580,9 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
}
case DTT_MAIL_ITEM: // mail_items
{
- if (!changeGuid(line, 1, mails, sObjectMgr->m_mailid))
+ if (!changeGuid(line, 1, mails, sObjectMgr->_mailId))
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.id
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.item_guid
if (!changenth(line, 3, newguid)) // mail_items.receiver
ROLLBACK(DUMP_FILE_BROKEN);
@@ -591,7 +591,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
case DTT_ITEM:
{
// item, owner, data field:item, owner guid
- if (!changeGuid(line, 1, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 1, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // item_instance.guid update
if (!changenth(line, 3, newguid)) // item_instance.owner_guid update
ROLLBACK(DUMP_FILE_BROKEN);
@@ -601,7 +601,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
{
if (!changenth(line, 1, newguid)) // character_gifts.guid update
ROLLBACK(DUMP_FILE_BROKEN);
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // character_gifts.item_guid update
break;
}
@@ -662,11 +662,11 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
// in case of name conflict player has to rename at login anyway
sWorld->AddCharacterNameData(guid, name, gender, race, playerClass);
- sObjectMgr->m_hiItemGuid += items.size();
- sObjectMgr->m_mailid += mails.size();
+ sObjectMgr->_hiItemGuid += items.size();
+ sObjectMgr->_mailId += mails.size();
if (incHighest)
- ++sObjectMgr->m_hiCharGuid;
+ ++sObjectMgr->_hiCharGuid;
fclose(fin);