aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAI.cpp14
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAIMgr.cpp10
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAIMgr.h2
-rw-r--r--src/server/game/Accounts/AccountMgr.h2
-rw-r--r--src/server/game/Achievements/AchievementMgr.cpp72
-rw-r--r--src/server/game/Achievements/AchievementMgr.h2
-rw-r--r--src/server/game/Addons/AddonMgr.h4
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp48
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h11
-rw-r--r--src/server/game/Battlegrounds/ArenaTeam.cpp28
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp70
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp12
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.cpp18
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp6
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp8
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp42
-rw-r--r--src/server/game/Chat/Chat.cpp44
-rw-r--r--src/server/game/Chat/Commands/Debugcmds.cpp4
-rw-r--r--src/server/game/Chat/Commands/Level0.cpp4
-rw-r--r--src/server/game/Chat/Commands/Level1.cpp74
-rw-r--r--src/server/game/Chat/Commands/Level2.cpp108
-rw-r--r--src/server/game/Chat/Commands/Level3.cpp238
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp22
-rw-r--r--src/server/game/Conditions/DisableMgr.cpp2
-rw-r--r--src/server/game/DataStores/DBCStores.cpp2
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp8
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp80
-rw-r--r--src/server/game/Entities/Creature/Creature.h2
-rw-r--r--src/server/game/Entities/Creature/GossipDef.cpp36
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp52
-rw-r--r--src/server/game/Entities/Item/Container/Bag.cpp2
-rw-r--r--src/server/game/Entities/Item/Item.cpp12
-rw-r--r--src/server/game/Entities/Item/ItemEnchantmentMgr.cpp2
-rw-r--r--src/server/game/Entities/Object/Object.cpp18
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp46
-rw-r--r--src/server/game/Entities/Player/Player.cpp338
-rw-r--r--src/server/game/Entities/Player/SocialMgr.cpp2
-rw-r--r--src/server/game/Entities/Totem/Totem.cpp4
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp8
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp68
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.cpp2
-rw-r--r--src/server/game/Events/GameEventMgr.cpp60
-rw-r--r--src/server/game/Events/GameEventMgr.h6
-rw-r--r--src/server/game/Globals/ObjectAccessor.cpp4
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp44
-rw-r--r--src/server/game/Globals/ObjectMgr.h2
-rw-r--r--src/server/game/Grids/ObjectGridLoader.cpp6
-rw-r--r--src/server/game/Groups/Group.cpp58
-rw-r--r--src/server/game/Guilds/Guild.cpp26
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.cpp10
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.h2
-rw-r--r--src/server/game/Loot/LootMgr.cpp12
-rw-r--r--src/server/game/Mails/Mail.cpp26
-rw-r--r--src/server/game/Maps/Map.cpp18
-rw-r--r--src/server/game/Maps/MapInstanced.cpp2
-rw-r--r--src/server/game/Maps/MapManager.cpp8
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp18
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp2
-rw-r--r--src/server/game/Pools/PoolMgr.cpp30
-rw-r--r--src/server/game/Pools/PoolMgr.h2
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp2
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp4
-rw-r--r--src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp22
-rw-r--r--src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp44
-rw-r--r--src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp10
-rw-r--r--src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp2
-rw-r--r--src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp24
-rw-r--r--src/server/game/Server/Protocol/Handlers/ChatHandler.cpp8
-rw-r--r--src/server/game/Server/Protocol/Handlers/GroupHandler.cpp16
-rw-r--r--src/server/game/Server/Protocol/Handlers/GuildHandler.cpp68
-rw-r--r--src/server/game/Server/Protocol/Handlers/ItemHandler.cpp10
-rw-r--r--src/server/game/Server/Protocol/Handlers/MiscHandler.cpp20
-rw-r--r--src/server/game/Server/Protocol/Handlers/MovementHandler.cpp4
-rw-r--r--src/server/game/Server/Protocol/Handlers/NPCHandler.cpp16
-rw-r--r--src/server/game/Server/Protocol/Handlers/PetHandler.cpp2
-rw-r--r--src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp34
-rw-r--r--src/server/game/Server/Protocol/Handlers/QueryHandler.cpp18
-rw-r--r--src/server/game/Server/Protocol/Handlers/QuestHandler.cpp30
-rw-r--r--src/server/game/Server/Protocol/Handlers/SpellHandler.cpp4
-rw-r--r--src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp10
-rw-r--r--src/server/game/Server/Protocol/Handlers/TicketHandler.cpp16
-rw-r--r--src/server/game/Server/WorldSession.cpp6
-rw-r--r--src/server/game/Skills/SkillDiscovery.cpp4
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp22
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp14
-rw-r--r--src/server/game/Spells/Spell.cpp46
-rw-r--r--src/server/game/Spells/SpellEffects.cpp48
-rw-r--r--src/server/game/Spells/SpellMgr.cpp24
-rw-r--r--src/server/game/Spells/SpellMgr.h2
-rw-r--r--src/server/game/Tools/PlayerDump.cpp32
-rw-r--r--src/server/game/Weather/WeatherMgr.cpp2
-rw-r--r--src/server/game/World/World.cpp240
-rw-r--r--src/server/worldserver/CommandLine/CliRunnable.cpp24
-rw-r--r--src/server/worldserver/TCSoap/TCSoap.cpp6
97 files changed, 1354 insertions, 1353 deletions
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index c70f471a82f..308d4cd7c69 100644
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -60,8 +60,8 @@ int CreatureEventAI::Permissible(const Creature *creature)
CreatureEventAI::CreatureEventAI(Creature *c) : CreatureAI(c)
{
// Need make copy for filter unneeded steps and safe in case table reload
- CreatureEventAI_Event_Map::const_iterator CreatureEvents = CreatureEAI_Mgr.GetCreatureEventAIMap().find(me->GetEntry());
- if (CreatureEvents != CreatureEAI_Mgr.GetCreatureEventAIMap().end())
+ CreatureEventAI_Event_Map::const_iterator CreatureEvents = sEventAIMgr.GetCreatureEventAIMap().find(me->GetEntry());
+ if (CreatureEvents != sEventAIMgr.GetCreatureEventAIMap().end())
{
std::vector<CreatureEventAI_Event>::const_iterator i;
for (i = (*CreatureEvents).second.begin(); i != (*CreatureEvents).second.end(); ++i)
@@ -412,7 +412,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
{
if (CreatureInfo const* ci = GetCreatureTemplateStore(action.morph.creatureId))
{
- uint32 display_id = objmgr.ChooseDisplayId(0,ci);
+ uint32 display_id = sObjectMgr.ChooseDisplayId(0,ci);
me->SetDisplayId(display_id);
}
}
@@ -674,8 +674,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
{
Unit* target = GetTargetByType(action.summon_id.target, pActionInvoker);
- CreatureEventAI_Summon_Map::const_iterator i = CreatureEAI_Mgr.GetCreatureEventAISummonMap().find(action.summon_id.spawnId);
- if (i == CreatureEAI_Mgr.GetCreatureEventAISummonMap().end())
+ CreatureEventAI_Summon_Map::const_iterator i = sEventAIMgr.GetCreatureEventAISummonMap().find(action.summon_id.spawnId);
+ if (i == sEventAIMgr.GetCreatureEventAISummonMap().end())
{
sLog.outErrorDb("CreatureEventAI: failed to spawn creature %u. Summon map index %u does not exist. EventID %d. CreatureID %d", action.summon_id.creatureId, action.summon_id.spawnId, EventId, me->GetEntry());
return;
@@ -1230,9 +1230,9 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* pSource, Unit*
return;
}
- CreatureEventAI_TextMap::const_iterator i = CreatureEAI_Mgr.GetCreatureEventAITextMap().find(textEntry);
+ CreatureEventAI_TextMap::const_iterator i = sEventAIMgr.GetCreatureEventAITextMap().find(textEntry);
- if (i == CreatureEAI_Mgr.GetCreatureEventAITextMap().end())
+ if (i == sEventAIMgr.GetCreatureEventAITextMap().end())
{
sLog.outErrorDb("CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.",pSource->GetEntry(),pSource->GetTypeId(),pSource->GetGUIDLow(),textEntry);
return;
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
index 9f4105050ae..9f10cae7409 100644
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
@@ -34,7 +34,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
m_CreatureEventAI_TextMap.clear();
// Load EventAI Text
- objmgr.LoadTrinityStrings(WorldDatabase,"creature_ai_texts",MIN_CREATURE_AI_TEXT_STRING_ID,MAX_CREATURE_AI_TEXT_STRING_ID);
+ sObjectMgr.LoadTrinityStrings(WorldDatabase,"creature_ai_texts",MIN_CREATURE_AI_TEXT_STRING_ID,MAX_CREATURE_AI_TEXT_STRING_ID);
// Gather Additional data from EventAI Texts
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM creature_ai_texts");
@@ -65,7 +65,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
}
// range negative (don't must be happen, loaded from same table)
- if (!objmgr.GetTrinityStringLocale(i))
+ if (!sObjectMgr.GetTrinityStringLocale(i))
{
sLog.outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` not found",i);
continue;
@@ -331,7 +331,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
break;
case EVENT_T_QUEST_ACCEPT:
case EVENT_T_QUEST_COMPLETE:
- if (!objmgr.GetQuestTemplate(temp.quest.questId))
+ if (!sObjectMgr.GetQuestTemplate(temp.quest.questId))
sLog.outErrorDb("CreatureEventAI: Creature %u are using event(%u) with not existed qyest id (%u) in param1, skipped.", temp.creature_id, i, temp.quest.questId);
sLog.outErrorDb("CreatureEventAI: Creature %u using not implemented event (%u) in event %u.", temp.creature_id, temp.event_id, i);
continue;
@@ -543,7 +543,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_all_pct.percent);
break;
case ACTION_T_QUEST_EVENT:
- if (Quest const* qid = objmgr.GetQuestTemplate(action.quest_event.questId))
+ if (Quest const* qid = sObjectMgr.GetQuestTemplate(action.quest_event.questId))
{
if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT))
sLog.outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId);
@@ -585,7 +585,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
sLog.outErrorDb("CreatureEventAI: Event %u Action %u is change phase by too large for any use %i.", i, j+1, action.set_inc_phase.step);
break;
case ACTION_T_QUEST_EVENT_ALL:
- if (Quest const* qid = objmgr.GetQuestTemplate(action.quest_event_all.questId))
+ if (Quest const* qid = sObjectMgr.GetQuestTemplate(action.quest_event_all.questId))
{
if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT))
sLog.outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId);
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.h b/src/server/game/AI/EventAI/CreatureEventAIMgr.h
index 3c8181e9e74..7818c1cc739 100644
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.h
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.h
@@ -43,5 +43,5 @@ class CreatureEventAIMgr
CreatureEventAI_TextMap m_CreatureEventAI_TextMap;
};
-#define CreatureEAI_Mgr (*ACE_Singleton<CreatureEventAIMgr, ACE_Null_Mutex>::instance())
+#define sEventAIMgr (*ACE_Singleton<CreatureEventAIMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h
index f53d29032b7..e4526932ac8 100644
--- a/src/server/game/Accounts/AccountMgr.h
+++ b/src/server/game/Accounts/AccountMgr.h
@@ -59,6 +59,6 @@ class AccountMgr
static bool normalizeString(std::string& utf8str);
};
-#define accmgr (*ACE_Singleton<AccountMgr, ACE_Null_Mutex>::instance())
+#define sAccountMgr (*ACE_Singleton<AccountMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index 7fb8ddcfae1..800bf80aaab 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -49,7 +49,7 @@ namespace Trinity
: i_player(pl), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) {}
void operator()(WorldPacket& data, int32 loc_idx)
{
- char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
+ char const* text = sObjectMgr.GetTrinityString(i_textId,loc_idx);
data << uint8(i_msgtype);
data << uint32(LANG_UNIVERSAL);
@@ -110,7 +110,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT:
return true;
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE:
- if (!creature.id || !objmgr.GetCreatureTemplate(creature.id))
+ if (!creature.id || !sObjectMgr.GetCreatureTemplate(creature.id))
{
sLog.outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE (%u) has non-existing creature id in value1 (%u), ignored.",
criteria->ID, criteria->requiredType,dataType,creature.id);
@@ -355,7 +355,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un
}
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM:
{
- ItemPrototype const *pProto = objmgr.GetItemPrototype(miscvalue1);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(miscvalue1);
if (!pProto)
return false;
return pProto->ItemLevel >= equipped_item.item_level && pProto->Quality >= equipped_item.item_quality;
@@ -414,7 +414,7 @@ void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, uin
if (!sWorld.getConfig(CONFIG_GM_ALLOW_ACHIEVEMENT_GAINS) && m_player->GetSession()->GetSecurity() > SEC_PLAYER)
return;
- AchievementCriteriaEntryList const& achievementCriteriaList = achievementmgr.GetAchievementCriteriaByType(type);
+ AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr.GetAchievementCriteriaByType(type);
for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i)
{
AchievementCriteriaEntry const *achievementCriteria = (*i);
@@ -562,7 +562,7 @@ void AchievementMgr::LoadFromDB(QueryResult_AutoPtr achievementResult, QueryResu
uint32 achievement_id = fields[0].GetUInt32();
- // don't must happen: cleanup at server startup in achievementmgr.LoadCompletedAchievements()
+ // don't must happen: cleanup at server startup in sAchievementMgr.LoadCompletedAchievements()
if (!sAchievementStore.LookupEntry(achievement_id))
continue;
@@ -617,7 +617,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
sLog.outDebug("AchievementMgr::SendAchievementEarned(%u)", achievement->ID);
#endif
- if (Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId()))
+ if (Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId()))
{
Trinity::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_GUILD_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID);
Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> say_do(say_builder);
@@ -710,7 +710,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (!sWorld.getConfig(CONFIG_GM_ALLOW_ACHIEVEMENT_GAINS) && m_player->GetSession()->GetSecurity() > SEC_PLAYER)
return;
- AchievementCriteriaEntryList const& achievementCriteriaList = achievementmgr.GetAchievementCriteriaByType(type);
+ AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr.GetAchievementCriteriaByType(type);
for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i)
{
AchievementCriteriaEntry const *achievementCriteria = (*i);
@@ -789,7 +789,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (achievementCriteria->additionalRequrements[0].additionalRequirement_type)
{
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(),unit))
continue;
}
@@ -835,7 +835,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue;
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(),unit))
continue;
@@ -911,7 +911,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
uint32 counter =0;
for (QuestStatusMap::const_iterator itr = GetPlayer()->getQuestStatusMap().begin(); itr != GetPlayer()->getQuestStatusMap().end(); itr++)
{
- Quest const* quest = objmgr.GetQuestTemplate(itr->first);
+ Quest const* quest = sObjectMgr.GetQuestTemplate(itr->first);
if (itr->second.m_rewarded && quest && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID)
counter++;
}
@@ -1033,7 +1033,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue;
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(),unit))
continue;
@@ -1075,7 +1075,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
case 1789:
{
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(),unit))
continue;
break;
@@ -1094,7 +1094,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue;
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data)
continue;
@@ -1111,7 +1111,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue;
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data)
continue;
@@ -1141,7 +1141,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (achievementCriteria->loot_type.lootTypeCount == 1)
{
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(),unit))
continue;
}
@@ -1164,7 +1164,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (achievementCriteria->additionalRequrements[0].additionalRequirement_type == ACHIEVEMENT_CRITERIA_CONDITION_NO_LOOSE)
{
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(),unit,miscvalue1))
{
// reset the progress as we have a win without the requirement.
@@ -1260,7 +1260,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue;
// check item level and quality via achievement_criteria_data
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(), 0, miscvalue1))
continue;
@@ -1278,12 +1278,12 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (miscvalue2 != achievementCriteria->roll_greed_on_loot.rollValue)
continue;
- ItemPrototype const *pProto = objmgr.GetItemPrototype(miscvalue1);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(miscvalue1);
if (!pProto)
continue;
// check item level via achievement_criteria_data
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(), 0, pProto->ItemLevel))
continue;
@@ -1300,7 +1300,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (achievementCriteria->do_emote.count)
{
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data || !data->Meets(GetPlayer(),unit))
continue;
}
@@ -1363,7 +1363,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
spellIter != GetPlayer()->GetSpellMap().end();
++spellIter)
{
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spellIter->first);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spellIter->first);
for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
{
if (skillIter->second->skillId == achievementCriteria->learn_skillline_spell.skillLine)
@@ -1381,7 +1381,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (achievementCriteria->win_duel.duelCount)
{
// those requirements couldn't be found in the dbc
- AchievementCriteriaDataSet const* data = achievementmgr.GetCriteriaDataSet(achievementCriteria);
+ AchievementCriteriaDataSet const* data = sAchievementMgr.GetCriteriaDataSet(achievementCriteria);
if (!data)
continue;
@@ -1422,7 +1422,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
spellIter != GetPlayer()->GetSpellMap().end();
++spellIter)
{
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spellIter->first);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spellIter->first);
for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
if (skillIter->second->skillId == achievementCriteria->learn_skill_line.skillLine)
spellCount++;
@@ -1503,7 +1503,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
CompletedAchievement(achievement);
}
- if (AchievementEntryList const* achRefList = achievementmgr.GetAchievementByReferencedId(achievement->ID))
+ if (AchievementEntryList const* achRefList = sAchievementMgr.GetAchievementByReferencedId(achievement->ID))
{
for (AchievementEntryList::const_iterator itr = achRefList->begin(); itr != achRefList->end(); ++itr)
if (IsCompletedAchievement(*itr))
@@ -1524,7 +1524,7 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve
if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL))
{
// someone on this realm has already completed that achievement
- if (achievementmgr.IsRealmCompleted(achievement))
+ if (sAchievementMgr.IsRealmCompleted(achievement))
return false;
}
@@ -1698,7 +1698,7 @@ bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry)
uint32 achievmentForTestId = entry->refAchievement ? entry->refAchievement : entry->ID;
uint32 achievmentForTestCount = entry->count;
- AchievementCriteriaEntryList const* cList = achievementmgr.GetAchievementCriteriaByAchievement(achievmentForTestId);
+ AchievementCriteriaEntryList const* cList = sAchievementMgr.GetAchievementCriteriaByAchievement(achievmentForTestId);
if (!cList)
return false;
uint32 count = 0;
@@ -1856,7 +1856,7 @@ void AchievementMgr::UpdateTimedAchievements(uint32 timeDiff)
void AchievementMgr::StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
{
- AchievementCriteriaEntryList const& achievementCriteriaList = achievementmgr.GetTimedAchievementCriteriaByType(type);
+ AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr.GetTimedAchievementCriteriaByType(type);
for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i)
{
if ((*i)->timerStartEvent != entry)
@@ -1876,7 +1876,7 @@ void AchievementMgr::StartTimedAchievement(AchievementCriteriaTimedTypes type, u
void AchievementMgr::RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
{
- AchievementCriteriaEntryList const& achievementCriteriaList = achievementmgr.GetTimedAchievementCriteriaByType(type);
+ AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr.GetTimedAchievementCriteriaByType(type);
for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i!=achievementCriteriaList.end(); ++i)
{
if ((*i)->timerStartEvent != entry)
@@ -1916,13 +1916,13 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
// don't insert for ACHIEVEMENT_FLAG_REALM_FIRST_KILL since otherwise only the first group member would reach that achievement
// TODO: where do set this instead?
if (!(achievement->flags & ACHIEVEMENT_FLAG_REALM_FIRST_KILL))
- achievementmgr.SetRealmCompleted(achievement);
+ sAchievementMgr.SetRealmCompleted(achievement);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_ACHIEVEMENT_POINTS, achievement->points);
// reward items and titles if any
- AchievementReward const* reward = achievementmgr.GetAchievementReward(achievement);
+ AchievementReward const* reward = sAchievementMgr.GetAchievementReward(achievement);
// no rewards
if (!reward)
@@ -1945,7 +1945,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
std::string text = reward->text;
if (loc_idx >= 0)
{
- if (AchievementRewardLocale const* loc = achievementmgr.GetAchievementRewardLocale(achievement))
+ if (AchievementRewardLocale const* loc = sAchievementMgr.GetAchievementRewardLocale(achievement))
{
if (loc->subject.size() > size_t(loc_idx) && !loc->subject[loc_idx].empty())
subject = loc->subject[loc_idx];
@@ -2134,7 +2134,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT)
sLog.outErrorDb("Table `achievement_criteria_data` has ScriptName set for non-scripted data type (Entry: %u, type %u), useless data.", criteria_id, dataType);
else
- scriptId = objmgr.GetScriptId(scriptName);
+ scriptId = sObjectMgr.GetScriptId(scriptName);
}
AchievementCriteriaData data(dataType, fields[2].GetUInt32(), fields[3].GetUInt32(), scriptId);
@@ -2346,7 +2346,7 @@ void AchievementGlobalMgr::LoadRewards()
//check mail data before item for report including wrong item case
if (reward.sender)
{
- if (!objmgr.GetCreatureTemplate(reward.sender))
+ if (!sObjectMgr.GetCreatureTemplate(reward.sender))
{
sLog.outErrorDb("Table `achievement_reward` (Entry: %u) has invalid creature entry %u as sender, mail reward skipped.", entry, reward.sender);
reward.sender = 0;
@@ -2366,7 +2366,7 @@ void AchievementGlobalMgr::LoadRewards()
if (reward.itemId)
{
- if (!objmgr.GetItemPrototype(reward.itemId))
+ if (!sObjectMgr.GetItemPrototype(reward.itemId))
{
sLog.outErrorDb("Table `achievement_reward` (Entry: %u) has invalid item id %u, reward mail will not contain item.", entry, reward.itemId);
reward.itemId = 0;
@@ -2422,7 +2422,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
std::string str = fields[1+2*(i-1)].GetCppString();
if (!str.empty())
{
- int idx = objmgr.GetOrNewIndexForLocale(LocaleConstant(i));
+ int idx = sObjectMgr.GetOrNewIndexForLocale(LocaleConstant(i));
if (idx >= 0)
{
if (data.subject.size() <= size_t(idx))
@@ -2434,7 +2434,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
str = fields[1+2*(i-1)+1].GetCppString();
if (!str.empty())
{
- int idx = objmgr.GetOrNewIndexForLocale(LocaleConstant(i));
+ int idx = sObjectMgr.GetOrNewIndexForLocale(LocaleConstant(i));
if (idx >= 0)
{
if (data.text.size() <= size_t(idx))
diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h
index f49c2954c4e..ddbd07369fa 100644
--- a/src/server/game/Achievements/AchievementMgr.h
+++ b/src/server/game/Achievements/AchievementMgr.h
@@ -345,6 +345,6 @@ class AchievementGlobalMgr
AchievementRewardLocales m_achievementRewardLocales;
};
-#define achievementmgr (*ACE_Singleton<AchievementGlobalMgr, ACE_Null_Mutex>::instance())
+#define sAchievementMgr (*ACE_Singleton<AchievementGlobalMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Addons/AddonMgr.h b/src/server/game/Addons/AddonMgr.h
index 112415e5b40..a2233db2592 100644
--- a/src/server/game/Addons/AddonMgr.h
+++ b/src/server/game/Addons/AddonMgr.h
@@ -69,9 +69,9 @@ class AddonMgr
{
friend class ACE_Singleton<AddonMgr, ACE_Null_Mutex>;
AddonMgr();
- public:
+ ~AddonMgr();
- ~AddonMgr();
+ public:
void LoadFromDB();
void SaveAddon(AddonInfo const& addon);
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index 1016398c467..002abac3bc3 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -97,7 +97,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction)
uint32 bidder_accId = 0;
uint32 bidder_security = 0;
uint64 bidder_guid = MAKE_NEW_GUID(auction->bidder, 0, HIGHGUID_PLAYER);
- Player *bidder = objmgr.GetPlayer(bidder_guid);
+ Player *bidder = sObjectMgr.GetPlayer(bidder_guid);
// data for gm.log
if (sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
@@ -110,22 +110,22 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction)
}
else
{
- bidder_accId = objmgr.GetPlayerAccountIdByGUID(bidder_guid);
- bidder_security = accmgr.GetSecurity(bidder_accId);
+ bidder_accId = sObjectMgr.GetPlayerAccountIdByGUID(bidder_guid);
+ bidder_security = sAccountMgr.GetSecurity(bidder_accId);
if (bidder_security > SEC_PLAYER) // not do redundant DB requests
{
- if (!objmgr.GetPlayerNameByGUID(bidder_guid,bidder_name))
- bidder_name = objmgr.GetTrinityStringForDBCLocale(LANG_UNKNOWN);
+ if (!sObjectMgr.GetPlayerNameByGUID(bidder_guid,bidder_name))
+ bidder_name = sObjectMgr.GetTrinityStringForDBCLocale(LANG_UNKNOWN);
}
}
if (bidder_security > SEC_PLAYER)
{
std::string owner_name;
- if (!objmgr.GetPlayerNameByGUID(auction->owner,owner_name))
- owner_name = objmgr.GetTrinityStringForDBCLocale(LANG_UNKNOWN);
+ if (!sObjectMgr.GetPlayerNameByGUID(auction->owner,owner_name))
+ owner_name = sObjectMgr.GetTrinityStringForDBCLocale(LANG_UNKNOWN);
- uint32 owner_accid = objmgr.GetPlayerAccountIdByGUID(auction->owner);
+ uint32 owner_accid = sObjectMgr.GetPlayerAccountIdByGUID(auction->owner);
sLog.outCommand(bidder_accId,"GM %s (Account: %u) won item in auction: %s (Entry: %u Count: %u) and pay money: %u. Original owner %s (Account: %u)",
bidder_name.c_str(),bidder_accId,pItem->GetProto()->Name1,pItem->GetEntry(),pItem->GetCount(),auction->bid,owner_name.c_str(),owner_accid);
@@ -164,8 +164,8 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction)
void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry * auction)
{
uint64 owner_guid = MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER);
- Player *owner = objmgr.GetPlayer(owner_guid);
- uint32 owner_accId = objmgr.GetPlayerAccountIdByGUID(owner_guid);
+ Player *owner = sObjectMgr.GetPlayer(owner_guid);
+ uint32 owner_accId = sObjectMgr.GetPlayerAccountIdByGUID(owner_guid);
// owner exist (online or offline)
if (owner || owner_accId)
{
@@ -194,8 +194,8 @@ void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry * auction)
void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction)
{
uint64 owner_guid = MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER);
- Player *owner = objmgr.GetPlayer(owner_guid);
- uint32 owner_accId = objmgr.GetPlayerAccountIdByGUID(owner_guid);
+ Player *owner = sObjectMgr.GetPlayer(owner_guid);
+ uint32 owner_accId = sObjectMgr.GetPlayerAccountIdByGUID(owner_guid);
// owner exist
if (owner || owner_accId)
{
@@ -237,8 +237,8 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry * auction)
return;
uint64 owner_guid = MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER);
- Player *owner = objmgr.GetPlayer(owner_guid);
- uint32 owner_accId = objmgr.GetPlayerAccountIdByGUID(owner_guid);
+ Player *owner = sObjectMgr.GetPlayer(owner_guid);
+ uint32 owner_accId = sObjectMgr.GetPlayerAccountIdByGUID(owner_guid);
// owner exist
if (owner || owner_accId)
{
@@ -282,7 +282,7 @@ void AuctionHouseMgr::LoadAuctionItems()
uint32 item_guid = fields[11].GetUInt32();
uint32 item_template = fields[12].GetUInt32();
- ItemPrototype const *proto = objmgr.GetItemPrototype(item_template);
+ ItemPrototype const *proto = sObjectMgr.GetItemPrototype(item_template);
if (!proto)
{
@@ -363,7 +363,7 @@ void AuctionHouseMgr::LoadAuctions()
aItem->startbid = fields[9].GetUInt32();
aItem->deposit = fields[10].GetUInt32();
- CreatureData const* auctioneerData = objmgr.GetCreatureData(aItem->auctioneer);
+ CreatureData const* auctioneerData = sObjectMgr.GetCreatureData(aItem->auctioneer);
if (!auctioneerData)
{
aItem->DeleteFromDB();
@@ -372,7 +372,7 @@ void AuctionHouseMgr::LoadAuctions()
continue;
}
- CreatureInfo const* auctioneerInfo = objmgr.GetCreatureTemplate(auctioneerData->id);
+ CreatureInfo const* auctioneerInfo = sObjectMgr.GetCreatureTemplate(auctioneerData->id);
if (!auctioneerInfo)
{
aItem->DeleteFromDB();
@@ -534,7 +534,7 @@ void AuctionHouseObject::Update()
///- Either cancel the auction if there was no bidder
if (auction->bidder == 0)
{
- auctionmgr.SendAuctionExpiredMail(auction);
+ sAuctionMgr.SendAuctionExpiredMail(auction);
sScriptMgr.OnAuctionExpire(this, auction);
}
///- Or perform the transaction
@@ -543,8 +543,8 @@ void AuctionHouseObject::Update()
//we should send an "item sold" message if the seller is online
//we send the item to the winner
//we send the money to the seller
- auctionmgr.SendAuctionSuccessfulMail(auction);
- auctionmgr.SendAuctionWonMail(auction);
+ sAuctionMgr.SendAuctionSuccessfulMail(auction);
+ sAuctionMgr.SendAuctionWonMail(auction);
sScriptMgr.OnAuctionSuccessful(this, auction);
}
@@ -552,7 +552,7 @@ void AuctionHouseObject::Update()
CharacterDatabase.BeginTransaction();
auction->DeleteFromDB();
uint32 item_template = auction->item_template;
- auctionmgr.RemoveAItem(auction->item_guidlow);
+ sAuctionMgr.RemoveAItem(auction->item_guidlow);
RemoveAuction(auction, item_template);
CharacterDatabase.CommitTransaction();
}
@@ -599,7 +599,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
{
AuctionEntry *Aentry = itr->second;
- Item *item = auctionmgr.GetAItem(Aentry->item_guidlow);
+ Item *item = sAuctionMgr.GetAItem(Aentry->item_guidlow);
if (!item)
continue;
@@ -634,7 +634,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
// local name
if (loc_idx >= 0)
{
- ItemLocale const *il = objmgr.GetItemLocale(proto->ItemId);
+ ItemLocale const *il = sObjectMgr.GetItemLocale(proto->ItemId);
if (il)
{
if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty())
@@ -696,7 +696,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
//this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
{
- Item *pItem = auctionmgr.GetAItem(item_guidlow);
+ Item *pItem = sAuctionMgr.GetAItem(item_guidlow);
if (!pItem)
{
sLog.outError("auction to item, that doesn't exist !!!!");
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index bdd2de22281..322fb08360f 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -119,9 +119,9 @@ class AuctionHouseMgr
{
friend class ACE_Singleton<AuctionHouseMgr, ACE_Null_Mutex>;
AuctionHouseMgr();
+ ~AuctionHouseMgr();
public:
- ~AuctionHouseMgr();
typedef UNORDERED_MAP<uint32, Item*> ItemMap;
@@ -132,9 +132,8 @@ class AuctionHouseMgr
{
ItemMap::const_iterator itr = mAitems.find(id);
if (itr != mAitems.end())
- {
return itr->second;
- }
+
return NULL;
}
@@ -147,7 +146,8 @@ class AuctionHouseMgr
static AuctionHouseEntry const* GetAuctionHouseEntry(uint32 factionTemplateId);
public:
- //load first auction items, because of check if item exists, when loading
+
+ //load first auction items, because of check if item exists, when loading
void LoadAuctionItems();
void LoadAuctions();
@@ -157,6 +157,7 @@ class AuctionHouseMgr
void Update();
private:
+
AuctionHouseObject mHordeAuctions;
AuctionHouseObject mAllianceAuctions;
AuctionHouseObject mNeutralAuctions;
@@ -164,6 +165,6 @@ class AuctionHouseMgr
ItemMap mAitems;
};
-#define auctionmgr (*ACE_Singleton<AuctionHouseMgr, ACE_Null_Mutex>::instance())
+#define sAuctionMgr (*ACE_Singleton<AuctionHouseMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 4224ff6357a..51c5cecd6f6 100644
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -62,9 +62,9 @@ ArenaTeam::~ArenaTeam()
bool ArenaTeam::Create(uint64 captainGuid, uint32 type, std::string ArenaTeamName)
{
- if (!objmgr.GetPlayer(captainGuid)) // player not exist
+ if (!sObjectMgr.GetPlayer(captainGuid)) // player not exist
return false;
- if (objmgr.GetArenaTeamByName(ArenaTeamName)) // arena team with this name already exist
+ if (sObjectMgr.GetArenaTeamByName(ArenaTeamName)) // arena team with this name already exist
return false;
sLog.outDebug("GUILD: creating arena team %s to leader: %u", ArenaTeamName.c_str(), GUID_LOPART(captainGuid));
@@ -73,7 +73,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint32 type, std::string ArenaTeamNam
m_Name = ArenaTeamName;
m_Type = type;
- m_TeamId = objmgr.GenerateArenaTeamId();
+ m_TeamId = sObjectMgr.GenerateArenaTeamId();
// ArenaTeamName already assigned to ArenaTeam::name, use it to encode string for DB
CharacterDatabase.escape_string(ArenaTeamName);
@@ -103,7 +103,7 @@ bool ArenaTeam::AddMember(const uint64& PlayerGuid)
if (GetMembersSize() >= GetType() * 2)
return false;
- Player *pl = objmgr.GetPlayer(PlayerGuid);
+ Player *pl = sObjectMgr.GetPlayer(PlayerGuid);
if (pl)
{
if (pl->GetArenaTeamId(GetSlot()))
@@ -266,7 +266,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult_AutoPtr arenaTeamMembersResult)
void ArenaTeam::SetCaptain(const uint64& guid)
{
// disable remove/promote buttons
- Player *oldcaptain = objmgr.GetPlayer(GetCaptain());
+ Player *oldcaptain = sObjectMgr.GetPlayer(GetCaptain());
if (oldcaptain)
oldcaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 1);
@@ -277,7 +277,7 @@ void ArenaTeam::SetCaptain(const uint64& guid)
CharacterDatabase.PExecute("UPDATE arena_team SET captainguid = '%u' WHERE arenateamid = '%u'", GUID_LOPART(guid), GetId());
// enable remove/promote buttons
- Player *newcaptain = objmgr.GetPlayer(guid);
+ Player *newcaptain = sObjectMgr.GetPlayer(guid);
if (newcaptain)
{
newcaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0);
@@ -294,7 +294,7 @@ void ArenaTeam::DelMember(uint64 guid)
break;
}
- if (Player *player = objmgr.GetPlayer(guid))
+ if (Player *player = sObjectMgr.GetPlayer(guid))
{
player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);
// delete all info regarding this team
@@ -325,7 +325,7 @@ void ArenaTeam::Disband(WorldSession *session)
CharacterDatabase.PExecute("DELETE FROM arena_team_member WHERE arenateamid = '%u'", m_TeamId); //< this should be alredy done by calling DelMember(memberGuids[j]); for each member
CharacterDatabase.PExecute("DELETE FROM arena_team_stats WHERE arenateamid = '%u'", m_TeamId);
CharacterDatabase.CommitTransaction();
- objmgr.RemoveArenaTeam(m_TeamId);
+ sObjectMgr.RemoveArenaTeam(m_TeamId);
}
void ArenaTeam::Roster(WorldSession *session)
@@ -342,7 +342,7 @@ void ArenaTeam::Roster(WorldSession *session)
for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
- pl = objmgr.GetPlayer(itr->guid);
+ pl = sObjectMgr.GetPlayer(itr->guid);
data << uint64(itr->guid); // guid
data << uint8((pl ? 1 : 0)); // online flag
@@ -400,7 +400,7 @@ void ArenaTeam::NotifyStatsChanged()
// updates arena team stats for every member of the team (not only the ones who participated!)
for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
- Player * plr = objmgr.GetPlayer(itr->guid);
+ Player * plr = sObjectMgr.GetPlayer(itr->guid);
if (plr)
Stats(plr->GetSession());
}
@@ -473,7 +473,7 @@ void ArenaTeam::BroadcastPacket(WorldPacket *packet)
{
for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
- Player *player = objmgr.GetPlayer(itr->guid);
+ Player *player = sObjectMgr.GetPlayer(itr->guid);
if (player)
player->GetSession()->SendPacket(packet);
}
@@ -581,8 +581,8 @@ void ArenaTeam::FinishGame(int32 mod)
m_stats.games_season += 1;
// update team's rank
m_stats.rank = 1;
- ObjectMgr::ArenaTeamMap::const_iterator i = objmgr.GetArenaTeamMapBegin();
- for (; i != objmgr.GetArenaTeamMapEnd(); ++i)
+ ObjectMgr::ArenaTeamMap::const_iterator i = sObjectMgr.GetArenaTeamMapBegin();
+ for (; i != sObjectMgr.GetArenaTeamMapEnd(); ++i)
{
if (i->second->GetType() == m_Type && i->second->GetStats().rating > m_stats.rating)
++m_stats.rank;
@@ -757,7 +757,7 @@ void ArenaTeam::FinishWeek()
bool ArenaTeam::IsFighting() const
{
for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
- if (Player *p = objmgr.GetPlayer(itr->guid))
+ if (Player *p = sObjectMgr.GetPlayer(itr->guid))
if (p->GetMap()->IsBattleArena())
return true;
return false;
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index a3f581adbb4..0b511c22ab9 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -46,7 +46,7 @@ namespace Trinity
: i_msgtype(msgtype), i_textId(textId), i_source(source), i_args(args) {}
void operator()(WorldPacket& data, int32 loc_idx)
{
- char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
+ char const* text = sObjectMgr.GetTrinityString(i_textId,loc_idx);
if (i_args)
{
@@ -91,9 +91,9 @@ namespace Trinity
: i_msgtype(msgtype), i_textId(textId), i_source(source), i_arg1(arg1), i_arg2(arg2) {}
void operator()(WorldPacket& data, int32 loc_idx)
{
- char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
- char const* arg1str = i_arg1 ? objmgr.GetTrinityString(i_arg1,loc_idx) : "";
- char const* arg2str = i_arg2 ? objmgr.GetTrinityString(i_arg2,loc_idx) : "";
+ char const* text = sObjectMgr.GetTrinityString(i_textId,loc_idx);
+ char const* arg1str = i_arg1 ? sObjectMgr.GetTrinityString(i_arg1,loc_idx) : "";
+ char const* arg2str = i_arg2 ? sObjectMgr.GetTrinityString(i_arg2,loc_idx) : "";
char str [2048];
snprintf(str,2048,text, arg1str, arg2str);
@@ -286,7 +286,7 @@ void Battleground::Update(uint32 diff)
Creature *sh = NULL;
for (std::vector<uint64>::const_iterator itr2 = (itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
{
- Player *plr = objmgr.GetPlayer(*itr2);
+ Player *plr = sObjectMgr.GetPlayer(*itr2);
if (!plr)
continue;
@@ -317,7 +317,7 @@ void Battleground::Update(uint32 diff)
{
for (std::vector<uint64>::const_iterator itr = m_ResurrectQueue.begin(); itr != m_ResurrectQueue.end(); ++itr)
{
- Player *plr = objmgr.GetPlayer(*itr);
+ Player *plr = sObjectMgr.GetPlayer(*itr);
if (!plr)
continue;
plr->ResurrectPlayer(1.0f);
@@ -426,7 +426,7 @@ void Battleground::Update(uint32 diff)
//TODO : add arena sound PlaySoundToAll(SOUND_ARENA_START);
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- if (Player *plr = objmgr.GetPlayer(itr->first))
+ if (Player *plr = sObjectMgr.GetPlayer(itr->first))
{
plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
// remove auras with duration lower than 30s
@@ -454,7 +454,7 @@ void Battleground::Update(uint32 diff)
PlaySoundToAll(SOUND_BG_START);
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- if (Player* plr = objmgr.GetPlayer(itr->first))
+ if (Player* plr = sObjectMgr.GetPlayer(itr->first))
plr->RemoveAurasDueToSpell(SPELL_PREPARATION);
//Announce BG starting
if (sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE))
@@ -507,7 +507,7 @@ void Battleground::SendPacketToAll(WorldPacket *packet)
{
if (itr->second.OfflineRemoveTime)
continue;
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (plr)
plr->GetSession()->SendPacket(packet);
else
@@ -521,7 +521,7 @@ void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket *packet, Player *
{
if (itr->second.OfflineRemoveTime)
continue;
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (!plr)
{
sLog.outError("Battleground:SendPacketToTeam: Player (GUID: %u) not found!", GUID_LOPART(itr->first));
@@ -554,7 +554,7 @@ void Battleground::PlaySoundToTeam(uint32 SoundID, uint32 TeamID)
{
if (itr->second.OfflineRemoveTime)
continue;
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (!plr)
{
@@ -579,7 +579,7 @@ void Battleground::CastSpellOnTeam(uint32 SpellID, uint32 TeamID)
{
if (itr->second.OfflineRemoveTime)
continue;
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (!plr)
{
@@ -600,7 +600,7 @@ void Battleground::YellToAll(Creature* creature, const char* text, uint32 langua
for (std::map<uint64, BattlegroundPlayer>::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
WorldPacket data(SMSG_MESSAGECHAT, 200);
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (!plr)
{
sLog.outError("Battleground: Player " UI64FMTD " not found!", itr->first);
@@ -617,7 +617,7 @@ void Battleground::RewardHonorToTeam(uint32 Honor, uint32 TeamID)
{
if (itr->second.OfflineRemoveTime)
continue;
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (!plr)
{
@@ -644,7 +644,7 @@ void Battleground::RewardReputationToTeam(uint32 faction_id, uint32 Reputation,
{
if (itr->second.OfflineRemoveTime)
continue;
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (!plr)
{
@@ -713,8 +713,8 @@ void Battleground::EndBattleground(uint32 winner)
// arena rating calculation
if (isArena() && isRated())
{
- winner_arena_team = objmgr.GetArenaTeamById(GetArenaTeamIdForTeam(winner));
- loser_arena_team = objmgr.GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(winner)));
+ winner_arena_team = sObjectMgr.GetArenaTeamById(GetArenaTeamIdForTeam(winner));
+ loser_arena_team = sObjectMgr.GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(winner)));
if (winner_arena_team && loser_arena_team && winner_arena_team != loser_arena_team)
{
loser_rating = loser_arena_team->GetStats().rating;
@@ -749,7 +749,7 @@ void Battleground::EndBattleground(uint32 winner)
}
continue;
}
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (!plr)
{
sLog.outError("Battleground:EndBattleground Player (GUID: %u) not found!", GUID_LOPART(itr->first));
@@ -902,7 +902,7 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
RemovePlayerFromResurrectQueue(guid);
- Player *plr = objmgr.GetPlayer(guid);
+ Player *plr = sObjectMgr.GetPlayer(guid);
// should remove spirit of redemption
if (plr && plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
@@ -939,8 +939,8 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
if (isRated() && GetStatus() == STATUS_IN_PROGRESS)
{
//left a rated match while the encounter was in progress, consider as loser
- ArenaTeam * winner_arena_team = objmgr.GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
- ArenaTeam * loser_arena_team = objmgr.GetArenaTeamById(GetArenaTeamIdForTeam(team));
+ ArenaTeam * winner_arena_team = sObjectMgr.GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
+ ArenaTeam * loser_arena_team = sObjectMgr.GetArenaTeamById(GetArenaTeamIdForTeam(team));
if (winner_arena_team && loser_arena_team && winner_arena_team != loser_arena_team)
loser_arena_team->MemberLost(plr,winner_arena_team->GetRating());
}
@@ -961,8 +961,8 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
if (isRated() && GetStatus() == STATUS_IN_PROGRESS)
{
//left a rated match while the encounter was in progress, consider as loser
- ArenaTeam * others_arena_team = objmgr.GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
- ArenaTeam * players_arena_team = objmgr.GetArenaTeamById(GetArenaTeamIdForTeam(team));
+ ArenaTeam * others_arena_team = sObjectMgr.GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
+ ArenaTeam * players_arena_team = sObjectMgr.GetArenaTeamById(GetArenaTeamIdForTeam(team));
if (others_arena_team && players_arena_team)
players_arena_team->OfflineMemberLost(guid, others_arena_team->GetRating());
}
@@ -1336,7 +1336,7 @@ void Battleground::AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid
{
m_ReviveQueue[npc_guid].push_back(player_guid);
- Player *plr = objmgr.GetPlayer(player_guid);
+ Player *plr = sObjectMgr.GetPlayer(player_guid);
if (!plr)
return;
@@ -1353,7 +1353,7 @@ void Battleground::RemovePlayerFromResurrectQueue(uint64 player_guid)
{
(itr->second).erase(itr2);
- Player *plr = objmgr.GetPlayer(player_guid);
+ Player *plr = sObjectMgr.GetPlayer(player_guid);
if (!plr)
return;
@@ -1374,7 +1374,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
// and when loading it (in go::LoadFromDB()), a new guid would be assigned to the object, and a new object would be created
// so we must create it specific for this instance
GameObject * go = new GameObject;
- if (!go->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT),entry, GetBgMap(),
+ if (!go->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT),entry, GetBgMap(),
PHASEMASK_NORMAL, x,y,z,o,rotation0,rotation1,rotation2,rotation3,100,GO_STATE_READY))
{
sLog.outErrorDb("Gameobject template %u not found in database! Battleground not created!", entry);
@@ -1387,7 +1387,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
// without this, UseButtonOrDoor caused the crash, since it tried to get go info from godata
// iirc that was changed, so adding to go data map is no longer required if that was the only function using godata from GameObject without checking if it existed
- GameObjectData& data = objmgr.NewGOData(guid);
+ GameObjectData& data = sObjectMgr.NewGOData(guid);
data.id = entry;
data.mapid = GetMapId();
@@ -1498,7 +1498,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
return NULL;
Creature* pCreature = new Creature;
- if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, teamval, x, y, z, o))
+ if (!pCreature->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, teamval, x, y, z, o))
{
sLog.outError("Can't create creature entry: %u",entry);
delete pCreature;
@@ -1507,7 +1507,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
pCreature->SetHomePosition(x, y, z, o);
- CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(entry);
+ CreatureInfo const *cinfo = sObjectMgr.GetCreatureTemplate(entry);
if (!cinfo)
{
sLog.outErrorDb("Battleground::AddCreature: entry %u does not exist.", entry);
@@ -1539,7 +1539,7 @@ void Battleground::SpawnBGCreature(uint32 type, uint32 respawntime)
{
//obj->Respawn(); // bugged
obj->SetRespawnTime(0);
- objmgr.SaveCreatureRespawnTime(obj->GetGUIDLow(), GetInstanceID(), 0);
+ sObjectMgr.SaveCreatureRespawnTime(obj->GetGUIDLow(), GetInstanceID(), 0);
map->Add(obj);
}
}
@@ -1642,7 +1642,7 @@ void Battleground::PSendMessageToAll(int32 entry, ChatMsg type, Player const* so
void Battleground::SendWarningToAll(int32 entry, ...)
{
- const char *format = objmgr.GetTrinityStringForDBCLocale(entry);
+ const char *format = sObjectMgr.GetTrinityStringForDBCLocale(entry);
va_list ap;
char str [1024];
va_start(ap, entry);
@@ -1686,7 +1686,7 @@ void Battleground::EndNow()
const char *Battleground::GetTrinityString(int32 entry)
{
// FIXME: now we have different DBC locales and need localized message for each target client
- return objmgr.GetTrinityStringForDBCLocale(entry);
+ return sObjectMgr.GetTrinityStringForDBCLocale(entry);
}
/*
@@ -1743,7 +1743,7 @@ void Battleground::HandleKillPlayer(Player *player, Player *killer)
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
if (!plr || plr == killer)
continue;
@@ -1809,7 +1809,7 @@ uint32 Battleground::GetAlivePlayersCountByTeam(uint32 Team) const
{
if (itr->second.Team == Team)
{
- Player * pl = objmgr.GetPlayer(itr->first);
+ Player * pl = sObjectMgr.GetPlayer(itr->first);
if (pl && pl->isAlive() && !pl->HasByteFlag(UNIT_FIELD_BYTES_2, 3, FORM_SPIRITOFREDEMPTION))
++count;
}
@@ -1862,7 +1862,7 @@ void Battleground::SetBgRaid(uint32 TeamID, Group *bg_raid)
WorldSafeLocsEntry const* Battleground::GetClosestGraveYard(Player* player)
{
- return objmgr.GetClosestGraveYard(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam());
+ return sObjectMgr.GetClosestGraveYard(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam());
}
bool Battleground::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index 37965da3984..55c9fb86dba 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -252,7 +252,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
for (int i = 1; i >= 0; --i)
{
uint32 at_id = bg->m_ArenaTeamIds[i];
- ArenaTeam * at = objmgr.GetArenaTeamById(at_id);
+ ArenaTeam * at = sObjectMgr.GetArenaTeamById(at_id);
if (at)
*data << at->GetName();
else
@@ -284,7 +284,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
}
else
{
- Player *plr = objmgr.GetPlayer(itr->first);
+ Player *plr = sObjectMgr.GetPlayer(itr->first);
uint32 team = bg->GetPlayerTeam(itr->first);
if (!team && plr)
team = plr->GetBGTeam();
@@ -757,7 +757,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
}
selectionWeight = fields[9].GetUInt8();
- scriptId = objmgr.GetScriptId(fields[10].GetString());
+ scriptId = sObjectMgr.GetScriptId(fields[10].GetString());
//sLog.outDetail("Creating battleground %s, %u-%u", bl->name[sWorld.GetDBClang()], MinLvl, MaxLvl);
if (!CreateBattleground(bgTypeID, IsArena, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, bl->name[sWorld.GetDefaultDbcLocale()], bl->mapid[0], AStartLoc[0], AStartLoc[1], AStartLoc[2], AStartLoc[3], HStartLoc[0], HStartLoc[1], HStartLoc[2], HStartLoc[3], scriptId))
continue;
@@ -805,7 +805,7 @@ void BattlegroundMgr::DistributeArenaPoints()
std::map<uint32, uint32> PlayerPoints;
//at first update all points for all team members
- for (ObjectMgr::ArenaTeamMap::iterator team_itr = objmgr.GetArenaTeamMapBegin(); team_itr != objmgr.GetArenaTeamMapEnd(); ++team_itr)
+ for (ObjectMgr::ArenaTeamMap::iterator team_itr = sObjectMgr.GetArenaTeamMapBegin(); team_itr != sObjectMgr.GetArenaTeamMapEnd(); ++team_itr)
if (ArenaTeam * at = team_itr->second)
at->UpdateArenaPointsHelper(PlayerPoints);
@@ -816,7 +816,7 @@ void BattlegroundMgr::DistributeArenaPoints()
CharacterDatabase.PExecute("UPDATE characters SET arenaPoints = arenaPoints + '%u' WHERE guid = '%u'", plr_itr->second, plr_itr->first);
//add points to player if online
- Player* pl = objmgr.GetPlayer(plr_itr->first);
+ Player* pl = sObjectMgr.GetPlayer(plr_itr->first);
if (pl)
pl->ModifyArenaPoints(plr_itr->second);
}
@@ -826,7 +826,7 @@ void BattlegroundMgr::DistributeArenaPoints()
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_ONLINE_END);
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_START);
- for (ObjectMgr::ArenaTeamMap::iterator titr = objmgr.GetArenaTeamMapBegin(); titr != objmgr.GetArenaTeamMapEnd(); ++titr)
+ for (ObjectMgr::ArenaTeamMap::iterator titr = sObjectMgr.GetArenaTeamMapBegin(); titr != sObjectMgr.GetArenaTeamMapEnd(); ++titr)
{
if (ArenaTeam * at = titr->second)
{
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index b882118ae3e..ac85123f5e2 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -155,7 +155,7 @@ GroupQueueInfo * BattlegroundQueue::AddGroup(Player *leader, Group* grp, Battleg
//announce world (this don't need mutex)
if (isRated && sWorld.getConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE))
{
- ArenaTeam *Team = objmgr.GetArenaTeamById(arenateamid);
+ ArenaTeam *Team = sObjectMgr.GetArenaTeamById(arenateamid);
if (Team)
sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, Team->GetName().c_str(), ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating);
}
@@ -279,7 +279,7 @@ uint32 BattlegroundQueue::GetAverageQueueWaitTime(GroupQueueInfo* ginfo, Battleg
//remove player from queue and from group info, if group info is empty then remove it too
void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCount)
{
- //Player *plr = objmgr.GetPlayer(guid);
+ //Player *plr = sObjectMgr.GetPlayer(guid);
int32 bracket_id = -1; // signed for proper for-loop finish
QueuedPlayersMap::iterator itr;
@@ -350,7 +350,7 @@ void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
// announce to world if arena team left queue for rated match, show only once
if (group->ArenaType && group->IsRated && group->Players.empty() && sWorld.getConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE))
{
- ArenaTeam *Team = objmgr.GetArenaTeamById(group->ArenaTeamId);
+ ArenaTeam *Team = sObjectMgr.GetArenaTeamById(group->ArenaTeamId);
if (Team)
sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, Team->GetName().c_str(), group->ArenaType, group->ArenaType, group->ArenaTeamRating);
}
@@ -358,11 +358,11 @@ void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
//if player leaves queue and he is invited to rated arena match, then he have to loose
if (group->IsInvitedToBGInstanceGUID && group->IsRated && decreaseInvitedCount)
{
- ArenaTeam * at = objmgr.GetArenaTeamById(group->ArenaTeamId);
+ ArenaTeam * at = sObjectMgr.GetArenaTeamById(group->ArenaTeamId);
if (at)
{
sLog.outDebug("UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating);
- Player *plr = objmgr.GetPlayer(guid);
+ Player *plr = sObjectMgr.GetPlayer(guid);
if (plr)
at->MemberLost(plr, group->OpponentsTeamRating);
else
@@ -384,7 +384,7 @@ void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
{
// remove next player, this is recursive
// first send removal information
- if (Player *plr2 = objmgr.GetPlayer(group->Players.begin()->first))
+ if (Player *plr2 = sObjectMgr.GetPlayer(group->Players.begin()->first))
{
Battleground * bg = sBattlegroundMgr.GetBattlegroundTemplate(group->BgTypeId);
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(group->BgTypeId, group->ArenaType);
@@ -443,7 +443,7 @@ bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, Battleground * b
for (std::map<uint64,PlayerQueueInfo*>::iterator itr = ginfo->Players.begin(); itr != ginfo->Players.end(); ++itr)
{
// get the player
- Player* plr = objmgr.GetPlayer(itr->first);
+ Player* plr = sObjectMgr.GetPlayer(itr->first);
// if offline, skip him, this should not happen - player is removed from queue when he logs out
if (!plr)
continue;
@@ -1014,7 +1014,7 @@ void BattlegroundQueue::Update(BattlegroundTypeId bgTypeId, BattlegroundBracketI
bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
- Player* plr = objmgr.GetPlayer(m_PlayerGuid);
+ Player* plr = sObjectMgr.GetPlayer(m_PlayerGuid);
// player logged off (we should do nothing, he is correctly removed from queue in another procedure)
if (!plr)
return true;
@@ -1057,7 +1057,7 @@ void BGQueueInviteEvent::Abort(uint64 /*e_time*/)
*/
bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
- Player* plr = objmgr.GetPlayer(m_PlayerGuid);
+ Player* plr = sObjectMgr.GetPlayer(m_PlayerGuid);
if (!plr)
// player logged off (we should do nothing, he is correctly removed from queue in another procedure)
return true;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index 0495266e583..3b8bedfa8ba 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -413,7 +413,7 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node)
WorldSafeLocsEntry const *ClosestGrave = NULL;
for (std::vector<uint64>::const_iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
- Player* plr = objmgr.GetPlayer(*itr);
+ Player* plr = sObjectMgr.GetPlayer(*itr);
if (!plr)
continue;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index 0e56a4d21e0..b0cd6d87543 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -291,7 +291,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
if (!isStatic && ((cinfoid >= AV_NPC_A_GRAVEDEFENSE0 && cinfoid <= AV_NPC_A_GRAVEDEFENSE3)
|| (cinfoid >= AV_NPC_H_GRAVEDEFENSE0 && cinfoid <= AV_NPC_H_GRAVEDEFENSE3)))
{
- CreatureData &data = objmgr.NewOrExistCreatureData(creature->GetDBTableGUIDLow());
+ CreatureData &data = sObjectMgr.NewOrExistCreatureData(creature->GetDBTableGUIDLow());
data.spawndist = 5;
}
//else spawndist will be 15, so creatures move maximum=10
@@ -1031,7 +1031,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
WorldSafeLocsEntry const *ClosestGrave = NULL;
for (std::vector<uint64>::iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
- plr = objmgr.GetPlayer(*ghost_list.begin());
+ plr = sObjectMgr.GetPlayer(*ghost_list.begin());
if (!plr)
continue;
if (!ClosestGrave)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index cedbaa9a7c9..540e955eb85 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -150,7 +150,7 @@ void BattlegroundEY::CheckSomeoneJoinedPoint()
uint8 j = 0;
while (j < m_PlayersNearPoint[EY_POINTS_MAX].size())
{
- Player *plr = objmgr.GetPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
+ Player *plr = sObjectMgr.GetPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
if (!plr)
{
sLog.outError("BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
@@ -190,7 +190,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
uint8 j = 0;
while (j < m_PlayersNearPoint[i].size())
{
- Player *plr = objmgr.GetPlayer(m_PlayersNearPoint[i][j]);
+ Player *plr = sObjectMgr.GetPlayer(m_PlayersNearPoint[i][j]);
if (!plr)
{
sLog.outError("BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
@@ -245,7 +245,7 @@ void BattlegroundEY::UpdatePointStatuses()
for (uint8 i = 0; i < m_PlayersNearPoint[point].size(); ++i)
{
- Player *plr = objmgr.GetPlayer(m_PlayersNearPoint[point][i]);
+ Player *plr = sObjectMgr.GetPlayer(m_PlayersNearPoint[point][i]);
if (plr)
{
this->UpdateWorldStateForPlayer(PROGRESS_BAR_STATUS, m_PointBarStatus[point], plr);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index c984f56335b..577fbec184f 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -232,7 +232,7 @@ void BattlegroundSA::StartShips()
{
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end();itr++)
{
- if (Player* p = objmgr.GetPlayer(itr->first))
+ if (Player* p = sObjectMgr.GetPlayer(itr->first))
{
if (p->GetTeamId() != attackers)
continue;
@@ -462,7 +462,7 @@ void BattlegroundSA::TeleportPlayers()
{
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
{
- if (Player *plr = objmgr.GetPlayer(itr->first))
+ if (Player *plr = sObjectMgr.GetPlayer(itr->first))
{
// should remove spirit of redemption
if (plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 6a05c9b4f8a..a87739c6b78 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -144,20 +144,20 @@ void BattlegroundWS::Update(uint32 diff)
m_FlagSpellForceTimer += diff;
if (m_FlagDebuffState == 0 && m_FlagSpellForceTimer >= 600000) //10 minutes
{
- if (Player * plr = objmgr.GetPlayer(m_FlagKeepers[0]))
+ if (Player * plr = sObjectMgr.GetPlayer(m_FlagKeepers[0]))
plr->CastSpell(plr,WS_SPELL_FOCUSED_ASSAULT,true);
- if (Player * plr = objmgr.GetPlayer(m_FlagKeepers[1]))
+ if (Player * plr = sObjectMgr.GetPlayer(m_FlagKeepers[1]))
plr->CastSpell(plr,WS_SPELL_FOCUSED_ASSAULT,true);
m_FlagDebuffState = 1;
}
else if (m_FlagDebuffState == 1 && m_FlagSpellForceTimer >= 900000) //15 minutes
{
- if (Player * plr = objmgr.GetPlayer(m_FlagKeepers[0]))
+ if (Player * plr = sObjectMgr.GetPlayer(m_FlagKeepers[0]))
{
plr->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
plr->CastSpell(plr,WS_SPELL_BRUTAL_ASSAULT,true);
}
- if (Player * plr = objmgr.GetPlayer(m_FlagKeepers[1]))
+ if (Player * plr = sObjectMgr.GetPlayer(m_FlagKeepers[1]))
{
plr->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
plr->CastSpell(plr,WS_SPELL_BRUTAL_ASSAULT,true);
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index 0217b88956f..10912ab4882 100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -156,7 +156,7 @@ void Channel::Join(uint64 p, const char *pass)
return;
}
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (plr)
{
@@ -216,7 +216,7 @@ void Channel::Leave(uint64 p, bool send)
}
else
{
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (send)
{
@@ -252,7 +252,7 @@ void Channel::Leave(uint64 p, bool send)
void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
{
AccountTypes sec = SEC_PLAYER;
- Player *gplr = objmgr.GetPlayer(good);
+ Player *gplr = sObjectMgr.GetPlayer(good);
if (gplr)
sec = gplr->GetSession()->GetSecurity();
@@ -270,7 +270,7 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
}
else
{
- Player *bad = objmgr.GetPlayer(badname);
+ Player *bad = sObjectMgr.GetPlayer(badname);
if (bad == NULL || !IsOn(bad->GetGUID()))
{
WorldPacket data;
@@ -316,7 +316,7 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
void Channel::UnBan(uint64 good, const char *badname)
{
uint32 sec = 0;
- Player *gplr = objmgr.GetPlayer(good);
+ Player *gplr = sObjectMgr.GetPlayer(good);
if (gplr)
sec = gplr->GetSession()->GetSecurity();
@@ -334,7 +334,7 @@ void Channel::UnBan(uint64 good, const char *badname)
}
else
{
- Player *bad = objmgr.GetPlayer(badname);
+ Player *bad = sObjectMgr.GetPlayer(badname);
if (bad == NULL || !IsBanned(bad->GetGUID()))
{
WorldPacket data;
@@ -358,7 +358,7 @@ void Channel::Password(uint64 p, const char *pass)
{
std::string plName;
uint32 sec = 0;
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (plr)
sec = plr->GetSession()->GetSecurity();
@@ -396,7 +396,7 @@ void Channel::Password(uint64 p, const char *pass)
void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
{
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (!plr)
return;
@@ -416,7 +416,7 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
}
else
{
- Player *newp = objmgr.GetPlayer(p2n);
+ Player *newp = sObjectMgr.GetPlayer(p2n);
if (!newp)
{
WorldPacket data;
@@ -464,7 +464,7 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
void Channel::SetOwner(uint64 p, const char *newname)
{
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (!plr)
return;
@@ -486,7 +486,7 @@ void Channel::SetOwner(uint64 p, const char *newname)
return;
}
- Player *newp = objmgr.GetPlayer(newname);
+ Player *newp = sObjectMgr.GetPlayer(newname);
if (newp == NULL || !IsOn(newp->GetGUID()))
{
WorldPacket data;
@@ -548,7 +548,7 @@ void Channel::List(Player* player)
uint32 count = 0;
for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
- Player *plr = objmgr.GetPlayer(i->first);
+ Player *plr = sObjectMgr.GetPlayer(i->first);
// PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
@@ -570,7 +570,7 @@ void Channel::List(Player* player)
void Channel::Announce(uint64 p)
{
uint32 sec = 0;
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (plr)
sec = plr->GetSession()->GetSecurity();
@@ -605,7 +605,7 @@ void Channel::Announce(uint64 p)
void Channel::Moderate(uint64 p)
{
uint32 sec = 0;
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (plr)
sec = plr->GetSession()->GetSecurity();
@@ -644,7 +644,7 @@ void Channel::Say(uint64 p, const char *what, uint32 lang)
lang = LANG_UNIVERSAL;
uint32 sec = 0;
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (plr)
sec = plr->GetSession()->GetSecurity();
@@ -695,7 +695,7 @@ void Channel::Invite(uint64 p, const char *newname)
return;
}
- Player *newp = objmgr.GetPlayer(newname);
+ Player *newp = sObjectMgr.GetPlayer(newname);
if (!newp)
{
WorldPacket data;
@@ -712,7 +712,7 @@ void Channel::Invite(uint64 p, const char *newname)
return;
}
- Player *plr = objmgr.GetPlayer(p);
+ Player *plr = sObjectMgr.GetPlayer(p);
if (!plr)
return;
@@ -779,7 +779,7 @@ void Channel::SendToAll(WorldPacket *data, uint64 p)
{
for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
- Player *plr = objmgr.GetPlayer(i->first);
+ Player *plr = sObjectMgr.GetPlayer(i->first);
if (plr)
{
if (!p || !plr->GetSocial()->HasIgnore(GUID_LOPART(p)))
@@ -794,7 +794,7 @@ void Channel::SendToAllButOne(WorldPacket *data, uint64 who)
{
if (i->first != who)
{
- Player *plr = objmgr.GetPlayer(i->first);
+ Player *plr = sObjectMgr.GetPlayer(i->first);
if (plr)
plr->GetSession()->SendPacket(data);
}
@@ -803,7 +803,7 @@ void Channel::SendToAllButOne(WorldPacket *data, uint64 who)
void Channel::SendToOne(WorldPacket *data, uint64 who)
{
- Player *plr = objmgr.GetPlayer(who);
+ Player *plr = sObjectMgr.GetPlayer(who);
if (plr)
plr->GetSession()->SendPacket(data);
}
@@ -907,7 +907,7 @@ void Channel::MakeChannelOwner(WorldPacket *data)
{
std::string name = "";
- if (!objmgr.GetPlayerNameByGUID(m_ownerGUID, name) || name.empty())
+ if (!sObjectMgr.GetPlayerNameByGUID(m_ownerGUID, name) || name.empty())
name = "PLAYER_NOT_FOUND";
MakeNotifyPacket(data, CHAT_CHANNEL_OWNER_NOTICE);
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index d3e153e3a89..eea17aa8f0c 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -815,7 +815,7 @@ bool ChatHandler::HasLowerSecurity(Player* target, uint64 guid, bool strong)
if (target)
target_session = target->GetSession();
else if (guid)
- target_account = objmgr.GetPlayerAccountIdByGUID(guid);
+ target_account = sObjectMgr.GetPlayerAccountIdByGUID(guid);
if (!target_session && !target_account)
{
@@ -842,7 +842,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac
if (target)
target_sec = target->GetSecurity();
else if (target_account)
- target_sec = accmgr.GetSecurity(target_account);
+ target_sec = sAccountMgr.GetSecurity(target_account);
else
return true; // caller must report error for (target == NULL && target_account == 0)
@@ -1316,7 +1316,7 @@ valid examples:
// read item entry
reader.getline(buffer, 256, ':');
- linkedItem= objmgr.GetItemPrototype(atoi(buffer));
+ linkedItem= sObjectMgr.GetItemPrototype(atoi(buffer));
if (!linkedItem)
{
#ifdef TRINITY_DEBUG
@@ -1395,7 +1395,7 @@ valid examples:
c = reader.peek();
}
- linkedQuest = objmgr.GetQuestTemplate(questid);
+ linkedQuest = sObjectMgr.GetQuestTemplate(questid);
if (!linkedQuest)
{
@@ -1566,7 +1566,7 @@ valid examples:
if (linkedSpell->Attributes & SPELL_ATTR_TRADESPELL)
{
// lookup skillid
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(linkedSpell->Id);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(linkedSpell->Id);
if (bounds.first == bounds.second)
{
return false;
@@ -1613,7 +1613,7 @@ valid examples:
{
if (linkedQuest->GetTitle() != buffer)
{
- QuestLocale const *ql = objmgr.GetQuestLocale(linkedQuest->GetQuestId());
+ QuestLocale const *ql = sObjectMgr.GetQuestLocale(linkedQuest->GetQuestId());
if (!ql)
{
@@ -1654,12 +1654,12 @@ valid examples:
if (expectedName != buffer)
{
- ItemLocale const *il = objmgr.GetItemLocale(linkedItem->ItemId);
+ ItemLocale const *il = sObjectMgr.GetItemLocale(linkedItem->ItemId);
bool foundName = false;
for (uint8 i=LOCALE_koKR; i<MAX_LOCALE; ++i)
{
- int8 dbIndex = objmgr.GetIndexForLocale(LocaleConstant(i));
+ int8 dbIndex = sObjectMgr.GetIndexForLocale(LocaleConstant(i));
if (dbIndex == -1 || il == NULL || dbIndex >= il->Name.size())
// using strange database/client combinations can lead to this case
expectedName = linkedItem->Name1;
@@ -1911,7 +1911,7 @@ Player * ChatHandler::getSelectedPlayer()
if (guid == 0)
return m_session->GetPlayer();
- return objmgr.GetPlayer(guid);
+ return sObjectMgr.GetPlayer(guid);
}
Unit* ChatHandler::getSelectedUnit()
@@ -2114,7 +2114,7 @@ GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid
GameObject* obj = pl->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid, entry, HIGHGUID_GAMEOBJECT));
- if (!obj && objmgr.GetGOData(lowguid)) // guid is DB guid of object
+ if (!obj && sObjectMgr.GetGOData(lowguid)) // guid is DB guid of object
{
// search near player then
CellPair p(Trinity::ComputeCellPair(pl->GetPositionX(), pl->GetPositionY()));
@@ -2214,9 +2214,9 @@ GameTele const* ChatHandler::extractGameTeleFromLink(char* text)
// id case (explicit or from shift link)
if (cId[0] >= '0' || cId[0] >= '9')
if (uint32 id = atoi(cId))
- return objmgr.GetGameTele(id);
+ return sObjectMgr.GetGameTele(id);
- return objmgr.GetGameTele(cId);
+ return sObjectMgr.GetGameTele(cId);
}
enum GuidLinkType
@@ -2253,10 +2253,10 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
if (!normalizePlayerName(name))
return 0;
- if (Player* player = objmgr.GetPlayer(name.c_str()))
+ if (Player* player = sObjectMgr.GetPlayer(name.c_str()))
return player->GetGUID();
- if (uint64 guid = objmgr.GetPlayerGUIDByName(name))
+ if (uint64 guid = sObjectMgr.GetPlayerGUIDByName(name))
return guid;
return 0;
@@ -2265,7 +2265,7 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
{
uint32 lowguid = (uint32)atol(idS);
- if (CreatureData const* data = objmgr.GetCreatureData(lowguid))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(lowguid))
return MAKE_NEW_GUID(lowguid,data->id,HIGHGUID_UNIT);
else
return 0;
@@ -2274,7 +2274,7 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
{
uint32 lowguid = (uint32)atol(idS);
- if (GameObjectData const* data = objmgr.GetGOData(lowguid))
+ if (GameObjectData const* data = sObjectMgr.GetGOData(lowguid))
return MAKE_NEW_GUID(lowguid,data->id,HIGHGUID_GAMEOBJECT);
else
return 0;
@@ -2311,14 +2311,14 @@ bool ChatHandler::extractPlayerTarget(char* args, Player** player, uint64* playe
return false;
}
- Player* pl = objmgr.GetPlayer(name.c_str());
+ Player* pl = sObjectMgr.GetPlayer(name.c_str());
// if allowed player pointer
if (player)
*player = pl;
// if need guid value from DB (in name case for check player existence)
- uint64 guid = !pl && (player_guid || player_name) ? objmgr.GetPlayerGUIDByName(name) : 0;
+ uint64 guid = !pl && (player_guid || player_name) ? sObjectMgr.GetPlayerGUIDByName(name) : 0;
// if allowed player guid (if no then only online players allowed)
if (player_guid)
@@ -2404,7 +2404,7 @@ int ChatHandler::GetSessionDbLocaleIndex() const
const char *CliHandler::GetTrinityString(int32 entry) const
{
- return objmgr.GetTrinityStringForDBCLocale(entry);
+ return sObjectMgr.GetTrinityStringForDBCLocale(entry);
}
bool CliHandler::isAvailable(ChatCommand const& cmd) const
@@ -2446,9 +2446,9 @@ bool ChatHandler::GetPlayerGroupAndGUIDByName(const char* cname, Player* &plr, G
return false;
}
- plr = objmgr.GetPlayer(name.c_str());
+ plr = sObjectMgr.GetPlayer(name.c_str());
if (offline)
- guid = objmgr.GetPlayerGUIDByName(name.c_str());
+ guid = sObjectMgr.GetPlayerGUIDByName(name.c_str());
}
}
@@ -2480,5 +2480,5 @@ LocaleConstant CliHandler::GetSessionDbcLocale() const
int CliHandler::GetSessionDbLocaleIndex() const
{
- return objmgr.GetDBCLocaleIndex();
+ return sObjectMgr.GetDBCLocaleIndex();
}
diff --git a/src/server/game/Chat/Commands/Debugcmds.cpp b/src/server/game/Chat/Commands/Debugcmds.cpp
index 4a4df8eb853..a7d53b15c08 100644
--- a/src/server/game/Chat/Commands/Debugcmds.cpp
+++ b/src/server/game/Chat/Commands/Debugcmds.cpp
@@ -777,7 +777,7 @@ bool ChatHandler::HandleDebugSpawnVehicle(const char* args)
uint32 id = (uint32)atoi(i);
- CreatureInfo const *ci = objmgr.GetCreatureTemplate(entry);
+ CreatureInfo const *ci = sObjectMgr.GetCreatureTemplate(entry);
if (!ci)
return false;
@@ -791,7 +791,7 @@ bool ChatHandler::HandleDebugSpawnVehicle(const char* args)
Map *map = m_session->GetPlayer()->GetMap();
- if (!v->Create(objmgr.GenerateLowGuid(HIGHGUID_VEHICLE), map, m_session->GetPlayer()->GetPhaseMask(), entry, id, m_session->GetPlayer()->GetTeam(), x, y, z, o))
+ if (!v->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_VEHICLE), map, m_session->GetPlayer()->GetPhaseMask(), entry, id, m_session->GetPlayer()->GetTeam(), x, y, z, o))
{
delete v;
return false;
diff --git a/src/server/game/Chat/Commands/Level0.cpp b/src/server/game/Chat/Commands/Level0.cpp
index ff266caa328..6e4e969e017 100644
--- a/src/server/game/Chat/Commands/Level0.cpp
+++ b/src/server/game/Chat/Commands/Level0.cpp
@@ -205,7 +205,7 @@ bool ChatHandler::HandleAccountPasswordCommand(const char* args)
std::string password_new = new_pass;
std::string password_new_c = new_pass_c;
- if (!accmgr.CheckPassword(m_session->GetAccountId(), password_old))
+ if (!sAccountMgr.CheckPassword(m_session->GetAccountId(), password_old))
{
SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
SetSentErrorMessage(true);
@@ -219,7 +219,7 @@ bool ChatHandler::HandleAccountPasswordCommand(const char* args)
return false;
}
- AccountOpResult result = accmgr.ChangePassword(m_session->GetAccountId(), password_new);
+ AccountOpResult result = sAccountMgr.ChangePassword(m_session->GetAccountId(), password_new);
switch(result)
{
case AOR_OK:
diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp
index 1b383d00f09..731d8fac035 100644
--- a/src/server/game/Chat/Commands/Level1.cpp
+++ b/src/server/game/Chat/Commands/Level1.cpp
@@ -129,7 +129,7 @@ bool ChatHandler::HandleNpcWhisperCommand(const char* args)
uint64 receiver_guid= atol(receiver_str);
// check online security
- if (HasLowerSecurity(objmgr.GetPlayer(receiver_guid), 0))
+ if (HasLowerSecurity(sObjectMgr.GetPlayer(receiver_guid), 0))
return false;
pCreature->MonsterWhisper(text,receiver_guid);
@@ -302,7 +302,7 @@ std::string ChatHandler::PGetParseString(int32 entry, ...)
bool ChatHandler::HandleGMTicketListCommand(const char* /*args*/)
{
SendSysMessage(LANG_COMMAND_TICKETSHOWLIST);
- for (GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
+ for (GmTicketList::iterator itr = sObjectMgr.m_GMTicketList.begin(); itr != sObjectMgr.m_GMTicketList.end(); ++itr)
{
if ((*itr)->closed != 0)
continue;
@@ -312,7 +312,7 @@ bool ChatHandler::HandleGMTicketListCommand(const char* /*args*/)
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, (*itr)->name.c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGECREATE, (secsToTimeString(time(NULL) - (*itr)->createtime, true, false)).c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGE, (secsToTimeString(time(NULL) - (*itr)->timestamp, true, false)).c_str());
- if (objmgr.GetPlayerNameByGUID((*itr)->assignedToGM, gmname))
+ if (sObjectMgr.GetPlayerNameByGUID((*itr)->assignedToGM, gmname))
{
ss << PGetParseString(LANG_COMMAND_TICKETLISTASSIGNEDTO, gmname.c_str());
}
@@ -324,9 +324,9 @@ bool ChatHandler::HandleGMTicketListCommand(const char* /*args*/)
bool ChatHandler::HandleGMTicketListOnlineCommand(const char* /*args*/)
{
SendSysMessage(LANG_COMMAND_TICKETSHOWONLINELIST);
- for (GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
+ for (GmTicketList::iterator itr = sObjectMgr.m_GMTicketList.begin(); itr != sObjectMgr.m_GMTicketList.end(); ++itr)
{
- if ((*itr)->closed != 0 || !objmgr.GetPlayer((*itr)->playerGuid))
+ if ((*itr)->closed != 0 || !sObjectMgr.GetPlayer((*itr)->playerGuid))
continue;
std::string gmname;
@@ -335,7 +335,7 @@ bool ChatHandler::HandleGMTicketListOnlineCommand(const char* /*args*/)
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, (*itr)->name.c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGECREATE, (secsToTimeString(time(NULL) - (*itr)->createtime, true, false)).c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGE, (secsToTimeString(time(NULL) - (*itr)->timestamp, true, false)).c_str());
- if (objmgr.GetPlayerNameByGUID((*itr)->assignedToGM, gmname))
+ if (sObjectMgr.GetPlayerNameByGUID((*itr)->assignedToGM, gmname))
{
ss << PGetParseString(LANG_COMMAND_TICKETLISTASSIGNEDTO, gmname.c_str());
}
@@ -347,7 +347,7 @@ bool ChatHandler::HandleGMTicketListOnlineCommand(const char* /*args*/)
bool ChatHandler::HandleGMTicketListClosedCommand(const char* /*args*/)
{
SendSysMessage(LANG_COMMAND_TICKETSHOWCLOSEDLIST);
- for (GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
+ for (GmTicketList::iterator itr = sObjectMgr.m_GMTicketList.begin(); itr != sObjectMgr.m_GMTicketList.end(); ++itr)
{
if ((*itr)->closed == 0)
continue;
@@ -358,7 +358,7 @@ bool ChatHandler::HandleGMTicketListClosedCommand(const char* /*args*/)
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, (*itr)->name.c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGECREATE, (secsToTimeString(time(NULL) - (*itr)->createtime, true, false)).c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGE, (secsToTimeString(time(NULL) - (*itr)->timestamp, true, false)).c_str());
- if (objmgr.GetPlayerNameByGUID((*itr)->assignedToGM, gmname))
+ if (sObjectMgr.GetPlayerNameByGUID((*itr)->assignedToGM, gmname))
{
ss << PGetParseString(LANG_COMMAND_TICKETLISTASSIGNEDTO, gmname.c_str());
}
@@ -373,7 +373,7 @@ bool ChatHandler::HandleGMTicketGetByIdCommand(const char* args)
return false;
uint64 tguid = atoi(args);
- GM_Ticket *ticket = objmgr.GetGMTicket(tguid);
+ GM_Ticket *ticket = sObjectMgr.GetGMTicket(tguid);
if (!ticket || ticket->closed != 0)
{
SendSysMessage(LANG_COMMAND_TICKETNOTEXIST);
@@ -386,7 +386,7 @@ bool ChatHandler::HandleGMTicketGetByIdCommand(const char* args)
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, ticket->name.c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGECREATE, (secsToTimeString(time(NULL) - ticket->createtime, true, false)).c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGE, (secsToTimeString(time(NULL) - ticket->timestamp, true, false)).c_str());
- if (objmgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname))
+ if (sObjectMgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname))
{
ss << PGetParseString(LANG_COMMAND_TICKETLISTASSIGNEDTO, gmname.c_str());
}
@@ -407,14 +407,14 @@ bool ChatHandler::HandleGMTicketGetByNameCommand(const char* args)
std::string name = (char*)args;
normalizePlayerName(name);
- Player *plr = objmgr.GetPlayer(name.c_str());
+ Player *plr = sObjectMgr.GetPlayer(name.c_str());
if (!plr)
{
SendSysMessage(LANG_NO_PLAYERS_FOUND);
return true;
}
- GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(plr->GetGUID());
+ GM_Ticket *ticket = sObjectMgr.GetGMTicketByPlayer(plr->GetGUID());
if (!ticket)
{
SendSysMessage(LANG_COMMAND_TICKETNOTEXIST);
@@ -427,7 +427,7 @@ bool ChatHandler::HandleGMTicketGetByNameCommand(const char* args)
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, ticket->name.c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGECREATE, (secsToTimeString(time(NULL) - ticket->createtime, true, false)).c_str());
ss << PGetParseString(LANG_COMMAND_TICKETLISTAGE, (secsToTimeString(time(NULL) - ticket->timestamp, true, false)).c_str());
- if (objmgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname))
+ if (sObjectMgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname))
{
ss << PGetParseString(LANG_COMMAND_TICKETLISTASSIGNEDTO, gmname.c_str());
}
@@ -446,7 +446,7 @@ bool ChatHandler::HandleGMTicketCloseByIdCommand(const char* args)
return false;
uint64 tguid = atoi(args);
- GM_Ticket *ticket = objmgr.GetGMTicket(tguid);
+ GM_Ticket *ticket = sObjectMgr.GetGMTicket(tguid);
if (!ticket || ticket->closed != 0)
{
SendSysMessage(LANG_COMMAND_TICKETNOTEXIST);
@@ -462,8 +462,8 @@ bool ChatHandler::HandleGMTicketCloseByIdCommand(const char* args)
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, ticket->name.c_str());
ss << PGetParseString(LANG_COMMAND_TICKETCLOSED, m_session->GetPlayer()->GetName());
SendGlobalGMSysMessage(ss.str().c_str());
- Player *plr = objmgr.GetPlayer(ticket->playerGuid);
- objmgr.RemoveGMTicket(ticket, m_session->GetPlayer()->GetGUID());
+ Player *plr = sObjectMgr.GetPlayer(ticket->playerGuid);
+ sObjectMgr.RemoveGMTicket(ticket, m_session->GetPlayer()->GetGUID());
if (!plr || !plr->IsInWorld())
return true;
@@ -492,7 +492,7 @@ bool ChatHandler::HandleGMTicketAssignToCommand(const char* args)
return false;
Player *cplr = m_session->GetPlayer();
- GM_Ticket *ticket = objmgr.GetGMTicket(ticketGuid);
+ GM_Ticket *ticket = sObjectMgr.GetGMTicket(ticketGuid);
if (!ticket || ticket->closed != 0)
{
@@ -500,9 +500,9 @@ bool ChatHandler::HandleGMTicketAssignToCommand(const char* args)
return true;
}
- uint64 tarGUID = objmgr.GetPlayerGUIDByName(targm.c_str());
- uint64 accid = objmgr.GetPlayerAccountIdByGUID(tarGUID);
- uint32 gmlevel = accmgr.GetSecurity(accid, realmID);
+ uint64 tarGUID = sObjectMgr.GetPlayerGUIDByName(targm.c_str());
+ uint64 accid = sObjectMgr.GetPlayerAccountIdByGUID(tarGUID);
+ uint32 gmlevel = sAccountMgr.GetSecurity(accid, realmID);
if (!tarGUID || gmlevel == SEC_PLAYER)
{
@@ -517,7 +517,7 @@ bool ChatHandler::HandleGMTicketAssignToCommand(const char* args)
}
std::string gmname;
- objmgr.GetPlayerNameByGUID(tarGUID, gmname);
+ sObjectMgr.GetPlayerNameByGUID(tarGUID, gmname);
if (ticket->assignedToGM != 0 && ticket->assignedToGM != cplr->GetGUID())
{
PSendSysMessage(LANG_COMMAND_TICKETALREADYASSIGNED, ticket->guid, gmname.c_str());
@@ -525,7 +525,7 @@ bool ChatHandler::HandleGMTicketAssignToCommand(const char* args)
}
ticket->assignedToGM = tarGUID;
- objmgr.AddOrUpdateGMTicket(*ticket);
+ sObjectMgr.AddOrUpdateGMTicket(*ticket);
std::stringstream ss;
ss << PGetParseString(LANG_COMMAND_TICKETLISTGUID, ticket->guid);
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, ticket->name.c_str());
@@ -541,7 +541,7 @@ bool ChatHandler::HandleGMTicketUnAssignCommand(const char* args)
uint64 ticketGuid = atoi(args);
Player *cplr = m_session->GetPlayer();
- GM_Ticket *ticket = objmgr.GetGMTicket(ticketGuid);
+ GM_Ticket *ticket = sObjectMgr.GetGMTicket(ticketGuid);
if (!ticket|| ticket->closed != 0)
{
@@ -555,8 +555,8 @@ bool ChatHandler::HandleGMTicketUnAssignCommand(const char* args)
}
std::string gmname;
- objmgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname);
- Player *plr = objmgr.GetPlayer(ticket->assignedToGM);
+ sObjectMgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname);
+ Player *plr = sObjectMgr.GetPlayer(ticket->assignedToGM);
if (plr && plr->IsInWorld() && plr->GetSession()->GetSecurity() > cplr->GetSession()->GetSecurity())
{
SendSysMessage(LANG_COMMAND_TICKETUNASSIGNSECURITY);
@@ -570,7 +570,7 @@ bool ChatHandler::HandleGMTicketUnAssignCommand(const char* args)
ss << PGetParseString(LANG_COMMAND_TICKETLISTUNASSIGNED, cplr->GetName());
SendGlobalGMSysMessage(ss.str().c_str());
ticket->assignedToGM = 0;
- objmgr.AddOrUpdateGMTicket(*ticket);
+ sObjectMgr.AddOrUpdateGMTicket(*ticket);
return true;
}
@@ -587,7 +587,7 @@ bool ChatHandler::HandleGMTicketCommentCommand(const char* args)
return false;
Player *cplr = m_session->GetPlayer();
- GM_Ticket *ticket = objmgr.GetGMTicket(ticketGuid);
+ GM_Ticket *ticket = sObjectMgr.GetGMTicket(ticketGuid);
if (!ticket || ticket->closed != 0)
{
@@ -601,13 +601,13 @@ bool ChatHandler::HandleGMTicketCommentCommand(const char* args)
}
std::string gmname;
- objmgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname);
+ sObjectMgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname);
ticket->comment = comment;
- objmgr.AddOrUpdateGMTicket(*ticket);
+ sObjectMgr.AddOrUpdateGMTicket(*ticket);
std::stringstream ss;
ss << PGetParseString(LANG_COMMAND_TICKETLISTGUID, ticket->guid);
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, ticket->name.c_str());
- if (objmgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname))
+ if (sObjectMgr.GetPlayerNameByGUID(ticket->assignedToGM, gmname))
{
ss << PGetParseString(LANG_COMMAND_TICKETLISTASSIGNEDTO, gmname.c_str());
}
@@ -621,7 +621,7 @@ bool ChatHandler::HandleGMTicketDeleteByIdCommand(const char* args)
if (!*args)
return false;
uint64 ticketGuid = atoi(args);
- GM_Ticket *ticket = objmgr.GetGMTicket(ticketGuid);
+ GM_Ticket *ticket = sObjectMgr.GetGMTicket(ticketGuid);
if (!ticket)
{
@@ -639,8 +639,8 @@ bool ChatHandler::HandleGMTicketDeleteByIdCommand(const char* args)
ss << PGetParseString(LANG_COMMAND_TICKETLISTNAME, ticket->name.c_str());
ss << PGetParseString(LANG_COMMAND_TICKETDELETED, m_session->GetPlayer()->GetName());
SendGlobalGMSysMessage(ss.str().c_str());
- Player *plr = objmgr.GetPlayer(ticket->playerGuid);
- objmgr.RemoveGMTicket(ticket, -1, true);
+ Player *plr = sObjectMgr.GetPlayer(ticket->playerGuid);
+ sObjectMgr.RemoveGMTicket(ticket, -1, true);
if (plr && plr->IsInWorld())
{
// Force abandon ticket
@@ -655,7 +655,7 @@ bool ChatHandler::HandleGMTicketDeleteByIdCommand(const char* args)
bool ChatHandler::HandleGMTicketReloadCommand(const char*)
{
- objmgr.LoadGMTickets();
+ sObjectMgr.LoadGMTickets();
return true;
}
@@ -994,7 +994,7 @@ bool ChatHandler::HandleGonameCommand(const char* args)
// if no bind exists, create a solo bind
InstanceGroupBind *gBind = group ? group->GetBoundInstance(target) : NULL; // if no bind exists, create a solo bind
if (!gBind)
- if (InstanceSave *save = sInstanceSaveManager.GetInstanceSave(target->GetInstanceId()))
+ if (InstanceSave *save = sInstanceSaveMgr.GetInstanceSave(target->GetInstanceId()))
_player->BindToInstance(save, !save->CanReset());
}
@@ -2327,7 +2327,7 @@ bool ChatHandler::HandleLookupTeleCommand(const char * args)
std::ostringstream reply;
- GameTeleMap const & teleMap = objmgr.GetGameTeleMap();
+ GameTeleMap const & teleMap = sObjectMgr.GetGameTeleMap();
for (GameTeleMap::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
{
GameTele const* tele = &itr->second;
@@ -2461,7 +2461,7 @@ bool ChatHandler::HandleTeleNameCommand(const char * args)
return false;
}
- Player *chr = objmgr.GetPlayer(name.c_str());*/
+ Player *chr = sObjectMgr.GetPlayer(name.c_str());*/
if (target)
{
diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp
index 77880355352..cdbdcfb2051 100644
--- a/src/server/game/Chat/Commands/Level2.cpp
+++ b/src/server/game/Chat/Commands/Level2.cpp
@@ -65,7 +65,7 @@ bool ChatHandler::HandleMuteCommand(const char* args)
if (!extractPlayerTarget(nameStr,&target,&target_guid,&target_name))
return false;
- uint32 account_id = target ? target->GetSession()->GetAccountId() : objmgr.GetPlayerAccountIdByGUID(target_guid);
+ uint32 account_id = target ? target->GetSession()->GetAccountId() : sObjectMgr.GetPlayerAccountIdByGUID(target_guid);
// find only player from same account if any
if (!target)
@@ -104,7 +104,7 @@ bool ChatHandler::HandleUnmuteCommand(const char* args)
if (!extractPlayerTarget((char*)args,&target,&target_guid,&target_name))
return false;
- uint32 account_id = target ? target->GetSession()->GetAccountId() : objmgr.GetPlayerAccountIdByGUID(target_guid);
+ uint32 account_id = target ? target->GetSession()->GetAccountId() : sObjectMgr.GetPlayerAccountIdByGUID(target_guid);
// find only player from same account if any
if (!target)
@@ -152,7 +152,7 @@ bool ChatHandler::HandleGoTicketCommand(const char * args)
if (!ticket_id)
return false;
- GM_Ticket *ticket = objmgr.GetGMTicket(ticket_id);
+ GM_Ticket *ticket = sObjectMgr.GetGMTicket(ticket_id);
if (!ticket)
{
SendSysMessage(LANG_COMMAND_TICKETNOTEXIST);
@@ -394,7 +394,7 @@ bool ChatHandler::HandleGoObjectCommand(const char* args)
int mapid;
// by DB guid
- if (GameObjectData const* go_data = objmgr.GetGOData(guid))
+ if (GameObjectData const* go_data = sObjectMgr.GetGOData(guid))
{
x = go_data->posX;
y = go_data->posY;
@@ -434,7 +434,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args)
{
Player* pl = m_session->GetPlayer();
QueryResult_AutoPtr result;
- GameEventMgr::ActiveEvents const& activeEventsList = gameeventmgr.GetActiveEventList();
+ GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr.GetActiveEventList();
if (*args)
{
// number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
@@ -507,8 +507,8 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args)
o = fields[5].GetFloat();
mapid = fields[6].GetUInt16();
phase = fields[7].GetUInt16();
- pool_id = poolhandler.IsPartOfAPool<GameObject>(lowguid);
- if (!pool_id || poolhandler.IsSpawnedObject<GameObject>(lowguid))
+ pool_id = sPoolMgr.IsPartOfAPool<GameObject>(lowguid);
+ if (!pool_id || sPoolMgr.IsSpawnedObject<GameObject>(lowguid))
found = true;
} while (result->NextRow() && (!found));
@@ -518,7 +518,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args)
return false;
}
- GameObjectInfo const* goI = objmgr.GetGameObjectInfo(id);
+ GameObjectInfo const* goI = sObjectMgr.GetGameObjectInfo(id);
if (!goI)
{
@@ -559,7 +559,7 @@ bool ChatHandler::HandleGameObjectDeleteCommand(const char* args)
GameObject* obj = NULL;
// by DB guid
- if (GameObjectData const* go_data = objmgr.GetGOData(lowguid))
+ if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
if (!obj)
@@ -607,7 +607,7 @@ bool ChatHandler::HandleGameObjectTurnCommand(const char* args)
GameObject* obj = NULL;
// by DB guid
- if (GameObjectData const* go_data = objmgr.GetGOData(lowguid))
+ if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
if (!obj)
@@ -658,7 +658,7 @@ bool ChatHandler::HandleGameObjectMoveCommand(const char* args)
GameObject* obj = NULL;
// by DB guid
- if (GameObjectData const* go_data = objmgr.GetGOData(lowguid))
+ if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
if (!obj)
@@ -725,7 +725,7 @@ bool ChatHandler::HandleGameObjectAddCommand(const char* args)
char* spawntimeSecs = strtok(NULL, " ");
- const GameObjectInfo *gInfo = objmgr.GetGameObjectInfo(id);
+ const GameObjectInfo *gInfo = sObjectMgr.GetGameObjectInfo(id);
if (!gInfo)
{
@@ -751,7 +751,7 @@ bool ChatHandler::HandleGameObjectAddCommand(const char* args)
Map *map = chr->GetMap();
GameObject* pGameObj = new GameObject;
- uint32 db_lowGUID = objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT);
+ uint32 db_lowGUID = sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT);
if (!pGameObj->Create(db_lowGUID, gInfo->id, map, chr->GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
{
@@ -781,7 +781,7 @@ bool ChatHandler::HandleGameObjectAddCommand(const char* args)
map->Add(pGameObj);
// TODO: is it really necessary to add both the real and DB table guid here ?
- objmgr.AddGameobjectToGrid(db_lowGUID, objmgr.GetGOData(db_lowGUID));
+ sObjectMgr.AddGameobjectToGrid(db_lowGUID, sObjectMgr.GetGOData(db_lowGUID));
PSendSysMessage(LANG_GAMEOBJECT_ADD,id,gInfo->name,db_lowGUID,x,y,z);
return true;
@@ -802,7 +802,7 @@ bool ChatHandler::HandleGameObjectPhaseCommand(const char* args)
GameObject* obj = NULL;
// by DB guid
- if (GameObjectData const* go_data = objmgr.GetGOData(lowguid))
+ if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
if (!obj)
@@ -850,7 +850,7 @@ bool ChatHandler::HandleGameObjectNearCommand(const char* args)
float z = fields[4].GetFloat();
int mapid = fields[5].GetUInt16();
- GameObjectInfo const * gInfo = objmgr.GetGameObjectInfo(entry);
+ GameObjectInfo const * gInfo = sObjectMgr.GetGameObjectInfo(entry);
if (!gInfo)
continue;
@@ -1028,7 +1028,7 @@ bool ChatHandler::HandleNpcAddCommand(const char* args)
}
Creature* pCreature = new Creature;
- if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, (uint32)teamval, x, y, z, o))
+ if (!pCreature->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, (uint32)teamval, x, y, z, o))
{
delete pCreature;
return false;
@@ -1042,7 +1042,7 @@ bool ChatHandler::HandleNpcAddCommand(const char* args)
pCreature->LoadFromDB(db_guid, map);
map->Add(pCreature);
- objmgr.AddCreatureToGrid(db_guid, objmgr.GetCreatureData(db_guid));
+ sObjectMgr.AddCreatureToGrid(db_guid, sObjectMgr.GetCreatureData(db_guid));
return true;
}
@@ -1079,15 +1079,15 @@ bool ChatHandler::HandleNpcAddVendorItemCommand(const char* args)
uint32 vendor_entry = vendor ? vendor->GetEntry() : 0;
- if (!objmgr.IsVendorItemValid(vendor_entry,itemId,maxcount,incrtime,extendedcost,m_session->GetPlayer()))
+ if (!sObjectMgr.IsVendorItemValid(vendor_entry,itemId,maxcount,incrtime,extendedcost,m_session->GetPlayer()))
{
SetSentErrorMessage(true);
return false;
}
- objmgr.AddVendorItem(vendor_entry,itemId,maxcount,incrtime,extendedcost);
+ sObjectMgr.AddVendorItem(vendor_entry,itemId,maxcount,incrtime,extendedcost);
- ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
+ ItemPrototype const* pProto = sObjectMgr.GetItemPrototype(itemId);
PSendSysMessage(LANG_ITEM_ADDED_TO_LIST,itemId,pProto->Name1,maxcount,incrtime,extendedcost);
return true;
@@ -1116,14 +1116,14 @@ bool ChatHandler::HandleNpcDelVendorItemCommand(const char* args)
}
uint32 itemId = atol(pitem);
- if (!objmgr.RemoveVendorItem(vendor->GetEntry(),itemId))
+ if (!sObjectMgr.RemoveVendorItem(vendor->GetEntry(),itemId))
{
PSendSysMessage(LANG_ITEM_NOT_IN_LIST,itemId);
SetSentErrorMessage(true);
return false;
}
- ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
+ ItemPrototype const* pProto = sObjectMgr.GetItemPrototype(itemId);
PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST,itemId,pProto->Name1);
return true;
@@ -1150,7 +1150,7 @@ bool ChatHandler::HandleNpcAddMoveCommand(const char* args)
// attempt check creature existence by DB data
if (!pCreature)
{
- CreatureData const* data = objmgr.GetCreatureData(lowguid);
+ CreatureData const* data = sObjectMgr.GetCreatureData(lowguid);
if (!data)
{
PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, lowguid);
@@ -1218,7 +1218,7 @@ bool ChatHandler::HandleNpcChangeLevelCommand(const char* args)
{
if (((Pet*)pCreature)->getPetType() == HUNTER_PET)
{
- pCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(lvl)/4);
+ pCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(lvl)/4);
pCreature->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
}
((Pet*)pCreature)->GivePetLevel(lvl);
@@ -1275,7 +1275,7 @@ bool ChatHandler::HandleNpcDeleteCommand(const char* args)
if (!lowguid)
return false;
- if (CreatureData const* cr_data = objmgr.GetCreatureData(lowguid))
+ if (CreatureData const* cr_data = sObjectMgr.GetCreatureData(lowguid))
unit = m_session->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(lowguid, cr_data->id, HIGHGUID_UNIT));
}
else
@@ -1322,7 +1322,7 @@ bool ChatHandler::HandleNpcMoveCommand(const char* args)
// Attempting creature load from DB data
if (!pCreature)
{
- CreatureData const* data = objmgr.GetCreatureData(lowguid);
+ CreatureData const* data = sObjectMgr.GetCreatureData(lowguid);
if (!data)
{
PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, lowguid);
@@ -1356,7 +1356,7 @@ bool ChatHandler::HandleNpcMoveCommand(const char* args)
if (pCreature)
{
- if (CreatureData const* data = objmgr.GetCreatureData(pCreature->GetDBTableGUIDLow()))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(pCreature->GetDBTableGUIDLow()))
{
const_cast<CreatureData*>(data)->posX = x;
const_cast<CreatureData*>(data)->posY = y;
@@ -1462,7 +1462,7 @@ bool ChatHandler::HandleNpcSetMoveTypeCommand(const char* args)
// attempt check creature existence by DB data
if (!pCreature)
{
- CreatureData const* data = objmgr.GetCreatureData(lowguid);
+ CreatureData const* data = sObjectMgr.GetCreatureData(lowguid);
if (!data)
{
PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, lowguid);
@@ -1882,7 +1882,7 @@ bool ChatHandler::HandleNpcNameCommand(const char* /*args*/)
}
pCreature->SetName(args);
- uint32 idname = objmgr.AddCreatureTemplate(pCreature->GetName());
+ uint32 idname = sObjectMgr.AddCreatureTemplate(pCreature->GetName());
pCreature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
pCreature->SaveToDB();
@@ -1929,7 +1929,7 @@ bool ChatHandler::HandleNpcSubNameCommand(const char* /*args*/)
return true;
}
- uint32 idname = objmgr.AddCreatureSubName(pCreature->GetName(),args,pCreature->GetUInt32Value(UNIT_FIELD_DISPLAYID));
+ uint32 idname = sObjectMgr.AddCreatureSubName(pCreature->GetName(),args,pCreature->GetUInt32Value(UNIT_FIELD_DISPLAYID));
pCreature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
pCreature->SaveToDB();
@@ -2070,7 +2070,7 @@ bool ChatHandler::HandleKickPlayerCommand(const char *args)
return false;
}
- Player* player = objmgr.GetPlayer(kickName);
+ Player* player = sObjectMgr.GetPlayer(kickName);
if (!player)
{
SendSysMessage(LANG_PLAYER_NOT_FOUND);
@@ -2162,7 +2162,7 @@ bool ChatHandler::HandleGOInfoCommand(const char* args)
else
entry = atoi((char*)args);
- GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(entry);
+ GameObjectInfo const* goinfo = sObjectMgr.GetGameObjectInfo(entry);
if (!goinfo)
return false;
@@ -2861,7 +2861,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
wpCreature->AddObjectToRemoveList();
// re-create
Creature* wpCreature2 = new Creature;
- if (!wpCreature2->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), VISUAL_WAYPOINT, 0, 0, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation()))
+ if (!wpCreature2->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), VISUAL_WAYPOINT, 0, 0, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation()))
{
PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, VISUAL_WAYPOINT);
delete wpCreature2;
@@ -3066,7 +3066,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
float o = chr->GetOrientation();
Creature* wpCreature = new Creature;
- if (!wpCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
+ if (!wpCreature->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
{
PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
delete wpCreature;
@@ -3118,7 +3118,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
Map *map = chr->GetMap();
Creature* pCreature = new Creature;
- if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT),map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
+ if (!pCreature->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT),map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
{
PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
delete pCreature;
@@ -3166,7 +3166,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
Map *map = chr->GetMap();
Creature* pCreature = new Creature;
- if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
+ if (!pCreature->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
{
PSendSysMessage(LANG_WAYPOINT_NOTCREATED, id);
delete pCreature;
@@ -3422,8 +3422,8 @@ bool ChatHandler::HandleLookupEventCommand(const char* args)
bool found = false;
- GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
- GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
+ GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
+ GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
for (uint32 id = 0; id < events.size(); ++id)
{
@@ -3457,8 +3457,8 @@ bool ChatHandler::HandleEventActiveListCommand(const char* /*args*/)
{
uint32 counter = 0;
- GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
- GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
+ GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
+ GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
char const* active = GetTrinityString(LANG_ACTIVE);
@@ -3493,7 +3493,7 @@ bool ChatHandler::HandleEventInfoCommand(const char* args)
uint32 event_id = atoi(cId);
- GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
+ GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
if (event_id >=events.size())
{
@@ -3510,14 +3510,14 @@ bool ChatHandler::HandleEventInfoCommand(const char* args)
return false;
}
- GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
+ GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
bool active = activeEvents.find(event_id) != activeEvents.end();
char const* activeStr = active ? GetTrinityString(LANG_ACTIVE) : "";
std::string startTimeStr = TimeToTimestampStr(eventData.start);
std::string endTimeStr = TimeToTimestampStr(eventData.end);
- uint32 delay = gameeventmgr.NextCheck(event_id);
+ uint32 delay = sGameEventMgr.NextCheck(event_id);
time_t nextTime = time(NULL)+delay;
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(NULL)+delay) : "-";
@@ -3542,7 +3542,7 @@ bool ChatHandler::HandleEventStartCommand(const char* args)
int32 event_id = atoi(cId);
- GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
+ GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
if (event_id < 1 || event_id >=events.size())
{
@@ -3559,7 +3559,7 @@ bool ChatHandler::HandleEventStartCommand(const char* args)
return false;
}
- GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
+ GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
if (activeEvents.find(event_id) != activeEvents.end())
{
PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE,event_id);
@@ -3567,7 +3567,7 @@ bool ChatHandler::HandleEventStartCommand(const char* args)
return false;
}
- gameeventmgr.StartEvent(event_id,true);
+ sGameEventMgr.StartEvent(event_id,true);
return true;
}
@@ -3583,7 +3583,7 @@ bool ChatHandler::HandleEventStopCommand(const char* args)
int32 event_id = atoi(cId);
- GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
+ GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
if (event_id < 1 || event_id >=events.size())
{
@@ -3600,7 +3600,7 @@ bool ChatHandler::HandleEventStopCommand(const char* args)
return false;
}
- GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
+ GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
if (activeEvents.find(event_id) == activeEvents.end())
{
@@ -3609,7 +3609,7 @@ bool ChatHandler::HandleEventStopCommand(const char* args)
return false;
}
- gameeventmgr.StopEvent(event_id,true);
+ sGameEventMgr.StopEvent(event_id,true);
return true;
}
@@ -3931,7 +3931,7 @@ bool ChatHandler::HandleCreatePetCommand(const char* /*args*/)
return false;
}
- CreatureInfo const* cInfo = objmgr.GetCreatureTemplate(creatureTarget->GetEntry());
+ CreatureInfo const* cInfo = sObjectMgr.GetCreatureTemplate(creatureTarget->GetEntry());
// Creatures with family 0 crashes the server
if (cInfo->family == 0)
{
@@ -3978,7 +3978,7 @@ bool ChatHandler::HandleCreatePetCommand(const char* /*args*/)
// prepare visual effect for levelup
pet->SetUInt32Value(UNIT_FIELD_LEVEL,creatureTarget->getLevel()-1);
- pet->GetCharmInfo()->SetPetNumber(objmgr.GeneratePetNumber(), true);
+ pet->GetCharmInfo()->SetPetNumber(sObjectMgr.GeneratePetNumber(), true);
// this enables pet details window (Shift+P)
pet->InitPetCreateSpells();
pet->SetHealth(pet->GetMaxHealth());
@@ -4102,7 +4102,7 @@ bool ChatHandler::HandleActivateObjectCommand(const char *args)
GameObject* obj = NULL;
// by DB guid
- if (GameObjectData const* go_data = objmgr.GetGOData(lowguid))
+ if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
if (!obj)
@@ -4241,7 +4241,7 @@ bool ChatHandler::HandleNpcSetLinkCommand(const char* args)
return false;
}
- if (!objmgr.SetCreatureLinkedRespawn(pCreature->GetDBTableGUIDLow(), linkguid))
+ if (!sObjectMgr.SetCreatureLinkedRespawn(pCreature->GetDBTableGUIDLow(), linkguid))
{
PSendSysMessage("Selected creature can't link with guid '%u'", linkguid);
SetSentErrorMessage(true);
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp
index 57813285632..3b27218e606 100644
--- a/src/server/game/Chat/Commands/Level3.cpp
+++ b/src/server/game/Chat/Commands/Level3.cpp
@@ -126,7 +126,7 @@ bool ChatHandler::HandleReloadAllQuestCommand(const char* /*args*/)
HandleReloadQuestTemplateCommand("a");
sLog.outString("Re-Loading Quests Relations...");
- objmgr.LoadQuestRelations();
+ sObjectMgr.LoadQuestRelations();
SendGlobalGMSysMessage("DB tables `*_questrelation` and `*_involvedrelation` reloaded.");
return true;
}
@@ -210,7 +210,7 @@ bool ChatHandler::HandleReloadConfigCommand(const char* /*args*/)
bool ChatHandler::HandleReloadAccessRequirementCommand(const char*)
{
sLog.outString("Re-Loading Access Requirement definitions...");
- objmgr.LoadAccessRequirements();
+ sObjectMgr.LoadAccessRequirements();
SendGlobalGMSysMessage("DB table `access_requirement` reloaded.");
return true;
}
@@ -218,7 +218,7 @@ bool ChatHandler::HandleReloadAccessRequirementCommand(const char*)
bool ChatHandler::HandleReloadAchievementCriteriaDataCommand(const char*)
{
sLog.outString("Re-Loading Additional Achievement Criteria Data...");
- achievementmgr.LoadAchievementCriteriaData();
+ sAchievementMgr.LoadAchievementCriteriaData();
SendGlobalGMSysMessage("DB table `achievement_criteria_data` reloaded.");
return true;
}
@@ -226,7 +226,7 @@ bool ChatHandler::HandleReloadAchievementCriteriaDataCommand(const char*)
bool ChatHandler::HandleReloadAchievementRewardCommand(const char*)
{
sLog.outString("Re-Loading Achievement Reward Data...");
- achievementmgr.LoadRewards();
+ sAchievementMgr.LoadRewards();
SendGlobalGMSysMessage("DB table `achievement_reward` reloaded.");
return true;
}
@@ -234,7 +234,7 @@ bool ChatHandler::HandleReloadAchievementRewardCommand(const char*)
bool ChatHandler::HandleReloadAreaTriggerTavernCommand(const char*)
{
sLog.outString("Re-Loading Tavern Area Triggers...");
- objmgr.LoadTavernAreaTriggers();
+ sObjectMgr.LoadTavernAreaTriggers();
SendGlobalGMSysMessage("DB table `areatrigger_tavern` reloaded.");
return true;
}
@@ -242,7 +242,7 @@ bool ChatHandler::HandleReloadAreaTriggerTavernCommand(const char*)
bool ChatHandler::HandleReloadAreaTriggerTeleportCommand(const char*)
{
sLog.outString("Re-Loading AreaTrigger teleport definitions...");
- objmgr.LoadAreaTriggerTeleports();
+ sObjectMgr.LoadAreaTriggerTeleports();
SendGlobalGMSysMessage("DB table `areatrigger_teleport` reloaded.");
return true;
}
@@ -265,7 +265,7 @@ bool ChatHandler::HandleReloadCommandCommand(const char*)
bool ChatHandler::HandleReloadOnKillReputationCommand(const char*)
{
sLog.outString("Re-Loading creature award reputation definitions...");
- objmgr.LoadReputationOnKill();
+ sObjectMgr.LoadReputationOnKill();
SendGlobalGMSysMessage("DB table `creature_onkill_reputation` reloaded.");
return true;
}
@@ -403,9 +403,9 @@ bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args)
const_cast<CreatureInfo*>(cInfo)->equipmentId = fields[79].GetUInt32();
const_cast<CreatureInfo*>(cInfo)->MechanicImmuneMask = fields[80].GetUInt32();
const_cast<CreatureInfo*>(cInfo)->flags_extra = fields[81].GetUInt32();
- const_cast<CreatureInfo*>(cInfo)->ScriptID = objmgr.GetScriptId(fields[82].GetString());
+ const_cast<CreatureInfo*>(cInfo)->ScriptID = sObjectMgr.GetScriptId(fields[82].GetString());
- objmgr.CheckCreatureTemplate(cInfo);
+ sObjectMgr.CheckCreatureTemplate(cInfo);
SendGlobalGMSysMessage("Creature template reloaded.");
return true;
@@ -414,7 +414,7 @@ bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args)
bool ChatHandler::HandleReloadCreatureQuestRelationsCommand(const char*)
{
sLog.outString("Loading Quests Relations... (`creature_questrelation`)");
- objmgr.LoadCreatureQuestRelations();
+ sObjectMgr.LoadCreatureQuestRelations();
SendGlobalGMSysMessage("DB table `creature_questrelation` (creature quest givers) reloaded.");
return true;
}
@@ -422,7 +422,7 @@ bool ChatHandler::HandleReloadCreatureQuestRelationsCommand(const char*)
bool ChatHandler::HandleReloadCreatureLinkedRespawnCommand(const char * /*args*/)
{
sLog.outString("Loading Linked Respawns... (`creature_linked_respawn`)");
- objmgr.LoadCreatureLinkedRespawn();
+ sObjectMgr.LoadCreatureLinkedRespawn();
SendGlobalGMSysMessage("DB table `creature_linked_respawn` (creature linked respawns) reloaded.");
return true;
}
@@ -430,7 +430,7 @@ bool ChatHandler::HandleReloadCreatureLinkedRespawnCommand(const char * /*args*/
bool ChatHandler::HandleReloadCreatureQuestInvRelationsCommand(const char*)
{
sLog.outString("Loading Quests Relations... (`creature_involvedrelation`)");
- objmgr.LoadCreatureInvolvedRelations();
+ sObjectMgr.LoadCreatureInvolvedRelations();
SendGlobalGMSysMessage("DB table `creature_involvedrelation` (creature quest takers) reloaded.");
return true;
}
@@ -438,7 +438,7 @@ bool ChatHandler::HandleReloadCreatureQuestInvRelationsCommand(const char*)
bool ChatHandler::HandleReloadGossipMenuCommand(const char*)
{
sLog.outString("Re-Loading `gossip_menu` Table!");
- objmgr.LoadGossipMenu();
+ sObjectMgr.LoadGossipMenu();
SendGlobalGMSysMessage("DB table `gossip_menu` reloaded.");
sConditionMgr.LoadConditions(true);
return true;
@@ -447,7 +447,7 @@ bool ChatHandler::HandleReloadGossipMenuCommand(const char*)
bool ChatHandler::HandleReloadGossipMenuOptionCommand(const char*)
{
sLog.outString("Re-Loading `gossip_menu_option` Table!");
- objmgr.LoadGossipMenuItems();
+ sObjectMgr.LoadGossipMenuItems();
SendGlobalGMSysMessage("DB table `gossip_menu_option` reloaded.");
sConditionMgr.LoadConditions(true);
return true;
@@ -456,7 +456,7 @@ bool ChatHandler::HandleReloadGossipMenuOptionCommand(const char*)
bool ChatHandler::HandleReloadGOQuestRelationsCommand(const char*)
{
sLog.outString("Loading Quests Relations... (`gameobject_questrelation`)");
- objmgr.LoadGameobjectQuestRelations();
+ sObjectMgr.LoadGameobjectQuestRelations();
SendGlobalGMSysMessage("DB table `gameobject_questrelation` (gameobject quest givers) reloaded.");
return true;
}
@@ -464,7 +464,7 @@ bool ChatHandler::HandleReloadGOQuestRelationsCommand(const char*)
bool ChatHandler::HandleReloadGOQuestInvRelationsCommand(const char*)
{
sLog.outString("Loading Quests Relations... (`gameobject_involvedrelation`)");
- objmgr.LoadGameobjectInvolvedRelations();
+ sObjectMgr.LoadGameobjectInvolvedRelations();
SendGlobalGMSysMessage("DB table `gameobject_involvedrelation` (gameobject quest takers) reloaded.");
return true;
}
@@ -472,7 +472,7 @@ bool ChatHandler::HandleReloadGOQuestInvRelationsCommand(const char*)
bool ChatHandler::HandleReloadQuestAreaTriggersCommand(const char*)
{
sLog.outString("Re-Loading Quest Area Triggers...");
- objmgr.LoadQuestAreaTriggers();
+ sObjectMgr.LoadQuestAreaTriggers();
SendGlobalGMSysMessage("DB table `areatrigger_involvedrelation` (quest area triggers) reloaded.");
return true;
}
@@ -480,12 +480,12 @@ bool ChatHandler::HandleReloadQuestAreaTriggersCommand(const char*)
bool ChatHandler::HandleReloadQuestTemplateCommand(const char*)
{
sLog.outString("Re-Loading Quest Templates...");
- objmgr.LoadQuests();
+ sObjectMgr.LoadQuests();
SendGlobalGMSysMessage("DB table `quest_template` (quest definitions) reloaded.");
/// dependent also from `gameobject` but this table not reloaded anyway
sLog.outString("Re-Loading GameObjects for quests...");
- objmgr.LoadGameObjectForQuests();
+ sObjectMgr.LoadGameObjectForQuests();
SendGlobalGMSysMessage("Data GameObjects for quests reloaded.");
return true;
}
@@ -612,7 +612,7 @@ bool ChatHandler::HandleReloadLootTemplatesSpellCommand(const char*)
bool ChatHandler::HandleReloadTrinityStringCommand(const char*)
{
sLog.outString("Re-Loading trinity_string Table!");
- objmgr.LoadTrinityStrings();
+ sObjectMgr.LoadTrinityStrings();
SendGlobalGMSysMessage("DB table `trinity_string` reloaded.");
return true;
}
@@ -620,7 +620,7 @@ bool ChatHandler::HandleReloadTrinityStringCommand(const char*)
bool ChatHandler::HandleReloadNpcGossipCommand(const char*)
{
sLog.outString("Re-Loading `npc_gossip` Table!");
- objmgr.LoadNpcTextId();
+ sObjectMgr.LoadNpcTextId();
SendGlobalGMSysMessage("DB table `npc_gossip` reloaded.");
return true;
}
@@ -628,7 +628,7 @@ bool ChatHandler::HandleReloadNpcGossipCommand(const char*)
bool ChatHandler::HandleReloadNpcTrainerCommand(const char*)
{
sLog.outString("Re-Loading `npc_trainer` Table!");
- objmgr.LoadTrainerSpell();
+ sObjectMgr.LoadTrainerSpell();
SendGlobalGMSysMessage("DB table `npc_trainer` reloaded.");
return true;
}
@@ -636,7 +636,7 @@ bool ChatHandler::HandleReloadNpcTrainerCommand(const char*)
bool ChatHandler::HandleReloadNpcVendorCommand(const char*)
{
sLog.outString("Re-Loading `npc_vendor` Table!");
- objmgr.LoadVendors();
+ sObjectMgr.LoadVendors();
SendGlobalGMSysMessage("DB table `npc_vendor` reloaded.");
return true;
}
@@ -644,7 +644,7 @@ bool ChatHandler::HandleReloadNpcVendorCommand(const char*)
bool ChatHandler::HandleReloadPointsOfInterestCommand(const char*)
{
sLog.outString("Re-Loading `points_of_interest` Table!");
- objmgr.LoadPointsOfInterest();
+ sObjectMgr.LoadPointsOfInterest();
SendGlobalGMSysMessage("DB table `points_of_interest` reloaded.");
return true;
}
@@ -652,7 +652,7 @@ bool ChatHandler::HandleReloadPointsOfInterestCommand(const char*)
bool ChatHandler::HandleReloadSpellClickSpellsCommand(const char*)
{
sLog.outString("Re-Loading `npc_spellclick_spells` Table!");
- objmgr.LoadNPCSpellClickSpells();
+ sObjectMgr.LoadNPCSpellClickSpells();
SendGlobalGMSysMessage("DB table `npc_spellclick_spells` reloaded.");
return true;
}
@@ -660,7 +660,7 @@ bool ChatHandler::HandleReloadSpellClickSpellsCommand(const char*)
bool ChatHandler::HandleReloadReservedNameCommand(const char*)
{
sLog.outString("Loading ReservedNames... (`reserved_name`)");
- objmgr.LoadReservedPlayersNames();
+ sObjectMgr.LoadReservedPlayersNames();
SendGlobalGMSysMessage("DB table `reserved_name` (player reserved names) reloaded.");
return true;
}
@@ -668,7 +668,7 @@ bool ChatHandler::HandleReloadReservedNameCommand(const char*)
bool ChatHandler::HandleReloadReputationRewardRateCommand(const char*)
{
sLog.outString( "Re-Loading `reputation_reward_rate` Table!" );
- objmgr.LoadReputationRewardRate();
+ sObjectMgr.LoadReputationRewardRate();
SendGlobalSysMessage("DB table `reputation_reward_rate` reloaded.");
return true;
}
@@ -676,7 +676,7 @@ bool ChatHandler::HandleReloadReputationRewardRateCommand(const char*)
bool ChatHandler::HandleReloadReputationSpilloverTemplateCommand(const char*)
{
sLog.outString( "Re-Loading `reputation_spillover_template` Table!" );
- objmgr.LoadReputationSpilloverTemplate();
+ sObjectMgr.LoadReputationSpilloverTemplate();
SendGlobalSysMessage("DB table `reputation_spillover_template` reloaded.");
return true;
}
@@ -700,7 +700,7 @@ bool ChatHandler::HandleReloadSkillExtraItemTemplateCommand(const char* /*args*/
bool ChatHandler::HandleReloadSkillFishingBaseLevelCommand(const char* /*args*/)
{
sLog.outString("Re-Loading Skill Fishing base level requirements...");
- objmgr.LoadFishingBaseSkillLevel();
+ sObjectMgr.LoadFishingBaseSkillLevel();
SendGlobalGMSysMessage("DB table `skill_fishing_base_level` (fishing base level for zone/subzone) reloaded.");
return true;
}
@@ -708,7 +708,7 @@ bool ChatHandler::HandleReloadSkillFishingBaseLevelCommand(const char* /*args*/)
bool ChatHandler::HandleReloadSpellAreaCommand(const char*)
{
sLog.outString("Re-Loading SpellArea Data...");
- spellmgr.LoadSpellAreas();
+ sSpellMgr.LoadSpellAreas();
SendGlobalGMSysMessage("DB table `spell_area` (spell dependences from area/quest/auras state) reloaded.");
return true;
}
@@ -716,7 +716,7 @@ bool ChatHandler::HandleReloadSpellAreaCommand(const char*)
bool ChatHandler::HandleReloadSpellRequiredCommand(const char*)
{
sLog.outString("Re-Loading Spell Required Data... ");
- spellmgr.LoadSpellRequired();
+ sSpellMgr.LoadSpellRequired();
SendGlobalGMSysMessage("DB table `spell_required` reloaded.");
return true;
}
@@ -724,7 +724,7 @@ bool ChatHandler::HandleReloadSpellRequiredCommand(const char*)
bool ChatHandler::HandleReloadSpellGroupsCommand(const char*)
{
sLog.outString("Re-Loading Spell Groups...");
- spellmgr.LoadSpellGroups();
+ sSpellMgr.LoadSpellGroups();
SendGlobalGMSysMessage("DB table `spell_group` (spell groups) reloaded.");
return true;
}
@@ -732,7 +732,7 @@ bool ChatHandler::HandleReloadSpellGroupsCommand(const char*)
bool ChatHandler::HandleReloadSpellLearnSpellCommand(const char*)
{
sLog.outString("Re-Loading Spell Learn Spells...");
- spellmgr.LoadSpellLearnSpells();
+ sSpellMgr.LoadSpellLearnSpells();
SendGlobalGMSysMessage("DB table `spell_learn_spell` reloaded.");
return true;
}
@@ -740,7 +740,7 @@ bool ChatHandler::HandleReloadSpellLearnSpellCommand(const char*)
bool ChatHandler::HandleReloadSpellLinkedSpellCommand(const char*)
{
sLog.outString("Re-Loading Spell Linked Spells...");
- spellmgr.LoadSpellLinked();
+ sSpellMgr.LoadSpellLinked();
SendGlobalGMSysMessage("DB table `spell_linked_spell` reloaded.");
return true;
}
@@ -748,7 +748,7 @@ bool ChatHandler::HandleReloadSpellLinkedSpellCommand(const char*)
bool ChatHandler::HandleReloadSpellProcEventCommand(const char*)
{
sLog.outString("Re-Loading Spell Proc Event conditions...");
- spellmgr.LoadSpellProcEvents();
+ sSpellMgr.LoadSpellProcEvents();
SendGlobalGMSysMessage("DB table `spell_proc_event` (spell proc trigger requirements) reloaded.");
return true;
}
@@ -756,7 +756,7 @@ bool ChatHandler::HandleReloadSpellProcEventCommand(const char*)
bool ChatHandler::HandleReloadSpellBonusesCommand(const char*)
{
sLog.outString("Re-Loading Spell Bonus Data...");
- spellmgr.LoadSpellBonusess();
+ sSpellMgr.LoadSpellBonusess();
SendGlobalGMSysMessage("DB table `spell_bonus_data` (spell damage/healing coefficients) reloaded.");
return true;
}
@@ -764,7 +764,7 @@ bool ChatHandler::HandleReloadSpellBonusesCommand(const char*)
bool ChatHandler::HandleReloadSpellTargetPositionCommand(const char*)
{
sLog.outString("Re-Loading Spell target coordinates...");
- spellmgr.LoadSpellTargetPositions();
+ sSpellMgr.LoadSpellTargetPositions();
SendGlobalGMSysMessage("DB table `spell_target_position` (destination coordinates for spell targets) reloaded.");
return true;
}
@@ -772,7 +772,7 @@ bool ChatHandler::HandleReloadSpellTargetPositionCommand(const char*)
bool ChatHandler::HandleReloadSpellThreatsCommand(const char*)
{
sLog.outString("Re-Loading Aggro Spells Definitions...");
- spellmgr.LoadSpellThreats();
+ sSpellMgr.LoadSpellThreats();
SendGlobalGMSysMessage("DB table `spell_threat` (spell aggro definitions) reloaded.");
return true;
}
@@ -780,7 +780,7 @@ bool ChatHandler::HandleReloadSpellThreatsCommand(const char*)
bool ChatHandler::HandleReloadSpellGroupStackRulesCommand(const char*)
{
sLog.outString("Re-Loading Spell Group Stack Rules...");
- spellmgr.LoadSpellGroupStackRules();
+ sSpellMgr.LoadSpellGroupStackRules();
SendGlobalGMSysMessage("DB table `spell_group_stack_rules` (spell stacking definitions) reloaded.");
return true;
}
@@ -788,7 +788,7 @@ bool ChatHandler::HandleReloadSpellGroupStackRulesCommand(const char*)
bool ChatHandler::HandleReloadSpellPetAurasCommand(const char*)
{
sLog.outString("Re-Loading Spell pet auras...");
- spellmgr.LoadSpellPetAuras();
+ sSpellMgr.LoadSpellPetAuras();
SendGlobalGMSysMessage("DB table `spell_pet_auras` reloaded.");
return true;
}
@@ -796,7 +796,7 @@ bool ChatHandler::HandleReloadSpellPetAurasCommand(const char*)
bool ChatHandler::HandleReloadPageTextsCommand(const char*)
{
sLog.outString("Re-Loading Page Texts...");
- objmgr.LoadPageTexts();
+ sObjectMgr.LoadPageTexts();
SendGlobalGMSysMessage("DB table `page_texts` reloaded.");
return true;
}
@@ -829,7 +829,7 @@ bool ChatHandler::HandleReloadGameObjectScriptsCommand(const char* arg)
if (*arg != 'a')
sLog.outString("Re-Loading Scripts from `gameobject_scripts`...");
- objmgr.LoadGameObjectScripts();
+ sObjectMgr.LoadGameObjectScripts();
if (*arg != 'a')
SendGlobalGMSysMessage("DB table `gameobject_scripts` reloaded.");
@@ -849,7 +849,7 @@ bool ChatHandler::HandleReloadEventScriptsCommand(const char* arg)
if (*arg != 'a')
sLog.outString("Re-Loading Scripts from `event_scripts`...");
- objmgr.LoadEventScripts();
+ sObjectMgr.LoadEventScripts();
if (*arg != 'a')
SendGlobalGMSysMessage("DB table `event_scripts` reloaded.");
@@ -869,7 +869,7 @@ bool ChatHandler::HandleReloadWpScriptsCommand(const char* arg)
if (*arg != 'a')
sLog.outString("Re-Loading Scripts from `waypoint_scripts`...");
- objmgr.LoadWaypointScripts();
+ sObjectMgr.LoadWaypointScripts();
if (*arg != 'a')
SendGlobalGMSysMessage("DB table `waypoint_scripts` reloaded.");
@@ -881,7 +881,7 @@ bool ChatHandler::HandleReloadEventAITextsCommand(const char* /*args*/)
{
sLog.outString("Re-Loading Texts from `creature_ai_texts`...");
- CreatureEAI_Mgr.LoadCreatureEventAI_Texts();
+ sEventAIMgr.LoadCreatureEventAI_Texts();
SendGlobalGMSysMessage("DB table `creature_ai_texts` reloaded.");
return true;
}
@@ -889,7 +889,7 @@ bool ChatHandler::HandleReloadEventAITextsCommand(const char* /*args*/)
bool ChatHandler::HandleReloadEventAISummonsCommand(const char* /*args*/)
{
sLog.outString("Re-Loading Summons from `creature_ai_summons`...");
- CreatureEAI_Mgr.LoadCreatureEventAI_Summons();
+ sEventAIMgr.LoadCreatureEventAI_Summons();
SendGlobalGMSysMessage("DB table `creature_ai_summons` reloaded.");
return true;
}
@@ -897,7 +897,7 @@ bool ChatHandler::HandleReloadEventAISummonsCommand(const char* /*args*/)
bool ChatHandler::HandleReloadEventAIScriptsCommand(const char* /*args*/)
{
sLog.outString("Re-Loading Scripts from `creature_ai_scripts`...");
- CreatureEAI_Mgr.LoadCreatureEventAI_Scripts();
+ sEventAIMgr.LoadCreatureEventAI_Scripts();
SendGlobalGMSysMessage("DB table `creature_ai_scripts` reloaded.");
return true;
}
@@ -914,7 +914,7 @@ bool ChatHandler::HandleReloadQuestEndScriptsCommand(const char* arg)
if (*arg != 'a')
sLog.outString("Re-Loading Scripts from `quest_end_scripts`...");
- objmgr.LoadQuestEndScripts();
+ sObjectMgr.LoadQuestEndScripts();
if (*arg != 'a')
SendGlobalGMSysMessage("DB table `quest_end_scripts` reloaded.");
@@ -934,7 +934,7 @@ bool ChatHandler::HandleReloadQuestStartScriptsCommand(const char* arg)
if (*arg != 'a')
sLog.outString("Re-Loading Scripts from `quest_start_scripts`...");
- objmgr.LoadQuestStartScripts();
+ sObjectMgr.LoadQuestStartScripts();
if (*arg != 'a')
SendGlobalGMSysMessage("DB table `quest_start_scripts` reloaded.");
@@ -954,7 +954,7 @@ bool ChatHandler::HandleReloadSpellScriptsCommand(const char* arg)
if (*arg != 'a')
sLog.outString("Re-Loading Scripts from `spell_scripts`...");
- objmgr.LoadSpellScripts();
+ sObjectMgr.LoadSpellScripts();
if (*arg != 'a')
SendGlobalGMSysMessage("DB table `spell_scripts` reloaded.");
@@ -965,7 +965,7 @@ bool ChatHandler::HandleReloadSpellScriptsCommand(const char* arg)
bool ChatHandler::HandleReloadDbScriptStringCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Script strings from `db_script_string`...");
- objmgr.LoadDbScriptStrings();
+ sObjectMgr.LoadDbScriptStrings();
SendGlobalGMSysMessage("DB table `db_script_string` reloaded.");
return true;
}
@@ -974,7 +974,7 @@ bool ChatHandler::HandleReloadGameGraveyardZoneCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Graveyard-zone links...");
- objmgr.LoadGraveyardZones();
+ sObjectMgr.LoadGraveyardZones();
SendGlobalGMSysMessage("DB table `game_graveyard_zone` reloaded.");
@@ -985,7 +985,7 @@ bool ChatHandler::HandleReloadGameTeleCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Game Tele coordinates...");
- objmgr.LoadGameTele();
+ sObjectMgr.LoadGameTele();
SendGlobalGMSysMessage("DB table `game_tele` reloaded.");
@@ -1005,7 +1005,7 @@ bool ChatHandler::HandleReloadDisablesCommand(const char* /*arg*/)
bool ChatHandler::HandleReloadLocalesAchievementRewardCommand(const char*)
{
sLog.outString("Re-Loading Locales Achievement Reward Data...");
- achievementmgr.LoadRewardLocales();
+ sAchievementMgr.LoadRewardLocales();
SendGlobalGMSysMessage("DB table `locales_achievement_reward` reloaded.");
return true;
}
@@ -1013,7 +1013,7 @@ bool ChatHandler::HandleReloadLocalesAchievementRewardCommand(const char*)
bool ChatHandler::HandleReloadLocalesCreatureCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales Creature ...");
- objmgr.LoadCreatureLocales();
+ sObjectMgr.LoadCreatureLocales();
SendGlobalGMSysMessage("DB table `locales_creature` reloaded.");
return true;
}
@@ -1021,7 +1021,7 @@ bool ChatHandler::HandleReloadLocalesCreatureCommand(const char* /*arg*/)
bool ChatHandler::HandleReloadLocalesGameobjectCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales Gameobject ... ");
- objmgr.LoadGameObjectLocales();
+ sObjectMgr.LoadGameObjectLocales();
SendGlobalGMSysMessage("DB table `locales_gameobject` reloaded.");
return true;
}
@@ -1029,7 +1029,7 @@ bool ChatHandler::HandleReloadLocalesGameobjectCommand(const char* /*arg*/)
bool ChatHandler::HandleReloadLocalesItemCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales Item ... ");
- objmgr.LoadItemLocales();
+ sObjectMgr.LoadItemLocales();
SendGlobalGMSysMessage("DB table `locales_item` reloaded.");
return true;
}
@@ -1037,7 +1037,7 @@ bool ChatHandler::HandleReloadLocalesItemCommand(const char* /*arg*/)
bool ChatHandler::HandleReloadLocalesItemSetNameCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales Item set name... ");
- objmgr.LoadItemSetNameLocales();
+ sObjectMgr.LoadItemSetNameLocales();
SendGlobalGMSysMessage("DB table `locales_item_set_name` reloaded.");
return true;
}
@@ -1045,7 +1045,7 @@ bool ChatHandler::HandleReloadLocalesItemSetNameCommand(const char* /*arg*/)
bool ChatHandler::HandleReloadLocalesNpcTextCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales NPC Text ... ");
- objmgr.LoadNpcTextLocales();
+ sObjectMgr.LoadNpcTextLocales();
SendGlobalGMSysMessage("DB table `locales_npc_text` reloaded.");
return true;
}
@@ -1053,7 +1053,7 @@ bool ChatHandler::HandleReloadLocalesNpcTextCommand(const char* /*arg*/)
bool ChatHandler::HandleReloadLocalesPageTextCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales Page Text ... ");
- objmgr.LoadPageTextLocales();
+ sObjectMgr.LoadPageTextLocales();
SendGlobalGMSysMessage("DB table `locales_page_text` reloaded.");
return true;
}
@@ -1061,7 +1061,7 @@ bool ChatHandler::HandleReloadLocalesPageTextCommand(const char* /*arg*/)
bool ChatHandler::HandleReloadLocalesPointsOfInterestCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales Points Of Interest ... ");
- objmgr.LoadPointOfInterestLocales();
+ sObjectMgr.LoadPointOfInterestLocales();
SendGlobalGMSysMessage("DB table `locales_points_of_interest` reloaded.");
return true;
}
@@ -1069,7 +1069,7 @@ bool ChatHandler::HandleReloadLocalesPointsOfInterestCommand(const char* /*arg*/
bool ChatHandler::HandleReloadLocalesQuestCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales Quest ... ");
- objmgr.LoadQuestLocales();
+ sObjectMgr.LoadQuestLocales();
SendGlobalGMSysMessage("DB table `locales_quest` reloaded.");
return true;
}
@@ -1077,7 +1077,7 @@ bool ChatHandler::HandleReloadLocalesQuestCommand(const char* /*arg*/)
bool ChatHandler::HandleReloadMailLevelRewardCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Player level dependent mail rewards...");
- objmgr.LoadMailLevelRewards();
+ sObjectMgr.LoadMailLevelRewards();
SendGlobalGMSysMessage("DB table `mail_level_reward` reloaded.");
return true;
}
@@ -1086,8 +1086,8 @@ bool ChatHandler::HandleReloadAuctionsCommand(const char * /*args*/)
{
///- Reload dynamic data tables from the database
sLog.outString("Re-Loading Auctions...");
- auctionmgr.LoadAuctionItems();
- auctionmgr.LoadAuctions();
+ sAuctionMgr.LoadAuctionItems();
+ sAuctionMgr.LoadAuctions();
SendGlobalGMSysMessage("Auctions reloaded.");
return true;
}
@@ -1147,13 +1147,13 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char *args)
}
// m_session == NULL only for console
- targetAccountId = (isAccountNameGiven) ? accmgr.GetId(targetAccountName) : getSelectedPlayer()->GetSession()->GetAccountId();
+ targetAccountId = (isAccountNameGiven) ? sAccountMgr.GetId(targetAccountName) : getSelectedPlayer()->GetSession()->GetAccountId();
int32 gmRealmID = (isAccountNameGiven) ? atoi(arg3) : atoi(arg2);
- uint32 plSecurity = m_session ? accmgr.GetSecurity(m_session->GetAccountId(), gmRealmID) : SEC_CONSOLE;
+ uint32 plSecurity = m_session ? sAccountMgr.GetSecurity(m_session->GetAccountId(), gmRealmID) : SEC_CONSOLE;
// can set security level only for target with less security and to less security that we have
// This is also reject self apply in fact
- targetSecurity = accmgr.GetSecurity(targetAccountId, gmRealmID);
+ targetSecurity = sAccountMgr.GetSecurity(targetAccountId, gmRealmID);
if (targetSecurity >= plSecurity || gm >= plSecurity)
{
SendSysMessage(LANG_YOURS_SECURITY_IS_LOW);
@@ -1215,7 +1215,7 @@ bool ChatHandler::HandleAccountSetPasswordCommand(const char *args)
return false;
}
- uint32 targetAccountId = accmgr.GetId(account_name);
+ uint32 targetAccountId = sAccountMgr.GetId(account_name);
if (!targetAccountId)
{
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
@@ -1235,7 +1235,7 @@ bool ChatHandler::HandleAccountSetPasswordCommand(const char *args)
return false;
}
- AccountOpResult result = accmgr.ChangePassword(targetAccountId, szPassword1);
+ AccountOpResult result = sAccountMgr.ChangePassword(targetAccountId, szPassword1);
switch (result)
{
@@ -1356,7 +1356,7 @@ bool ChatHandler::HandleUnLearnCommand(const char *args)
}
if (allRanks)
- spell_id = spellmgr.GetFirstSpellInChain (spell_id);
+ spell_id = sSpellMgr.GetFirstSpellInChain (spell_id);
if (target->HasSpell(spell_id))
target->removeSpell(spell_id,false,!allRanks);
@@ -2104,7 +2104,7 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/)
continue;
// skip spells with first rank learned as talent (and all talents then also)
- uint32 first_rank = spellmgr.GetFirstSpellInChain(spellInfo->Id);
+ uint32 first_rank = sSpellMgr.GetFirstSpellInChain(spellInfo->Id);
if (GetTalentSpellCost(first_rank) > 0)
continue;
@@ -2309,7 +2309,7 @@ bool ChatHandler::HandleLearnCommand(const char *args)
else
targetPlayer->learnSpell(spell, false);
- uint32 first_spell = spellmgr.GetFirstSpellInChain(spell);
+ uint32 first_spell = sSpellMgr.GetFirstSpellInChain(spell);
if (GetTalentSpellCost(first_spell))
targetPlayer->SendTalentsInfoData(false);
@@ -2368,7 +2368,7 @@ bool ChatHandler::HandleAddItemCommand(const char *args)
sLog.outDetail(GetTrinityString(LANG_ADDITEM), itemId, count);
- ItemPrototype const *pProto = objmgr.GetItemPrototype(itemId);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(itemId);
if (!pProto)
{
PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, itemId);
@@ -2507,7 +2507,7 @@ bool ChatHandler::HandleListItemCommand(const char *args)
return false;
}
- ItemPrototype const* itemProto = objmgr.GetItemPrototype(item_id);
+ ItemPrototype const* itemProto = sObjectMgr.GetItemPrototype(item_id);
if (!itemProto)
{
PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, item_id);
@@ -2712,7 +2712,7 @@ bool ChatHandler::HandleListObjectCommand(const char *args)
return false;
}
- GameObjectInfo const * gInfo = objmgr.GetGameObjectInfo(go_id);
+ GameObjectInfo const * gInfo = sObjectMgr.GetGameObjectInfo(go_id);
if (!gInfo)
{
PSendSysMessage(LANG_COMMAND_LISTOBJINVALIDID, go_id);
@@ -2778,7 +2778,7 @@ bool ChatHandler::HandleGameObjectStateCommand(const char *args)
GameObject* gobj = NULL;
- if (GameObjectData const* goData = objmgr.GetGOData(lowguid))
+ if (GameObjectData const* goData = sObjectMgr.GetGOData(lowguid))
gobj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, goData->id);
if (!gobj)
@@ -2842,7 +2842,7 @@ bool ChatHandler::HandleListCreatureCommand(const char *args)
return false;
}
- CreatureInfo const* cInfo = objmgr.GetCreatureTemplate(cr_id);
+ CreatureInfo const* cInfo = sObjectMgr.GetCreatureTemplate(cr_id);
if (!cInfo)
{
PSendSysMessage(LANG_COMMAND_INVALIDCREATUREID, cr_id);
@@ -2921,7 +2921,7 @@ bool ChatHandler::HandleLookupItemCommand(const char *args)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- ItemLocale const *il = objmgr.GetItemLocale(pProto->ItemId);
+ ItemLocale const *il = sObjectMgr.GetItemLocale(pProto->ItemId);
if (il)
{
if (il->Name.size() > loc_idx && !il->Name[loc_idx].empty())
@@ -3167,7 +3167,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char *args)
// unit32 used to prevent interpreting uint8 as char at output
// find rank of learned spell for learning spell, or talent rank
- uint32 rank = talentCost ? talentCost : spellmgr.GetSpellRank(learn ? spellInfo->EffectTriggerSpell[0] : id);
+ uint32 rank = talentCost ? talentCost : sSpellMgr.GetSpellRank(learn ? spellInfo->EffectTriggerSpell[0] : id);
// send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
std::ostringstream ss;
@@ -3227,7 +3227,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char *args)
bool found = false;
- ObjectMgr::QuestMap const& qTemplates = objmgr.GetQuestTemplates();
+ ObjectMgr::QuestMap const& qTemplates = sObjectMgr.GetQuestTemplates();
for (ObjectMgr::QuestMap::const_iterator iter = qTemplates.begin(); iter != qTemplates.end(); ++iter)
{
Quest * qinfo = iter->second;
@@ -3235,7 +3235,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char *args)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- QuestLocale const *il = objmgr.GetQuestLocale(qinfo->GetQuestId());
+ QuestLocale const *il = sObjectMgr.GetQuestLocale(qinfo->GetQuestId());
if (il)
{
if (il->Title.size() > loc_idx && !il->Title[loc_idx].empty())
@@ -3339,7 +3339,7 @@ bool ChatHandler::HandleLookupCreatureCommand(const char *args)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- CreatureLocale const *cl = objmgr.GetCreatureLocale (id);
+ CreatureLocale const *cl = sObjectMgr.GetCreatureLocale (id);
if (cl)
{
if (cl->Name.size() > loc_idx && !cl->Name[loc_idx].empty ())
@@ -3409,7 +3409,7 @@ bool ChatHandler::HandleLookupObjectCommand(const char *args)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- GameObjectLocale const *gl = objmgr.GetGameObjectLocale(id);
+ GameObjectLocale const *gl = sObjectMgr.GetGameObjectLocale(id);
if (gl)
{
if (gl->Name.size() > loc_idx && !gl->Name[loc_idx].empty())
@@ -3761,7 +3761,7 @@ bool ChatHandler::HandleGuildCreateCommand(const char *args)
return false;
}
- objmgr.AddGuild (guild);
+ sObjectMgr.AddGuild (guild);
return true;
}
@@ -3784,7 +3784,7 @@ bool ChatHandler::HandleGuildInviteCommand(const char *args)
return false;
std::string glName = guildStr;
- Guild* targetGuild = objmgr.GetGuildByName (glName);
+ Guild* targetGuild = sObjectMgr.GetGuildByName (glName);
if (!targetGuild)
return false;
@@ -3806,7 +3806,7 @@ bool ChatHandler::HandleGuildUninviteCommand(const char *args)
if (!glId)
return false;
- Guild* targetGuild = objmgr.GetGuildById (glId);
+ Guild* targetGuild = sObjectMgr.GetGuildById (glId);
if (!targetGuild)
return false;
@@ -3832,7 +3832,7 @@ bool ChatHandler::HandleGuildRankCommand(const char *args)
if (!glId)
return false;
- Guild* targetGuild = objmgr.GetGuildById (glId);
+ Guild* targetGuild = sObjectMgr.GetGuildById (glId);
if (!targetGuild)
return false;
@@ -3855,7 +3855,7 @@ bool ChatHandler::HandleGuildDeleteCommand(const char *args)
std::string gld = guildStr;
- Guild* targetGuild = objmgr.GetGuildByName (gld);
+ Guild* targetGuild = sObjectMgr.GetGuildByName (gld);
if (!targetGuild)
return false;
@@ -4137,7 +4137,7 @@ bool ChatHandler::HandleLinkGraveCommand(const char *args)
return false;
}
- if (objmgr.AddGraveYardLink(g_id,zoneId,g_team))
+ if (sObjectMgr.AddGraveYardLink(g_id,zoneId,g_team))
PSendSysMessage(LANG_COMMAND_GRAVEYARDLINKED, g_id,zoneId);
else
PSendSysMessage(LANG_COMMAND_GRAVEYARDALRLINKED, g_id,zoneId);
@@ -4163,14 +4163,14 @@ bool ChatHandler::HandleNearGraveCommand(const char *args)
Player* player = m_session->GetPlayer();
uint32 zone_id = player->GetZoneId();
- WorldSafeLocsEntry const* graveyard = objmgr.GetClosestGraveYard(
+ WorldSafeLocsEntry const* graveyard = sObjectMgr.GetClosestGraveYard(
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(),player->GetMapId(),g_team);
if (graveyard)
{
uint32 g_id = graveyard->ID;
- GraveYardData const* data = objmgr.FindGraveYardData(g_id,zone_id);
+ GraveYardData const* data = sObjectMgr.FindGraveYardData(g_id,zone_id);
if (!data)
{
PSendSysMessage(LANG_COMMAND_GRAVEYARDERROR,g_id);
@@ -4287,7 +4287,7 @@ bool ChatHandler::HandleNpcInfoCommand(const char* /*args*/)
PSendSysMessage(LANG_NPCINFO_POSITION,float(target->GetPositionX()), float(target->GetPositionY()), float(target->GetPositionZ()));
if (const CreatureData* const linked = target->GetLinkedRespawnCreatureData())
if (CreatureInfo const *master = GetCreatureInfo(linked->id))
- PSendSysMessage(LANG_NPCINFO_LINKGUID, objmgr.GetLinkedRespawnGuid(target->GetDBTableGUIDLow()), linked->id, master->Name);
+ PSendSysMessage(LANG_NPCINFO_LINKGUID, sObjectMgr.GetLinkedRespawnGuid(target->GetDBTableGUIDLow()), linked->id, master->Name);
if ((npcflags & UNIT_NPC_FLAG_VENDOR))
{
@@ -4356,7 +4356,7 @@ bool ChatHandler::HandleNpcAddWeaponCommand(const char* /*args*/)
uint32 ItemID = atoi(pItemID);
uint32 SlotID = atoi(pSlotID);
- ItemPrototype* tmpItem = objmgr.GetItemPrototype(ItemID);
+ ItemPrototype* tmpItem = sObjectMgr.GetItemPrototype(ItemID);
bool added = false;
if (tmpItem)
@@ -4717,7 +4717,7 @@ bool ChatHandler::HandleTeleAddCommand(const char * args)
std::string name = args;
- if (objmgr.GetGameTele(name))
+ if (sObjectMgr.GetGameTele(name))
{
SendSysMessage(LANG_COMMAND_TP_ALREADYEXIST);
SetSentErrorMessage(true);
@@ -4732,7 +4732,7 @@ bool ChatHandler::HandleTeleAddCommand(const char * args)
tele.mapId = player->GetMapId();
tele.name = name;
- if (objmgr.AddGameTele(tele))
+ if (sObjectMgr.AddGameTele(tele))
{
SendSysMessage(LANG_COMMAND_TP_ADDED);
}
@@ -4753,7 +4753,7 @@ bool ChatHandler::HandleTeleDelCommand(const char * args)
std::string name = args;
- if (!objmgr.DeleteGameTele(name))
+ if (!sObjectMgr.DeleteGameTele(name))
{
SendSysMessage(LANG_COMMAND_TELE_NOTFOUND);
SetSentErrorMessage(true);
@@ -5237,7 +5237,7 @@ bool ChatHandler::HandleQuestAdd(const char *args)
uint32 entry = atol(cId);
- Quest const* pQuest = objmgr.GetQuestTemplate(entry);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(entry);
if (!pQuest)
{
@@ -5291,7 +5291,7 @@ bool ChatHandler::HandleQuestRemove(const char *args)
uint32 entry = atol(cId);
- Quest const* pQuest = objmgr.GetQuestTemplate(entry);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(entry);
if (!pQuest)
{
@@ -5341,7 +5341,7 @@ bool ChatHandler::HandleQuestComplete(const char *args)
uint32 entry = atol(cId);
- Quest const* pQuest = objmgr.GetQuestTemplate(entry);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(entry);
// If player doesn't have the quest
if (!pQuest || player->GetQuestStatus(entry) == QUEST_STATUS_NONE)
@@ -5383,7 +5383,7 @@ bool ChatHandler::HandleQuestComplete(const char *args)
}
else if (creature > 0)
{
- if (CreatureInfo const* cInfo = objmgr.GetCreatureTemplate(creature))
+ if (CreatureInfo const* cInfo = sObjectMgr.GetCreatureTemplate(creature))
for (uint16 z = 0; z < creaturecount; ++z)
player->KilledMonster(cInfo,0);
}
@@ -5586,7 +5586,7 @@ bool ChatHandler::HandleBanInfoAccountCommand(const char *args)
return false;
}
- uint32 accountid = accmgr.GetId(account_name);
+ uint32 accountid = sAccountMgr.GetId(account_name);
if (!accountid)
{
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
@@ -5603,10 +5603,10 @@ bool ChatHandler::HandleBanInfoCharacterCommand(const char *args)
if (!extractPlayerTarget((char*)args,&target,&target_guid))
return false;
- uint32 accountid = target ? target->GetSession()->GetAccountId() : objmgr.GetPlayerAccountIdByGUID(target_guid);
+ uint32 accountid = target ? target->GetSession()->GetAccountId() : sObjectMgr.GetPlayerAccountIdByGUID(target_guid);
std::string accountname;
- if (!accmgr.GetName(accountid,accountname))
+ if (!sAccountMgr.GetName(accountid,accountname))
{
PSendSysMessage(LANG_BANINFO_NOCHARACTER);
return true;
@@ -5763,7 +5763,7 @@ bool ChatHandler::HandleBanListHelper(QueryResult_AutoPtr result)
account_name = fields[1].GetCppString();
// "character" case, name need extract from another DB
else
- accmgr.GetName (account_id,account_name);
+ sAccountMgr.GetName (account_id,account_name);
// No SQL injection. id is uint32.
QueryResult_AutoPtr banInfo = LoginDatabase.PQuery("SELECT bandate,unbandate,bannedby,banreason FROM account_banned WHERE id = %u ORDER BY unbandate", account_id);
@@ -5952,7 +5952,7 @@ bool ChatHandler::HandlePDumpLoadCommand(const char *args)
return false;
}
- uint32 account_id = accmgr.GetId(account_name);
+ uint32 account_id = sAccountMgr.GetId(account_name);
if (!account_id)
{
account_id = atoi(account); // use original string
@@ -5964,7 +5964,7 @@ bool ChatHandler::HandlePDumpLoadCommand(const char *args)
}
}
- if (!accmgr.GetName(account_id,account_name))
+ if (!sAccountMgr.GetName(account_id,account_name))
{
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
SetSentErrorMessage(true);
@@ -6008,7 +6008,7 @@ bool ChatHandler::HandlePDumpLoadCommand(const char *args)
return false;
}
- if (objmgr.GetPlayerAccountIdByGUID(guid))
+ if (sObjectMgr.GetPlayerAccountIdByGUID(guid))
{
PSendSysMessage(LANG_CHARACTER_GUID_IN_USE,guid);
SetSentErrorMessage(true);
@@ -6067,10 +6067,10 @@ bool ChatHandler::HandlePDumpWriteCommand(const char *args)
return false;
}
- guid = objmgr.GetPlayerGUIDByName(name);
+ guid = sObjectMgr.GetPlayerGUIDByName(name);
}
- if (!objmgr.GetPlayerAccountIdByGUID(guid))
+ if (!sObjectMgr.GetPlayerAccountIdByGUID(guid))
{
PSendSysMessage(LANG_PLAYER_NOT_FOUND);
SetSentErrorMessage(true);
@@ -6558,9 +6558,9 @@ bool ChatHandler::HandleInstanceStatsCommand(const char* /*args*/)
{
PSendSysMessage("instances loaded: %d", sMapMgr.GetNumInstances());
PSendSysMessage("players in instances: %d", sMapMgr.GetNumPlayersInInstances());
- PSendSysMessage("instance saves: %d", sInstanceSaveManager.GetNumInstanceSaves());
- PSendSysMessage("players bound: %d", sInstanceSaveManager.GetNumBoundPlayersTotal());
- PSendSysMessage("groups bound: %d", sInstanceSaveManager.GetNumBoundGroupsTotal());
+ PSendSysMessage("instance saves: %d", sInstanceSaveMgr.GetNumInstanceSaves());
+ PSendSysMessage("players bound: %d", sInstanceSaveMgr.GetNumBoundPlayersTotal());
+ PSendSysMessage("groups bound: %d", sInstanceSaveMgr.GetNumBoundGroupsTotal());
return true;
}
@@ -6664,7 +6664,7 @@ bool ChatHandler::HandleAccountSetAddonCommand(const char *args)
return false;
account_id = player->GetSession()->GetAccountId();
- accmgr.GetName(account_id,account_name);
+ sAccountMgr.GetName(account_id,account_name);
szExp = szAcc;
}
else
@@ -6678,7 +6678,7 @@ bool ChatHandler::HandleAccountSetAddonCommand(const char *args)
return false;
}
- account_id = accmgr.GetId(account_name);
+ account_id = sAccountMgr.GetId(account_name);
if (!account_id)
{
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
@@ -6756,7 +6756,7 @@ bool ChatHandler::HandleSendItemsCommand(const char *args)
if (!item_id)
return false;
- ItemPrototype const* item_proto = objmgr.GetItemPrototype(item_id);
+ ItemPrototype const* item_proto = sObjectMgr.GetItemPrototype(item_id);
if (!item_proto)
{
PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, item_id);
@@ -6909,7 +6909,7 @@ bool ChatHandler::HandleModifyGenderCommand(const char *args)
return false;
}
- PlayerInfo const* info = objmgr.GetPlayerInfo(player->getRace(), player->getClass());
+ PlayerInfo const* info = sObjectMgr.GetPlayerInfo(player->getRace(), player->getClass());
if (!info)
return false;
@@ -7024,7 +7024,7 @@ bool ChatHandler::HandleFreezeCommand(const char *args)
{
name = TargetName;
normalizePlayerName(name);
- player = objmgr.GetPlayer(name.c_str()); //get player by name
+ player = sObjectMgr.GetPlayer(name.c_str()); //get player by name
}
if (!player)
@@ -7090,7 +7090,7 @@ bool ChatHandler::HandleUnFreezeCommand(const char *args)
{
name = TargetName;
normalizePlayerName(name);
- player = objmgr.GetPlayer(name.c_str()); //get player by name
+ player = sObjectMgr.GetPlayer(name.c_str()); //get player by name
}
//effect
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 30dedf793de..ee7a662e608 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -114,7 +114,7 @@ bool Condition::Meets(Player * player, Unit* targetOverride)
condMeets = !player->HasAuraEffect(mConditionValue1, mConditionValue2);
break;
case CONDITION_ACTIVE_EVENT:
- condMeets = gameeventmgr.IsActiveEvent(mConditionValue1);
+ condMeets = sGameEventMgr.IsActiveEvent(mConditionValue1);
break;
case CONDITION_INSTANCE_DATA:
{
@@ -315,10 +315,10 @@ void ConditionMgr::LoadConditions(bool isReload)
LootTemplates_Spell.ResetConditions();
sLog.outString("Re-Loading `gossip_menu` Table for Conditions!");
- objmgr.LoadGossipMenu();
+ sObjectMgr.LoadGossipMenu();
sLog.outString("Re-Loading `gossip_menu_option` Table for Conditions!");
- objmgr.LoadGossipMenuItems();
+ sObjectMgr.LoadGossipMenuItems();
}
uint32 count = 0;
@@ -353,7 +353,7 @@ void ConditionMgr::LoadConditions(bool isReload)
cond->mConditionValue2 = fields[6].GetUInt32();
cond->mConditionValue3 = fields[7].GetUInt32();
cond->ErrorTextd = fields[8].GetUInt32();
- cond->mScriptId = objmgr.GetScriptId(fields[9].GetString());
+ cond->mScriptId = sObjectMgr.GetScriptId(fields[9].GetString());
if (iConditionTypeOrReference >= 0)
cond->mConditionType = ConditionType(iConditionTypeOrReference);
@@ -523,7 +523,7 @@ bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot)
bool ConditionMgr::addToGossipMenus(Condition* cond)
{
- GossipMenusMapBoundsNonConst pMenuBounds = objmgr.GetGossipMenusMapBoundsNonConst(cond->mSourceGroup);
+ GossipMenusMapBoundsNonConst pMenuBounds = sObjectMgr.GetGossipMenusMapBoundsNonConst(cond->mSourceGroup);
if (pMenuBounds.first != pMenuBounds.second)
{
@@ -543,7 +543,7 @@ bool ConditionMgr::addToGossipMenus(Condition* cond)
bool ConditionMgr::addToGossipMenuItems(Condition* cond)
{
- GossipMenuItemsMapBoundsNonConst pMenuItemBounds = objmgr.GetGossipMenuItemsMapBoundsNonConst(cond->mSourceGroup);
+ GossipMenuItemsMapBoundsNonConst pMenuItemBounds = sObjectMgr.GetGossipMenuItemsMapBoundsNonConst(cond->mSourceGroup);
if (pMenuItemBounds.first != pMenuItemBounds.second)
{
for (GossipMenuItemsMap::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
@@ -849,7 +849,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
return false;
}
- ItemPrototype const *pItemProto = objmgr.GetItemPrototype(cond->mSourceEntry);
+ ItemPrototype const *pItemProto = sObjectMgr.GetItemPrototype(cond->mSourceEntry);
if (!pItemProto)
{
sLog.outErrorDb("SourceEntry %u in `condition` table, does not exist in `item_tamplate`, ignoring.", cond->mSourceEntry);
@@ -929,7 +929,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_ITEM:
{
- ItemPrototype const *proto = objmgr.GetItemPrototype(cond->mConditionValue1);
+ ItemPrototype const *proto = sObjectMgr.GetItemPrototype(cond->mConditionValue1);
if (!proto)
{
sLog.outErrorDb("Item condition has non existing item (%u), skipped", cond->mConditionValue1);
@@ -945,7 +945,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_ITEM_EQUIPPED:
{
- ItemPrototype const *proto = objmgr.GetItemPrototype(cond->mConditionValue1);
+ ItemPrototype const *proto = sObjectMgr.GetItemPrototype(cond->mConditionValue1);
if (!proto)
{
sLog.outErrorDb("ItemEquipped condition has non existing item (%u), skipped", cond->mConditionValue1);
@@ -1017,7 +1017,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
case CONDITION_QUESTTAKEN:
case CONDITION_QUEST_NONE:
{
- Quest const *Quest = objmgr.GetQuestTemplate(cond->mConditionValue1);
+ Quest const *Quest = sObjectMgr.GetQuestTemplate(cond->mConditionValue1);
if (!Quest)
{
sLog.outErrorDb("Quest condition specifies non-existing quest (%u), skipped", cond->mConditionValue1);
@@ -1054,7 +1054,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_ACTIVE_EVENT:
{
- GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
+ GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
if (cond->mConditionValue1 >=events.size() || !events[cond->mConditionValue1].isValid())
{
sLog.outErrorDb("Active event condition has non existing event id (%u), skipped", cond->mConditionValue1);
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp
index 1fbb52bb0cf..505f76469f7 100644
--- a/src/server/game/Conditions/DisableMgr.cpp
+++ b/src/server/game/Conditions/DisableMgr.cpp
@@ -182,7 +182,7 @@ void DisableMgr::CheckQuestDisables()
{
bar.step();
const uint32 entry = itr->first;
- if (!objmgr.GetQuestTemplate(entry))
+ if (!sObjectMgr.GetQuestTemplate(entry))
{
sLog.outErrorDb("Quest entry %u from `disables` doesn't exist, skipped.", entry);
m_DisableMap[DISABLE_TYPE_QUEST].erase(itr++);
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 51d5cf6044f..91e083e6e79 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -444,7 +444,7 @@ void LoadDBCStores(const std::string& dataPath)
continue;
for (int x = 0; x < MAX_DIFFICULTY; ++x)
- spellmgr.SetSpellDifficultyId(uint32(newEntry.SpellID[x]), spellDiff->ID);
+ sSpellMgr.SetSpellDifficultyId(uint32(newEntry.SpellID[x]), spellDiff->ID);
}
// create talent spells set
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 3fdeb59227a..4241df5918b 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -86,7 +86,7 @@ void LFGQueue::Update()
queuedTime = uint32(currTime - queue->joinTime);
for (LfgRolesMap::const_iterator itPlayer = queue->roles.begin(); itPlayer != queue->roles.end(); ++itPlayer)
{
- plr = objmgr.GetPlayer(itPlayer->first);
+ plr = sObjectMgr.GetPlayer(itPlayer->first);
if (!plr)
continue;
role = itPlayer->second;
@@ -177,7 +177,7 @@ void LFGMgr::Update(uint32 diff)
Player *plr = NULL;
for (LfgRolesMap::const_iterator itRoles = pRoleCheck->roles.begin(); itRoles != pRoleCheck->roles.end(); ++itRoles)
{
- plr = objmgr.GetPlayer(itRoles->first);
+ plr = sObjectMgr.GetPlayer(itRoles->first);
if (!plr)
continue;
plr->GetSession()->SendPacket(&data);
@@ -706,7 +706,7 @@ void LFGMgr::BuildLfgRoleCheck(WorldPacket &data, LfgRoleCheck *pRoleCheck)
data << uint64(pRoleCheck->leader); // Guid
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
- plr = objmgr.GetPlayer(pRoleCheck->leader);
+ plr = sObjectMgr.GetPlayer(pRoleCheck->leader);
if (plr)
data << uint8(plr->getLevel()); // Level
else
@@ -721,7 +721,7 @@ void LFGMgr::BuildLfgRoleCheck(WorldPacket &data, LfgRoleCheck *pRoleCheck)
data << uint64(itPlayers->first); // Guid
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
- plr = objmgr.GetPlayer(pRoleCheck->leader);
+ plr = sObjectMgr.GetPlayer(pRoleCheck->leader);
if (plr)
data << uint8(plr->getLevel()); // Level
else
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 4186ea27e88..2007aa8cff1 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -129,7 +129,7 @@ bool AssistDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
CreatureBaseStats const* CreatureBaseStats::GetBaseStats(uint8 level, uint8 unitClass)
{
- return objmgr.GetCreatureBaseStats(level, unitClass);
+ return sObjectMgr.GetCreatureBaseStats(level, unitClass);
}
bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
@@ -257,7 +257,7 @@ void Creature::RemoveCorpse()
*/
bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data)
{
- CreatureInfo const *normalInfo = objmgr.GetCreatureTemplate(Entry);
+ CreatureInfo const *normalInfo = sObjectMgr.GetCreatureTemplate(Entry);
if (!normalInfo)
{
sLog.outErrorDb("Creature::InitEntry creature entry %u does not exist.", Entry);
@@ -275,7 +275,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data
// we already have valid Map pointer for current creature!
if (GetMap()->GetSpawnMode() > diff)
{
- cinfo = objmgr.GetCreatureTemplate(normalInfo->DifficultyEntry[diff]);
+ cinfo = sObjectMgr.GetCreatureTemplate(normalInfo->DifficultyEntry[diff]);
if (!cinfo)
{
// maybe check such things already at startup
@@ -302,8 +302,8 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data
return false;
}
- uint32 display_id = objmgr.ChooseDisplayId(0, GetCreatureInfo(), data);
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
+ uint32 display_id = sObjectMgr.ChooseDisplayId(0, GetCreatureInfo(), data);
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
if (!minfo) // Cancel load if no model defined
{
sLog.outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ",Entry);
@@ -370,7 +370,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data)
setFaction(cInfo->faction_A);
if (cInfo->flags_extra & CREATURE_FLAG_EXTRA_WORLDEVENT)
- SetUInt32Value(UNIT_NPC_FLAGS,cInfo->npcflag | gameeventmgr.GetNPCFlag(this));
+ SetUInt32Value(UNIT_NPC_FLAGS,cInfo->npcflag | sGameEventMgr.GetNPCFlag(this));
else
SetUInt32Value(UNIT_NPC_FLAGS,cInfo->npcflag);
@@ -384,7 +384,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data)
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool));
- CreatureBaseStats const* stats = objmgr.GetCreatureBaseStats(getLevel(), cInfo->unit_class);
+ CreatureBaseStats const* stats = sObjectMgr.GetCreatureBaseStats(getLevel(), cInfo->unit_class);
float armor = stats->GenerateArmor(cInfo); // TODO: Why is this treated as uint32 when it's a float?
SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, armor);
SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(cInfo->resistance1));
@@ -453,7 +453,7 @@ void Creature::Update(uint32 diff)
Respawn();
else // the master is dead
{
- if (uint32 targetGuid = objmgr.GetLinkedRespawnGuid(m_DBTableGuid))
+ if (uint32 targetGuid = sObjectMgr.GetLinkedRespawnGuid(m_DBTableGuid))
{
if (targetGuid == m_DBTableGuid) // if linking self, never respawn (check delayed to next day)
SetRespawnTime(DAY);
@@ -479,7 +479,7 @@ void Creature::Update(uint32 diff)
if (m_groupLootTimer <= diff)
{
- Group* group = objmgr.GetGroupByGUID(lootingGroupLowGUID);
+ Group* group = sObjectMgr.GetGroupByGUID(lootingGroupLowGUID);
if (group)
group->EndRoll(&loot);
m_groupLootTimer = 0;
@@ -773,7 +773,7 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
break;
}
LoadCreaturesAddon();
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(GetNativeDisplayId());
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(GetNativeDisplayId());
if (minfo && !isTotem()) // Cancel load if no model defined or if totem
{
uint32 display_id = minfo->modelid; // it can be different (for another gender)
@@ -1001,7 +1001,7 @@ void Creature::SaveToDB()
{
// this should only be used when the creature has already been loaded
// preferably after adding to map, because mapid may not be valid otherwise
- CreatureData const *data = objmgr.GetCreatureData(m_DBTableGuid);
+ CreatureData const *data = sObjectMgr.GetCreatureData(m_DBTableGuid);
if (!data)
{
sLog.outError("Creature::SaveToDB failed, cannot get creature data!");
@@ -1016,7 +1016,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
// update in loaded data
if (!m_DBTableGuid)
m_DBTableGuid = GetGUIDLow();
- CreatureData& data = objmgr.NewOrExistCreatureData(m_DBTableGuid);
+ CreatureData& data = sObjectMgr.NewOrExistCreatureData(m_DBTableGuid);
uint32 displayId = GetNativeDisplayId();
@@ -1092,7 +1092,7 @@ void Creature::SelectLevel(const CreatureInfo *cinfo)
uint8 level = minlevel == maxlevel ? minlevel : urand(minlevel, maxlevel);
SetLevel(level);
- CreatureBaseStats const* stats = objmgr.GetCreatureBaseStats(level, cinfo->unit_class);
+ CreatureBaseStats const* stats = sObjectMgr.GetCreatureBaseStats(level, cinfo->unit_class);
// health
float healthmod = _GetHealthMod(rank);
@@ -1197,7 +1197,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint3
return false;
}
- CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(Entry);
+ CreatureInfo const *cinfo = sObjectMgr.GetCreatureTemplate(Entry);
if (!cinfo)
{
sLog.outErrorDb("Creature entry %u does not exist.", Entry);
@@ -1222,7 +1222,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint3
bool Creature::LoadFromDB(uint32 guid, Map *map)
{
- CreatureData const* data = objmgr.GetCreatureData(guid);
+ CreatureData const* data = sObjectMgr.GetCreatureData(guid);
if (!data)
{
@@ -1237,7 +1237,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
return false;
}
else
- guid = objmgr.GenerateLowGuid(HIGHGUID_UNIT);
+ guid = sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT);
uint16 team = 0;
if (!Create(guid,map,data->phaseMask,data->id,0,team,data->posX,data->posY,data->posZ,data->orientation,data))
@@ -1252,7 +1252,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
m_isDeadByDefault = data->is_dead;
m_deathState = m_isDeadByDefault ? DEAD : ALIVE;
- m_respawnTime = objmgr.GetCreatureRespawnTime(m_DBTableGuid,GetInstanceId());
+ m_respawnTime = sObjectMgr.GetCreatureRespawnTime(m_DBTableGuid,GetInstanceId());
if (m_respawnTime) // respawn on Update
{
m_deathState = DEAD;
@@ -1306,7 +1306,7 @@ void Creature::LoadEquipment(uint32 equip_entry, bool force)
return;
}
- EquipmentInfo const *einfo = objmgr.GetEquipmentInfo(equip_entry);
+ EquipmentInfo const *einfo = sObjectMgr.GetEquipmentInfo(equip_entry);
if (!einfo)
return;
@@ -1317,7 +1317,7 @@ void Creature::LoadEquipment(uint32 equip_entry, bool force)
bool Creature::hasQuest(uint32 quest_id) const
{
- QuestRelations const& qr = objmgr.mCreatureQuestRelations;
+ QuestRelations const& qr = sObjectMgr.mCreatureQuestRelations;
for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
{
if (itr->second == quest_id)
@@ -1328,7 +1328,7 @@ bool Creature::hasQuest(uint32 quest_id) const
bool Creature::hasInvolvedQuest(uint32 quest_id) const
{
- QuestRelations const& qr = objmgr.mCreatureQuestInvolvedRelations;
+ QuestRelations const& qr = sObjectMgr.mCreatureQuestInvolvedRelations;
for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
{
if (itr->second == quest_id)
@@ -1345,8 +1345,8 @@ void Creature::DeleteFromDB()
return;
}
- objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
- objmgr.DeleteCreatureData(m_DBTableGuid);
+ sObjectMgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
+ sObjectMgr.DeleteCreatureData(m_DBTableGuid);
WorldDatabase.BeginTransaction();
WorldDatabase.PExecuteLog("DELETE FROM creature WHERE guid = '%u'", m_DBTableGuid);
@@ -1569,7 +1569,7 @@ void Creature::Respawn(bool force)
if (getDeathState() == DEAD)
{
if (m_DBTableGuid)
- objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
+ sObjectMgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
DEBUG_LOG("Respawning...");
m_respawnTime = 0;
@@ -1592,7 +1592,7 @@ void Creature::Respawn(bool force)
else
setDeathState(JUST_ALIVED);
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(GetNativeDisplayId());
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(GetNativeDisplayId());
if (minfo) // Cancel load if no model defined
{
uint32 display_id = minfo->modelid; // it can be different (for another gender)
@@ -1606,9 +1606,9 @@ void Creature::Respawn(bool force)
if (IsAIEnabled)
AI()->JustRespawned();
- uint16 poolid = GetDBTableGUIDLow() ? poolhandler.IsPartOfAPool<Creature>(GetDBTableGUIDLow()) : 0;
+ uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<Creature>(GetDBTableGUIDLow()) : 0;
if (poolid)
- poolhandler.UpdatePool<Creature>(poolid, GetDBTableGUIDLow());
+ sPoolMgr.UpdatePool<Creature>(poolid, GetDBTableGUIDLow());
//Re-initialize reactstate that could be altered by movementgenerators
InitializeReactState();
@@ -1991,9 +1991,9 @@ void Creature::SaveRespawnTime()
return;
if (m_respawnTime > time(NULL)) // dead (no corpse)
- objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),m_respawnTime);
+ sObjectMgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),m_respawnTime);
else if (m_deathTimer > 0) // dead (corpse)
- objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),time(NULL)+m_respawnDelay+m_deathTimer/IN_MILLISECONDS);
+ sObjectMgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),time(NULL)+m_respawnDelay+m_deathTimer/IN_MILLISECONDS);
}
// this should not be called by petAI or
@@ -2228,7 +2228,7 @@ void Creature::GetRespawnCoord(float &x, float &y, float &z, float* ori, float*
{
if (m_DBTableGuid)
{
- if (CreatureData const* data = objmgr.GetCreatureData(GetDBTableGUIDLow()))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(GetDBTableGUIDLow()))
{
x = data->posX;
y = data->posY;
@@ -2292,7 +2292,7 @@ std::string Creature::GetAIName() const
std::string Creature::GetScriptName() const
{
- return objmgr.GetScriptName(GetScriptId());
+ return sObjectMgr.GetScriptName(GetScriptId());
}
uint32 Creature::GetScriptId() const
@@ -2302,7 +2302,7 @@ uint32 Creature::GetScriptId() const
VendorItemData const* Creature::GetVendorItems() const
{
- return objmgr.GetNpcVendorItemList(GetEntry());
+ return sObjectMgr.GetNpcVendorItemList(GetEntry());
}
uint32 Creature::GetVendorItemCurrentCount(VendorItem const* vItem)
@@ -2324,7 +2324,7 @@ uint32 Creature::GetVendorItemCurrentCount(VendorItem const* vItem)
if (vCount->lastIncrementTime + vItem->incrtime <= ptime)
{
- ItemPrototype const* pProto = objmgr.GetItemPrototype(vItem->item);
+ ItemPrototype const* pProto = sObjectMgr.GetItemPrototype(vItem->item);
uint32 diff = uint32((ptime - vCount->lastIncrementTime)/vItem->incrtime);
if ((vCount->count + diff * pProto->BuyCount) >= vItem->maxcount)
@@ -2363,7 +2363,7 @@ uint32 Creature::UpdateVendorItemCurrentCount(VendorItem const* vItem, uint32 us
if (vCount->lastIncrementTime + vItem->incrtime <= ptime)
{
- ItemPrototype const* pProto = objmgr.GetItemPrototype(vItem->item);
+ ItemPrototype const* pProto = sObjectMgr.GetItemPrototype(vItem->item);
uint32 diff = uint32((ptime - vCount->lastIncrementTime)/vItem->incrtime);
if ((vCount->count + diff * pProto->BuyCount) < vItem->maxcount)
@@ -2379,7 +2379,7 @@ uint32 Creature::UpdateVendorItemCurrentCount(VendorItem const* vItem, uint32 us
TrainerSpellData const* Creature::GetTrainerSpells() const
{
- return objmgr.GetNpcTrainerSpells(GetEntry());
+ return sObjectMgr.GetNpcTrainerSpells(GetEntry());
}
// overwrite WorldObject function for proper name localization
@@ -2387,7 +2387,7 @@ const char* Creature::GetNameForLocaleIdx(int32 loc_idx) const
{
if (loc_idx >= 0)
{
- CreatureLocale const *cl = objmgr.GetCreatureLocale(GetEntry());
+ CreatureLocale const *cl = sObjectMgr.GetCreatureLocale(GetEntry());
if (cl)
{
if (cl->Name.size() > loc_idx && !cl->Name[loc_idx].empty())
@@ -2403,8 +2403,8 @@ const CreatureData* Creature::GetLinkedRespawnCreatureData() const
if (!m_DBTableGuid) // only hard-spawned creatures from DB can have a linked master
return NULL;
- if (uint32 targetGuid = objmgr.GetLinkedRespawnGuid(m_DBTableGuid))
- return objmgr.GetCreatureData(targetGuid);
+ if (uint32 targetGuid = sObjectMgr.GetLinkedRespawnGuid(m_DBTableGuid))
+ return sObjectMgr.GetCreatureData(targetGuid);
return NULL;
}
@@ -2415,10 +2415,10 @@ time_t Creature::GetLinkedCreatureRespawnTime() const
if (!m_DBTableGuid) // only hard-spawned creatures from DB can have a linked master
return 0;
- if (uint32 targetGuid = objmgr.GetLinkedRespawnGuid(m_DBTableGuid))
+ if (uint32 targetGuid = sObjectMgr.GetLinkedRespawnGuid(m_DBTableGuid))
{
Map* targetMap = NULL;
- if (const CreatureData* data = objmgr.GetCreatureData(targetGuid))
+ if (const CreatureData* data = sObjectMgr.GetCreatureData(targetGuid))
{
if (data->mapid == GetMapId()) // look up on the same map
targetMap = GetMap();
@@ -2426,7 +2426,7 @@ time_t Creature::GetLinkedCreatureRespawnTime() const
targetMap = sMapMgr.FindMap(data->mapid);
}
if (targetMap)
- return objmgr.GetCreatureRespawnTime(targetGuid,targetMap->GetInstanceId());
+ return sObjectMgr.GetCreatureRespawnTime(targetGuid,targetMap->GetInstanceId());
}
return 0;
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index daf29136563..142af96f98c 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -712,7 +712,7 @@ class Creature : public Unit, public GridObject<Creature>
bool DisableReputationGain;
- CreatureInfo const* m_creatureInfo; // in difficulty mode > 0 can different from objmgr.::GetCreatureTemplate(GetEntry())
+ CreatureInfo const* m_creatureInfo; // in difficulty mode > 0 can different from sObjectMgr.::GetCreatureTemplate(GetEntry())
CreatureData const* m_creatureData;
uint16 m_LootMode; // bitmask, default LOOT_MODE_DEFAULT, determines what loot will be lootable
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index cbbe7dc052b..05f734ad1ac 100644
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -162,7 +162,7 @@ void PlayerMenu::SendGossipMenu(uint32 TitleTextId, uint64 objectGUID)
{
QuestMenuItem const& qItem = mQuestMenu.GetItem(iI);
uint32 questID = qItem.m_qId;
- Quest const* pQuest = objmgr.GetQuestTemplate(questID);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(questID);
data << uint32(questID);
data << uint32(qItem.m_qIcon);
@@ -173,7 +173,7 @@ void PlayerMenu::SendGossipMenu(uint32 TitleTextId, uint64 objectGUID)
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
- if (QuestLocale const *ql = objmgr.GetQuestLocale(questID))
+ if (QuestLocale const *ql = sObjectMgr.GetQuestLocale(questID))
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
Title = ql->Title[loc_idx];
data << Title; // max 0x200
@@ -205,7 +205,7 @@ void PlayerMenu::SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags
void PlayerMenu::SendPointOfInterest(uint32 poi_id)
{
- PointOfInterest const* poi = objmgr.GetPointOfInterest(poi_id);
+ PointOfInterest const* poi = sObjectMgr.GetPointOfInterest(poi_id);
if (!poi)
{
sLog.outErrorDb("Request to send non-existing POI (Id: %u), ignored.",poi_id);
@@ -217,7 +217,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poi_id)
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- PointOfInterestLocale const *pl = objmgr.GetPointOfInterestLocale(poi_id);
+ PointOfInterestLocale const *pl = sObjectMgr.GetPointOfInterestLocale(poi_id);
if (pl)
{
if (pl->IconName.size() > size_t(loc_idx) && !pl->IconName[loc_idx].empty())
@@ -239,7 +239,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poi_id)
void PlayerMenu::SendTalking(uint32 textID)
{
- GossipText const* pGossip = objmgr.GetGossipText(textID);
+ GossipText const* pGossip = sObjectMgr.GetGossipText(textID);
WorldPacket data(SMSG_NPC_TEXT_UPDATE, 100); // guess size
data << textID; // can be < 0
@@ -271,7 +271,7 @@ void PlayerMenu::SendTalking(uint32 textID)
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- NpcTextLocale const *nl = objmgr.GetNpcTextLocale(textID);
+ NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textID);
if (nl)
{
for (int i=0; i<8; ++i)
@@ -350,7 +350,7 @@ QuestMenu::~QuestMenu()
void QuestMenu::AddMenuItem(uint32 QuestId, uint8 Icon)
{
- Quest const* qinfo = objmgr.GetQuestTemplate(QuestId);
+ Quest const* qinfo = sObjectMgr.GetQuestTemplate(QuestId);
if (!qinfo) return;
ASSERT(m_qItems.size() <= GOSSIP_MAX_MENU_ITEMS);
@@ -397,14 +397,14 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title
uint32 questID = qmi.m_qId;
- if (Quest const *pQuest = objmgr.GetQuestTemplate(questID))
+ if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(questID))
{
std::string title = pQuest->GetTitle();
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- if (QuestLocale const *ql = objmgr.GetQuestLocale(questID))
+ if (QuestLocale const *ql = sObjectMgr.GetQuestLocale(questID))
{
if (ql->Title.size() > (size_t)loc_idx && !ql->Title[loc_idx].empty())
title = ql->Title[loc_idx];
@@ -445,7 +445,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID,
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- QuestLocale const *ql = objmgr.GetQuestLocale(pQuest->GetQuestId());
+ QuestLocale const *ql = sObjectMgr.GetQuestLocale(pQuest->GetQuestId());
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@@ -491,7 +491,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID,
data << uint32(pQuest->RewChoiceItemId[i]);
data << uint32(pQuest->RewChoiceItemCount[i]);
- IProto = objmgr.GetItemPrototype(pQuest->RewChoiceItemId[i]);
+ IProto = sObjectMgr.GetItemPrototype(pQuest->RewChoiceItemId[i]);
if (IProto)
data << uint32(IProto->DisplayInfoID);
@@ -509,7 +509,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID,
data << uint32(pQuest->RewItemId[i]);
data << uint32(pQuest->RewItemCount[i]);
- IProto = objmgr.GetItemPrototype(pQuest->RewItemId[i]);
+ IProto = sObjectMgr.GetItemPrototype(pQuest->RewItemId[i]);
if (IProto)
data << uint32(IProto->DisplayInfoID);
@@ -566,7 +566,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest)
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- QuestLocale const *ql = objmgr.GetQuestLocale(pQuest->GetQuestId());
+ QuestLocale const *ql = sObjectMgr.GetQuestLocale(pQuest->GetQuestId());
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@@ -706,7 +706,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- QuestLocale const *ql = objmgr.GetQuestLocale(pQuest->GetQuestId());
+ QuestLocale const *ql = sObjectMgr.GetQuestLocale(pQuest->GetQuestId());
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@@ -747,7 +747,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->GetRewChoiceItemsCount());
for (uint32 i=0; i < pQuest->GetRewChoiceItemsCount(); ++i)
{
- pItem = objmgr.GetItemPrototype(pQuest->RewChoiceItemId[i]);
+ pItem = sObjectMgr.GetItemPrototype(pQuest->RewChoiceItemId[i]);
data << uint32(pQuest->RewChoiceItemId[i]);
data << uint32(pQuest->RewChoiceItemCount[i]);
@@ -761,7 +761,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->GetRewItemsCount());
for (uint32 i = 0; i < pQuest->GetRewItemsCount(); ++i)
{
- pItem = objmgr.GetItemPrototype(pQuest->RewItemId[i]);
+ pItem = sObjectMgr.GetItemPrototype(pQuest->RewItemId[i]);
data << uint32(pQuest->RewItemId[i]);
data << uint32(pQuest->RewItemCount[i]);
@@ -809,7 +809,7 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID,
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- QuestLocale const *ql = objmgr.GetQuestLocale(pQuest->GetQuestId());
+ QuestLocale const *ql = sObjectMgr.GetQuestLocale(pQuest->GetQuestId());
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@@ -857,7 +857,7 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID,
if (!pQuest->ReqItemId[i])
continue;
- pItem = objmgr.GetItemPrototype(pQuest->ReqItemId[i]);
+ pItem = sObjectMgr.GetItemPrototype(pQuest->ReqItemId[i]);
data << uint32(pQuest->ReqItemId[i]);
data << uint32(pQuest->ReqItemCount[i]);
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 8db323337c7..3d190bccb5f 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -152,7 +152,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
SetPhaseMask(phaseMask,false);
- GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(name_id);
+ GameObjectInfo const* goinfo = sObjectMgr.GetGameObjectInfo(name_id);
if (!goinfo)
{
sLog.outErrorDb("Gameobject (GUID: %u Entry: %u) not created: it have not exist entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f) ang: %f rotation0: %f rotation1: %f rotation2: %f rotation3: %f",guidlow, name_id, map->GetId(), x, y, z, ang, rotation0, rotation1, rotation2, rotation3);
@@ -317,9 +317,9 @@ void GameObject::Update(uint32 diff)
return;
}
// respawn timer
- uint16 poolid = GetDBTableGUIDLow() ? poolhandler.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
+ uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
if (poolid)
- poolhandler.UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
+ sPoolMgr.UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
else
GetMap()->Add(this);
break;
@@ -444,7 +444,7 @@ void GameObject::Update(uint32 diff)
{
if (m_groupLootTimer <= diff)
{
- Group* group = objmgr.GetGroupByGUID(lootingGroupLowGUID);
+ Group* group = sObjectMgr.GetGroupByGUID(lootingGroupLowGUID);
if (group)
group->EndRoll(&loot);
m_groupLootTimer = 0;
@@ -559,9 +559,9 @@ void GameObject::Delete()
SetGoState(GO_STATE_READY);
SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags);
- uint16 poolid = GetDBTableGUIDLow() ? poolhandler.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
+ uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<GameObject>(GetDBTableGUIDLow()) : 0;
if (poolid)
- poolhandler.UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
+ sPoolMgr.UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
else
AddObjectToRemoveList();
}
@@ -583,7 +583,7 @@ void GameObject::SaveToDB()
{
// this should only be used when the gameobject has already been loaded
// preferably after adding to map, because mapid may not be valid otherwise
- GameObjectData const *data = objmgr.GetGOData(m_DBTableGuid);
+ GameObjectData const *data = sObjectMgr.GetGOData(m_DBTableGuid);
if (!data)
{
sLog.outError("GameObject::SaveToDB failed, cannot get gameobject data!");
@@ -603,7 +603,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
if (!m_DBTableGuid)
m_DBTableGuid = GetGUIDLow();
// update in loaded data (changing data only in this place)
- GameObjectData& data = objmgr.NewGOData(m_DBTableGuid);
+ GameObjectData& data = sObjectMgr.NewGOData(m_DBTableGuid);
// data->guid = guid don't must be update at save
data.id = GetEntry();
@@ -651,7 +651,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
bool GameObject::LoadFromDB(uint32 guid, Map *map)
{
- GameObjectData const* data = objmgr.GetGOData(guid);
+ GameObjectData const* data = sObjectMgr.GetGOData(guid);
if (!data)
{
@@ -677,7 +677,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
uint32 artKit = data->artKit;
m_DBTableGuid = guid;
- if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT);
+ if (map->GetInstanceId() != 0) guid = sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT);
if (!Create(guid,entry, map, phaseMask, x, y, z, ang, rotation0, rotation1, rotation2, rotation3, animprogress, go_state, artKit))
return false;
@@ -695,13 +695,13 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
else
{
m_respawnDelayTime = data->spawntimesecs;
- m_respawnTime = objmgr.GetGORespawnTime(m_DBTableGuid, map->GetInstanceId());
+ m_respawnTime = sObjectMgr.GetGORespawnTime(m_DBTableGuid, map->GetInstanceId());
// ready to respawn
if (m_respawnTime && m_respawnTime <= time(NULL))
{
m_respawnTime = 0;
- objmgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),0);
+ sObjectMgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),0);
}
}
}
@@ -719,8 +719,8 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
void GameObject::DeleteFromDB()
{
- objmgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),0);
- objmgr.DeleteGOData(m_DBTableGuid);
+ sObjectMgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),0);
+ sObjectMgr.DeleteGOData(m_DBTableGuid);
WorldDatabase.PExecuteLog("DELETE FROM gameobject WHERE guid = '%u'", m_DBTableGuid);
WorldDatabase.PExecuteLog("DELETE FROM game_event_gameobject WHERE guid = '%u'", m_DBTableGuid);
}
@@ -735,7 +735,7 @@ GameObject* GameObject::GetGameObject(WorldObject& object, uint64 guid)
/*********************************************************/
bool GameObject::hasQuest(uint32 quest_id) const
{
- QuestRelations const& qr = objmgr.mGOQuestRelations;
+ QuestRelations const& qr = sObjectMgr.mGOQuestRelations;
for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
{
if (itr->second == quest_id)
@@ -746,7 +746,7 @@ bool GameObject::hasQuest(uint32 quest_id) const
bool GameObject::hasInvolvedQuest(uint32 quest_id) const
{
- QuestRelations const& qr = objmgr.mGOQuestInvolvedRelations;
+ QuestRelations const& qr = sObjectMgr.mGOQuestInvolvedRelations;
for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
{
if (itr->second == quest_id)
@@ -781,7 +781,7 @@ Unit* GameObject::GetOwner() const
void GameObject::SaveRespawnTime()
{
if (m_goData && m_goData->dbData && m_respawnTime > time(NULL) && m_spawnedByDefault)
- objmgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),m_respawnTime);
+ sObjectMgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),m_respawnTime);
}
bool GameObject::isVisibleForInState(Player const* u, bool inVisibleList) const
@@ -841,13 +841,13 @@ void GameObject::Respawn()
if (m_spawnedByDefault && m_respawnTime > 0)
{
m_respawnTime = time(NULL);
- objmgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),0);
+ sObjectMgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),0);
}
}
bool GameObject::ActivateToQuest(Player *pTarget) const
{
- if (!objmgr.IsGameObjectForQuests(GetEntry()))
+ if (!sObjectMgr.IsGameObjectForQuests(GetEntry()))
return false;
switch (GetGoType())
@@ -967,7 +967,7 @@ void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = f
void GameObject::SetGoArtKit(uint8 kit)
{
SetByteValue(GAMEOBJECT_BYTES_1, 2, kit);
- GameObjectData *data = const_cast<GameObjectData*>(objmgr.GetGOData(m_DBTableGuid));
+ GameObjectData *data = const_cast<GameObjectData*>(sObjectMgr.GetGOData(m_DBTableGuid));
if (data)
data->artKit = kit;
}
@@ -981,7 +981,7 @@ void GameObject::SetGoArtKit(uint8 artkit, GameObject *go, uint32 lowguid)
data = go->GetGOData();
}
else if (lowguid)
- data = objmgr.GetGOData(lowguid);
+ data = sObjectMgr.GetGOData(lowguid);
if (data)
const_cast<GameObjectData*>(data)->artKit = artkit;
@@ -1070,7 +1070,7 @@ void GameObject::Use(Unit* user)
float y_i = GetPositionY() + relativeDistance * sin(orthogonalOrientation);
if (itr->second)
- if (Player* ChairUser = objmgr.GetPlayer(itr->second))
+ if (Player* ChairUser = sObjectMgr.GetPlayer(itr->second))
if (ChairUser->IsSitState() && ChairUser->getStandState() != UNIT_STAND_STATE_SIT && ChairUser->GetExactDist2d(x_i, y_i) < 0.1f)
continue; // This seat is already occupied by ChairUser. NOTE: Not sure if the ChairUser->getStandState() != UNIT_STAND_STATE_SIT check is required.
else
@@ -1144,7 +1144,7 @@ void GameObject::Use(Unit* user)
}
// possible quest objective for active quests
- if (info->goober.questId && objmgr.GetQuestTemplate(info->goober.questId))
+ if (info->goober.questId && sObjectMgr.GetQuestTemplate(info->goober.questId))
{
//Quest require to be active for GO using
if (player->GetQuestStatus(info->goober.questId) != QUEST_STATUS_INCOMPLETE)
@@ -1216,9 +1216,9 @@ void GameObject::Use(Unit* user)
uint32 zone, subzone;
GetZoneAndAreaId(zone,subzone);
- int32 zone_skill = objmgr.GetFishingBaseSkillLevel(subzone);
+ int32 zone_skill = sObjectMgr.GetFishingBaseSkillLevel(subzone);
if (!zone_skill)
- zone_skill = objmgr.GetFishingBaseSkillLevel(zone);
+ zone_skill = sObjectMgr.GetFishingBaseSkillLevel(zone);
//provide error, no fishable zone or area should be 0
if (!zone_skill)
@@ -1653,7 +1653,7 @@ void GameObject::EventInform(uint32 eventId)
const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const
{
if (loc_idx >= 0)
- if (GameObjectLocale const *cl = objmgr.GetGameObjectLocale(GetEntry()))
+ if (GameObjectLocale const *cl = sObjectMgr.GetGameObjectLocale(GetEntry()))
if (cl->Name.size() > loc_idx && !cl->Name[loc_idx].empty())
return cl->Name[loc_idx].c_str();
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index 6afd3260c08..8a1e978b73f 100644
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
@@ -72,7 +72,7 @@ void Bag::RemoveFromWorld()
bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
{
- ItemPrototype const * itemProto = objmgr.GetItemPrototype(itemid);
+ ItemPrototype const * itemProto = sObjectMgr.GetItemPrototype(itemid);
if (!itemProto || itemProto->ContainerSlots > MAX_BAG_SIZE)
return false;
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 2b4e751b80a..7e080670e90 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -267,7 +267,7 @@ bool Item::Create(uint32 guidlow, uint32 itemid, Player const* owner)
SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0);
SetUInt64Value(ITEM_FIELD_CONTAINED, owner ? owner->GetGUID() : 0);
- ItemPrototype const *itemProto = objmgr.GetItemPrototype(itemid);
+ ItemPrototype const *itemProto = sObjectMgr.GetItemPrototype(itemid);
if (!itemProto)
return false;
@@ -483,12 +483,12 @@ void Item::DeleteFromInventoryDB()
ItemPrototype const *Item::GetProto() const
{
- return objmgr.GetItemPrototype(GetEntry());
+ return sObjectMgr.GetItemPrototype(GetEntry());
}
Player* Item::GetOwner()const
{
- return objmgr.GetPlayer(GetOwnerGUID());
+ return sObjectMgr.GetPlayer(GetOwnerGUID());
}
uint32 Item::GetSkill()
@@ -829,7 +829,7 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const
// Special case - accept vellum for armor/weapon requirements
if ((spellInfo->EquippedItemClass == ITEM_CLASS_ARMOR && proto->IsArmorVellum())
||(spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON && proto->IsWeaponVellum()))
- if (spellmgr.IsSkillTypeSpell(spellInfo->Id, SKILL_ENCHANTING)) // only for enchanting spells
+ if (sSpellMgr.IsSkillTypeSpell(spellInfo->Id, SKILL_ENCHANTING)) // only for enchanting spells
return true;
if (spellInfo->EquippedItemClass != int32(proto->Class))
@@ -1022,7 +1022,7 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player)
if (count < 1)
return NULL; //don't create item at zero count
- ItemPrototype const *pProto = objmgr.GetItemPrototype(item);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item);
if (pProto)
{
if (count > pProto->GetMaxStackSize())
@@ -1031,7 +1031,7 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player)
ASSERT(count !=0 && "pProto->Stackable == 0 but checked at loading already");
Item *pItem = NewItemOrBag(pProto);
- if (pItem->Create(objmgr.GenerateLowGuid(HIGHGUID_ITEM), item, player))
+ if (pItem->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_ITEM), item, player))
{
pItem->SetCount(count);
return pItem;
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index 440ea0027e8..6f8ff28cd21 100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -127,7 +127,7 @@ uint32 GetItemEnchantMod(int32 entry)
uint32 GenerateEnchSuffixFactor(uint32 item_id)
{
- ItemPrototype const *itemProto = objmgr.GetItemPrototype(item_id);
+ ItemPrototype const *itemProto = sObjectMgr.GetItemPrototype(item_id);
if (!itemProto)
return 0;
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 179db32bca7..477f06ba21b 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1539,7 +1539,7 @@ void WorldObject::MonsterTextEmote(const char* text, uint64 TargetGuid, bool IsB
void WorldObject::MonsterWhisper(const char* text, uint64 receiver, bool IsBossWhisper)
{
- Player *player = objmgr.GetPlayer(receiver);
+ Player *player = sObjectMgr.GetPlayer(receiver);
if (!player || !player->GetSession())
return;
@@ -1581,7 +1581,7 @@ namespace Trinity
: i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {}
void operator()(WorldPacket& data, int32 loc_idx)
{
- char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
+ char const* text = sObjectMgr.GetTrinityString(i_textId,loc_idx);
// TODO: i_object.GetName() also must be localized?
i_object.BuildMonsterChat(&data,i_msgtype,text,i_language,i_object.GetNameForLocaleIdx(loc_idx),i_targetGUID);
@@ -1656,12 +1656,12 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisper)
{
- Player *player = objmgr.GetPlayer(receiver);
+ Player *player = sObjectMgr.GetPlayer(receiver);
if (!player || !player->GetSession())
return;
uint32 loc_idx = player->GetSession()->GetSessionDbLocaleIndex();
- char const* text = objmgr.GetTrinityString(textId,loc_idx);
+ char const* text = sObjectMgr.GetTrinityString(textId,loc_idx);
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildMonsterChat(&data,IsBossWhisper ? CHAT_MSG_RAID_BOSS_WHISPER : CHAT_MSG_MONSTER_WHISPER,text,LANG_UNIVERSAL,GetNameForLocaleIdx(loc_idx),receiver);
@@ -1822,7 +1822,7 @@ TempSummon *Map::SummonCreature(uint32 entry, const Position &pos, SummonPropert
default: return NULL;
}
- if (!summon->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, team, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()))
+ if (!summon->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, team, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()))
{
delete summon;
return NULL;
@@ -1905,8 +1905,8 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
}
Map *map = GetMap();
- uint32 pet_number = objmgr.GeneratePetNumber();
- if (!pet->Create(objmgr.GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number))
+ uint32 pet_number = sObjectMgr.GeneratePetNumber();
+ if (!pet->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number))
{
sLog.outError("no such creature entry %u", entry);
delete pet;
@@ -1978,7 +1978,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
if (!IsInWorld())
return NULL;
- GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(entry);
+ GameObjectInfo const* goinfo = sObjectMgr.GetGameObjectInfo(entry);
if (!goinfo)
{
sLog.outErrorDb("Gameobject template %u not found in database!", entry);
@@ -1986,7 +1986,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
}
Map *map = GetMap();
GameObject *go = new GameObject();
- if (!go->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, GetPhaseMask(), x,y,z,ang,rotation0,rotation1,rotation2,rotation3,100,GO_STATE_READY))
+ if (!go->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, GetPhaseMask(), x,y,z,ang,rotation0,rotation1,rotation2,rotation3,100,GO_STATE_READY))
{
delete go;
return NULL;
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index cde6aaabc5b..e6ee2dcae74 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -155,7 +155,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
PetType pet_type = PetType(fields[18].GetUInt8());
if (pet_type == HUNTER_PET)
{
- CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(petentry);
+ CreatureInfo const* creatureInfo = sObjectMgr.GetCreatureTemplate(petentry);
if (!creatureInfo || !creatureInfo->isTameable(owner->CanTameExoticPets()))
return false;
}
@@ -169,7 +169,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
}
Map *map = owner->GetMap();
- uint32 guid = objmgr.GenerateLowGuid(HIGHGUID_PET);
+ uint32 guid = sObjectMgr.GenerateLowGuid(HIGHGUID_PET);
if (!Create(guid, map, owner->GetPhaseMask(), petentry, pet_number))
return false;
@@ -654,7 +654,7 @@ bool Pet::CanTakeMoreActiveSpells(uint32 spellid)
if (IsPassiveSpell(spellid))
return true;
- chainstartstore[0] = spellmgr.GetFirstSpellInChain(spellid);
+ chainstartstore[0] = sSpellMgr.GetFirstSpellInChain(spellid);
for (PetSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
{
@@ -664,7 +664,7 @@ bool Pet::CanTakeMoreActiveSpells(uint32 spellid)
if (IsPassiveSpell(itr->first))
continue;
- uint32 chainstart = spellmgr.GetFirstSpellInChain(itr->first);
+ uint32 chainstart = sSpellMgr.GetFirstSpellInChain(itr->first);
uint8 x;
@@ -717,7 +717,7 @@ void Pet::GivePetXP(uint32 xp)
// Subtract newXP from amount needed for nextlevel
newXP -= nextLvlXP;
GivePetLevel(level+1);
- SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(level+1)*PET_XP_FACTOR);
+ SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(level+1)*PET_XP_FACTOR);
// Make sure we're working with the upgraded levels for the pet XP-levels
level = getLevel();
@@ -772,7 +772,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family))
SetName(cFamily->Name[sWorld.GetDefaultDbcLocale()]);
else
- SetName(creature->GetNameForLocaleIdx(objmgr.GetDBCLocaleIndex()));
+ SetName(creature->GetNameForLocaleIdx(sObjectMgr.GetDBCLocaleIndex()));
return true;
}
@@ -793,8 +793,8 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureInfo const* cinfo, Unit * owner)
bool Pet::CreateBaseAtTamed(CreatureInfo const * cinfo, Map * map, uint32 phaseMask)
{
sLog.outDebug("Pet::CreateBaseForTamed");
- uint32 guid=objmgr.GenerateLowGuid(HIGHGUID_PET);
- uint32 pet_number = objmgr.GeneratePetNumber();
+ uint32 guid=sObjectMgr.GenerateLowGuid(HIGHGUID_PET);
+ uint32 pet_number = sObjectMgr.GeneratePetNumber();
if (!Create(guid, map, phaseMask, cinfo->Entry, pet_number))
return false;
@@ -803,7 +803,7 @@ bool Pet::CreateBaseAtTamed(CreatureInfo const * cinfo, Map * map, uint32 phaseM
setPowerType(POWER_FOCUS);
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0);
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
- SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(getLevel()+1)*PET_XP_FACTOR);
+ SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(getLevel()+1)*PET_XP_FACTOR);
SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
if (cinfo->type == CREATURE_TYPE_BEAST)
@@ -883,7 +883,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
SetModifierValue(UnitMods(UNIT_MOD_RESISTANCE_START + i), BASE_VALUE, float(createResistance[i]));
//health, mana, armor and resistance
- PetLevelInfo const* pInfo = objmgr.GetPetLevelInfo(creature_ID, petlevel);
+ PetLevelInfo const* pInfo = sObjectMgr.GetPetLevelInfo(creature_ID, petlevel);
if (pInfo) // exist in DB
{
SetCreateHealth(pInfo->health);
@@ -929,7 +929,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
}
case HUNTER_PET:
{
- SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(petlevel)*PET_XP_FACTOR);
+ SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(petlevel)*PET_XP_FACTOR);
//these formula may not be correct; however, it is designed to be close to what it should be
//this makes dps 0.5 of pets level
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
@@ -1395,16 +1395,16 @@ bool Pet::addSpell(uint32 spell_id,ActiveStates active /*= ACT_DECIDE*/, PetSpel
}
}
}
- else if (spellmgr.GetSpellRank(spell_id) != 0)
+ else if (sSpellMgr.GetSpellRank(spell_id) != 0)
{
for (PetSpellMap::const_iterator itr2 = m_spells.begin(); itr2 != m_spells.end(); ++itr2)
{
if (itr2->second.state == PETSPELL_REMOVED) continue;
- if (spellmgr.IsRankSpellDueToSpell(spellInfo,itr2->first))
+ if (sSpellMgr.IsRankSpellDueToSpell(spellInfo,itr2->first))
{
// replace by new high rank
- if (spellmgr.IsHighRankOfSpell(spell_id,itr2->first))
+ if (sSpellMgr.IsHighRankOfSpell(spell_id,itr2->first))
{
newspell.active = itr2->second.active;
@@ -1416,7 +1416,7 @@ bool Pet::addSpell(uint32 spell_id,ActiveStates active /*= ACT_DECIDE*/, PetSpel
break;
}
// ignore new lesser rank
- else if (spellmgr.IsHighRankOfSpell(itr2->first,spell_id))
+ else if (sSpellMgr.IsHighRankOfSpell(itr2->first,spell_id))
return false;
}
}
@@ -1464,7 +1464,7 @@ void Pet::InitLevelupSpellsForLevel()
{
uint8 level = getLevel();
- if (PetLevelupSpellSet const *levelupSpells = GetCreatureInfo()->family ? spellmgr.GetPetLevelupSpellList(GetCreatureInfo()->family) : NULL)
+ if (PetLevelupSpellSet const *levelupSpells = GetCreatureInfo()->family ? sSpellMgr.GetPetLevelupSpellList(GetCreatureInfo()->family) : NULL)
{
// PetLevelupSpellSet ordered by levels, process in reversed order
for (PetLevelupSpellSet::const_reverse_iterator itr = levelupSpells->rbegin(); itr != levelupSpells->rend(); ++itr)
@@ -1481,7 +1481,7 @@ void Pet::InitLevelupSpellsForLevel()
int32 petSpellsId = GetCreatureInfo()->PetSpellDataId ? -(int32)GetCreatureInfo()->PetSpellDataId : GetEntry();
// default spells (can be not learned if pet level (as owner level decrease result for example) less first possible in normal game)
- if (PetDefaultSpellsEntry const *defSpells = spellmgr.GetPetDefaultSpellsEntry(petSpellsId))
+ if (PetDefaultSpellsEntry const *defSpells = sSpellMgr.GetPetDefaultSpellsEntry(petSpellsId))
{
for (uint8 i = 0; i < MAX_CREATURE_SPELL_DATA_SLOT; ++i)
{
@@ -1544,7 +1544,7 @@ bool Pet::removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab)
if (learn_prev)
{
- if (uint32 prev_id = spellmgr.GetPrevSpellInChain (spell_id))
+ if (uint32 prev_id = sSpellMgr.GetPrevSpellInChain (spell_id))
learnSpell(prev_id);
else
learn_prev = false;
@@ -1657,10 +1657,10 @@ bool Pet::resetTalents(bool no_cost)
continue;
}
// remove learned spells (all ranks)
- uint32 itrFirstId = spellmgr.GetFirstSpellInChain(itr->first);
+ uint32 itrFirstId = sSpellMgr.GetFirstSpellInChain(itr->first);
// unlearn if first rank is talent or learned by talent
- if (itrFirstId == talentInfo->RankID[j] || spellmgr.IsSpellLearnToSpell(talentInfo->RankID[j],itrFirstId))
+ if (itrFirstId == talentInfo->RankID[j] || sSpellMgr.IsSpellLearnToSpell(talentInfo->RankID[j],itrFirstId))
{
unlearnSpell(itr->first,false);
itr = m_spells.begin();
@@ -1979,7 +1979,7 @@ void Pet::learnSpellHighRank(uint32 spellid)
{
learnSpell(spellid);
- if (uint32 next = spellmgr.GetNextSpellInChain(spellid))
+ if (uint32 next = sSpellMgr.GetNextSpellInChain(spellid))
learnSpellHighRank(next);
}
@@ -2000,13 +2000,13 @@ void Pet::SynchronizeLevelWithOwner()
if (getLevel() > owner->getLevel())
{
GivePetLevel(owner->getLevel());
- SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(owner->getLevel())/5);
+ SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(owner->getLevel())/5);
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
}
if (getLevel() < owner->getLevel()-5)
{
GivePetLevel(owner->getLevel()-5);
- SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(owner->getLevel()-5)/5);
+ SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(owner->getLevel()-5)/5);
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
}
break;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index ccb7f4c37b0..7b1e6afb91f 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -235,13 +235,13 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString(const std::string& values, uint3
{
uint32 cost;
uint32 path;
- objmgr.GetTaxiPath(m_TaxiDestinations[i-1],m_TaxiDestinations[i],path,cost);
+ sObjectMgr.GetTaxiPath(m_TaxiDestinations[i-1],m_TaxiDestinations[i],path,cost);
if (!path)
return false;
}
// can't load taxi path without mount set (quest taxi path?)
- if (!objmgr.GetTaxiMountDisplayId(GetTaxiSource(),team,true))
+ if (!sObjectMgr.GetTaxiMountDisplayId(GetTaxiSource(),team,true))
return false;
return true;
@@ -268,7 +268,7 @@ uint32 PlayerTaxi::GetCurrentTaxiPath() const
uint32 path;
uint32 cost;
- objmgr.GetTaxiPath(m_TaxiDestinations[0],m_TaxiDestinations[1],path,cost);
+ sObjectMgr.GetTaxiPath(m_TaxiDestinations[0],m_TaxiDestinations[1],path,cost);
return path;
}
@@ -670,7 +670,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
m_name = name;
- PlayerInfo const* info = objmgr.GetPlayerInfo(race, class_);
+ PlayerInfo const* info = sObjectMgr.GetPlayerInfo(race, class_);
if (!info)
{
sLog.outError("Player have incorrect race/class pair. Can't be loaded.");
@@ -862,7 +862,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
uint32 item_id = oEntry->ItemId[j];
// just skip, reported in ObjectMgr::LoadItemPrototypes
- ItemPrototype const* iProto = objmgr.GetItemPrototype(item_id);
+ ItemPrototype const* iProto = sObjectMgr.GetItemPrototype(item_id);
if (!iProto)
continue;
@@ -1594,7 +1594,7 @@ bool Player::BuildEnumData(QueryResult_AutoPtr result, WorldPacket * p_data)
uint8 pRace = fields[2].GetUInt8();
uint8 pClass = fields[3].GetUInt8();
- PlayerInfo const *info = objmgr.GetPlayerInfo(pRace, pClass);
+ PlayerInfo const *info = sObjectMgr.GetPlayerInfo(pRace, pClass);
if (!info)
{
sLog.outError("Player %u has incorrect race/class pair. Don't build enum.", guid);
@@ -1680,7 +1680,7 @@ bool Player::BuildEnumData(QueryResult_AutoPtr result, WorldPacket * p_data)
{
uint32 visualbase = slot * 2;
uint32 item_id = GetUInt32ValueFromArray(data, visualbase);
- const ItemPrototype * proto = objmgr.GetItemPrototype(item_id);
+ const ItemPrototype * proto = sObjectMgr.GetItemPrototype(item_id);
if (!proto)
{
*p_data << uint32(0);
@@ -2562,7 +2562,7 @@ void Player::UninviteFromGroup()
if (group->IsCreated())
{
group->Disband(true);
- objmgr.RemoveGroup(group);
+ sObjectMgr.RemoveGroup(group);
}
else
group->RemoveAllInvites();
@@ -2578,7 +2578,7 @@ void Player::RemoveFromGroup(Group* group, uint64 guid)
if (group->RemoveMember(guid, 0) <= 1)
{
// group->Disband(); already disbanded in RemoveMember
- objmgr.RemoveGroup(group);
+ sObjectMgr.RemoveGroup(group);
delete group;
// removemember sets the player's group pointer to NULL
}
@@ -2655,10 +2655,10 @@ void Player::GiveLevel(uint8 level)
return;
PlayerLevelInfo info;
- objmgr.GetPlayerLevelInfo(getRace(),getClass(),level,&info);
+ sObjectMgr.GetPlayerLevelInfo(getRace(),getClass(),level,&info);
PlayerClassLevelInfo classInfo;
- objmgr.GetPlayerClassLevelInfo(getClass(),level,&classInfo);
+ sObjectMgr.GetPlayerClassLevelInfo(getClass(),level,&classInfo);
// send levelup info to client
WorldPacket data(SMSG_LEVELUP_INFO, (4+4+MAX_POWERS*4+MAX_STATS*4));
@@ -2678,7 +2678,7 @@ void Player::GiveLevel(uint8 level)
GetSession()->SendPacket(&data);
- SetUInt32Value(PLAYER_NEXT_LEVEL_XP, objmgr.GetXPForLevel(level));
+ SetUInt32Value(PLAYER_NEXT_LEVEL_XP, sObjectMgr.GetXPForLevel(level));
//update level, max level of skills
m_Played_time[PLAYED_TIME_LEVEL] = 0; // Level Played Time reset
@@ -2720,7 +2720,7 @@ void Player::GiveLevel(uint8 level)
if (Pet* pet = GetPet())
pet->SynchronizeLevelWithOwner();
- if (MailLevelReward const* mailReward = objmgr.GetMailLevelReward(level,getRaceMask()))
+ if (MailLevelReward const* mailReward = sObjectMgr.GetMailLevelReward(level,getRaceMask()))
MailDraft(mailReward->mailTemplateId).SendMailTo(this,MailSender(MAIL_CREATURE,mailReward->senderEntry));
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL);
@@ -2772,13 +2772,13 @@ void Player::InitStatsForLevel(bool reapplyMods)
_RemoveAllStatBonuses();
PlayerClassLevelInfo classInfo;
- objmgr.GetPlayerClassLevelInfo(getClass(),getLevel(),&classInfo);
+ sObjectMgr.GetPlayerClassLevelInfo(getClass(),getLevel(),&classInfo);
PlayerLevelInfo info;
- objmgr.GetPlayerLevelInfo(getRace(),getClass(),getLevel(),&info);
+ sObjectMgr.GetPlayerLevelInfo(getRace(),getClass(),getLevel(),&info);
SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
- SetUInt32Value(PLAYER_NEXT_LEVEL_XP, objmgr.GetXPForLevel(getLevel()));
+ SetUInt32Value(PLAYER_NEXT_LEVEL_XP, sObjectMgr.GetXPForLevel(getLevel()));
// reset before any aura state sources (health set/aura apply)
SetUInt32Value(UNIT_FIELD_AURASTATE, 0);
@@ -3174,9 +3174,9 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
{
uint32 next_active_spell_id = 0;
// fix activate state for non-stackable low rank (and find next spell for !active case)
- if (!SpellMgr::canStackSpellRanks(spellInfo) && spellmgr.GetSpellRank(spellInfo->Id) != 0)
+ if (!SpellMgr::canStackSpellRanks(spellInfo) && sSpellMgr.GetSpellRank(spellInfo->Id) != 0)
{
- if (uint32 next = spellmgr.GetNextSpellInChain(spell_id))
+ if (uint32 next = sSpellMgr.GetNextSpellInChain(spell_id))
{
if (HasSpell(next))
{
@@ -3294,7 +3294,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
}
}
// non talent spell: learn low ranks (recursive call)
- else if (uint32 prev_spell = spellmgr.GetPrevSpellInChain(spell_id))
+ else if (uint32 prev_spell = sSpellMgr.GetPrevSpellInChain(spell_id))
{
if (!IsInWorld() || disabled) // at spells loading, no output, but allow save
addSpell(prev_spell,active,true,true,disabled);
@@ -3309,7 +3309,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
newspell->disabled = disabled;
// replace spells in action bars and spellbook to bigger rank if only one spell rank must be accessible
- if (newspell->active && !newspell->disabled && !SpellMgr::canStackSpellRanks(spellInfo) && spellmgr.GetSpellRank(spellInfo->Id) != 0)
+ if (newspell->active && !newspell->disabled && !SpellMgr::canStackSpellRanks(spellInfo) && sSpellMgr.GetSpellRank(spellInfo->Id) != 0)
{
for (PlayerSpellMap::iterator itr2 = m_spells.begin(); itr2 != m_spells.end(); ++itr2)
{
@@ -3317,11 +3317,11 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
SpellEntry const *i_spellInfo = sSpellStore.LookupEntry(itr2->first);
if (!i_spellInfo) continue;
- if (spellmgr.IsRankSpellDueToSpell(spellInfo,itr2->first))
+ if (sSpellMgr.IsRankSpellDueToSpell(spellInfo,itr2->first))
{
if (itr2->second->active)
{
- if (spellmgr.IsHighRankOfSpell(spell_id,itr2->first))
+ if (sSpellMgr.IsHighRankOfSpell(spell_id,itr2->first))
{
if (IsInWorld()) // not send spell (re-/over-)learn packets at loading
{
@@ -3337,7 +3337,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
itr2->second->state = PLAYERSPELL_CHANGED;
superceded_old = true; // new spell replace old in action bars and spell book.
}
- else if (spellmgr.IsHighRankOfSpell(itr2->first,spell_id))
+ else if (sSpellMgr.IsHighRankOfSpell(itr2->first,spell_id))
{
if (IsInWorld()) // not send spell (re-/over-)learn packets at loading
{
@@ -3391,16 +3391,16 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
// update free primary prof.points (if any, can be none in case GM .learn prof. learning)
if (uint32 freeProfs = GetFreePrimaryProfessionPoints())
{
- if (spellmgr.IsPrimaryProfessionFirstRankSpell(spell_id))
+ if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(spell_id))
SetFreePrimaryProfessions(freeProfs-1);
}
// add dependent skills
uint16 maxskill = GetMaxSkillValueForLevel();
- SpellLearnSkillNode const* spellLearnSkill = spellmgr.GetSpellLearnSkill(spell_id);
+ SpellLearnSkillNode const* spellLearnSkill = sSpellMgr.GetSpellLearnSkill(spell_id);
- SkillLineAbilityMapBounds skill_bounds = spellmgr.GetSkillLineAbilityMapBounds(spell_id);
+ SkillLineAbilityMapBounds skill_bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spell_id);
if (spellLearnSkill)
{
@@ -3459,7 +3459,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
}
// learn dependent spells
- SpellLearnSpellMapBounds spell_bounds = spellmgr.GetSpellLearnSpellMapBounds(spell_id);
+ SpellLearnSpellMapBounds spell_bounds = sSpellMgr.GetSpellLearnSpellMapBounds(spell_id);
for (SpellLearnSpellMap::const_iterator itr2 = spell_bounds.first; itr2 != spell_bounds.second; ++itr2)
{
@@ -3546,7 +3546,7 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
// learn all disabled higher ranks and required spells (recursive)
if (disabled)
{
- SpellChainNode const* node = spellmgr.GetSpellChainNode(spell_id);
+ SpellChainNode const* node = sSpellMgr.GetSpellChainNode(spell_id);
if (node)
{
PlayerSpellMap::iterator iter = m_spells.find(node->next);
@@ -3554,7 +3554,7 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
learnSpell(node->next, false);
}
- SpellsRequiringSpellMapBounds spellsRequiringSpell = spellmgr.GetSpellsRequiringSpellBounds(spell_id);
+ SpellsRequiringSpellMapBounds spellsRequiringSpell = sSpellMgr.GetSpellsRequiringSpellBounds(spell_id);
for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequiringSpell.first; itr2 != spellsRequiringSpell.second; ++itr2)
{
PlayerSpellMap::iterator iter2 = m_spells.find(itr2->second);
@@ -3574,13 +3574,13 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
return;
// unlearn non talent higher ranks (recursive)
- if (SpellChainNode const* node = spellmgr.GetSpellChainNode(spell_id))
+ if (SpellChainNode const* node = sSpellMgr.GetSpellChainNode(spell_id))
{
if (HasSpell(node->next) && !GetTalentSpellPos(node->next))
removeSpell(node->next,disabled, false);
}
//unlearn spells dependent from recently removed spells
- SpellsRequiringSpellMapBounds spellsRequiringSpell = spellmgr.GetSpellsRequiringSpellBounds(spell_id);
+ SpellsRequiringSpellMapBounds spellsRequiringSpell = sSpellMgr.GetSpellsRequiringSpellBounds(spell_id);
for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequiringSpell.first; itr2 != spellsRequiringSpell.second; ++itr2)
removeSpell(itr2->second,disabled);
@@ -3615,7 +3615,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
// remove pet auras
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- if (PetAura const *petSpell = spellmgr.GetPetAura(spell_id, i))
+ if (PetAura const *petSpell = sSpellMgr.GetPetAura(spell_id, i))
RemovePetAura(petSpell);
// free talent points
@@ -3629,7 +3629,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
}
// update free primary prof.points (if not overflow setting, can be in case GM use before .learn prof. learning)
- if (spellmgr.IsPrimaryProfessionFirstRankSpell(spell_id))
+ if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(spell_id))
{
uint32 freeProfs = GetFreePrimaryProfessionPoints()+1;
if (freeProfs <= sWorld.getConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL))
@@ -3637,20 +3637,20 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
}
// remove dependent skill
- SpellLearnSkillNode const *spellLearnSkill = spellmgr.GetSpellLearnSkill(spell_id);
+ SpellLearnSkillNode const *spellLearnSkill = sSpellMgr.GetSpellLearnSkill(spell_id);
if (spellLearnSkill)
{
- uint32 prev_spell = spellmgr.GetPrevSpellInChain(spell_id);
+ uint32 prev_spell = sSpellMgr.GetPrevSpellInChain(spell_id);
if (!prev_spell) // first rank, remove skill
SetSkill(spellLearnSkill->skill, 0, 0, 0);
else
{
// search prev. skill setting by spell ranks chain
- SpellLearnSkillNode const *prevSkill = spellmgr.GetSpellLearnSkill(prev_spell);
+ SpellLearnSkillNode const *prevSkill = sSpellMgr.GetSpellLearnSkill(prev_spell);
while (!prevSkill && prev_spell)
{
- prev_spell = spellmgr.GetPrevSpellInChain(prev_spell);
- prevSkill = spellmgr.GetSpellLearnSkill(spellmgr.GetFirstSpellInChain(prev_spell));
+ prev_spell = sSpellMgr.GetPrevSpellInChain(prev_spell);
+ prevSkill = sSpellMgr.GetSpellLearnSkill(sSpellMgr.GetFirstSpellInChain(prev_spell));
}
if (!prevSkill) // not found prev skill setting, remove skill
@@ -3676,7 +3676,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
else
{
// not ranked skills
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spell_id);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spell_id);
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{
@@ -3710,7 +3710,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
}
// remove dependent spells
- SpellLearnSpellMapBounds spell_bounds = spellmgr.GetSpellLearnSpellMapBounds(spell_id);
+ SpellLearnSpellMapBounds spell_bounds = sSpellMgr.GetSpellLearnSpellMapBounds(spell_id);
for (SpellLearnSpellMap::const_iterator itr2 = spell_bounds.first; itr2 != spell_bounds.second; ++itr2)
removeSpell(itr2->second.spell, disabled);
@@ -3718,7 +3718,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
// activate lesser rank in spellbook/action bar, and cast it if need
bool prev_activate = false;
- if (uint32 prev_id = spellmgr.GetPrevSpellInChain (spell_id))
+ if (uint32 prev_id = sSpellMgr.GetPrevSpellInChain (spell_id))
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
@@ -3730,7 +3730,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
// learnSpell(prev_id, false);
}
// if ranked non-stackable spell: need activate lesser rank and update dendence state
- else if (cur_active && !SpellMgr::canStackSpellRanks(spellInfo) && spellmgr.GetSpellRank(spellInfo->Id) != 0)
+ else if (cur_active && !SpellMgr::canStackSpellRanks(spellInfo) && sSpellMgr.GetSpellRank(spellInfo->Id) != 0)
{
// need manually update dependence state (learn spell ignore like attempts)
PlayerSpellMap::iterator prev_itr = m_spells.find(prev_id);
@@ -3788,7 +3788,7 @@ bool Player::Has310Flyer(bool checkAllSpells, uint32 excludeSpellId)
if (itr->first == excludeSpellId)
continue;
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(itr->first);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(itr->first);
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{
if (_spell_idx->second->skillId != SKILL_MOUNTS)
@@ -4311,14 +4311,14 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
if (!IsSpellFitByClassAndRace(trainer_spell->learnedSpell[i]))
return TRAINER_SPELL_RED;
- if (SpellChainNode const* spell_chain = spellmgr.GetSpellChainNode(trainer_spell->learnedSpell[i]))
+ if (SpellChainNode const* spell_chain = sSpellMgr.GetSpellChainNode(trainer_spell->learnedSpell[i]))
{
// check prev.rank requirement
if (spell_chain->prev && !HasSpell(spell_chain->prev))
return TRAINER_SPELL_RED;
}
- SpellsRequiringSpellMapBounds spellsRequired = spellmgr.GetSpellsRequiredForSpellBounds(trainer_spell->learnedSpell[i]);
+ SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr.GetSpellsRequiredForSpellBounds(trainer_spell->learnedSpell[i]);
for (SpellsRequiringSpellMap::const_iterator itr = spellsRequired.first; itr != spellsRequired.second; ++itr)
{
// check additional spell requirement
@@ -4333,7 +4333,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
{
if (!trainer_spell->learnedSpell[i])
continue;
- if ((spellmgr.IsPrimaryProfessionFirstRankSpell(trainer_spell->learnedSpell[i])) && (GetFreePrimaryProfessionPoints() == 0))
+ if ((sSpellMgr.IsPrimaryProfessionFirstRankSpell(trainer_spell->learnedSpell[i])) && (GetFreePrimaryProfessionPoints() == 0))
return TRAINER_SPELL_GREEN_DISABLED;
}
@@ -4373,7 +4373,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
sObjectAccessor.ConvertCorpseForPlayer(playerguid);
if (uint32 guildId = GetGuildIdFromDB(playerguid))
- if (Guild* guild = objmgr.GetGuildById(guildId))
+ if (Guild* guild = sObjectMgr.GetGuildById(guildId))
guild->DelMember(guid);
// remove from arena teams
@@ -4382,7 +4382,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
// the player was uninvited already on logout so just remove from group
QueryResult_AutoPtr resultGroup = CharacterDatabase.PQuery("SELECT guid FROM group_member WHERE memberGuid=%u", guid);
if (resultGroup)
- if (Group* group = objmgr.GetGroupByGUID((*resultGroup)[0].GetUInt32()))
+ if (Group* group = sObjectMgr.GetGroupByGUID((*resultGroup)[0].GetUInt32()))
RemoveFromGroup(group, playerguid);
// Remove signs from petitions (also remove petitions if owner);
@@ -4439,7 +4439,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
uint32 item_guidlow = fields2[11].GetUInt32();
uint32 item_template = fields2[12].GetUInt32();
- ItemPrototype const* itemProto = objmgr.GetItemPrototype(item_template);
+ ItemPrototype const* itemProto = sObjectMgr.GetItemPrototype(item_template);
if (!itemProto)
{
CharacterDatabase.PExecute("DELETE FROM item_instance WHERE guid = '%u'", item_guidlow);
@@ -4462,7 +4462,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
CharacterDatabase.PExecute("DELETE FROM mail_items WHERE mail_id = '%u'", mail_id);
- uint32 pl_account = objmgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER));
+ uint32 pl_account = sObjectMgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER));
draft.AddMoney(money).SendReturnToSender(pl_account, guid, sender);
}
@@ -4784,7 +4784,7 @@ void Player::CreateCorpse()
Corpse *corpse = new Corpse((m_ExtraFlags & PLAYER_EXTRA_PVP_DEATH) ? CORPSE_RESURRECTABLE_PVP : CORPSE_RESURRECTABLE_PVE);
SetPvPDeath(false);
- if (!corpse->Create(objmgr.GenerateLowGuid(HIGHGUID_CORPSE), this))
+ if (!corpse->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_CORPSE), this))
{
delete corpse;
return;
@@ -5026,7 +5026,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
return TotalCost;
}
- Guild *pGuild = objmgr.GetGuildById(GetGuildId());
+ Guild *pGuild = sObjectMgr.GetGuildById(GetGuildId());
if (!pGuild)
return TotalCost;
@@ -5090,7 +5090,7 @@ void Player::RepopAtGraveyard()
if (Battleground *bg = GetBattleground())
ClosestGrave = bg->GetClosestGraveYard(this);
else
- ClosestGrave = objmgr.GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam());
+ ClosestGrave = sObjectMgr.GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam());
// stop countdown until repop
m_deathTimer = 0;
@@ -5631,7 +5631,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
{
sLog.outDebug("UpdateCraftSkill spellid %d", spellid);
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spellid);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spellid);
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{
@@ -5977,7 +5977,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
if (SkillLineAbilityEntry const *pAbility = sSkillLineAbilityStore.LookupEntry(j))
if (pAbility->skillId == id)
- removeSpell(spellmgr.GetFirstSpellInChain(pAbility->spellId));
+ removeSpell(sSpellMgr.GetFirstSpellInChain(pAbility->spellId));
}
}
else if (newVal) //add
@@ -6205,7 +6205,7 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
}
break;
case ACTION_BUTTON_ITEM:
- if (!objmgr.GetItemPrototype(action))
+ if (!sObjectMgr.GetItemPrototype(action))
{
sLog.outError( "Item action %u not added into button %u for player %s: item not exist", action, button, GetName() );
return false;
@@ -6409,7 +6409,7 @@ void Player::CheckAreaExploreAndOutdoor()
uint32 XP = 0;
if (diff < -5)
{
- XP = uint32(objmgr.GetBaseXP(getLevel()+5)*sWorld.getRate(RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr.GetBaseXP(getLevel()+5)*sWorld.getRate(RATE_XP_EXPLORE));
}
else if (diff > 5)
{
@@ -6419,11 +6419,11 @@ void Player::CheckAreaExploreAndOutdoor()
else if (exploration_percent < 0)
exploration_percent = 0;
- XP = uint32(objmgr.GetBaseXP(p->area_level)*exploration_percent/100*sWorld.getRate(RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr.GetBaseXP(p->area_level)*exploration_percent/100*sWorld.getRate(RATE_XP_EXPLORE));
}
else
{
- XP = uint32(objmgr.GetBaseXP(p->area_level)*sWorld.getRate(RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr.GetBaseXP(p->area_level)*sWorld.getRate(RATE_XP_EXPLORE));
}
GiveXP(XP, NULL);
@@ -6483,7 +6483,7 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in
float percent = 100.0f;
// Get the generic rate first
- if (RepRewardRate const * repData = objmgr.GetRepRewardRate(faction))
+ if (RepRewardRate const * repData = sObjectMgr.GetRepRewardRate(faction))
{
float repRate = for_quest ? repData->quest_rate : repData->creature_rate;
percent *= repRate;
@@ -6516,7 +6516,7 @@ void Player::RewardReputation(Unit *pVictim, float rate)
if (pVictim->ToCreature()->IsReputationGainDisabled())
return;
- ReputationOnKillEntry const* Rep = objmgr.GetReputationOnKilEntry(pVictim->ToCreature()->GetCreatureInfo()->Entry);
+ ReputationOnKillEntry const* Rep = sObjectMgr.GetReputationOnKilEntry(pVictim->ToCreature()->GetCreatureInfo()->Entry);
if (!Rep)
return;
@@ -6530,10 +6530,10 @@ void Player::RewardReputation(Unit *pVictim, float rate)
Map const *pMap = GetMap();
if (pMap && pMap->IsDungeon())
{
- InstanceTemplate const *pInstance = objmgr.GetInstanceTemplate(pMap->GetId());
+ InstanceTemplate const *pInstance = sObjectMgr.GetInstanceTemplate(pMap->GetId());
if (pInstance)
{
- AccessRequirement const *pAccessRequirement = objmgr.GetAccessRequirement(pMap->GetId(), ((InstanceMap*)pMap)->GetDifficulty());
+ AccessRequirement const *pAccessRequirement = sObjectMgr.GetAccessRequirement(pMap->GetId(), ((InstanceMap*)pMap)->GetDifficulty());
if (pAccessRequirement)
{
if (!pMap->IsRaid() && pAccessRequirement->levelMin == 80)
@@ -7842,7 +7842,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
if (pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
continue;
- SpellEnchantProcEntry const* entry = spellmgr.GetSpellEnchantProcEvent(enchant_id);
+ SpellEnchantProcEntry const* entry = sSpellMgr.GetSpellEnchantProcEvent(enchant_id);
if (entry && entry->procEx)
{
@@ -8104,7 +8104,7 @@ void Player::_ApplyAmmoBonuses()
float currentAmmoDPS;
- ItemPrototype const *ammo_proto = objmgr.GetItemPrototype(ammo_id);
+ ItemPrototype const *ammo_proto = sObjectMgr.GetItemPrototype(ammo_id);
if (!ammo_proto || ammo_proto->Class != ITEM_CLASS_PROJECTILE || !CheckAmmoCompatibility(ammo_proto))
currentAmmoDPS = 0.0f;
else
@@ -9826,7 +9826,7 @@ bool Player::HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_
}
}
- ItemPrototype const *pProto = objmgr.GetItemPrototype(item);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item);
if (pProto && pProto->GemProperties)
{
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
@@ -9883,7 +9883,7 @@ bool Player::HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32
uint8 Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count) const
{
- ItemPrototype const *pProto = objmgr.GetItemPrototype(entry);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(entry);
if (!pProto)
{
if (no_space_count)
@@ -10154,7 +10154,7 @@ uint8 Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32
{
sLog.outDebug("STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
- ItemPrototype const *pProto = objmgr.GetItemPrototype(entry);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(entry);
if (!pProto)
{
if (no_space_count)
@@ -11315,7 +11315,7 @@ uint8 Player::CanUseAmmo(uint32 item) const
return EQUIP_ERR_YOU_ARE_DEAD;
//if (isStunned())
// return EQUIP_ERR_YOU_ARE_STUNNED;
- ItemPrototype const *pProto = objmgr.GetItemPrototype(item);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item);
if (pProto)
{
if (pProto->InventoryType!= INVTYPE_AMMO)
@@ -12721,7 +12721,7 @@ void Player::SendEquipError(uint8 msg, Item* pItem, Item *pItem2, uint32 itemid)
case EQUIP_ERR_CANT_EQUIP_LEVEL_I:
case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW:
{
- ItemPrototype const* proto = pItem ? pItem->GetProto() : objmgr.GetItemPrototype(itemid);
+ ItemPrototype const* proto = pItem ? pItem->GetProto() : sObjectMgr.GetItemPrototype(itemid);
data << uint32(proto ? proto->RequiredLevel : 0);
break;
}
@@ -12736,7 +12736,7 @@ void Player::SendEquipError(uint8 msg, Item* pItem, Item *pItem2, uint32 itemid)
case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED:
case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED:
{
- ItemPrototype const* proto = pItem ? pItem->GetProto() : objmgr.GetItemPrototype(itemid);
+ ItemPrototype const* proto = pItem ? pItem->GetProto() : sObjectMgr.GetItemPrototype(itemid);
data << uint32(proto ? proto->ItemLimitCategory : 0);
break;
}
@@ -12871,7 +12871,7 @@ void Player::RemoveArenaEnchantments(EnchantmentSlot slot)
if (itr->item && itr->item->GetEnchantmentId(slot))
{
// Poisons and DK runes are enchants which are allowed on arenas
- if (spellmgr.IsArenaAllowedEnchancment(itr->item->GetEnchantmentId(slot)))
+ if (sSpellMgr.IsArenaAllowedEnchancment(itr->item->GetEnchantmentId(slot)))
{
++next;
continue;
@@ -13382,11 +13382,11 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId, bool showQue
pMenu->GetGossipMenu().SetMenuId(menuId);
- GossipMenuItemsMapBounds pMenuItemBounds = objmgr.GetGossipMenuItemsMapBounds(menuId);
+ GossipMenuItemsMapBounds pMenuItemBounds = sObjectMgr.GetGossipMenuItemsMapBounds(menuId);
// if default menuId and no menu options exist for this, use options from default options
if (pMenuItemBounds.first == pMenuItemBounds.second && menuId == GetDefaultGossipMenuForSource(pSource))
- pMenuItemBounds = objmgr.GetGossipMenuItemsMapBounds(0);
+ pMenuItemBounds = sObjectMgr.GetGossipMenuItemsMapBounds(0);
uint32 npcflags = 0;
Creature *pCreature = NULL;
@@ -13510,7 +13510,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId, bool showQue
{
uint32 idxEntry = MAKE_PAIR32(menuId, itr->second.id);
- if (GossipMenuItemsLocale const *no = objmgr.GetGossipMenuItemsLocale(idxEntry))
+ if (GossipMenuItemsLocale const *no = sObjectMgr.GetGossipMenuItemsLocale(idxEntry))
{
if (no->OptionText.size() > (size_t)loc_idx && !no->OptionText[loc_idx].empty())
strOptionText = no->OptionText[loc_idx];
@@ -13722,7 +13722,7 @@ uint32 Player::GetGossipTextId(WorldObject *pSource)
if (!pSource || pSource->GetTypeId() != TYPEID_UNIT || !pSource->ToCreature()->GetDBTableGUIDLow())
return DEFAULT_GOSSIP_MESSAGE;
- if (uint32 pos = objmgr.GetNpcGossip(pSource->ToCreature()->GetDBTableGUIDLow()))
+ if (uint32 pos = sObjectMgr.GetNpcGossip(pSource->ToCreature()->GetDBTableGUIDLow()))
return pos;
return DEFAULT_GOSSIP_MESSAGE;
@@ -13735,7 +13735,7 @@ uint32 Player::GetGossipTextId(uint32 menuId)
if (!menuId)
return textId;
- GossipMenusMapBounds pMenuBounds = objmgr.GetGossipMenusMapBounds(menuId);
+ GossipMenusMapBounds pMenuBounds = sObjectMgr.GetGossipMenusMapBounds(menuId);
for (GossipMenusMap::const_iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
{
@@ -13771,8 +13771,8 @@ void Player::PrepareQuestMenu(uint64 guid)
if (pCreature)
{
pObject = (Object*)pCreature;
- pObjectQR = &objmgr.mCreatureQuestRelations;
- pObjectQIR = &objmgr.mCreatureQuestInvolvedRelations;
+ pObjectQR = &sObjectMgr.mCreatureQuestRelations;
+ pObjectQIR = &sObjectMgr.mCreatureQuestInvolvedRelations;
}
else
{
@@ -13784,8 +13784,8 @@ void Player::PrepareQuestMenu(uint64 guid)
if (pGameObject)
{
pObject = (Object*)pGameObject;
- pObjectQR = &objmgr.mGOQuestRelations;
- pObjectQIR = &objmgr.mGOQuestInvolvedRelations;
+ pObjectQR = &sObjectMgr.mGOQuestRelations;
+ pObjectQIR = &sObjectMgr.mGOQuestInvolvedRelations;
}
else
return;
@@ -13809,7 +13809,7 @@ void Player::PrepareQuestMenu(uint64 guid)
for (QuestRelations::const_iterator i = pObjectQR->lower_bound(pObject->GetEntry()); i != pObjectQR->upper_bound(pObject->GetEntry()); ++i)
{
uint32 quest_id = i->second;
- Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (!pQuest) continue;
QuestStatus status = GetQuestStatus(quest_id);
@@ -13836,7 +13836,7 @@ void Player::SendPreparedQuest(uint64 guid)
{
// Auto open -- maybe also should verify there is no greeting
uint32 quest_id = qmi0.m_qId;
- Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (pQuest)
{
@@ -13882,7 +13882,7 @@ void Player::SendPreparedQuest(uint64 guid)
if (pCreature)
{
uint32 textid = GetGossipTextId(pCreature);
- GossipText const* gossiptext = objmgr.GetGossipText(textid);
+ GossipText const* gossiptext = sObjectMgr.GetGossipText(textid);
if (!gossiptext)
{
qe._Delay = 0; //TEXTEMOTE_MESSAGE; //zyg: player emote
@@ -13900,7 +13900,7 @@ void Player::SendPreparedQuest(uint64 guid)
int loc_idx = GetSession()->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- NpcTextLocale const *nl = objmgr.GetNpcTextLocale(textid);
+ NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textid);
if (nl)
{
if (nl->Text_0[0].size() > loc_idx && !nl->Text_0[0][loc_idx].empty())
@@ -13915,7 +13915,7 @@ void Player::SendPreparedQuest(uint64 guid)
int loc_idx = GetSession()->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- NpcTextLocale const *nl = objmgr.GetNpcTextLocale(textid);
+ NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textid);
if (nl)
{
if (nl->Text_1[0].size() > loc_idx && !nl->Text_1[0][loc_idx].empty())
@@ -13946,8 +13946,8 @@ Quest const * Player::GetNextQuest(uint64 guid, Quest const *pQuest)
if (pCreature)
{
pObject = (Object*)pCreature;
- pObjectQR = &objmgr.mCreatureQuestRelations;
- pObjectQIR = &objmgr.mCreatureQuestInvolvedRelations;
+ pObjectQR = &sObjectMgr.mCreatureQuestRelations;
+ pObjectQIR = &sObjectMgr.mCreatureQuestInvolvedRelations;
}
else
{
@@ -13959,8 +13959,8 @@ Quest const * Player::GetNextQuest(uint64 guid, Quest const *pQuest)
if (pGameObject)
{
pObject = (Object*)pGameObject;
- pObjectQR = &objmgr.mGOQuestRelations;
- pObjectQIR = &objmgr.mGOQuestInvolvedRelations;
+ pObjectQR = &sObjectMgr.mGOQuestRelations;
+ pObjectQIR = &sObjectMgr.mGOQuestInvolvedRelations;
}
else
return NULL;
@@ -13970,7 +13970,7 @@ Quest const * Player::GetNextQuest(uint64 guid, Quest const *pQuest)
for (QuestRelations::const_iterator itr = pObjectQR->lower_bound(pObject->GetEntry()); itr != pObjectQR->upper_bound(pObject->GetEntry()); ++itr)
{
if (itr->second == nextQuestID)
- return objmgr.GetQuestTemplate(nextQuestID);
+ return sObjectMgr.GetQuestTemplate(nextQuestID);
}
return NULL;
@@ -14033,7 +14033,7 @@ bool Player::CanCompleteQuest(uint32 quest_id)
if (q_status.m_status == QUEST_STATUS_COMPLETE)
return false; // not allow re-complete quest
- Quest const* qInfo = objmgr.GetQuestTemplate(quest_id);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id);
if (!qInfo)
return false;
@@ -14252,7 +14252,7 @@ void Player::AddQuest(Quest const *pQuest, Object *questGiver)
GetMap()->ScriptsStart(sQuestStartScripts, pQuest->GetQuestStartScript(), questGiver, this);
// Some spells applied at quest activation
- SpellAreaForQuestMapBounds saBounds = spellmgr.GetSpellAreaForQuestMapBounds(quest_id,true);
+ SpellAreaForQuestMapBounds saBounds = sSpellMgr.GetSpellAreaForQuestMapBounds(quest_id,true);
if (saBounds.first != saBounds.second)
{
uint32 zone, area;
@@ -14277,7 +14277,7 @@ void Player::CompleteQuest(uint32 quest_id)
if (log_slot < MAX_QUEST_LOG_SIZE)
SetQuestSlotState(log_slot,QUEST_STATE_COMPLETE);
- if (Quest const* qInfo = objmgr.GetQuestTemplate(quest_id))
+ if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id))
{
if (qInfo->HasFlag(QUEST_FLAGS_AUTO_REWARDED))
RewardQuest(qInfo,0,this,false);
@@ -14446,7 +14446,7 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
uint32 area = 0;
// remove auras from spells with quest reward state limitations
- SpellAreaForQuestMapBounds saEndBounds = spellmgr.GetSpellAreaForQuestEndMapBounds(quest_id);
+ SpellAreaForQuestMapBounds saEndBounds = sSpellMgr.GetSpellAreaForQuestEndMapBounds(quest_id);
if (saEndBounds.first != saEndBounds.second)
{
GetZoneAndAreaId(zone,area);
@@ -14457,7 +14457,7 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
}
// Some spells applied at quest reward
- SpellAreaForQuestMapBounds saBounds = spellmgr.GetSpellAreaForQuestMapBounds(quest_id,false);
+ SpellAreaForQuestMapBounds saBounds = sSpellMgr.GetSpellAreaForQuestMapBounds(quest_id,false);
if (saBounds.first != saBounds.second)
{
if (!zone || !area)
@@ -14475,7 +14475,7 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
void Player::FailQuest(uint32 questId)
{
- if (Quest const* pQuest = objmgr.GetQuestTemplate(questId))
+ if (Quest const* pQuest = sObjectMgr.GetQuestTemplate(questId))
{
SetQuestStatus(questId, QUEST_STATUS_FAILED);
@@ -14600,7 +14600,7 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
uint32 prevId = abs(*iter);
QuestStatusMap::iterator i_prevstatus = mQuestStatus.find(prevId);
- Quest const* qPrevInfo = objmgr.GetQuestTemplate(prevId);
+ Quest const* qPrevInfo = sObjectMgr.GetQuestTemplate(prevId);
if (qPrevInfo && i_prevstatus != mQuestStatus.end())
{
@@ -14613,8 +14613,8 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
// each-from-all exclusive group (< 0)
// can be start if only all quests in prev quest exclusive group completed and rewarded
- ObjectMgr::ExclusiveQuestGroups::iterator iter2 = objmgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
- ObjectMgr::ExclusiveQuestGroups::iterator end = objmgr.mExclusiveQuestGroups.upper_bound(qPrevInfo->GetExclusiveGroup());
+ ObjectMgr::ExclusiveQuestGroups::iterator iter2 = sObjectMgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
+ ObjectMgr::ExclusiveQuestGroups::iterator end = sObjectMgr.mExclusiveQuestGroups.upper_bound(qPrevInfo->GetExclusiveGroup());
ASSERT(iter2 != end); // always must be found if qPrevInfo->ExclusiveGroup != 0
@@ -14648,8 +14648,8 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
// each-from-all exclusive group (< 0)
// can be start if only all quests in prev quest exclusive group active
- ObjectMgr::ExclusiveQuestGroups::iterator iter2 = objmgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
- ObjectMgr::ExclusiveQuestGroups::iterator end = objmgr.mExclusiveQuestGroups.upper_bound(qPrevInfo->GetExclusiveGroup());
+ ObjectMgr::ExclusiveQuestGroups::iterator iter2 = sObjectMgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup());
+ ObjectMgr::ExclusiveQuestGroups::iterator end = sObjectMgr.mExclusiveQuestGroups.upper_bound(qPrevInfo->GetExclusiveGroup());
ASSERT(iter2 != end); // always must be found if qPrevInfo->ExclusiveGroup != 0
@@ -14750,8 +14750,8 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg)
if (qInfo->GetExclusiveGroup() <= 0)
return true;
- ObjectMgr::ExclusiveQuestGroups::iterator iter = objmgr.mExclusiveQuestGroups.lower_bound(qInfo->GetExclusiveGroup());
- ObjectMgr::ExclusiveQuestGroups::iterator end = objmgr.mExclusiveQuestGroups.upper_bound(qInfo->GetExclusiveGroup());
+ ObjectMgr::ExclusiveQuestGroups::iterator iter = sObjectMgr.mExclusiveQuestGroups.lower_bound(qInfo->GetExclusiveGroup());
+ ObjectMgr::ExclusiveQuestGroups::iterator end = sObjectMgr.mExclusiveQuestGroups.upper_bound(qInfo->GetExclusiveGroup());
ASSERT(iter != end); // always must be found if qInfo->ExclusiveGroup != 0
@@ -14764,7 +14764,7 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg)
continue;
// not allow have daily quest if daily quest from exclusive group already recently completed
- Quest const* Nquest = objmgr.GetQuestTemplate(exclude_Id);
+ Quest const* Nquest = sObjectMgr.GetQuestTemplate(exclude_Id);
if (!SatisfyQuestDay(Nquest, false) || !SatisfyQuestWeek(Nquest, false))
{
if (msg)
@@ -14907,7 +14907,7 @@ bool Player::GiveQuestSourceItem(Quest const *pQuest)
bool Player::TakeQuestSourceItem(uint32 quest_id, bool msg)
{
- Quest const* qInfo = objmgr.GetQuestTemplate(quest_id);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id);
if (qInfo)
{
uint32 srcitem = qInfo->GetSrcItemId();
@@ -14935,7 +14935,7 @@ bool Player::TakeQuestSourceItem(uint32 quest_id, bool msg)
bool Player::GetQuestRewardStatus(uint32 quest_id) const
{
- Quest const* qInfo = objmgr.GetQuestTemplate(quest_id);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id);
if (qInfo)
{
// for repeatable quests: rewarded field is set after first reward only to prevent getting XP more than once
@@ -14962,7 +14962,7 @@ QuestStatus Player::GetQuestStatus(uint32 quest_id) const
bool Player::CanShareQuest(uint32 quest_id) const
{
- Quest const* qInfo = objmgr.GetQuestTemplate(quest_id);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id);
if (qInfo && qInfo->HasFlag(QUEST_FLAGS_SHARABLE))
{
QuestStatusMap::const_iterator itr = mQuestStatus.find(quest_id);
@@ -14974,7 +14974,7 @@ bool Player::CanShareQuest(uint32 quest_id) const
void Player::SetQuestStatus(uint32 quest_id, QuestStatus status)
{
- if (Quest const* qInfo = objmgr.GetQuestTemplate(quest_id))
+ if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id))
{
QuestStatusData& q_status = mQuestStatus[quest_id];
@@ -14990,7 +14990,7 @@ void Player::SetQuestStatus(uint32 quest_id, QuestStatus status)
// not used in Trinity, but used in scripting code
uint32 Player::GetReqKillOrCastCurrentCount(uint32 quest_id, int32 entry)
{
- Quest const* qInfo = objmgr.GetQuestTemplate(quest_id);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest_id);
if (!qInfo)
return 0;
@@ -15081,7 +15081,7 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count)
if (q_status.m_status != QUEST_STATUS_INCOMPLETE)
continue;
- Quest const* qInfo = objmgr.GetQuestTemplate(questid);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
if (!qInfo || !qInfo->HasFlag(QUEST_TRINITY_FLAGS_DELIVER))
continue;
@@ -15116,7 +15116,7 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count)
uint32 questid = GetQuestSlotQuestId(i);
if (!questid)
continue;
- Quest const* qInfo = objmgr.GetQuestTemplate(questid);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
if (!qInfo)
continue;
if (!qInfo->HasFlag(QUEST_TRINITY_FLAGS_DELIVER))
@@ -15181,7 +15181,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
if (!questid)
continue;
- Quest const* qInfo = objmgr.GetQuestTemplate(questid);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
if (!qInfo)
continue;
// just if !ingroup || !noraidgroup || raidgroup
@@ -15237,7 +15237,7 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
if (!questid)
continue;
- Quest const* qInfo = objmgr.GetQuestTemplate(questid);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
if (!qInfo)
continue;
@@ -15264,7 +15264,7 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
reqTarget = qInfo->ReqCreatureOrGOId[j];
if (reqTarget != entry) // if entry doesn't match, check for killcredits referenced in template
{
- CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(entry);
+ CreatureInfo const *cinfo = sObjectMgr.GetCreatureTemplate(entry);
for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
if (cinfo->KillCredit[i] == reqTarget)
entry = cinfo->KillCredit[i];
@@ -15314,7 +15314,7 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid)
if (!questid)
continue;
- Quest const* qInfo = objmgr.GetQuestTemplate(questid);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
if (!qInfo)
continue;
@@ -15370,7 +15370,7 @@ void Player::MoneyChanged(uint32 count)
if (!questid)
continue;
- Quest const* qInfo = objmgr.GetQuestTemplate(questid);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid);
if (qInfo && qInfo->GetRewOrReqMoney() < 0)
{
QuestStatusData& q_status = mQuestStatus[questid];
@@ -15398,7 +15398,7 @@ void Player::ReputationChanged(FactionEntry const* factionEntry)
{
if (uint32 questid = GetQuestSlotQuestId(i))
{
- if (Quest const* qInfo = objmgr.GetQuestTemplate(questid))
+ if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid))
{
if (qInfo->GetRepObjectiveFaction() == factionEntry->ID)
{
@@ -15426,7 +15426,7 @@ void Player::ReputationChanged2(FactionEntry const* factionEntry)
{
if (uint32 questid = GetQuestSlotQuestId(i))
{
- if (Quest const* qInfo = objmgr.GetQuestTemplate(questid))
+ if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(questid))
{
if (qInfo->GetRepObjectiveFaction2() == factionEntry->ID)
{
@@ -15464,7 +15464,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
{
- Quest const* qinfo = objmgr.GetQuestTemplate(questid);
+ Quest const* qinfo = sObjectMgr.GetQuestTemplate(questid);
if (!qinfo)
continue;
@@ -15486,7 +15486,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
// examined item is a source item
if (qinfo->ReqSourceId[j] == itemid)
{
- ItemPrototype const *pProto = objmgr.GetItemPrototype(itemid);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(itemid);
// 'unique' item
if (pProto->MaxCount && GetItemCount(itemid,true) < pProto->MaxCount)
@@ -15521,7 +15521,7 @@ void Player::SendQuestReward(Quest const *pQuest, uint32 XP, Object * questGiver
{
uint32 questid = pQuest->GetQuestId();
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid);
- gameeventmgr.HandleQuestComplete(questid);
+ sGameEventMgr.HandleQuestComplete(questid);
WorldPacket data(SMSG_QUESTGIVER_QUEST_COMPLETE, (4+4+4+4+4));
data << uint32(questid);
@@ -15586,7 +15586,7 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
if (loc_idx >= 0)
{
- if (const QuestLocale* pLocale = objmgr.GetQuestLocale(pQuest->GetQuestId()))
+ if (const QuestLocale* pLocale = sObjectMgr.GetQuestLocale(pQuest->GetQuestId()))
{
if (pLocale->Title.size() > loc_idx && !pLocale->Title[loc_idx].empty())
strTitle = pLocale->Title[loc_idx];
@@ -15685,7 +15685,7 @@ void Player::_LoadArenaTeamInfo(QueryResult_AutoPtr result)
uint32 wons_season = fields[3].GetUInt32();
uint32 personal_rating = fields[4].GetUInt32();
- ArenaTeam* aTeam = objmgr.GetArenaTeamById(arenateamid);
+ ArenaTeam* aTeam = sObjectMgr.GetArenaTeamById(arenateamid);
if (!aTeam)
{
sLog.outError("Player::_LoadArenaTeamInfo: couldn't load arenateam %u", arenateamid);
@@ -15841,7 +15841,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
// check name limitations
if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS ||
- (GetSession()->GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(m_name)))
+ (GetSession()->GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(m_name)))
{
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE guid ='%u'", uint32(AT_LOGIN_RENAME),guid);
return false;
@@ -15946,7 +15946,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
if (!arena_team_id)
continue;
- if (ArenaTeam * at = objmgr.GetArenaTeamById(arena_team_id))
+ if (ArenaTeam * at = sObjectMgr.GetArenaTeamById(arena_team_id))
if (at->HaveMember(GetGUID()))
continue;
@@ -16130,7 +16130,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
if (!map)
{
instanceId = 0;
- AreaTrigger const* at = objmgr.GetGoBackTrigger(mapId);
+ AreaTrigger const* at = sObjectMgr.GetGoBackTrigger(mapId);
if (at)
{
sLog.outError("Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).",guid,mapId,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
@@ -16146,7 +16146,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
map = sMapMgr.CreateMap(mapId, this, 0);
if (!map)
{
- PlayerInfo const *info = objmgr.GetPlayerInfo(getRace(), getClass());
+ PlayerInfo const *info = sObjectMgr.GetPlayerInfo(getRace(), getClass());
mapId = info->mapId;
Relocate(info->positionX,info->positionY,info->positionZ,0.0f);
sLog.outError("Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
@@ -16160,9 +16160,9 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
}
// if the player is in an instance and it has been reset in the meantime teleport him to the entrance
- if (instanceId && !sInstanceSaveManager.GetInstanceSave(instanceId))
+ if (instanceId && !sInstanceSaveMgr.GetInstanceSave(instanceId))
{
- AreaTrigger const* at = objmgr.GetMapEntranceTrigger(mapId);
+ AreaTrigger const* at = sObjectMgr.GetMapEntranceTrigger(mapId);
if (at)
Relocate(at->target_X, at->target_Y, at->target_Z, at->target_Orientation);
else
@@ -16656,7 +16656,7 @@ void Player::_LoadInventory(QueryResult_AutoPtr result, uint32 timediff)
uint32 item_guid = fields[13].GetUInt32();
uint32 item_id = fields[14].GetUInt32();
- ItemPrototype const * proto = objmgr.GetItemPrototype(item_id);
+ ItemPrototype const * proto = sObjectMgr.GetItemPrototype(item_id);
if (!proto)
{
@@ -16839,7 +16839,7 @@ void Player::_LoadMailedItems(Mail *mail)
mail->AddItem(item_guid_low, item_template);
- ItemPrototype const *proto = objmgr.GetItemPrototype(item_template);
+ ItemPrototype const *proto = sObjectMgr.GetItemPrototype(item_template);
if (!proto)
{
@@ -16955,7 +16955,7 @@ void Player::_LoadQuestStatus(QueryResult_AutoPtr result)
uint32 quest_id = fields[0].GetUInt32();
// used to be new, no delete?
- Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (pQuest)
{
// find or create
@@ -17073,7 +17073,7 @@ void Player::_LoadDailyQuestStatus(QueryResult_AutoPtr result)
// save _any_ from daily quest times (it must be after last reset anyway)
m_lastDailyQuestTime = (time_t)fields[1].GetUInt64();
- Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (!pQuest)
continue;
@@ -17100,7 +17100,7 @@ void Player::_LoadWeeklyQuestStatus(QueryResult_AutoPtr result)
uint32 quest_id = fields[0].GetUInt32();
- Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (!pQuest)
continue;
@@ -17136,7 +17136,7 @@ void Player::_LoadGroup(QueryResult_AutoPtr result)
//QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM group_member WHERE memberGuid=%u", GetGUIDLow());
if (result)
{
- if (Group* group = objmgr.GetGroupByGUID((*result)[0].GetUInt32()))
+ if (Group* group = sObjectMgr.GetGroupByGUID((*result)[0].GetUInt32()))
{
uint8 subgroup = group->GetMemberGroup(GetGUID());
SetGroup(group, subgroup);
@@ -17205,7 +17205,7 @@ void Player::_LoadBoundInstances(QueryResult_AutoPtr result)
}
// since non permanent binds are always solo bind, they can always be reset
- if (InstanceSave *save = sInstanceSaveManager.AddInstanceSave(mapId, instanceId, Difficulty(difficulty), resetTime, !perm, true))
+ if (InstanceSave *save = sInstanceSaveMgr.AddInstanceSave(mapId, instanceId, Difficulty(difficulty), resetTime, !perm, true))
BindToInstance(save, perm, true);
} while (result->NextRow());
}
@@ -17470,7 +17470,7 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report
else if (mapDiff->hasErrorMessage) // if (missingAchievement) covered by this case
SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY, target_difficulty);
else if (missingItem)
- GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, objmgr.GetItemPrototype(missingItem)->Name1);
+ GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, sObjectMgr.GetItemPrototype(missingItem)->Name1);
else if (LevelMin)
GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED), LevelMin);
}
@@ -17507,7 +17507,7 @@ bool Player::CheckInstanceLoginValid()
bool Player::_LoadHomeBind(QueryResult_AutoPtr result)
{
- PlayerInfo const *info = objmgr.GetPlayerInfo(getRace(), getClass());
+ PlayerInfo const *info = sObjectMgr.GetPlayerInfo(getRace(), getClass());
if (!info)
{
sLog.outError("Player have incorrect race/class pair. Can't be loaded.");
@@ -18606,7 +18606,7 @@ void Player::Whisper(const std::string& text, uint32 language,uint64 receiver)
if (language != LANG_ADDON) // if not addon data
language = LANG_UNIVERSAL; // whispers should always be readable
- Player *rPlayer = objmgr.GetPlayer(receiver);
+ Player *rPlayer = sObjectMgr.GetPlayer(receiver);
if (sWorld.getConfig(CONFIG_CHATLOG_WHISPER))
sLog.outChat("[WHISPER] Player %s tells %s: %s",
@@ -18864,7 +18864,7 @@ bool Player::IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mo
if (mod->op == SPELLMOD_DURATION && GetSpellDuration(spellInfo) == -1)
return false;
- return spellmgr.IsAffectedByMod(spellInfo, mod);
+ return sSpellMgr.IsAffectedByMod(spellInfo, mod);
}
void Player::AddSpellMod(SpellModifier* mod, bool apply)
@@ -19057,7 +19057,7 @@ void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type)
uint64 petitionguid = MAKE_NEW_GUID(fields[1].GetUInt32(), 0, HIGHGUID_ITEM);
// send update if charter owner in game
- Player* owner = objmgr.GetPlayer(ownerguid);
+ Player* owner = sObjectMgr.GetPlayer(ownerguid);
if (owner)
owner->GetSession()->SendPetitionQueryOpcode(petitionguid);
@@ -19095,7 +19095,7 @@ void Player::LeaveAllArenaTeams(uint64 guid)
uint32 at_id = fields[0].GetUInt32();
if (at_id != 0)
{
- ArenaTeam * at = objmgr.GetArenaTeamById(at_id);
+ ArenaTeam * at = sObjectMgr.GetArenaTeamById(at_id);
if (at)
at->DelMember(guid);
}
@@ -19302,7 +19302,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
uint32 path, cost;
lastnode = nodes[i];
- objmgr.GetTaxiPath(prevnode, lastnode, path, cost);
+ sObjectMgr.GetTaxiPath(prevnode, lastnode, path, cost);
if (!path)
{
@@ -19326,7 +19326,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
// only one mount ID for both sides. Probably not good to use 315 in case DBC nodes
// change but I couldn't find a suitable alternative. OK to use class because only DK
// can use this taxi.
- uint32 mount_display_id = objmgr.GetTaxiMountDisplayId(sourcenode, GetTeam(), npc == NULL || (sourcenode == 315 && getClass() == CLASS_DEATH_KNIGHT));
+ uint32 mount_display_id = sObjectMgr.GetTaxiMountDisplayId(sourcenode, GetTeam(), npc == NULL || (sourcenode == 315 && getClass() == CLASS_DEATH_KNIGHT));
// in spell case allow 0 model
if ((mount_display_id == 0 && spellid == 0) || sourcepath == 0)
@@ -19409,7 +19409,7 @@ void Player::ContinueTaxiFlight()
sLog.outDebug("WORLD: Restart character %u taxi flight", GetGUIDLow());
- uint32 mountDisplayId = objmgr.GetTaxiMountDisplayId(sourceNode, GetTeam(),true);
+ uint32 mountDisplayId = sObjectMgr.GetTaxiMountDisplayId(sourceNode, GetTeam(),true);
uint32 path = m_taxi.GetCurrentTaxiPath();
// search appropriate start path node
@@ -19537,7 +19537,7 @@ void Player::InitDataForForm(bool reapplyMods)
void Player::InitDisplayIds()
{
- PlayerInfo const *info = objmgr.GetPlayerInfo(getRace(), getClass());
+ PlayerInfo const *info = sObjectMgr.GetPlayerInfo(getRace(), getClass());
if (!info)
{
sLog.outError("Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow());
@@ -19574,7 +19574,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
if (!isAlive())
return false;
- ItemPrototype const *pProto = objmgr.GetItemPrototype(item);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item);
if (!pProto)
{
SendBuyError(BUY_ERR_CANT_FIND_ITEM, NULL, item, 0);
@@ -19807,7 +19807,7 @@ uint32 Player::GetMaxPersonalArenaRatingRequirement(uint32 minarenaslot)
uint32 max_personal_rating = 0;
for (uint8 i = minarenaslot; i < MAX_ARENA_SLOT; ++i)
{
- if (ArenaTeam * at = objmgr.GetArenaTeamById(GetArenaTeamId(i)))
+ if (ArenaTeam * at = sObjectMgr.GetArenaTeamById(GetArenaTeamId(i)))
{
uint32 p_rating = GetArenaPersonalRating(i);
uint32 t_rating = at->GetRating();
@@ -20236,7 +20236,7 @@ void Player::SetBattlegroundEntryPoint()
// If map is dungeon find linked graveyard
if (GetMap()->IsDungeon())
{
- if (const WorldSafeLocsEntry* entry = objmgr.GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam()))
+ if (const WorldSafeLocsEntry* entry = sObjectMgr.GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam()))
{
m_bgData.joinPos = WorldLocation(entry->map_id, entry->x, entry->y, entry->z, 0.0f);
return;
@@ -20321,7 +20321,7 @@ void Player::ReportedAfkBy(Player* reporter)
WorldLocation Player::GetStartPosition() const
{
- PlayerInfo const *info = objmgr.GetPlayerInfo(getRace(), getClass());
+ PlayerInfo const *info = sObjectMgr.GetPlayerInfo(getRace(), getClass());
uint32 mapId = info->mapId;
if (getClass() == CLASS_DEATH_KNIGHT && HasSpell(50977))
mapId = 0;
@@ -21045,7 +21045,7 @@ void Player::resetSpells(bool myClassOnly)
continue;
// skip spells with first rank learned as talent (and all talents then also)
- uint32 first_rank = spellmgr.GetFirstSpellInChain(spellInfo->Id);
+ uint32 first_rank = sSpellMgr.GetFirstSpellInChain(spellInfo->Id);
if (GetTalentSpellCost(first_rank) > 0)
continue;
@@ -21065,7 +21065,7 @@ void Player::resetSpells(bool myClassOnly)
void Player::learnDefaultSpells()
{
// learn default race/class spells
- PlayerInfo const *info = objmgr.GetPlayerInfo(getRace(),getClass());
+ PlayerInfo const *info = sObjectMgr.GetPlayerInfo(getRace(),getClass());
for (PlayerCreateInfoSpells::const_iterator itr = info->spell.begin(); itr != info->spell.end(); ++itr)
{
uint32 tspell = *itr;
@@ -21114,10 +21114,10 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
// prevent learn non first rank unknown profession and second specialization for same profession)
uint32 learned_0 = spellInfo->EffectTriggerSpell[0];
- if (spellmgr.GetSpellRank(learned_0) > 1 && !HasSpell(learned_0))
+ if (sSpellMgr.GetSpellRank(learned_0) > 1 && !HasSpell(learned_0))
{
// not have first rank learned (unlearned prof?)
- uint32 first_spell = spellmgr.GetFirstSpellInChain(learned_0);
+ uint32 first_spell = sSpellMgr.GetFirstSpellInChain(learned_0);
if (!HasSpell(first_spell))
return;
@@ -21125,7 +21125,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
if (!learnedInfo)
return;
- SpellsRequiringSpellMapBounds spellsRequired = spellmgr.GetSpellsRequiredForSpellBounds(learned_0);
+ SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr.GetSpellsRequiredForSpellBounds(learned_0);
for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequired.first; itr2 != spellsRequired.second; ++itr2)
{
uint32 profSpell = itr2->second;
@@ -21148,7 +21148,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
continue;
// compare same chain spells
- if (spellmgr.IsSpellRequiringSpell(itr->first, profSpell))
+ if (sSpellMgr.IsSpellRequiringSpell(itr->first, profSpell))
return;
}
}
@@ -21167,7 +21167,7 @@ void Player::learnQuestRewardedSpells()
if (!itr->second.m_rewarded)
continue;
- Quest const* quest = objmgr.GetQuestTemplate(itr->first);
+ Quest const* quest = sObjectMgr.GetQuestTemplate(itr->first);
if (!quest)
continue;
@@ -21338,7 +21338,7 @@ bool Player::IsSpellFitByClassAndRace(uint32 spell_id) const
uint32 racemask = getRaceMask();
uint32 classmask = getClassMask();
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spell_id);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spell_id);
if (bounds.first == bounds.second)
return true;
@@ -21374,7 +21374,7 @@ bool Player::HasQuestForGO(int32 GOId) const
if (qs.m_status == QUEST_STATUS_INCOMPLETE)
{
- Quest const* qinfo = objmgr.GetQuestTemplate(questid);
+ Quest const* qinfo = sObjectMgr.GetQuestTemplate(questid);
if (!qinfo)
continue;
@@ -21418,7 +21418,7 @@ void Player::UpdateForQuestWorldObjects()
if (!obj->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_SPELLCLICK))
continue;
- SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(obj->GetEntry());
+ SpellClickInfoMapBounds clickPair = sObjectMgr.GetSpellClickInfoMapBounds(obj->GetEntry());
for (SpellClickInfoMap::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
if (_itr->second.questStart || _itr->second.questEnd)
{
@@ -21883,7 +21883,7 @@ void Player::SetClientControl(Unit* target, uint8 allowMove)
void Player::UpdateZoneDependentAuras(uint32 newZone)
{
// Some spells applied at enter into zone (with subzones), aura removed in UpdateAreaDependentAuras that called always at zone->area update
- SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAreaMapBounds(newZone);
+ SpellAreaForAreaMapBounds saBounds = sSpellMgr.GetSpellAreaForAreaMapBounds(newZone);
for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
if (itr->second->autocast && itr->second->IsFitToRequirements(this,newZone,0))
if (!HasAura(itr->second->spellId))
@@ -21896,14 +21896,14 @@ void Player::UpdateAreaDependentAuras(uint32 newArea)
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
{
// use m_zoneUpdateId for speed: UpdateArea called from UpdateZone or instead UpdateZone in both cases m_zoneUpdateId up-to-date
- if (spellmgr.GetSpellAllowedInLocationError(iter->second->GetSpellProto(),GetMapId(),m_zoneUpdateId,newArea,this) != SPELL_CAST_OK)
+ if (sSpellMgr.GetSpellAllowedInLocationError(iter->second->GetSpellProto(),GetMapId(),m_zoneUpdateId,newArea,this) != SPELL_CAST_OK)
RemoveOwnedAura(iter);
else
++iter;
}
// some auras applied at subzone enter
- SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAreaMapBounds(newArea);
+ SpellAreaForAreaMapBounds saBounds = sSpellMgr.GetSpellAreaForAreaMapBounds(newArea);
for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
if (itr->second->autocast && itr->second->IsFitToRequirements(this,m_zoneUpdateId,newArea))
if (!HasAura(itr->second->spellId))
@@ -22618,7 +22618,7 @@ void Player::learnSpellHighRank(uint32 spellid)
{
learnSpell(spellid, false);
- if (uint32 next = spellmgr.GetNextSpellInChain(spellid))
+ if (uint32 next = sSpellMgr.GetNextSpellInChain(spellid))
learnSpellHighRank(next);
}
@@ -22760,7 +22760,7 @@ uint8 Player::CanEquipUniqueItem(Item* pItem, uint8 eslot, uint32 limit_count) c
if (!enchantEntry)
continue;
- ItemPrototype const* pGem = objmgr.GetItemPrototype(enchantEntry->GemID);
+ ItemPrototype const* pGem = sObjectMgr.GetItemPrototype(enchantEntry->GemID);
if (!pGem)
continue;
@@ -23171,7 +23171,7 @@ bool Player::canSeeSpellClickOn(Creature const *c) const
if (!c->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_SPELLCLICK))
return false;
- SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(c->GetEntry());
+ SpellClickInfoMapBounds clickPair = sObjectMgr.GetSpellClickInfoMapBounds(c->GetEntry());
if (clickPair.first == clickPair.second)
return true;
@@ -23428,7 +23428,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
if (eqset.Guid == 0)
{
- eqslot.Guid = objmgr.GenerateEquipmentSetGuid();
+ eqslot.Guid = sObjectMgr.GenerateEquipmentSetGuid();
WorldPacket data(SMSG_EQUIPMENT_SET_SAVED, 4 + 1);
data << uint32(index);
@@ -23816,7 +23816,7 @@ uint32 Player::GetReputation(uint32 factionentry)
}
std::string Player::GetGuildName()
{
- return objmgr.GetGuildById(GetGuildId())->GetName();
+ return sObjectMgr.GetGuildById(GetGuildId())->GetName();
}
void Player::SendDuelCountdown(uint32 counter)
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index 0de95352d19..68c30058c44 100644
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -117,7 +117,7 @@ void PlayerSocial::SetFriendNote(uint32 friend_guid, std::string note)
void PlayerSocial::SendSocialList()
{
- Player *plr = objmgr.GetPlayer(GetPlayerGUID());
+ Player *plr = sObjectMgr.GetPlayer(GetPlayerGUID());
if (!plr)
return;
diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp
index 13b55da7231..e7326127edc 100644
--- a/src/server/game/Entities/Totem/Totem.cpp
+++ b/src/server/game/Entities/Totem/Totem.cpp
@@ -59,8 +59,8 @@ void Totem::InitStats(uint32 duration)
CreatureInfo const *cinfo = GetCreatureInfo();
if (m_owner->GetTypeId() == TYPEID_PLAYER && cinfo)
{
- uint32 display_id = objmgr.ChooseDisplayId(m_owner->ToPlayer()->GetTeam(), cinfo);
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
+ uint32 display_id = sObjectMgr.ChooseDisplayId(m_owner->ToPlayer()->GetTeam(), cinfo);
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
switch (m_owner->ToPlayer()->GetTeam())
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 55b840d94e4..c30a18abbd7 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -55,11 +55,11 @@ void MapManager::LoadTransports()
uint32 entry = fields[0].GetUInt32();
std::string name = fields[1].GetCppString();
uint32 period = fields[2].GetUInt32();
- uint32 scriptId = objmgr.GetScriptId(fields[3].GetString());
+ uint32 scriptId = sObjectMgr.GetScriptId(fields[3].GetString());
Transport *t = new Transport(period, scriptId);
- const GameObjectInfo *goinfo = objmgr.GetGameObjectInfo(entry);
+ const GameObjectInfo *goinfo = sObjectMgr.GetGameObjectInfo(entry);
if (!goinfo)
{
@@ -197,7 +197,7 @@ bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z,
Object::_Create(guidlow, 0, HIGHGUID_MO_TRANSPORT);
- GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(guidlow);
+ GameObjectInfo const* goinfo = sObjectMgr.GetGameObjectInfo(guidlow);
if (!goinfo)
{
@@ -642,7 +642,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y,
Map* map = GetMap();
Creature* pCreature = new Creature;
- if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), GetMap(), this->GetPhaseMask(), entry, 0, (uint32)(this->GetGOInfo()->faction), 0, 0, 0, 0))
+ if (!pCreature->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT), GetMap(), this->GetPhaseMask(), entry, 0, (uint32)(this->GetGOInfo()->faction), 0, 0, 0, 0))
{
delete pCreature;
return 0;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 62e600bd205..a021126225f 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -655,7 +655,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
// some critters required for quests (need normal entry instead possible heroic in any cases)
if (GetTypeId() == TYPEID_PLAYER)
- if (CreatureInfo const* normalInfo = objmgr.GetCreatureTemplate(pVictim->GetEntry()))
+ if (CreatureInfo const* normalInfo = sObjectMgr.GetCreatureTemplate(pVictim->GetEntry()))
this->ToPlayer()->KilledMonster(normalInfo,pVictim->GetGUID());
}
else
@@ -1948,8 +1948,8 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
int32 remainingHp = (int32)pVictim->GetHealth() - RemainingDamage;
// min pct of hp is stored in effect 0 of talent spell
- uint32 rank = spellmgr.GetSpellRank(spellProto->Id);
- SpellEntry const * talentProto = sSpellStore.LookupEntry(spellmgr.GetSpellWithRank(49189, rank));
+ uint32 rank = sSpellMgr.GetSpellRank(spellProto->Id);
+ SpellEntry const * talentProto = sSpellStore.LookupEntry(sSpellMgr.GetSpellWithRank(49189, rank));
int32 minHp = (float)pVictim->GetMaxHealth() * (float)SpellMgr::CalculateSpellEffectAmount(talentProto, 0, (*i)->GetCaster()) / 100.0f;
// Damage that would take you below [effect0] health or taken while you are at [effect0]
@@ -3918,7 +3918,7 @@ bool Unit::_IsNoStackAuraDueToAura(Aura * appliedAura, Aura * existingAura) cons
return false;
// passive non-stackable spells not stackable only with another rank of same spell
- if (!spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId))
+ if (!sSpellMgr.IsRankSpellDueToSpell(spellProto, i_spellId))
return false;
}
@@ -3938,7 +3938,7 @@ bool Unit::_IsNoStackAuraDueToAura(Aura * appliedAura, Aura * existingAura) cons
if (is_triggered_by_spell)
return false;
- if (spellmgr.CanAurasStack(spellProto, i_spellProto, sameCaster))
+ if (sSpellMgr.CanAurasStack(spellProto, i_spellProto, sameCaster))
return false;
return true;
}
@@ -4516,12 +4516,12 @@ AuraEffect * Unit::GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster)
AuraEffect * Unit::GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 caster) const
{
- uint32 rankSpell = spellmgr.GetFirstSpellInChain(spellId);
+ uint32 rankSpell = sSpellMgr.GetFirstSpellInChain(spellId);
while (true)
{
if (AuraEffect * aurEff = GetAuraEffect(rankSpell, effIndex, caster))
return aurEff;
- SpellChainNode const * chainNode = spellmgr.GetSpellChainNode(rankSpell);
+ SpellChainNode const * chainNode = sSpellMgr.GetSpellChainNode(rankSpell);
if (!chainNode)
break;
else
@@ -4579,12 +4579,12 @@ Aura * Unit::GetAura(uint32 spellId, uint64 casterGUID, uint8 reqEffMask) const
AuraApplication * Unit::GetAuraApplicationOfRankedSpel(uint32 spellId, uint64 casterGUID, uint8 reqEffMask, AuraApplication * except) const
{
- uint32 rankSpell = spellmgr.GetFirstSpellInChain(spellId);
+ uint32 rankSpell = sSpellMgr.GetFirstSpellInChain(spellId);
while (true)
{
if (AuraApplication * aurApp = GetAuraApplication(rankSpell, casterGUID, reqEffMask, except))
return aurApp;
- SpellChainNode const * chainNode = spellmgr.GetSpellChainNode(rankSpell);
+ SpellChainNode const * chainNode = sSpellMgr.GetSpellChainNode(rankSpell);
if (!chainNode)
break;
else
@@ -5321,7 +5321,7 @@ bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
}
// default case
- if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
+ if ((!target && !sSpellMgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
return false;
if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id))
@@ -7463,7 +7463,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// Lightning Shield
if (AuraEffect const * aurEff = GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN, 0x400, 0, 0))
{
- uint32 spell = spellmgr.GetSpellWithRank(26364, spellmgr.GetSpellRank(aurEff->GetId()));
+ uint32 spell = sSpellMgr.GetSpellWithRank(26364, sSpellMgr.GetSpellRank(aurEff->GetId()));
// custom cooldown processing case
if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(spell))
@@ -7668,7 +7668,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if (spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT
&& spellProto->SpellFamilyFlags[0] & 0x2000)
{
- SpellChainNode const* newChain = spellmgr.GetSpellChainNode(itr->first);
+ SpellChainNode const* newChain = sSpellMgr.GetSpellChainNode(itr->first);
// No chain entry or entry lower than found entry
if (!chain || !newChain || (chain->rank < newChain->rank))
@@ -7756,7 +7756,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
}
// default case
- if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
+ if ((!target && !sSpellMgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
return false;
if (cooldown_spell_id == 0)
@@ -7818,7 +7818,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffe
}
// default case
- if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
+ if ((!target && !sSpellMgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
return false;
if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id))
@@ -7875,7 +7875,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 /*damage*/, Aur
}
// default case
- if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
+ if ((!target && !sSpellMgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
return false;
if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id))
@@ -8403,7 +8403,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
// Lightning Shield (overwrite non existing triggered spell call in spell.dbc
if (auraSpellInfo->SpellFamilyFlags[0] & 0x400)
{
- trigger_spell_id = spellmgr.GetSpellWithRank(26364, spellmgr.GetSpellRank(auraSpellInfo->Id));
+ trigger_spell_id = sSpellMgr.GetSpellWithRank(26364, sSpellMgr.GetSpellRank(auraSpellInfo->Id));
}
// Nature's Guardian
else if (auraSpellInfo->SpellIconID == 2013)
@@ -8694,7 +8694,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
{
// have rank dependent proc chance, ignore too often cases
// PPM = 2.5 * (rank of talent),
- uint32 rank = spellmgr.GetSpellRank(auraSpellInfo->Id);
+ uint32 rank = sSpellMgr.GetSpellRank(auraSpellInfo->Id);
// 5 rank -> 100% 4 rank -> 80% and etc from full rate
if (!roll_chance_i(20*rank))
return false;
@@ -8770,7 +8770,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
target = !(procFlags & (PROC_FLAG_SUCCESSFUL_POSITIVE_MAGIC_SPELL | PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL_HIT)) && IsPositiveSpell(trigger_spell_id) ? this : pVictim;
// default case
- if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
+ if ((!target && !sSpellMgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
return false;
if (basepoints0)
@@ -10183,7 +10183,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
{
if (pVictim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0,0x02000000,0))
{
- if (SpellChainNode const *chain = spellmgr.GetSpellChainNode((*i)->GetId()))
+ if (SpellChainNode const *chain = sSpellMgr.GetSpellChainNode((*i)->GetId()))
DoneTotalMod *= (chain->rank * 2.0f + 100.0f)/100.0f;
}
break;
@@ -10401,7 +10401,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
// Check for table values
float coeff = 0;
- SpellBonusEntry const *bonus = spellmgr.GetSpellBonusData(spellProto->Id);
+ SpellBonusEntry const *bonus = sSpellMgr.GetSpellBonusData(spellProto->Id);
if (bonus)
{
if (damagetype == DOT)
@@ -10909,7 +10909,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
}
// Check for table values
- SpellBonusEntry const* bonus = !scripted ? spellmgr.GetSpellBonusData(spellProto->Id) : NULL;
+ SpellBonusEntry const* bonus = !scripted ? sSpellMgr.GetSpellBonusData(spellProto->Id) : NULL;
float coeff = 0;
float factorMod = 1.0f;
if (bonus)
@@ -11405,7 +11405,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
case 7293:
{
if (pVictim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0,0x02000000,0))
- if (SpellChainNode const *chain = spellmgr.GetSpellChainNode((*i)->GetId()))
+ if (SpellChainNode const *chain = sSpellMgr.GetSpellChainNode((*i)->GetId()))
DoneTotalMod *= (chain->rank * 2.0f + 100.0f)/100.0f;
break;
}
@@ -13598,14 +13598,14 @@ void CharmInfo::InitCharmCreateSpells()
bool CharmInfo::AddSpellToActionBar(uint32 spell_id, ActiveStates newstate)
{
- uint32 first_id = spellmgr.GetFirstSpellInChain(spell_id);
+ uint32 first_id = sSpellMgr.GetFirstSpellInChain(spell_id);
// new spell rank can be already listed
for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
{
if (uint32 action = PetActionBar[i].GetAction())
{
- if (PetActionBar[i].IsActionBarForSpell() && spellmgr.GetFirstSpellInChain(action) == first_id)
+ if (PetActionBar[i].IsActionBarForSpell() && sSpellMgr.GetFirstSpellInChain(action) == first_id)
{
PetActionBar[i].SetAction(spell_id);
return true;
@@ -13627,13 +13627,13 @@ bool CharmInfo::AddSpellToActionBar(uint32 spell_id, ActiveStates newstate)
bool CharmInfo::RemoveSpellFromActionBar(uint32 spell_id)
{
- uint32 first_id = spellmgr.GetFirstSpellInChain(spell_id);
+ uint32 first_id = sSpellMgr.GetFirstSpellInChain(spell_id);
for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
{
if (uint32 action = PetActionBar[i].GetAction())
{
- if (PetActionBar[i].IsActionBarForSpell() && spellmgr.GetFirstSpellInChain(action) == first_id)
+ if (PetActionBar[i].IsActionBarForSpell() && sSpellMgr.GetFirstSpellInChain(action) == first_id)
{
SetActionBar(i,0,ACT_PASSIVE);
return true;
@@ -14315,7 +14315,7 @@ void Unit::ClearComboPointHolders()
{
uint32 lowguid = *m_ComboPointHolders.begin();
- Player* plr = objmgr.GetPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER));
+ Player* plr = sObjectMgr.GetPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER));
if (plr && plr->GetComboTarget() == GetGUID()) // recheck for safe
plr->ClearComboPoints(); // remove also guid from m_ComboPointHolders;
else
@@ -14651,7 +14651,7 @@ Pet* Unit::CreateTamedPetFrom(uint32 creatureEntry, uint32 spell_id)
if (GetTypeId() != TYPEID_PLAYER)
return NULL;
- CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(creatureEntry);
+ CreatureInfo const* creatureInfo = sObjectMgr.GetCreatureTemplate(creatureEntry);
if (!creatureInfo)
return NULL;
@@ -14681,7 +14681,7 @@ bool Unit::InitTamedPet(Pet * pet, uint8 level, uint32 spell_id)
return false;
}
- pet->GetCharmInfo()->SetPetNumber(objmgr.GeneratePetNumber(), true);
+ pet->GetCharmInfo()->SetPetNumber(sObjectMgr.GeneratePetNumber(), true);
// this enables pet details window (Shift+P)
pet->InitPetCreateSpells();
//pet->InitLevelupSpellsForLevel();
@@ -14694,7 +14694,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
SpellEntry const *spellProto = aura->GetSpellProto();
// Get proc Event Entry
- spellProcEvent = spellmgr.GetSpellProcEvent(spellProto->Id);
+ spellProcEvent = sSpellMgr.GetSpellProcEvent(spellProto->Id);
// Get EventProcFlag
uint32 EventProcFlag;
@@ -14714,7 +14714,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
}
// Check spellProcEvent data requirements
- if (!spellmgr.IsSpellProcEventCanTriggeredBy(spellProcEvent, EventProcFlag, procSpell, procFlag, procExtra, active))
+ if (!sSpellMgr.IsSpellProcEventCanTriggeredBy(spellProcEvent, EventProcFlag, procSpell, procFlag, procExtra, active))
return false;
// In most cases req get honor or XP from kill
if (EventProcFlag & PROC_FLAG_KILL && GetTypeId() == TYPEID_PLAYER)
@@ -14949,7 +14949,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
group->UpdateLooterGuid(creature, true);
if (group->GetLooterGuid())
{
- pLooter = objmgr.GetPlayer(group->GetLooterGuid());
+ pLooter = sObjectMgr.GetPlayer(group->GetLooterGuid());
if (pLooter)
{
creature->SetLootRecipient(pLooter); // update creature loot recipient to the allowed looter.
@@ -15105,7 +15105,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
// the reset time is set but not added to the scheduler
// until the players leave the instance
time_t resettime = creature->GetRespawnTimeEx() + 2 * HOUR;
- if (InstanceSave *save = sInstanceSaveManager.GetInstanceSave(creature->GetInstanceId()))
+ if (InstanceSave *save = sInstanceSaveMgr.GetInstanceSave(creature->GetInstanceId()))
if (save->GetResetTime() < resettime) save->SetResetTime(resettime);
}
}
@@ -15452,7 +15452,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type)
//just to enable stat window
if (GetCharmInfo())
- GetCharmInfo()->SetPetNumber(objmgr.GeneratePetNumber(), true);
+ GetCharmInfo()->SetPetNumber(sObjectMgr.GeneratePetNumber(), true);
//if charmed two demons the same session, the 2nd gets the 1st one's name
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 6d0d78f6a32..2f6dfc2c98f 100644
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -115,7 +115,7 @@ void Vehicle::Install()
void Vehicle::InstallAllAccessories()
{
- VehicleAccessoryList const* mVehicleList = objmgr.GetVehicleAccessoryList(me->GetEntry());
+ VehicleAccessoryList const* mVehicleList = sObjectMgr.GetVehicleAccessoryList(me->GetEntry());
if (!mVehicleList)
return;
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index c69d9961dd6..4f9fc0f5b9a 100644
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -521,7 +521,7 @@ void GameEventMgr::LoadFromDB()
if (newModelEquipSet.equipment_id > 0)
{
- if (!objmgr.GetEquipmentInfo(newModelEquipSet.equipment_id))
+ if (!sObjectMgr.GetEquipmentInfo(newModelEquipSet.equipment_id))
{
sLog.outErrorDb("Table `game_event_model_equip` have creature (Guid: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", guid, newModelEquipSet.equipment_id);
continue;
@@ -870,11 +870,11 @@ void GameEventMgr::LoadFromDB()
// get creature entry
newEntry.entry = 0;
- if (CreatureData const* data = objmgr.GetCreatureData(guid))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(guid))
newEntry.entry = data->id;
// check validity with event's npcflag
- if (!objmgr.IsVendorItemValid(newEntry.entry, newEntry.item, newEntry.maxcount, newEntry.incrtime, newEntry.ExtendedCost, NULL, NULL, event_npc_flag))
+ if (!sObjectMgr.IsVendorItemValid(newEntry.entry, newEntry.item, newEntry.maxcount, newEntry.incrtime, newEntry.ExtendedCost, NULL, NULL, event_npc_flag))
continue;
++count;
vendors.push_back(newEntry);
@@ -1015,7 +1015,7 @@ void GameEventMgr::LoadFromDB()
continue;
}
- if (!poolhandler.CheckPool(entry))
+ if (!sPoolMgr.CheckPool(entry))
{
sLog.outErrorDb("Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", entry);
continue;
@@ -1212,7 +1212,7 @@ void GameEventMgr::UpdateEventNPCFlags(uint16 event_id)
for (NPCFlagList::iterator itr = mGameEventNPCFlags[event_id].begin(); itr != mGameEventNPCFlags[event_id].end(); ++itr)
{
// get the creature data from the low guid to get the entry, to be able to find out the whole guid
- if (CreatureData const* data = objmgr.GetCreatureData(itr->first))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(itr->first))
{
Creature * cr = HashMapHolder<Creature>::Find(MAKE_NEW_GUID(itr->first,data->id,HIGHGUID_UNIT));
// if we found the creature, modify its npcflag
@@ -1243,9 +1243,9 @@ void GameEventMgr::UpdateEventNPCVendor(uint16 event_id, bool activate)
for (NPCVendorList::iterator itr = mGameEventVendors[event_id].begin(); itr != mGameEventVendors[event_id].end(); ++itr)
{
if (activate)
- objmgr.AddVendorItem(itr->entry, itr->item, itr->maxcount, itr->incrtime, itr->ExtendedCost, false);
+ sObjectMgr.AddVendorItem(itr->entry, itr->item, itr->maxcount, itr->incrtime, itr->ExtendedCost, false);
else
- objmgr.RemoveVendorItem(itr->entry, itr->item, false);
+ sObjectMgr.RemoveVendorItem(itr->entry, itr->item, false);
}
}
@@ -1262,9 +1262,9 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
for (GuidList::iterator itr = mGameEventCreatureGuids[internal_event_id].begin(); itr != mGameEventCreatureGuids[internal_event_id].end(); ++itr)
{
// Add to correct cell
- if (CreatureData const* data = objmgr.GetCreatureData(*itr))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(*itr))
{
- objmgr.AddCreatureToGrid(*itr, data);
+ sObjectMgr.AddCreatureToGrid(*itr, data);
// Spawn if necessary (loaded grids only)
Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
@@ -1290,9 +1290,9 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
for (GuidList::iterator itr = mGameEventGameobjectGuids[internal_event_id].begin(); itr != mGameEventGameobjectGuids[internal_event_id].end(); ++itr)
{
// Add to correct cell
- if (GameObjectData const* data = objmgr.GetGOData(*itr))
+ if (GameObjectData const* data = sObjectMgr.GetGOData(*itr))
{
- objmgr.AddGameobjectToGrid(*itr, data);
+ sObjectMgr.AddGameobjectToGrid(*itr, data);
// Spawn if necessary (loaded grids only)
// this base map checked as non-instanced and then only existed
Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
@@ -1319,7 +1319,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
}
for (IdList::iterator itr = mGameEventPoolIds[internal_event_id].begin(); itr != mGameEventPoolIds[internal_event_id].end(); ++itr)
- poolhandler.SpawnPool(*itr);
+ sPoolMgr.SpawnPool(*itr);
}
void GameEventMgr::GameEventUnspawn(int16 event_id)
@@ -1338,9 +1338,9 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if (event_id > 0 && hasCreatureActiveEventExcept(*itr,event_id))
continue;
// Remove the creature from grid
- if (CreatureData const* data = objmgr.GetCreatureData(*itr))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(*itr))
{
- objmgr.RemoveCreatureFromGrid(*itr, data);
+ sObjectMgr.RemoveCreatureFromGrid(*itr, data);
if (Creature* pCreature = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_UNIT), (Creature*)NULL))
pCreature->AddObjectToRemoveList();
@@ -1359,9 +1359,9 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if (event_id >0 && hasGameObjectActiveEventExcept(*itr,event_id))
continue;
// Remove the gameobject from grid
- if (GameObjectData const* data = objmgr.GetGOData(*itr))
+ if (GameObjectData const* data = sObjectMgr.GetGOData(*itr))
{
- objmgr.RemoveGameobjectFromGrid(*itr, data);
+ sObjectMgr.RemoveGameobjectFromGrid(*itr, data);
if (GameObject* pGameobject = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
pGameobject->AddObjectToRemoveList();
@@ -1375,7 +1375,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
for (IdList::iterator itr = mGameEventPoolIds[internal_event_id].begin(); itr != mGameEventPoolIds[internal_event_id].end(); ++itr)
{
- poolhandler.DespawnPool(*itr);
+ sPoolMgr.DespawnPool(*itr);
}
}
@@ -1384,7 +1384,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
for (ModelEquipList::iterator itr = mGameEventModelEquip[event_id].begin(); itr != mGameEventModelEquip[event_id].end(); ++itr)
{
// Remove the creature from grid
- CreatureData const* data = objmgr.GetCreatureData(itr->first);
+ CreatureData const* data = sObjectMgr.GetCreatureData(itr->first);
if (!data)
continue;
@@ -1399,7 +1399,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
pCreature->LoadEquipment(itr->second.equipment_id, true);
if (itr->second.modelid >0 && itr->second.modelid_prev != itr->second.modelid)
{
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelInfo(itr->second.modelid);
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelInfo(itr->second.modelid);
if (minfo)
{
pCreature->SetDisplayId(itr->second.modelid);
@@ -1414,7 +1414,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
pCreature->LoadEquipment(itr->second.equipement_id_prev, true);
if (itr->second.modelid_prev >0 && itr->second.modelid_prev != itr->second.modelid)
{
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelInfo(itr->second.modelid_prev);
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelInfo(itr->second.modelid_prev);
if (minfo)
{
pCreature->SetDisplayId(itr->second.modelid_prev);
@@ -1427,12 +1427,12 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
}
else // If not spawned
{
- CreatureData const* data2 = objmgr.GetCreatureData(itr->first);
+ CreatureData const* data2 = sObjectMgr.GetCreatureData(itr->first);
if (data2 && activate)
{
- CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(data2->id);
- uint32 display_id = objmgr.ChooseDisplayId(0,cinfo,data2);
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
+ CreatureInfo const *cinfo = sObjectMgr.GetCreatureTemplate(data2->id);
+ uint32 display_id = sObjectMgr.ChooseDisplayId(0,cinfo,data2);
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
@@ -1445,7 +1445,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
}
// now last step: put in data
// just to have write access to it
- CreatureData& data2 = objmgr.NewOrExistCreatureData(itr->first);
+ CreatureData& data2 = sObjectMgr.NewOrExistCreatureData(itr->first);
if (activate)
{
data2.displayid = itr->second.modelid;
@@ -1524,7 +1524,7 @@ void GameEventMgr::UpdateEventQuests(uint16 event_id, bool activate)
QuestRelList::iterator itr;
for (itr = mGameEventCreatureQuests[event_id].begin(); itr != mGameEventCreatureQuests[event_id].end(); ++itr)
{
- QuestRelations &CreatureQuestMap = objmgr.mCreatureQuestRelations;
+ QuestRelations &CreatureQuestMap = sObjectMgr.mCreatureQuestRelations;
if (activate) // Add the pair(id,quest) to the multimap
CreatureQuestMap.insert(QuestRelations::value_type(itr->first, itr->second));
else
@@ -1549,7 +1549,7 @@ void GameEventMgr::UpdateEventQuests(uint16 event_id, bool activate)
}
for (itr = mGameEventGameObjectQuests[event_id].begin(); itr != mGameEventGameObjectQuests[event_id].end(); ++itr)
{
- QuestRelations &GameObjectQuestMap = objmgr.mGOQuestRelations;
+ QuestRelations &GameObjectQuestMap = sObjectMgr.mGOQuestRelations;
if (activate) // Add the pair(id,quest) to the multimap
GameObjectQuestMap.insert(QuestRelations::value_type(itr->first, itr->second));
else
@@ -1701,8 +1701,8 @@ bool IsHolidayActive(HolidayIds id)
if (id == HOLIDAY_NONE)
return false;
- GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
- GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
+ GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
+ GameEventMgr::ActiveEvents const& ae = sGameEventMgr.GetActiveEventList();
for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
if (events[*itr].holiday_id == uint32(id))
@@ -1713,6 +1713,6 @@ bool IsHolidayActive(HolidayIds id)
bool IsEventActive(uint16 event_id)
{
- GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
+ GameEventMgr::ActiveEvents const& ae = sGameEventMgr.GetActiveEventList();
return ae.find(event_id) != ae.end();
}
diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h
index e916d35f1d9..3d35e74a699 100644
--- a/src/server/game/Events/GameEventMgr.h
+++ b/src/server/game/Events/GameEventMgr.h
@@ -174,10 +174,10 @@ class GameEventMgr
GameEventGuidMap mGameEventGameobjectGuids;
};
-#define gameeventmgr (*ACE_Singleton<GameEventMgr, ACE_Null_Mutex>::instance())
+#define sGameEventMgr (*ACE_Singleton<GameEventMgr, ACE_Null_Mutex>::instance())
- bool IsHolidayActive(HolidayIds id);
- bool IsEventActive(uint16 event_id);
+bool IsHolidayActive(HolidayIds id);
+bool IsEventActive(uint16 event_id);
#endif
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index 2927be424ed..5f6806aa74e 100644
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
@@ -223,7 +223,7 @@ void ObjectAccessor::RemoveCorpse(Corpse* corpse)
CellPair cell_pair = Trinity::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY());
uint32 cell_id = (cell_pair.y_coord * TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
- objmgr.DeleteCorpseCellData(corpse->GetMapId(), cell_id, corpse->GetOwnerGUID());
+ sObjectMgr.DeleteCorpseCellData(corpse->GetMapId(), cell_id, corpse->GetOwnerGUID());
i_player2corpse.erase(iter);
}
@@ -244,7 +244,7 @@ void ObjectAccessor::AddCorpse(Corpse* corpse)
CellPair cell_pair = Trinity::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY());
uint32 cell_id = (cell_pair.y_coord * TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
- objmgr.AddCorpseCellData(corpse->GetMapId(), cell_id, corpse->GetOwnerGUID(), corpse->GetInstanceId());
+ sObjectMgr.AddCorpseCellData(corpse->GetMapId(), cell_id, corpse->GetOwnerGUID(), corpse->GetInstanceId());
}
}
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 7ed5a5a4103..4d3b43a2fdf 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -480,7 +480,7 @@ struct SQLCreatureLoader : public SQLStorageLoaderBase<SQLCreatureLoader>
template<class D>
void convert_from_str(uint32 /*field_pos*/, char *src, D &dst)
{
- dst = D(objmgr.GetScriptId(src));
+ dst = D(sObjectMgr.GetScriptId(src));
}
};
@@ -1230,7 +1230,7 @@ void ObjectMgr::LoadCreatures()
spawnMasks[i] |= (1 << k);
//TODO: remove this
- //gameeventmgr.mGameEventCreatureGuids.resize(52*2-1);
+ //sGameEventMgr.mGameEventCreatureGuids.resize(52*2-1);
barGoLink bar(result->GetRowCount());
@@ -1353,14 +1353,14 @@ void ObjectMgr::LoadCreatures()
/*if (entry == 30739 || entry == 30740)
{
gameEvent = 51;
- uint32 guid2 = objmgr.GenerateLowGuid(HIGHGUID_UNIT);
+ uint32 guid2 = sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT);
CreatureData& data2 = mCreatureDataMap[guid2];
data2 = data;
// data2.id = (entry == 32307 ? 32308 : 32307);
data2.id = (entry == 30739 ? 30740 : 30739);
data2.displayid = 0;
- gameeventmgr.mGameEventCreatureGuids[51+51].push_back(guid);
- gameeventmgr.mGameEventCreatureGuids[51+50].push_back(guid2);
+ sGameEventMgr.mGameEventCreatureGuids[51+51].push_back(guid);
+ sGameEventMgr.mGameEventCreatureGuids[51+50].push_back(guid2);
}*/
if (gameEvent == 0 && PoolId == 0) // if not this is to be managed by GameEvent System or Pool system
@@ -1498,7 +1498,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
return 0;
uint32 level = cInfo->minlevel == cInfo->maxlevel ? cInfo->minlevel : urand(cInfo->minlevel, cInfo->maxlevel); // Only used for extracting creature base stats
- CreatureBaseStats const* stats = objmgr.GetCreatureBaseStats(level, cInfo->unit_class);
+ CreatureBaseStats const* stats = sObjectMgr.GetCreatureBaseStats(level, cInfo->unit_class);
uint32 guid = GenerateLowGuid(HIGHGUID_UNIT);
CreatureData& data = NewOrExistCreatureData(guid);
@@ -1941,7 +1941,7 @@ struct SQLItemLoader : public SQLStorageLoaderBase<SQLItemLoader>
template<class D>
void convert_from_str(uint32 /*field_pos*/, char *src, D &dst)
{
- dst = D(objmgr.GetScriptId(src));
+ dst = D(sObjectMgr.GetScriptId(src));
}
};
@@ -3639,7 +3639,7 @@ void ObjectMgr::LoadGroups()
diff = 0; // default for both difficaly types
}
- InstanceSave *save = sInstanceSaveManager.AddInstanceSave(mapEntry->MapID, fields[2].GetUInt32(), Difficulty(diff), time_t(fields[5].GetUInt64()), fields[6].GetBool(), true);
+ InstanceSave *save = sInstanceSaveMgr.AddInstanceSave(mapEntry->MapID, fields[2].GetUInt32(), Difficulty(diff), time_t(fields[5].GetUInt64()), fields[6].GetBool(), true);
group->BindToInstance(save, fields[3].GetBool(), true);
++count;
}while (result->NextRow());
@@ -4949,7 +4949,7 @@ void ObjectMgr::LoadSpellScriptNames()
if (allRanks)
{
- if (spellmgr.GetFirstSpellInChain(spellId) != spellId)
+ if (sSpellMgr.GetFirstSpellInChain(spellId) != spellId)
{
sLog.outErrorDb("Scriptname:`%s` spell (spell_id:%d) is not first rank of spell.",scriptName,fields[0].GetInt32());
continue;
@@ -4957,7 +4957,7 @@ void ObjectMgr::LoadSpellScriptNames()
while(spellId)
{
mSpellScripts.insert(SpellScriptsMap::value_type(spellId, GetScriptId(scriptName)));
- spellId = spellmgr.GetNextSpellInChain(spellId);
+ spellId = sSpellMgr.GetNextSpellInChain(spellId);
}
}
else
@@ -4994,7 +4994,7 @@ void ObjectMgr::ValidateSpellScripts()
{
bar.step();
sitr->first->Register();
- if (!sitr->first->_Validate(spellEntry, objmgr.GetScriptName(sitr->second->second)))
+ if (!sitr->first->_Validate(spellEntry, sObjectMgr.GetScriptName(sitr->second->second)))
mSpellScripts.erase(sitr->second);
delete sitr->first;
}
@@ -5102,7 +5102,7 @@ struct SQLInstanceLoader : public SQLStorageLoaderBase<SQLInstanceLoader>
template<class D>
void convert_from_str(uint32 /*field_pos*/, char *src, D &dst)
{
- dst = D(objmgr.GetScriptId(src));
+ dst = D(sObjectMgr.GetScriptId(src));
}
};
@@ -5605,7 +5605,7 @@ uint32 ObjectMgr::GetTaxiMountDisplayId(uint32 id, uint32 team, bool allowed_alt
}
}
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(mount_id);
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(mount_id);
if (minfo)
mount_id = minfo->modelid;
@@ -6056,7 +6056,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
if (mapEntry->IsDungeon())
{
- const InstanceTemplate *iTemplate = objmgr.GetInstanceTemplate(Map);
+ const InstanceTemplate *iTemplate = sObjectMgr.GetInstanceTemplate(Map);
if (!iTemplate)
return NULL;
@@ -6337,7 +6337,7 @@ struct SQLGameObjectLoader : public SQLStorageLoaderBase<SQLGameObjectLoader>
template<class D>
void convert_from_str(uint32 /*field_pos*/, char *src, D &dst)
{
- dst = D(objmgr.GetScriptId(src));
+ dst = D(sObjectMgr.GetScriptId(src));
}
};
@@ -8776,7 +8776,7 @@ void ObjectMgr::LoadDbScriptStrings()
// Functions for scripting access
uint32 GetAreaTriggerScriptId(uint32 trigger_id)
{
- return objmgr.GetAreaTriggerScriptId(trigger_id);
+ return sObjectMgr.GetAreaTriggerScriptId(trigger_id);
}
bool LoadTrinityStrings(DatabaseType& db, char const* table,int32 start_value, int32 end_value)
@@ -8789,27 +8789,27 @@ bool LoadTrinityStrings(DatabaseType& db, char const* table,int32 start_value, i
return false;
}
- return objmgr.LoadTrinityStrings(db,table,start_value,end_value);
+ return sObjectMgr.LoadTrinityStrings(db,table,start_value,end_value);
}
uint32 GetScriptId(const char *name)
{
- return objmgr.GetScriptId(name);
+ return sObjectMgr.GetScriptId(name);
}
ObjectMgr::ScriptNameMap & GetScriptNames()
{
- return objmgr.GetScriptNames();
+ return sObjectMgr.GetScriptNames();
}
GameObjectInfo const *GetGameObjectInfo(uint32 id)
{
- return objmgr.GetGameObjectInfo(id);
+ return sObjectMgr.GetGameObjectInfo(id);
}
CreatureInfo const *GetCreatureInfo(uint32 id)
{
- return objmgr.GetCreatureTemplate(id);
+ return sObjectMgr.GetCreatureTemplate(id);
}
CreatureInfo const* GetCreatureTemplateStore(uint32 entry)
@@ -8819,7 +8819,7 @@ CreatureInfo const* GetCreatureTemplateStore(uint32 entry)
Quest const* GetQuestTemplateStore(uint32 entry)
{
- return objmgr.GetQuestTemplate(entry);
+ return sObjectMgr.GetQuestTemplate(entry);
}
uint64 ObjectMgr::GenerateGMTicketId()
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 0715375c615..1c910a7050f 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -1095,7 +1095,7 @@ class ObjectMgr
};
-#define objmgr (*ACE_Singleton<ObjectMgr, ACE_Null_Mutex>::instance())
+#define sObjectMgr (*ACE_Singleton<ObjectMgr, ACE_Null_Mutex>::instance())
// scripting access functions
bool LoadTrinityStrings(DatabaseType& db, char const* table,int32 start_value = MAX_CREATURE_AI_TEXT_STRING_ID, int32 end_value = std::numeric_limits<int32>::min());
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index 96f9fdd94ca..82946832ed2 100644
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -173,7 +173,7 @@ ObjectGridLoader::Visit(GameObjectMapType &m)
CellPair cell_pair(x,y);
uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
- CellObjectGuids const& cell_guids = objmgr.GetCellObjectGuids(i_map->GetId(), i_map->GetSpawnMode(), cell_id);
+ CellObjectGuids const& cell_guids = sObjectMgr.GetCellObjectGuids(i_map->GetId(), i_map->GetSpawnMode(), cell_id);
LoadHelper(cell_guids.gameobjects, cell_pair, m, i_gameObjects, i_map);
}
@@ -186,7 +186,7 @@ ObjectGridLoader::Visit(CreatureMapType &m)
CellPair cell_pair(x,y);
uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
- CellObjectGuids const& cell_guids = objmgr.GetCellObjectGuids(i_map->GetId(), i_map->GetSpawnMode(), cell_id);
+ CellObjectGuids const& cell_guids = sObjectMgr.GetCellObjectGuids(i_map->GetId(), i_map->GetSpawnMode(), cell_id);
LoadHelper(cell_guids.creatures, cell_pair, m, i_creatures, i_map);
}
@@ -200,7 +200,7 @@ ObjectWorldLoader::Visit(CorpseMapType &m)
uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
// corpses are always added to spawn mode 0 and they are spawned by their instance id
- CellObjectGuids const& cell_guids = objmgr.GetCellObjectGuids(i_map->GetId(), 0, cell_id);
+ CellObjectGuids const& cell_guids = sObjectMgr.GetCellObjectGuids(i_map->GetId(), 0, cell_id);
LoadHelper(cell_guids.corpses, cell_pair, m, i_corpses, i_map);
}
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 1b12db95c68..d13fed7eebc 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -84,7 +84,7 @@ Group::~Group()
bool Group::Create(const uint64 &guid, const char * name)
{
- uint32 lowguid = objmgr.GenerateLowGuid(HIGHGUID_GROUP);
+ uint32 lowguid = sObjectMgr.GenerateLowGuid(HIGHGUID_GROUP);
m_guid = MAKE_NEW_GUID(lowguid, 0, HIGHGUID_GROUP);
m_leaderGuid = guid;
m_leaderName = name;
@@ -102,7 +102,7 @@ bool Group::Create(const uint64 &guid, const char * name)
m_raidDifficulty = RAID_DIFFICULTY_10MAN_NORMAL;
if (!isBGGroup())
{
- Player *leader = objmgr.GetPlayer(guid);
+ Player *leader = sObjectMgr.GetPlayer(guid);
if (leader)
{
m_dungeonDifficulty = leader->GetDungeonDifficulty();
@@ -142,7 +142,7 @@ bool Group::LoadGroupFromDB(const uint32 &groupGuid, QueryResult_AutoPtr result,
m_leaderGuid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
// group leader not exist
- if (!objmgr.GetPlayerNameByGUID(fields[0].GetUInt32(), m_leaderName))
+ if (!sObjectMgr.GetPlayerNameByGUID(fields[0].GetUInt32(), m_leaderName))
return false;
m_lootMethod = LootMethod(fields[1].GetUInt8());
@@ -191,7 +191,7 @@ bool Group::LoadMemberFromDB(uint32 guidLow, uint8 memberFlags, uint8 subgroup)
member.guid = MAKE_NEW_GUID(guidLow, 0, HIGHGUID_PLAYER);
// skip non-existed member
- if (!objmgr.GetPlayerNameByGUID(member.guid, member.name))
+ if (!sObjectMgr.GetPlayerNameByGUID(member.guid, member.name))
{
CharacterDatabase.PQuery("DELETE FROM group_member WHERE memberGuid=%u", guidLow);
return false;
@@ -219,7 +219,7 @@ void Group::ConvertToRaid()
// update quest related GO states (quest activity dependent from raid membership)
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
- if (Player* player = objmgr.GetPlayer(citr->guid))
+ if (Player* player = sObjectMgr.GetPlayer(citr->guid))
player->UpdateForQuestWorldObjects();
}
@@ -294,7 +294,7 @@ bool Group::AddMember(const uint64 &guid, const char* name)
return false;
SendUpdate();
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
if (player)
{
if (!IsLeader(player->GetGUID()) && !isBGGroup())
@@ -344,7 +344,7 @@ uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method)
{
bool leaderChanged = _removeMember(guid);
- if (Player *player = objmgr.GetPlayer(guid))
+ if (Player *player = sObjectMgr.GetPlayer(guid))
{
// quest related GO state dependent from raid membership
if (isRaidGroup())
@@ -413,7 +413,7 @@ void Group::Disband(bool hideDestroy)
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
- player = objmgr.GetPlayer(citr->guid);
+ player = sObjectMgr.GetPlayer(citr->guid);
if (!player)
continue;
@@ -502,7 +502,7 @@ void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r)
for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr)
{
- Player *p = objmgr.GetPlayer(itr->first);
+ Player *p = sObjectMgr.GetPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -526,7 +526,7 @@ void Group::SendLootRoll(const uint64& SourceGuid, const uint64& TargetGuid, uin
for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr)
{
- Player *p = objmgr.GetPlayer(itr->first);
+ Player *p = sObjectMgr.GetPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -549,7 +549,7 @@ void Group::SendLootRollWon(const uint64& SourceGuid, const uint64& TargetGuid,
for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr)
{
- Player *p = objmgr.GetPlayer(itr->first);
+ Player *p = sObjectMgr.GetPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -569,7 +569,7 @@ void Group::SendLootAllPassed(uint32 NumberOfPlayers, const Roll &r)
for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr)
{
- Player *p = objmgr.GetPlayer(itr->first);
+ Player *p = sObjectMgr.GetPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -606,7 +606,7 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject)
if (i->freeforall)
continue;
- item = objmgr.GetItemPrototype(i->itemid);
+ item = sObjectMgr.GetItemPrototype(i->itemid);
if (!item)
{
//sLog.outDebug("Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
@@ -616,7 +616,7 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject)
//roll for over-threshold item if it's one-player loot
if (item->Quality >= uint32(m_lootThreshold))
{
- uint64 newitemGUID = MAKE_NEW_GUID(objmgr.GenerateLowGuid(HIGHGUID_ITEM),0,HIGHGUID_ITEM);
+ uint64 newitemGUID = MAKE_NEW_GUID(sObjectMgr.GenerateLowGuid(HIGHGUID_ITEM),0,HIGHGUID_ITEM);
Roll* r = new Roll(newitemGUID,*i);
//a vector is filled with only near party members
@@ -659,7 +659,7 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject)
{
for (Roll::PlayerVote::const_iterator itr=r->playerVote.begin(); itr != r->playerVote.end(); ++itr)
{
- Player *p = objmgr.GetPlayer(itr->first);
+ Player *p = sObjectMgr.GetPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -702,12 +702,12 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject)
if (i->freeforall)
continue;
- item = objmgr.GetItemPrototype(i->itemid);
+ item = sObjectMgr.GetItemPrototype(i->itemid);
//roll for over-threshold item if it's one-player loot
if (item->Quality >= uint32(m_lootThreshold))
{
- uint64 newitemGUID = MAKE_NEW_GUID(objmgr.GenerateLowGuid(HIGHGUID_ITEM),0,HIGHGUID_ITEM);
+ uint64 newitemGUID = MAKE_NEW_GUID(sObjectMgr.GenerateLowGuid(HIGHGUID_ITEM),0,HIGHGUID_ITEM);
Roll* r=new Roll(newitemGUID,*i);
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
@@ -753,7 +753,7 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject)
{
for (Roll::PlayerVote::const_iterator itr=r->playerVote.begin(); itr != r->playerVote.end(); ++itr)
{
- Player *p = objmgr.GetPlayer(itr->first);
+ Player *p = sObjectMgr.GetPlayer(itr->first);
if (!p || !p->GetSession())
continue;
@@ -906,7 +906,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers)
}
}
SendLootRollWon(0, maxguid, maxresul, ROLL_NEED, *roll);
- player = objmgr.GetPlayer(maxguid);
+ player = sObjectMgr.GetPlayer(maxguid);
if (player && player->GetSession())
{
@@ -955,7 +955,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers)
}
}
SendLootRollWon(0, maxguid, maxresul, rollvote, *roll);
- player = objmgr.GetPlayer(maxguid);
+ player = sObjectMgr.GetPlayer(maxguid);
if (player && player->GetSession())
{
@@ -1073,7 +1073,7 @@ void Group::SendUpdate()
Player *player;
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
- player = objmgr.GetPlayer(citr->guid);
+ player = sObjectMgr.GetPlayer(citr->guid);
if (!player || !player->GetSession() || player->GetGroup() != this)
continue;
@@ -1094,7 +1094,7 @@ void Group::SendUpdate()
{
if (citr->guid == citr2->guid)
continue;
- Player* member = objmgr.GetPlayer(citr2->guid);
+ Player* member = sObjectMgr.GetPlayer(citr2->guid);
uint8 onlineState = (member) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
onlineState = onlineState | ((isBGGroup()) ? MEMBER_STATUS_PVP : 0);
@@ -1165,7 +1165,7 @@ void Group::OfflineReadyCheck()
{
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
- Player *pl = objmgr.GetPlayer(citr->guid);
+ Player *pl = sObjectMgr.GetPlayer(citr->guid);
if (!pl || !pl->GetSession())
{
WorldPacket data(MSG_RAID_READY_CHECK_CONFIRM, 9);
@@ -1207,7 +1207,7 @@ bool Group::_addMember(const uint64 &guid, const char* name, uint8 group)
if (!guid)
return false;
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
MemberSlot member;
member.guid = guid;
@@ -1253,7 +1253,7 @@ bool Group::_addMember(const uint64 &guid, const char* name, uint8 group)
bool Group::_removeMember(const uint64 &guid)
{
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
if (player)
{
//if we are removing player from battleground raid
@@ -1315,7 +1315,7 @@ void Group::_setLeader(const uint64 &guid)
")", GUID_LOPART(m_guid), GUID_LOPART(slot->guid)
);
- Player *player = objmgr.GetPlayer(slot->guid);
+ Player *player = sObjectMgr.GetPlayer(slot->guid);
if (player)
{
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
@@ -1437,7 +1437,7 @@ void Group::ChangeMembersGroup(const uint64 &guid, const uint8 &group)
if (!isRaidGroup())
return;
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
if (!player)
{
@@ -1835,7 +1835,7 @@ void Group::BroadcastGroupUpdate(void)
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
- Player *pp = objmgr.GetPlayer(citr->guid);
+ Player *pp = sObjectMgr.GetPlayer(citr->guid);
if (pp && pp->IsInWorld())
{
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2);
@@ -1851,7 +1851,7 @@ void Group::ResetMaxEnchantingLevel()
Player *pMember = NULL;
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
- if (pMember = objmgr.GetPlayer(citr->guid))
+ if (pMember = sObjectMgr.GetPlayer(citr->guid))
if (m_maxEnchantingLevel < pMember->GetSkillValue(SKILL_ENCHANTING))
m_maxEnchantingLevel = pMember->GetSkillValue(SKILL_ENCHANTING);
}
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index cb976676527..4b5e5d6134a 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -64,7 +64,7 @@ Guild::~Guild()
bool Guild::Create(Player* leader, std::string gname)
{
- if (objmgr.GetGuildByName(gname))
+ if (sObjectMgr.GetGuildByName(gname))
return false;
WorldSession* lSession = leader->GetSession();
@@ -77,7 +77,7 @@ bool Guild::Create(Player* leader, std::string gname)
MOTD = "No message set.";
m_GuildBankMoney = 0;
m_PurchasedTabs = 0;
- m_Id = objmgr.GenerateGuildId();
+ m_Id = sObjectMgr.GenerateGuildId();
sLog.outDebug("GUILD: creating guild %s to leader: %u", gname.c_str(), GUID_LOPART(m_LeaderGuid));
@@ -107,16 +107,16 @@ void Guild::CreateDefaultGuildRanks(int locale_idx)
CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE guildid='%u'", m_Id);
CharacterDatabase.PExecute("DELETE FROM guild_bank_right WHERE guildid = '%u'", m_Id);
- CreateRank(objmgr.GetTrinityString(LANG_GUILD_MASTER, locale_idx), GR_RIGHT_ALL);
- CreateRank(objmgr.GetTrinityString(LANG_GUILD_OFFICER, locale_idx), GR_RIGHT_ALL);
- CreateRank(objmgr.GetTrinityString(LANG_GUILD_VETERAN, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
- CreateRank(objmgr.GetTrinityString(LANG_GUILD_MEMBER, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
- CreateRank(objmgr.GetTrinityString(LANG_GUILD_INITIATE, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
+ CreateRank(sObjectMgr.GetTrinityString(LANG_GUILD_MASTER, locale_idx), GR_RIGHT_ALL);
+ CreateRank(sObjectMgr.GetTrinityString(LANG_GUILD_OFFICER, locale_idx), GR_RIGHT_ALL);
+ CreateRank(sObjectMgr.GetTrinityString(LANG_GUILD_VETERAN, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
+ CreateRank(sObjectMgr.GetTrinityString(LANG_GUILD_MEMBER, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
+ CreateRank(sObjectMgr.GetTrinityString(LANG_GUILD_INITIATE, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
}
bool Guild::AddMember(uint64 plGuid, uint32 plRank)
{
- Player* pl = objmgr.GetPlayer(plGuid);
+ Player* pl = sObjectMgr.GetPlayer(plGuid);
if (pl)
{
if (pl->GetGuildId() != 0)
@@ -478,7 +478,7 @@ void Guild::DelMember(uint64 guid, bool isDisbanding)
SetLeader(newLeaderGUID);
// If player not online data in data field will be loaded from guild tabs no need to update it !!
- if (Player *newLeader = objmgr.GetPlayer(newLeaderGUID))
+ if (Player *newLeader = sObjectMgr.GetPlayer(newLeaderGUID))
newLeader->SetRank(GR_GUILDMASTER);
// when leader non-exist (at guild load with deleted leader only) not send broadcasts
@@ -492,7 +492,7 @@ void Guild::DelMember(uint64 guid, bool isDisbanding)
members.erase(GUID_LOPART(guid));
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
// If player not online data in data field will be loaded from guild tabs no need to update it !!
if (player)
{
@@ -512,7 +512,7 @@ void Guild::ChangeRank(uint64 guid, uint32 newRank)
if (itr != members.end())
itr->second.RankId = newRank;
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
// If player not online data in data field will be loaded from guild tabs no need to update it !!
if (player)
player->SetRank(newRank);
@@ -708,7 +708,7 @@ void Guild::Disband()
CharacterDatabase.PExecute("DELETE FROM guild_bank_eventlog WHERE guildid = '%u'", m_Id);
CharacterDatabase.PExecute("DELETE FROM guild_eventlog WHERE guildid = '%u'", m_Id);
CharacterDatabase.CommitTransaction();
- objmgr.RemoveGuild(m_Id);
+ sObjectMgr.RemoveGuild(m_Id);
}
void Guild::Roster(WorldSession *session /*= NULL*/)
@@ -1165,7 +1165,7 @@ void Guild::LoadGuildBankFromDB()
continue;
}
- ItemPrototype const *proto = objmgr.GetItemPrototype(ItemEntry);
+ ItemPrototype const *proto = sObjectMgr.GetItemPrototype(ItemEntry);
if (!proto)
{
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index dcc3271e19e..86b148edfa1 100644
--- a/src/server/game/Instances/InstanceSaveMgr.cpp
+++ b/src/server/game/Instances/InstanceSaveMgr.cpp
@@ -193,7 +193,7 @@ time_t InstanceSave::GetResetTimeForDB()
// to cache or not to cache, that is the question
InstanceTemplate const* InstanceSave::GetTemplate()
{
- return objmgr.GetInstanceTemplate(m_mapid);
+ return sObjectMgr.GetInstanceTemplate(m_mapid);
}
MapEntry const* InstanceSave::GetMapEntry()
@@ -211,8 +211,8 @@ bool InstanceSave::UnloadIfEmpty()
{
if (m_playerList.empty() && m_groupList.empty())
{
- if (!sInstanceSaveManager.lock_instLists)
- sInstanceSaveManager.RemoveInstanceSave(GetInstanceId());
+ if (!sInstanceSaveMgr.lock_instLists)
+ sInstanceSaveMgr.RemoveInstanceSave(GetInstanceId());
return false;
}
else
@@ -254,7 +254,7 @@ void InstanceSaveManager::CleanupInstances()
bar.step();
// load reset times and clean expired instances
- sInstanceSaveManager.LoadResetTimes();
+ sInstanceSaveMgr.LoadResetTimes();
// clean character/group - instance binds with invalid group/characters
_DelHelper(CharacterDatabase, "character_instance.guid, instance", "character_instance", "LEFT JOIN characters ON character_instance.guid = characters.guid WHERE characters.guid IS NULL");
@@ -617,7 +617,7 @@ void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
Map* iMap = ((MapInstanced*)map)->FindMap(instanceId);
if (iMap && iMap->IsDungeon()) ((InstanceMap*)iMap)->Reset(INSTANCE_RESET_RESPAWN_DELAY);
- else objmgr.DeleteRespawnTimeForInstance(instanceId); // even if map is not loaded
+ else sObjectMgr.DeleteRespawnTimeForInstance(instanceId); // even if map is not loaded
}
void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, bool warn, uint32 timeLeft)
diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h
index 66751cc4f10..7cecc4d9f75 100644
--- a/src/server/game/Instances/InstanceSaveMgr.h
+++ b/src/server/game/Instances/InstanceSaveMgr.h
@@ -191,5 +191,5 @@ class InstanceSaveManager
ResetTimeQueue m_resetTimeQueue;
};
-#define sInstanceSaveManager (*ACE_Singleton<InstanceSaveManager, ACE_Thread_Mutex>::instance())
+#define sInstanceSaveMgr (*ACE_Singleton<InstanceSaveManager, ACE_Thread_Mutex>::instance())
#endif
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 38bad409718..1cd2e1d939d 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -255,7 +255,7 @@ bool LootStoreItem::Roll(bool rate) const
if (mincountOrRef < 0) // reference case
return roll_chance_f(chance* (rate ? sWorld.getRate(RATE_DROP_ITEM_REFERENCED) : 1.0f));
- ItemPrototype const *pProto = objmgr.GetItemPrototype(itemid);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(itemid);
float qualityModifier = pProto && rate ? sWorld.getRate(qualityToRate[pProto->Quality]) : 1.0f;
@@ -279,7 +279,7 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const
if (mincountOrRef > 0) // item (quest or non-quest) entry, maybe grouped
{
- ItemPrototype const *proto = objmgr.GetItemPrototype(itemid);
+ ItemPrototype const *proto = sObjectMgr.GetItemPrototype(itemid);
if (!proto)
{
sLog.outErrorDb("Table '%s' entry %d item %d: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid);
@@ -329,7 +329,7 @@ LootItem::LootItem(LootStoreItem const& li)
itemid = li.itemid;
conditions = li.conditions;
- ItemPrototype const* proto = objmgr.GetItemPrototype(itemid);
+ ItemPrototype const* proto = sObjectMgr.GetItemPrototype(itemid);
freeforall = proto && (proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT);
needs_quest = li.needs_quest;
@@ -402,7 +402,7 @@ void Loot::AddItem(LootStoreItem const & item)
// non-ffa conditionals are counted in FillNonQuestNonFFAConditionalLoot()
if (item.conditions.empty())
{
- ItemPrototype const* proto = objmgr.GetItemPrototype(item.itemid);
+ ItemPrototype const* proto = sObjectMgr.GetItemPrototype(item.itemid);
if (!proto || (proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT) == 0)
++unlootedCount;
}
@@ -766,7 +766,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootItem const& li)
{
b << uint32(li.itemid);
b << uint32(li.count); // nr of items of this type
- b << uint32(objmgr.GetItemPrototype(li.itemid)->DisplayInfoID);
+ b << uint32(sObjectMgr.GetItemPrototype(li.itemid)->DisplayInfoID);
b << uint32(li.randomSuffix);
b << uint32(li.randomPropertyId);
//b << uint8(0); // slot type - will send after this function call
@@ -1452,7 +1452,7 @@ void LoadLootTemplates_Gameobject()
{
if (uint32 lootid = gInfo->GetLootId())
{
- if (objmgr.IsGoOfSpecificEntrySpawned(gInfo->id) && ids_set.find(lootid) == ids_set.end())
+ if (sObjectMgr.IsGoOfSpecificEntrySpawned(gInfo->id) && ids_set.find(lootid) == ids_set.end())
LootTemplates_Gameobject.ReportNotExistedId(lootid);
else
ids_setUsed.insert(lootid);
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 12ca85bcc5d..beee96c0d91 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -99,7 +99,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
uint64 rc = 0;
if (normalizePlayerName(receiver))
- rc = objmgr.GetPlayerGUIDByName(receiver);
+ rc = sObjectMgr.GetPlayerGUIDByName(receiver);
if (!rc)
{
@@ -127,7 +127,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
return;
}
- Player *receive = objmgr.GetPlayer(rc);
+ Player *receive = sObjectMgr.GetPlayer(rc);
uint32 rc_team = 0;
uint8 mails_count = 0; //do not allow to send to one player more than 100 mails
@@ -141,7 +141,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
}
else
{
- rc_team = objmgr.GetPlayerTeamByGUID(rc);
+ rc_team = sObjectMgr.GetPlayerTeamByGUID(rc);
if (QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT COUNT(*) FROM mail WHERE receiver = '%u'", GUID_LOPART(rc)))
{
Field *fields = result->Fetch();
@@ -188,7 +188,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
uint32 rc_account = receive
? receive->GetSession()->GetAccountId()
- : objmgr.GetPlayerAccountIdByGUID(rc);
+ : sObjectMgr.GetPlayerAccountIdByGUID(rc);
Item* items[MAX_MAIL_ITEMS];
@@ -442,7 +442,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
if (m->COD > 0) //if there is COD, take COD money from player and send them to sender by mail
{
uint64 sender_guid = MAKE_NEW_GUID(m->sender, 0, HIGHGUID_PLAYER);
- Player *receive = objmgr.GetPlayer(sender_guid);
+ Player *receive = sObjectMgr.GetPlayer(sender_guid);
uint32 sender_accId = 0;
@@ -457,16 +457,16 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
else
{
// can be calculated early
- sender_accId = objmgr.GetPlayerAccountIdByGUID(sender_guid);
+ sender_accId = sObjectMgr.GetPlayerAccountIdByGUID(sender_guid);
- if (!objmgr.GetPlayerNameByGUID(sender_guid,sender_name))
- sender_name = objmgr.GetTrinityStringForDBCLocale(LANG_UNKNOWN);
+ if (!sObjectMgr.GetPlayerNameByGUID(sender_guid,sender_name))
+ sender_name = sObjectMgr.GetTrinityStringForDBCLocale(LANG_UNKNOWN);
}
sLog.outCommand(GetAccountId(),"GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)",
GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),it->GetCount(),m->COD,sender_name.c_str(),sender_accId);
}
else if (!receive)
- sender_accId = objmgr.GetPlayerAccountIdByGUID(sender_guid);
+ sender_accId = sObjectMgr.GetPlayerAccountIdByGUID(sender_guid);
// check player existence
if (receive || sender_accId)
@@ -674,7 +674,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
}
Item *bodyItem = new Item; // This is not bag and then can be used new Item.
- if (!bodyItem->Create(objmgr.GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, pl))
+ if (!bodyItem->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, pl))
{
delete bodyItem;
return;
@@ -869,11 +869,11 @@ void MailDraft::deleteIncludedItems(bool inDB /*= false*/)
void MailDraft::SendReturnToSender(uint32 sender_acc, uint32 sender_guid, uint32 receiver_guid)
{
- Player *receiver = objmgr.GetPlayer(MAKE_NEW_GUID(receiver_guid, 0, HIGHGUID_PLAYER));
+ Player *receiver = sObjectMgr.GetPlayer(MAKE_NEW_GUID(receiver_guid, 0, HIGHGUID_PLAYER));
uint32 rc_account = 0;
if (!receiver)
- rc_account = objmgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(receiver_guid, 0, HIGHGUID_PLAYER));
+ rc_account = sObjectMgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(receiver_guid, 0, HIGHGUID_PLAYER));
if (!receiver && !rc_account) // sender not exist
{
@@ -915,7 +915,7 @@ void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sende
if (pReceiver)
prepareItems(pReceiver); // generate mail template items
- uint32 mailId = objmgr.GenerateMailID();
+ uint32 mailId = sObjectMgr.GenerateMailID();
time_t deliver_time = time(NULL) + deliver_delay;
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 4b470428c1f..fb83f3ac260 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2320,11 +2320,11 @@ bool InstanceMap::Add(Player *player)
if (IsDungeon())
{
// get or create an instance save for the map
- InstanceSave *mapSave = sInstanceSaveManager.GetInstanceSave(GetInstanceId());
+ InstanceSave *mapSave = sInstanceSaveMgr.GetInstanceSave(GetInstanceId());
if (!mapSave)
{
sLog.outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
- mapSave = sInstanceSaveManager.AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
+ mapSave = sInstanceSaveMgr.AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
}
// check for existing instance binds
@@ -2438,7 +2438,7 @@ void InstanceMap::CreateInstanceData(bool load)
if (i_data != NULL)
return;
- InstanceTemplate const* mInstance = objmgr.GetInstanceTemplate(GetId());
+ InstanceTemplate const* mInstance = sObjectMgr.GetInstanceTemplate(GetId());
if (mInstance)
{
i_script_id = mInstance->script_id;
@@ -2460,7 +2460,7 @@ void InstanceMap::CreateInstanceData(bool load)
std::string data = fields[0].GetString();
if (data != "")
{
- sLog.outDebug("Loading instance data for `%s` with id %u", objmgr.GetScriptName(i_script_id), i_InstanceId);
+ sLog.outDebug("Loading instance data for `%s` with id %u", sObjectMgr.GetScriptName(i_script_id), i_InstanceId);
i_data->Load(data.c_str());
}
}
@@ -2511,7 +2511,7 @@ void InstanceMap::PermBindAllPlayers(Player *player)
if (!IsDungeon())
return;
- InstanceSave *save = sInstanceSaveManager.GetInstanceSave(GetInstanceId());
+ InstanceSave *save = sInstanceSaveMgr.GetInstanceSave(GetInstanceId());
if (!save)
{
sLog.outError("Cannot bind players, no instance save available for map!");
@@ -2545,7 +2545,7 @@ void InstanceMap::UnloadAll()
ASSERT(!HavePlayers());
if (m_resetAfterUnload == true)
- objmgr.DeleteRespawnTimeForInstance(GetInstanceId());
+ sObjectMgr.DeleteRespawnTimeForInstance(GetInstanceId());
Map::UnloadAll();
}
@@ -2563,9 +2563,9 @@ void InstanceMap::SetResetSchedule(bool on)
// it is assumed that the reset time will rarely (if ever) change while the reset is scheduled
if (IsDungeon() && !HavePlayers() && !IsRaidOrHeroicDungeon())
{
- InstanceSave *save = sInstanceSaveManager.GetInstanceSave(GetInstanceId());
+ InstanceSave *save = sInstanceSaveMgr.GetInstanceSave(GetInstanceId());
if (!save) sLog.outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, no save available for instance %d of %d", on ? "on" : "off", GetInstanceId(), GetId());
- else sInstanceSaveManager.ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId()));
+ else sInstanceSaveMgr.ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId()));
}
}
@@ -3429,7 +3429,7 @@ void Map::ScriptsProcess()
}
else //check hashmap holders
{
- if (CreatureData const* data = objmgr.GetCreatureData(step.script->datalong))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(step.script->datalong))
cTarget = ObjectAccessor::GetObjectInWorld<Creature>(data->mapid, data->posX, data->posY, MAKE_NEW_GUID(step.script->datalong, data->id, HIGHGUID_UNIT), cTarget);
}
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index 7ee0a9cbf1d..47a90c67fe9 100644
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -180,7 +180,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
sLog.outError("CreateInstance: no entry for map %d", GetId());
ASSERT(false);
}
- const InstanceTemplate * iTemplate = objmgr.GetInstanceTemplate(GetId());
+ const InstanceTemplate * iTemplate = sObjectMgr.GetInstanceTemplate(GetId());
if (!iTemplate)
{
sLog.outError("CreateInstance: no instance template for map %d", GetId());
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index e4d8a601656..eeafda9b8b0 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -164,7 +164,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
if (!entry->IsDungeon())
return true;
- InstanceTemplate const* instance = objmgr.GetInstanceTemplate(mapid);
+ InstanceTemplate const* instance = sObjectMgr.GetInstanceTemplate(mapid);
if (!instance)
return false;
@@ -214,7 +214,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
if (instance_map == mapid)
break;
- InstanceTemplate const* instance = objmgr.GetInstanceTemplate(instance_map);
+ InstanceTemplate const* instance = sObjectMgr.GetInstanceTemplate(instance_map);
instance_map = instance ? instance->parent : 0;
}
while (instance_map);
@@ -253,7 +253,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
}
//Other requirements
- return player->Satisfy(objmgr.GetAccessRequirement(mapid, targetDifficulty), mapid, true);
+ return player->Satisfy(sObjectMgr.GetAccessRequirement(mapid, targetDifficulty), mapid, true);
}
void MapManager::Update(uint32 diff)
@@ -300,7 +300,7 @@ bool MapManager::ExistMapAndVMap(uint32 mapid, float x,float y)
bool MapManager::IsValidMAP(uint32 mapid)
{
MapEntry const* mEntry = sMapStore.LookupEntry(mapid);
- return mEntry && (!mEntry->IsDungeon() || objmgr.GetInstanceTemplate(mapid));
+ return mEntry && (!mEntry->IsDungeon() || sObjectMgr.GetInstanceTemplate(mapid));
// TODO: add check for battleground template
}
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 1de00677af4..7a34aa8e581 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -72,7 +72,7 @@ void OPvPCapturePoint::AddGO(uint32 type, uint32 guid, uint32 entry)
{
if (!entry)
{
- const GameObjectData *data = objmgr.GetGOData(guid);
+ const GameObjectData *data = sObjectMgr.GetGOData(guid);
if (!data)
return;
entry = data->id;
@@ -85,7 +85,7 @@ void OPvPCapturePoint::AddCre(uint32 type, uint32 guid, uint32 entry)
{
if (!entry)
{
- const CreatureData *data = objmgr.GetCreatureData(guid);
+ const CreatureData *data = sObjectMgr.GetCreatureData(guid);
if (!data)
return;
entry = data->id;
@@ -96,7 +96,7 @@ void OPvPCapturePoint::AddCre(uint32 type, uint32 guid, uint32 entry)
bool OPvPCapturePoint::AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
{
- if (uint32 guid = objmgr.AddGOData(entry, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3))
+ if (uint32 guid = sObjectMgr.AddGOData(entry, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3))
{
AddGO(type, guid, entry);
return true;
@@ -107,7 +107,7 @@ bool OPvPCapturePoint::AddObject(uint32 type, uint32 entry, uint32 map, float x,
bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 team, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay)
{
- if (uint32 guid = objmgr.AddCreData(entry, team, map, x, y, z, o, spawntimedelay))
+ if (uint32 guid = sObjectMgr.AddCreData(entry, team, map, x, y, z, o, spawntimedelay))
{
AddCre(type, guid, entry);
return true;
@@ -121,14 +121,14 @@ bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, fl
sLog.outDebug("Creating capture point %u", entry);
// check info existence
- GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(entry);
+ GameObjectInfo const* goinfo = sObjectMgr.GetGameObjectInfo(entry);
if (!goinfo || goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
{
sLog.outError("OutdoorPvP: GO %u is not capture point!", entry);
return false;
}
- m_capturePointGUID = objmgr.AddGOData(entry, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3);
+ m_capturePointGUID = sObjectMgr.AddGOData(entry, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3);
if (!m_capturePointGUID)
return false;
@@ -169,7 +169,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
// delete respawn time for this creature
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE guid = '%u'", guid);
cr->AddObjectToRemoveList();
- objmgr.DeleteCreatureData(guid);
+ sObjectMgr.DeleteCreatureData(guid);
m_CreatureTypes[m_Creatures[type]] = 0;
m_Creatures[type] = 0;
return true;
@@ -189,7 +189,7 @@ bool OPvPCapturePoint::DelObject(uint32 type)
uint32 guid = obj->GetDBTableGUIDLow();
obj->SetRespawnTime(0); // not save respawn time
obj->Delete();
- objmgr.DeleteGOData(guid);
+ sObjectMgr.DeleteGOData(guid);
m_ObjectTypes[m_Objects[type]] = 0;
m_Objects[type] = 0;
return true;
@@ -197,7 +197,7 @@ bool OPvPCapturePoint::DelObject(uint32 type)
bool OPvPCapturePoint::DelCapturePoint()
{
- objmgr.DeleteGOData(m_capturePointGUID);
+ sObjectMgr.DeleteGOData(m_capturePointGUID);
m_capturePointGUID = 0;
if (m_capturePoint)
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
index a380430b328..47d6617bac9 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
@@ -111,7 +111,7 @@ void OutdoorPvPMgr::LoadTemplates()
OutdoorPvPData data;
OutdoorPvPTypes realTypeId = OutdoorPvPTypes(typeId);
data.TypeId = realTypeId;
- data.ScriptId = objmgr.GetScriptId(fields[1].GetString());
+ data.ScriptId = sObjectMgr.GetScriptId(fields[1].GetString());
m_OutdoorPvPDatas[realTypeId] = &data;
++count;
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp
index 28fb67ad4dd..2f41972a605 100644
--- a/src/server/game/Pools/PoolMgr.cpp
+++ b/src/server/game/Pools/PoolMgr.cpp
@@ -194,9 +194,9 @@ void PoolGroup<T>::DespawnObject(SpawnedPoolData& spawns, uint32 guid)
template<>
void PoolGroup<Creature>::Despawn1Object(uint32 guid)
{
- if (CreatureData const* data = objmgr.GetCreatureData(guid))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(guid))
{
- objmgr.RemoveCreatureFromGrid(guid, data);
+ sObjectMgr.RemoveCreatureFromGrid(guid, data);
if (Creature* pCreature = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
pCreature->AddObjectToRemoveList();
@@ -207,9 +207,9 @@ void PoolGroup<Creature>::Despawn1Object(uint32 guid)
template<>
void PoolGroup<GameObject>::Despawn1Object(uint32 guid)
{
- if (GameObjectData const* data = objmgr.GetGOData(guid))
+ if (GameObjectData const* data = sObjectMgr.GetGOData(guid))
{
- objmgr.RemoveGameobjectFromGrid(guid, data);
+ sObjectMgr.RemoveGameobjectFromGrid(guid, data);
if (GameObject* pGameobject = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
pGameobject->AddObjectToRemoveList();
@@ -220,7 +220,7 @@ void PoolGroup<GameObject>::Despawn1Object(uint32 guid)
template<>
void PoolGroup<Pool>::Despawn1Object(uint32 child_pool_id)
{
- poolhandler.DespawnPool(child_pool_id);
+ sPoolMgr.DespawnPool(child_pool_id);
}
// Method for a pool only to remove any found record causing a circular dependency loop
@@ -289,9 +289,9 @@ void PoolGroup<T>::SpawnObject(SpawnedPoolData& spawns, uint32 limit, uint32 tri
template <>
void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
{
- if (CreatureData const* data = objmgr.GetCreatureData(obj->guid))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(obj->guid))
{
- objmgr.AddCreatureToGrid(obj->guid, data);
+ sObjectMgr.AddCreatureToGrid(obj->guid, data);
// Spawn if necessary (loaded grids only)
Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
@@ -315,9 +315,9 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
template <>
void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
{
- if (GameObjectData const* data = objmgr.GetGOData(obj->guid))
+ if (GameObjectData const* data = sObjectMgr.GetGOData(obj->guid))
{
- objmgr.AddGameobjectToGrid(obj->guid, data);
+ sObjectMgr.AddGameobjectToGrid(obj->guid, data);
// Spawn if necessary (loaded grids only)
// this base map checked as non-instanced and then only existed
Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
@@ -344,14 +344,14 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
template <>
void PoolGroup<Pool>::Spawn1Object(PoolObject* obj)
{
- poolhandler.SpawnPool(obj->guid);
+ sPoolMgr.SpawnPool(obj->guid);
}
// Method that does the respawn job on the specified creature
template <>
void PoolGroup<Creature>::ReSpawn1Object(PoolObject* obj)
{
- if (CreatureData const* data = objmgr.GetCreatureData(obj->guid))
+ if (CreatureData const* data = sObjectMgr.GetCreatureData(obj->guid))
if (Creature* pCreature = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
pCreature->GetMap()->Add(pCreature);
}
@@ -360,7 +360,7 @@ void PoolGroup<Creature>::ReSpawn1Object(PoolObject* obj)
template <>
void PoolGroup<GameObject>::ReSpawn1Object(PoolObject* obj)
{
- if (GameObjectData const* data = objmgr.GetGOData(obj->guid))
+ if (GameObjectData const* data = sObjectMgr.GetGOData(obj->guid))
if (GameObject* pGameobject = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
pGameobject->GetMap()->Add(pGameobject);
}
@@ -457,7 +457,7 @@ void PoolMgr::LoadFromDB()
uint16 pool_id = fields[1].GetUInt16();
float chance = fields[2].GetFloat();
- CreatureData const* data = objmgr.GetCreatureData(guid);
+ CreatureData const* data = sObjectMgr.GetCreatureData(guid);
if (!data)
{
sLog.outErrorDb("`pool_creature` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
@@ -520,13 +520,13 @@ void PoolMgr::LoadFromDB()
uint16 pool_id = fields[1].GetUInt16();
float chance = fields[2].GetFloat();
- GameObjectData const* data = objmgr.GetGOData(guid);
+ GameObjectData const* data = sObjectMgr.GetGOData(guid);
if (!data)
{
sLog.outErrorDb("`pool_gameobject` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
continue;
}
- GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(data->id);
+ GameObjectInfo const* goinfo = sObjectMgr.GetGameObjectInfo(data->id);
if (goinfo->type != GAMEOBJECT_TYPE_CHEST &&
goinfo->type != GAMEOBJECT_TYPE_GOOBER &&
goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE)
diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h
index 71cae3e4a1b..c2852cb38e4 100644
--- a/src/server/game/Pools/PoolMgr.h
+++ b/src/server/game/Pools/PoolMgr.h
@@ -135,7 +135,7 @@ class PoolMgr
SpawnedPoolData mSpawnedData;
};
-#define poolhandler (*ACE_Singleton<PoolMgr, ACE_Null_Mutex>::instance())
+#define sPoolMgr (*ACE_Singleton<PoolMgr, ACE_Null_Mutex>::instance())
// Method that tell if the creature is part of a pool and return the pool id if yes
template<>
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 54e6d96939d..bb6e82018f1 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -278,7 +278,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
if (res)
{
// then some spillover calculation here if it exist
- if (RepSpilloverTemplate const * repTemplate = objmgr.GetRepSpilloverTemplate(factionEntry->ID))
+ if (RepSpilloverTemplate const * repTemplate = sObjectMgr.GetRepSpilloverTemplate(factionEntry->ID))
{
for (uint32 i = 0; i < MAX_SPILLOVER_FACTIONS; ++i)
{
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 32fd1c0f24b..dea75f25ff4 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -289,7 +289,7 @@ void ScriptMgr::FillSpellSummary()
void ScriptMgr::CreateSpellScripts(uint32 spell_id, std::list<SpellScript *> & script_vector)
{
- SpellScriptsBounds bounds = objmgr.GetSpellScriptsBounds(spell_id);
+ SpellScriptsBounds bounds = sObjectMgr.GetSpellScriptsBounds(spell_id);
for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
@@ -311,7 +311,7 @@ void ScriptMgr::CreateSpellScripts(uint32 spell_id, std::list<SpellScript *> & s
void ScriptMgr::CreateSpellScripts(uint32 spell_id, std::vector<std::pair<SpellScript *, SpellScriptsMap::iterator> > & script_vector)
{
- SpellScriptsBounds bounds = objmgr.GetSpellScriptsBounds(spell_id);
+ SpellScriptsBounds bounds = sObjectMgr.GetSpellScriptsBounds(spell_id);
script_vector.reserve(std::distance(bounds.first, bounds.second));
for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
diff --git a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
index 3c26e17bddd..172ec7aa9bd 100644
--- a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
@@ -37,13 +37,13 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data)
recv_data >> guid;
sLog.outDebug("Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
- if (Player *plr = objmgr.GetPlayer(guid))
+ if (Player *plr = sObjectMgr.GetPlayer(guid))
{
for (uint8 i = 0; i < MAX_ARENA_SLOT; ++i)
{
if (uint32 a_id = plr->GetArenaTeamId(i))
{
- if (ArenaTeam *at = objmgr.GetArenaTeamById(a_id))
+ if (ArenaTeam *at = sObjectMgr.GetArenaTeamById(a_id))
at->InspectStats(this, plr->GetGUID());
}
}
@@ -57,7 +57,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data)
uint32 ArenaTeamId;
recv_data >> ArenaTeamId;
- if (ArenaTeam *arenateam = objmgr.GetArenaTeamById(ArenaTeamId))
+ if (ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId))
{
arenateam->Query(this);
arenateam->Stats(this);
@@ -71,7 +71,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data)
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
- if (ArenaTeam *arenateam = objmgr.GetArenaTeamById(ArenaTeamId))
+ if (ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId))
arenateam->Roster(this);
}
@@ -106,7 +106,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
return;
}
- ArenaTeam *arenateam = objmgr.GetArenaTeamById(ArenaTeamId);
+ ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId);
if (!arenateam)
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", "", ERR_ARENA_TEAM_PLAYER_NOT_IN_TEAM);
@@ -157,7 +157,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
{
sLog.outDebug("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
- ArenaTeam *at = objmgr.GetArenaTeamById(_player->GetArenaTeamIdInvited());
+ ArenaTeam *at = sObjectMgr.GetArenaTeamById(_player->GetArenaTeamIdInvited());
if (!at)
return;
@@ -168,7 +168,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
return;
}
- if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && _player->GetTeam() != objmgr.GetPlayerTeamByGUID(at->GetCaptain()))
+ if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && _player->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(at->GetCaptain()))
{
// not let enemies sign petition
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
@@ -200,7 +200,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data)
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
- ArenaTeam *at = objmgr.GetArenaTeamById(ArenaTeamId);
+ ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
if (!at)
return;
@@ -235,7 +235,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data)
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
- if (ArenaTeam *at = objmgr.GetArenaTeamById(ArenaTeamId))
+ if (ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId))
{
if (at->GetCaptain() != _player->GetGUID())
return;
@@ -258,7 +258,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data)
recv_data >> ArenaTeamId;
recv_data >> name;
- ArenaTeam *at = objmgr.GetArenaTeamById(ArenaTeamId);
+ ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
if (!at) // arena team not found
return;
@@ -300,7 +300,7 @@ void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recv_data)
recv_data >> ArenaTeamId;
recv_data >> name;
- ArenaTeam *at = objmgr.GetArenaTeamById(ArenaTeamId);
+ ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
if (!at) // arena team not found
return;
diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
index 0fae1ec4ca7..3bd6cad64c6 100644
--- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
@@ -117,11 +117,11 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
void WorldSession::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 newPrice)
{
uint64 oldBidder_guid = MAKE_NEW_GUID(auction->bidder,0, HIGHGUID_PLAYER);
- Player *oldBidder = objmgr.GetPlayer(oldBidder_guid);
+ Player *oldBidder = sObjectMgr.GetPlayer(oldBidder_guid);
uint32 oldBidder_accId = 0;
if (!oldBidder)
- oldBidder_accId = objmgr.GetPlayerAccountIdByGUID(oldBidder_guid);
+ oldBidder_accId = sObjectMgr.GetPlayerAccountIdByGUID(oldBidder_guid);
// old bidder exist
if (oldBidder || oldBidder_accId)
@@ -142,11 +142,11 @@ void WorldSession::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 newPri
void WorldSession::SendAuctionCancelledToBidderMail(AuctionEntry* auction)
{
uint64 bidder_guid = MAKE_NEW_GUID(auction->bidder, 0, HIGHGUID_PLAYER);
- Player *bidder = objmgr.GetPlayer(bidder_guid);
+ Player *bidder = sObjectMgr.GetPlayer(bidder_guid);
uint32 bidder_accId = 0;
if (!bidder)
- bidder_accId = objmgr.GetPlayerAccountIdByGUID(bidder_guid);
+ bidder_accId = sObjectMgr.GetPlayerAccountIdByGUID(bidder_guid);
// bidder exist
if (bidder || bidder_accId)
@@ -216,7 +216,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
Item *it = pl->GetItemByGuid(item);
//do not allow to sell already auctioned items
- if (auctionmgr.GetAItem(GUID_LOPART(item)))
+ if (sAuctionMgr.GetAItem(GUID_LOPART(item)))
{
sLog.outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", pl->GetName(), GUID_LOPART(item));
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
@@ -241,10 +241,10 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
return;
}
- AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
//we have to take deposit :
- uint32 deposit = auctionmgr.GetAuctionDeposit(auctionHouseEntry, etime, it);
+ uint32 deposit = sAuctionMgr.GetAuctionDeposit(auctionHouseEntry, etime, it);
if (pl->GetMoney() < deposit)
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
@@ -262,7 +262,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
uint32 auction_time = uint32(etime * sWorld.getRate(RATE_AUCTION_TIME));
AuctionEntry *AH = new AuctionEntry;
- AH->Id = objmgr.GenerateAuctionID();
+ AH->Id = sObjectMgr.GenerateAuctionID();
if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
AH->auctioneer = 23442;
else
@@ -279,7 +279,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
AH->auctionHouseEntry = auctionHouseEntry;
sLog.outDetail("selling item %u to auctioneer %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", GUID_LOPART(item), AH->auctioneer, bid, buyout, auction_time, AH->GetHouseId());
- auctionmgr.AddAItem(it);
+ sAuctionMgr.AddAItem(it);
auctionHouse->AddAuction(AH);
pl->MoveItemFromInventory(it->GetBagSlot(), it->GetSlot(), true);
@@ -319,7 +319,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject *auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject *auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
AuctionEntry *auction = auctionHouse->GetAuction(auctionId);
Player *pl = GetPlayer();
@@ -332,8 +332,8 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
}
// impossible have online own another character (use this for speedup check in case online owner)
- Player* auction_owner = objmgr.GetPlayer(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER));
- if (!auction_owner && objmgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER)) == pl->GetSession()->GetAccountId())
+ Player* auction_owner = sObjectMgr.GetPlayer(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER));
+ if (!auction_owner && sObjectMgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER)) == pl->GetSession()->GetAccountId())
{
//you cannot bid your another character auction:
SendAuctionCommandResult(0, AUCTION_PLACE_BID, CANNOT_BID_YOUR_AUCTION_ERROR);
@@ -400,16 +400,16 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
auction->bid = auction->buyout;
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, auction->buyout);
- auctionmgr.SendAuctionSalePendingMail(auction);
- auctionmgr.SendAuctionSuccessfulMail(auction);
- auctionmgr.SendAuctionWonMail(auction);
+ sAuctionMgr.SendAuctionSalePendingMail(auction);
+ sAuctionMgr.SendAuctionSuccessfulMail(auction);
+ sAuctionMgr.SendAuctionWonMail(auction);
SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, AUCTION_OK);
CharacterDatabase.BeginTransaction();
auction->DeleteFromDB();
uint32 item_template = auction->item_template;
- auctionmgr.RemoveAItem(auction->item_guidlow);
+ sAuctionMgr.RemoveAItem(auction->item_guidlow);
auctionHouse->RemoveAuction(auction, item_template);
}
pl->SaveInventoryAndGoldToDB();
@@ -436,14 +436,14 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
AuctionEntry *auction = auctionHouse->GetAuction(auctionId);
Player *pl = GetPlayer();
if (auction && auction->owner == pl->GetGUIDLow())
{
- Item *pItem = auctionmgr.GetAItem(auction->item_guidlow);
+ Item *pItem = sAuctionMgr.GetAItem(auction->item_guidlow);
if (pItem)
{
if (auction->bidder > 0) // If we have a bidder, we have to send him the money he paid
@@ -487,7 +487,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
pl->SaveInventoryAndGoldToDB();
auction->DeleteFromDB();
uint32 item_template = auction->item_template;
- auctionmgr.RemoveAItem(auction->item_guidlow);
+ sAuctionMgr.RemoveAItem(auction->item_guidlow);
auctionHouse->RemoveAuction(auction, item_template);
CharacterDatabase.CommitTransaction();
}
@@ -519,7 +519,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4+4+4));
Player *pl = GetPlayer();
@@ -566,7 +566,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data)
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
WorldPacket data(SMSG_AUCTION_OWNER_LIST_RESULT, (4+4+4));
data << (uint32) 0; // amount place holder
@@ -619,7 +619,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
//sLog.outDebug("Auctionhouse search (GUID: %u TypeId: %u)", , list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
// GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
index 0e798d63bf1..84eb0fa0701 100644
--- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
@@ -251,11 +251,11 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_
uint32 count1 = 0; //always constant zero?
uint32 count2 = 0; //count of next fields
- Player *ali_plr = objmgr.GetPlayer(((BattlegroundWS*)bg)->GetAllianceFlagPickerGUID());
+ Player *ali_plr = sObjectMgr.GetPlayer(((BattlegroundWS*)bg)->GetAllianceFlagPickerGUID());
if (ali_plr)
++count2;
- Player *horde_plr = objmgr.GetPlayer(((BattlegroundWS*)bg)->GetHordeFlagPickerGUID());
+ Player *horde_plr = sObjectMgr.GetPlayer(((BattlegroundWS*)bg)->GetHordeFlagPickerGUID());
if (horde_plr)
++count2;
@@ -468,7 +468,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
// if player leaves rated arena match before match start, it is counted as he played but he lost
if (ginfo.IsRated)
{
- ArenaTeam * at = objmgr.GetArenaTeamById(ginfo.Team);
+ ArenaTeam * at = sObjectMgr.GetArenaTeamById(ginfo.Team);
if (at)
{
sLog.outDebug("UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
@@ -707,7 +707,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
{
ateamId = _player->GetArenaTeamId(arenaslot);
// check real arenateam existence only here (if it was moved to group->CanJoin .. () then we would ahve to get it twice)
- ArenaTeam * at = objmgr.GetArenaTeamById(ateamId);
+ ArenaTeam * at = sObjectMgr.GetArenaTeamById(ateamId);
if (!at)
{
_player->GetSession()->SendNotInArenaTeamPacket(arenatype);
@@ -802,7 +802,7 @@ void WorldSession::HandleReportPvPAFK(WorldPacket & recv_data)
{
uint64 playerGuid;
recv_data >> playerGuid;
- Player *reportedPlayer = objmgr.GetPlayer(playerGuid);
+ Player *reportedPlayer = sObjectMgr.GetPlayer(playerGuid);
if (!reportedPlayer)
{
diff --git a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
index f6679c5d5ac..c65db2deb24 100644
--- a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
@@ -89,7 +89,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
p_counter = data.wpos();
data << uint32(counter); // raid reset count
- ResetTimeByMapDifficultyMap const& resets = sInstanceSaveManager.GetResetTimeMap();
+ ResetTimeByMapDifficultyMap const& resets = sInstanceSaveMgr.GetResetTimeMap();
for (ResetTimeByMapDifficultyMap::const_iterator itr = resets.begin(); itr != resets.end(); ++itr)
{
uint32 mapid = PAIR32_LOPART(itr->first);
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index 45a41dc099d..66b7bee40aa 100644
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -266,14 +266,14 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
return;
}
- if (GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(name))
+ if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(name))
{
data << (uint8)CHAR_NAME_RESERVED;
SendPacket(&data);
return;
}
- if (objmgr.GetPlayerGUIDByName(name))
+ if (sObjectMgr.GetPlayerGUIDByName(name))
{
data << (uint8)CHAR_CREATE_NAME_IN_USE;
SendPacket(&data);
@@ -446,7 +446,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
}
Player * pNewChar = new Player(this);
- if (!pNewChar->Create(objmgr.GenerateLowGuid(HIGHGUID_PLAYER), name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId))
+ if (!pNewChar->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_PLAYER), name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId))
{
// Player not create (race/class problem?)
pNewChar->CleanupsBeforeDelete();
@@ -488,14 +488,14 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
recv_data >> guid;
// can't delete loaded character
- if (objmgr.GetPlayer(guid))
+ if (sObjectMgr.GetPlayer(guid))
return;
uint32 accountId = 0;
std::string name;
// is guild leader
- if (objmgr.GetGuildByLeader(guid))
+ if (sObjectMgr.GetGuildByLeader(guid))
{
WorldPacket data(SMSG_CHAR_DELETE, 1);
data << (uint8)CHAR_DELETE_FAILED_GUILD_LEADER;
@@ -504,7 +504,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
}
// is arena team captain
- if (objmgr.GetArenaTeamByCaptain(guid))
+ if (sObjectMgr.GetArenaTeamByCaptain(guid))
{
WorldPacket data(SMSG_CHAR_DELETE, 1);
data << (uint8)CHAR_DELETE_FAILED_ARENA_CAPTAIN;
@@ -664,7 +664,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
if (pCurrChar->GetGuildId() != 0)
{
- Guild* guild = objmgr.GetGuildById(pCurrChar->GetGuildId());
+ Guild* guild = sObjectMgr.GetGuildById(pCurrChar->GetGuildId());
if (guild)
{
data.Initialize(SMSG_GUILD_EVENT, (1+1+guild->GetMOTD().size()+1));
@@ -713,7 +713,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
if (!pCurrChar->GetMap()->Add(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
{
- AreaTrigger const* at = objmgr.GetGoBackTrigger(pCurrChar->GetMapId());
+ AreaTrigger const* at = sObjectMgr.GetGoBackTrigger(pCurrChar->GetMapId());
if (at)
pCurrChar->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, pCurrChar->GetOrientation());
else
@@ -944,7 +944,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
}
// check name limitations
- if (GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(newname))
+ if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(newname))
{
WorldPacket data(SMSG_CHAR_RENAME, 1);
data << uint8(CHAR_NAME_RESERVED);
@@ -1002,7 +1002,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
// not accept declined names for unsupported languages
std::string name;
- if (!objmgr.GetPlayerNameByGUID(guid, name))
+ if (!sObjectMgr.GetPlayerNameByGUID(guid, name))
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
@@ -1208,7 +1208,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
}
// check name limitations
- if (GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(newname))
+ if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(newname))
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
data << uint8(CHAR_NAME_RESERVED);
@@ -1217,7 +1217,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
}
// character with this name already exist
- if (uint64 newguid = objmgr.GetPlayerGUIDByName(newname))
+ if (uint64 newguid = sObjectMgr.GetPlayerGUIDByName(newname))
{
if (newguid != guid)
{
diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
index 85f37b52478..7d113b2d5d7 100644
--- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
@@ -243,7 +243,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
break;
}
- Player *player = objmgr.GetPlayer(to.c_str());
+ Player *player = sObjectMgr.GetPlayer(to.c_str());
uint32 tSecurity = GetSecurity();
uint32 pSecurity = player ? player->GetSession()->GetSecurity() : SEC_PLAYER;
if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers()))
@@ -330,7 +330,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (GetPlayer()->GetGuildId())
{
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (guild)
guild->BroadcastToGuild(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
@@ -368,7 +368,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (GetPlayer()->GetGuildId())
{
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (guild)
guild->BroadcastToOfficers(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
@@ -714,7 +714,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data)
recv_data >> iguid;
recv_data >> unk; // probably related to spam reporting
- Player *player = objmgr.GetPlayer(iguid);
+ Player *player = sObjectMgr.GetPlayer(iguid);
if (!player || !player->GetSession())
return;
diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
index abce1ab5e18..0025ed86af7 100644
--- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
@@ -72,7 +72,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
return;
}
- Player *player = objmgr.GetPlayer(membername.c_str());
+ Player *player = sObjectMgr.GetPlayer(membername.c_str());
// no player
if (!player)
@@ -217,7 +217,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket & /*recv_data*/)
return;
}
- Player* leader = objmgr.GetPlayer(group->GetLeaderGUID());
+ Player* leader = sObjectMgr.GetPlayer(group->GetLeaderGUID());
// forming a new group, create it
if (!group->IsCreated())
@@ -225,7 +225,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket & /*recv_data*/)
if (leader)
group->RemoveInvite(leader);
group->Create(group->GetLeaderGUID(), group->GetLeaderName());
- objmgr.AddGroup(group);
+ sObjectMgr.AddGroup(group);
}
// everything's fine, do it, PLAYER'S GROUP IS SET IN ADDMEMBER!!!
@@ -249,7 +249,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recv_data*/)
if (!group) return;
// remember leader if online
- Player *leader = objmgr.GetPlayer(group->GetLeaderGUID());
+ Player *leader = sObjectMgr.GetPlayer(group->GetLeaderGUID());
// uninvite, group can be deleted
GetPlayer()->UninviteFromGroup();
@@ -353,7 +353,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
/** error handling **/
if (!player || !group->IsLeader(GetPlayer()->GetGUID()) || player->GetGroup() != group)
@@ -559,7 +559,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
return;
/********************/
- Player *movedPlayer = objmgr.GetPlayer(name.c_str());
+ Player *movedPlayer = sObjectMgr.GetPlayer(name.c_str());
if (movedPlayer)
{
//Do not allow leader to change group of player in combat
@@ -570,7 +570,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
group->ChangeMembersGroup(movedPlayer, groupNr);
}
else
- group->ChangeMembersGroup(objmgr.GetPlayerGUIDByName(name.c_str()), groupNr);
+ group->ChangeMembersGroup(sObjectMgr.GetPlayerGUIDByName(name.c_str()), groupNr);
}
void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data)
@@ -841,7 +841,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
uint64 Guid;
recv_data >> Guid;
- Player *player = objmgr.GetPlayer(Guid);
+ Player *player = sObjectMgr.GetPlayer(Guid);
if (!player)
{
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
diff --git a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
index b2325212b6c..07eded4943d 100644
--- a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
@@ -36,7 +36,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
uint32 guildId;
recvPacket >> guildId;
- if (Guild *guild = objmgr.GetGuildById(guildId))
+ if (Guild *guild = sObjectMgr.GetGuildById(guildId))
{
guild->Query(this);
return;
@@ -62,7 +62,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
return;
}
- objmgr.AddGuild(guild);
+ sObjectMgr.AddGuild(guild);
}
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
@@ -83,7 +83,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
return;
}
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -145,7 +145,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
if (!normalizePlayerName(plName))
return;
- Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -193,12 +193,12 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
sLog.outDebug("WORLD: Received CMSG_GUILD_ACCEPT");
- guild = objmgr.GetGuildById(player->GetGuildIdInvited());
+ guild = sObjectMgr.GetGuildById(player->GetGuildIdInvited());
if (!guild || player->GetGuildId())
return;
// not let enemies sign guild charter
- if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && player->GetTeam() != objmgr.GetPlayerTeamByGUID(guild->GetLeader()))
+ if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && player->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(guild->GetLeader()))
return;
if (!guild->AddMember(GetPlayer()->GetGUID(),guild->GetLowestRank()))
@@ -224,7 +224,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
Guild *guild;
sLog.outDebug("WORLD: Received CMSG_GUILD_INFO");
- guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -244,7 +244,7 @@ void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_ROSTER");
- if (Guild* guild = objmgr.GetGuildById(_player->GetGuildId()))
+ if (Guild* guild = sObjectMgr.GetGuildById(_player->GetGuildId()))
guild->Roster(this);
}
@@ -258,7 +258,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
if (!normalizePlayerName(plName))
return;
- Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -314,7 +314,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
if (!normalizePlayerName(plName))
return;
- Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
@@ -370,7 +370,7 @@ void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_LEAVE");
- Guild *guild = objmgr.GetGuildById(_player->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(_player->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -402,7 +402,7 @@ void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_DISBAND");
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -432,7 +432,7 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
if (!normalizePlayerName(name))
return;
- Guild *guild = objmgr.GetGuildById(oldLeader->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(oldLeader->GetGuildId());
if (!guild)
{
@@ -472,7 +472,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
else
MOTD = "";
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -500,7 +500,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
if (!normalizePlayerName(name))
return;
- Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -538,7 +538,7 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
if (!normalizePlayerName(plName))
return;
- Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -574,7 +574,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
sLog.outDebug("WORLD: Received CMSG_GUILD_RANK");
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
recvPacket.rpos(recvPacket.wpos()); // set to end to avoid warnings spam
@@ -624,7 +624,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
std::string rankname;
recvPacket >> rankname;
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -650,7 +650,7 @@ void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_DEL_RANK");
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -687,7 +687,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
recvPacket >> GINFO;
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -727,7 +727,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
//"You are not part of a guild!";
@@ -763,7 +763,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
// empty
sLog.outDebug("WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)");
if (uint32 GuildId = GetPlayer()->GetGuildId())
- if (Guild *pGuild = objmgr.GetGuildById(GuildId))
+ if (Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
pGuild->DisplayGuildEventLog(this);
}
@@ -773,7 +773,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recv_data */)
{
sLog.outDebug("WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)");
if (uint32 GuildId = GetPlayer()->GetGuildId())
- if (Guild *pGuild = objmgr.GetGuildById(GuildId))
+ if (Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
pGuild->SendMoneyInfo(this, GetPlayer()->GetGUIDLow());
}
@@ -783,7 +783,7 @@ void WorldSession::HandleGuildPermissions(WorldPacket& /* recv_data */)
if (uint32 GuildId = GetPlayer()->GetGuildId())
{
- if (Guild *pGuild = objmgr.GetGuildById(GuildId))
+ if (Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
{
uint32 rankId = GetPlayer()->GetRank();
@@ -819,7 +819,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket & recv_data)
if (uint32 GuildId = GetPlayer()->GetGuildId())
{
- if (Guild *pGuild = objmgr.GetGuildById(GuildId))
+ if (Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
{
pGuild->DisplayGuildBankTabsInfo(this); // this also will load guild bank if not yet
return;
@@ -845,7 +845,7 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data)
if (!GuildId)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
@@ -879,7 +879,7 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data)
if (!GuildId)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
@@ -927,7 +927,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data)
if (GuildId == 0)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
@@ -987,7 +987,7 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
return;
}
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
{
recv_data.rpos(recv_data.wpos()); // prevent additional spam at rejected packet
@@ -1088,7 +1088,7 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket & recv_data)
if (!GuildId)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
@@ -1139,7 +1139,7 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data)
if (!GuildId)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
@@ -1162,7 +1162,7 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data)
if (!GuildId)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
@@ -1184,7 +1184,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data)
if (!GuildId)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
@@ -1207,7 +1207,7 @@ void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data)
if (!GuildId)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
index 5087e541c0b..86c81172a61 100644
--- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
@@ -287,7 +287,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
sLog.outDetail("STORAGE: Item Query = %u", item);
- ItemPrototype const *pProto = objmgr.GetItemPrototype(item);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item);
if (pProto)
{
std::string Name = pProto->Name1;
@@ -296,7 +296,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- ItemLocale const *il = objmgr.GetItemLocale(pProto->ItemId);
+ ItemLocale const *il = sObjectMgr.GetItemLocale(pProto->ItemId);
if (il)
{
if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty())
@@ -762,7 +762,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
{
if (VendorItem const* crItem = vItems->GetItem(vendorslot))
{
- if (ItemPrototype const *pProto = objmgr.GetItemPrototype(crItem->item))
+ if (ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(crItem->item))
{
if ((pProto->AllowableClass & _player->getClassMask()) == 0 && pProto->Bonding == BIND_WHEN_PICKED_UP && !_player->isGameMaster())
continue;
@@ -1023,14 +1023,14 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
recv_data.read_skip<uint64>(); // guid
sLog.outDebug("WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
- ItemSetNameEntry const *pName = objmgr.GetItemSetNameEntry(itemid);
+ ItemSetNameEntry const *pName = sObjectMgr.GetItemSetNameEntry(itemid);
if (pName)
{
std::string Name = pName->name;
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- ItemSetNameLocale const *isnl = objmgr.GetItemSetNameLocale(itemid);
+ ItemSetNameLocale const *isnl = sObjectMgr.GetItemSetNameLocale(itemid);
if (isnl)
if (isnl->Name.size() > size_t(loc_idx) && !isnl->Name[loc_idx].empty())
Name = isnl->Name[loc_idx];
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
index 84c951a6192..85217117461 100644
--- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
@@ -296,7 +296,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
if (!(wplayer_name.empty() || wpname.find(wplayer_name) != std::wstring::npos))
continue;
- std::string gname = objmgr.GetGuildNameById(itr->second->GetGuildId());
+ std::string gname = sObjectMgr.GetGuildNameById(itr->second->GetGuildId());
std::wstring wgname;
if (!Utf8toWStr(gname,wgname))
continue;
@@ -578,7 +578,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult_AutoPtr result, uin
team = Player::TeamForRace((*result)[1].GetUInt8());
friendAcctid = (*result)[2].GetUInt32();
- if (session->GetSecurity() >= SEC_MODERATOR || sWorld.getConfig(CONFIG_ALLOW_GM_FRIEND) || accmgr.GetSecurity(friendAcctid) < SEC_MODERATOR)
+ if (session->GetSecurity() >= SEC_MODERATOR || sWorld.getConfig(CONFIG_ALLOW_GM_FRIEND) || sAccountMgr.GetSecurity(friendAcctid) < SEC_MODERATOR)
{
if (friendGuid)
{
@@ -887,10 +887,10 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if (sScriptMgr.OnAreaTrigger(GetPlayer(), atEntry))
return;
- uint32 quest_id = objmgr.GetQuestForAreaTrigger(Trigger_ID);
+ uint32 quest_id = sObjectMgr.GetQuestForAreaTrigger(Trigger_ID);
if (quest_id && GetPlayer()->isAlive() && GetPlayer()->IsActiveQuest(quest_id))
{
- Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (pQuest)
{
if (GetPlayer()->GetQuestStatus(quest_id) == QUEST_STATUS_INCOMPLETE)
@@ -898,7 +898,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
}
}
- if (objmgr.IsTavernAreaTrigger(Trigger_ID))
+ if (sObjectMgr.IsTavernAreaTrigger(Trigger_ID))
{
// set resting flag we are in the inn
GetPlayer()->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING);
@@ -928,7 +928,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
}
// NULL if all values default (non teleport trigger)
- AreaTrigger const* at = objmgr.GetAreaTrigger(Trigger_ID);
+ AreaTrigger const* at = sObjectMgr.GetAreaTrigger(Trigger_ID);
if (!at)
return;
@@ -1215,7 +1215,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
_player->SetSelection(guid);
- Player *plr = objmgr.GetPlayer(guid);
+ Player *plr = sObjectMgr.GetPlayer(guid);
if (!plr) // wrong player
return;
@@ -1244,7 +1244,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
uint64 guid;
recv_data >> guid;
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
if (!player)
{
@@ -1316,7 +1316,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
return;
}
- Player *plr = objmgr.GetPlayer(charname.c_str());
+ Player *plr = sObjectMgr.GetPlayer(charname.c_str());
if (!plr)
{
@@ -1687,7 +1687,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data)
if (!recv_data.readPackGUID(guid))
return;
- Player *player = objmgr.GetPlayer(guid);
+ Player *player = sObjectMgr.GetPlayer(guid);
if (!player)
return;
diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
index 727bef330c0..e7bab3eed1f 100644
--- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
@@ -58,7 +58,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
// get the destination map entry, not the current one, this will fix homebind and reset greeting
MapEntry const* mEntry = sMapStore.LookupEntry(loc.GetMapId());
- InstanceTemplate const* mInstance = objmgr.GetInstanceTemplate(loc.GetMapId());
+ InstanceTemplate const* mInstance = sObjectMgr.GetInstanceTemplate(loc.GetMapId());
// reset instance validity, except if going to an instance inside an instance
if (GetPlayer()->m_InstanceValid == false && !mInstance)
@@ -157,7 +157,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
{
if (mapDiff->resetTime)
{
- if (uint32 timeReset = sInstanceSaveManager.GetResetTimeFor(mEntry->MapID,diff))
+ if (uint32 timeReset = sInstanceSaveMgr.GetResetTimeFor(mEntry->MapID,diff))
{
uint32 timeleft = timeReset - time(NULL);
GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft);
diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
index 2008bee91ab..ac767d0e55d 100644
--- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
@@ -179,7 +179,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
valid = false;
break;
}
- if (spellmgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell[i]))
+ if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell[i]))
primary_prof_first_rank = true;
}
if (!valid)
@@ -203,7 +203,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
{
if (!tSpell->learnedSpell[i])
continue;
- if (SpellChainNode const* chain_node = spellmgr.GetSpellChainNode(tSpell->learnedSpell[i]))
+ if (SpellChainNode const* chain_node = sSpellMgr.GetSpellChainNode(tSpell->learnedSpell[i]))
{
if (chain_node->prev)
{
@@ -213,7 +213,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
}
if (maxReq == 3)
break;
- SpellsRequiringSpellMapBounds spellsRequired = spellmgr.GetSpellsRequiredForSpellBounds(tSpell->learnedSpell[i]);
+ SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr.GetSpellsRequiredForSpellBounds(tSpell->learnedSpell[i]);
for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequired.first; itr2 != spellsRequired.second && maxReq < 3; ++itr2)
{
data << uint32(itr2->second);
@@ -421,7 +421,7 @@ void WorldSession::SendSpiritResurrect()
WorldSafeLocsEntry const *corpseGrave = NULL;
Corpse *corpse = _player->GetCorpse();
if (corpse)
- corpseGrave = objmgr.GetClosestGraveYard(
+ corpseGrave = sObjectMgr.GetClosestGraveYard(
corpse->GetPositionX(), corpse->GetPositionY(), corpse->GetPositionZ(), corpse->GetMapId(), _player->GetTeam());
// now can spawn bones
@@ -430,7 +430,7 @@ void WorldSession::SendSpiritResurrect()
// teleport to nearest from corpse graveyard, if different from nearest to player ghost
if (corpseGrave)
{
- WorldSafeLocsEntry const *ghostGrave = objmgr.GetClosestGraveYard(
+ WorldSafeLocsEntry const *ghostGrave = sObjectMgr.GetClosestGraveYard(
_player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetMapId(), _player->GetTeam());
if (corpseGrave != ghostGrave)
@@ -673,7 +673,7 @@ void WorldSession::HandleUnstablePet(WorldPacket & recv_data)
return;
}
- CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(creature_id);
+ CreatureInfo const* creatureInfo = sObjectMgr.GetCreatureTemplate(creature_id);
if (!creatureInfo || !creatureInfo->isTameable(_player->CanTameExoticPets()))
{
// if problem in exotic pet
@@ -791,7 +791,7 @@ void WorldSession::HandleStableSwapPet(WorldPacket & recv_data)
return;
}
- CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(creature_id);
+ CreatureInfo const* creatureInfo = sObjectMgr.GetCreatureTemplate(creature_id);
if (!creatureInfo || !creatureInfo->isTameable(_player->CanTameExoticPets()))
{
// if problem in exotic pet
@@ -860,7 +860,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data)
uint32 GuildId = _player->GetGuildId();
if (!GuildId)
return;
- Guild *pGuild = objmgr.GetGuildById(GuildId);
+ Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
if (!pGuild)
return;
pGuild->LogBankEvent(GUILD_BANK_LOG_REPAIR_MONEY, 0, _player->GetGUIDLow(), TotalCost);
diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
index 1f0857d9a46..c8208e68e16 100644
--- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
@@ -571,7 +571,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
return;
}
- if (objmgr.IsReservedName(name))
+ if (sObjectMgr.IsReservedName(name))
{
SendPetNameInvalid(PET_NAME_RESERVED, name, NULL);
return;
diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
index 7f578c22656..5248fb93289 100644
--- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
@@ -147,12 +147,12 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
if (type == 9)
{
- if (objmgr.GetGuildByName(name))
+ if (sObjectMgr.GetGuildByName(name))
{
SendGuildCommandResult(GUILD_CREATE_S, name, ERR_GUILD_NAME_EXISTS_S);
return;
}
- if (objmgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
+ if (sObjectMgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
{
SendGuildCommandResult(GUILD_CREATE_S, name, ERR_GUILD_NAME_INVALID);
return;
@@ -160,19 +160,19 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
}
else
{
- if (objmgr.GetArenaTeamByName(name))
+ if (sObjectMgr.GetArenaTeamByName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
- if (objmgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
+ if (sObjectMgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_INVALID);
return;
}
}
- ItemPrototype const *pProto = objmgr.GetItemPrototype(charterid);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(charterid);
if (!pProto)
{
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, NULL, charterid, 0);
@@ -397,12 +397,12 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
if (type == 9)
{
- if (objmgr.GetGuildByName(newname))
+ if (sObjectMgr.GetGuildByName(newname))
{
SendGuildCommandResult(GUILD_CREATE_S, newname, ERR_GUILD_NAME_EXISTS_S);
return;
}
- if (objmgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
+ if (sObjectMgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
{
SendGuildCommandResult(GUILD_CREATE_S, newname, ERR_GUILD_NAME_INVALID);
return;
@@ -410,12 +410,12 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
}
else
{
- if (objmgr.GetArenaTeamByName(newname))
+ if (sObjectMgr.GetArenaTeamByName(newname))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newname, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
- if (objmgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
+ if (sObjectMgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newname, "", ERR_ARENA_TEAM_NAME_INVALID);
return;
@@ -467,7 +467,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
return;
// not let enemies sign guild charter
- if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != objmgr.GetPlayerTeamByGUID(ownerguid))
+ if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(ownerguid))
{
if (type != 9)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
@@ -532,7 +532,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
SendPacket(&data);
// update for owner if online
- if (Player *owner = objmgr.GetPlayer(ownerguid))
+ if (Player *owner = sObjectMgr.GetPlayer(ownerguid))
owner->GetSession()->SendPacket(&data);
return;
}
@@ -555,7 +555,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
// item->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1+1, signs);
// update for owner if online
- if (Player *owner = objmgr.GetPlayer(ownerguid))
+ if (Player *owner = sObjectMgr.GetPlayer(ownerguid))
owner->GetSession()->SendPacket(&data);
}
@@ -576,7 +576,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
Field *fields = result->Fetch();
ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
- Player *owner = objmgr.GetPlayer(ownerguid);
+ Player *owner = sObjectMgr.GetPlayer(ownerguid);
if (owner) // petition owner online
{
WorldPacket data(MSG_PETITION_DECLINE, 8);
@@ -770,7 +770,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
if (type == 9)
{
- if (objmgr.GetGuildByName(name))
+ if (sObjectMgr.GetGuildByName(name))
{
SendGuildCommandResult(GUILD_CREATE_S, name, ERR_GUILD_NAME_EXISTS_S);
return;
@@ -778,7 +778,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
}
else
{
- if (objmgr.GetArenaTeamByName(name))
+ if (sObjectMgr.GetArenaTeamByName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
@@ -805,7 +805,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
}
// register guild and add guildmaster
- objmgr.AddGuild(guild);
+ sObjectMgr.AddGuild(guild);
// add members
for (uint8 i = 0; i < signs; ++i)
@@ -831,7 +831,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
at->SetEmblem(backgroud, icon, iconcolor, border, bordercolor);
// register team and add captain
- objmgr.AddArenaTeam(at);
+ sObjectMgr.AddArenaTeam(at);
sLog.outDebug("PetitonsHandler: arena team added to objmrg");
// add members
diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
index fc2c3baf735..0aa6ded77f0 100644
--- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
@@ -127,7 +127,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket & recv_data)
recv_data >> guid;
- Player *pChar = objmgr.GetPlayer(guid);
+ Player *pChar = sObjectMgr.GetPlayer(guid);
if (pChar)
SendNameQueryOpcode(pChar);
@@ -156,7 +156,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
- CreatureInfo const *ci = objmgr.GetCreatureTemplate(entry);
+ CreatureInfo const *ci = sObjectMgr.GetCreatureTemplate(entry);
if (ci)
{
@@ -167,7 +167,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- CreatureLocale const *cl = objmgr.GetCreatureLocale(entry);
+ CreatureLocale const *cl = sObjectMgr.GetCreatureLocale(entry);
if (cl)
{
if (cl->Name.size() > size_t(loc_idx) && !cl->Name[loc_idx].empty())
@@ -222,7 +222,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
- const GameObjectInfo *info = objmgr.GetGameObjectInfo(entryID);
+ const GameObjectInfo *info = sObjectMgr.GetGameObjectInfo(entryID);
if (info)
{
std::string Name;
@@ -236,7 +236,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- GameObjectLocale const *gl = objmgr.GetGameObjectLocale(entryID);
+ GameObjectLocale const *gl = sObjectMgr.GetGameObjectLocale(entryID);
if (gl)
{
if (gl->Name.size() > size_t(loc_idx) && !gl->Name[loc_idx].empty())
@@ -335,7 +335,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
recv_data >> guid;
GetPlayer()->SetUInt64Value(UNIT_FIELD_TARGET, guid);
- GossipText const* pGossip = objmgr.GetGossipText(textID);
+ GossipText const* pGossip = sObjectMgr.GetGossipText(textID);
WorldPacket data(SMSG_NPC_TEXT_UPDATE, 100); // guess size
data << textID;
@@ -368,7 +368,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- NpcTextLocale const *nl = objmgr.GetNpcTextLocale(textID);
+ NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textID);
if (nl)
{
for (int i = 0; i < 8; ++i)
@@ -439,7 +439,7 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- PageTextLocale const *pl = objmgr.GetPageTextLocale(pageID);
+ PageTextLocale const *pl = sObjectMgr.GetPageTextLocale(pageID);
if (pl)
{
if (pl->Text.size() > size_t(loc_idx) && !pl->Text[loc_idx].empty())
@@ -497,7 +497,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
if (questOk)
{
- QuestPOIVector const *POI = objmgr.GetQuestPOIVector(questId);
+ QuestPOIVector const *POI = sObjectMgr.GetQuestPOIVector(questId);
if (POI)
{
diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
index 7e948fe136d..ace517677e9 100644
--- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
@@ -133,7 +133,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
return;
}
- Quest const* qInfo = objmgr.GetQuestTemplate(quest);
+ Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest);
if (qInfo)
{
// prevent cheating
@@ -243,7 +243,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
return;
}
- Quest const* pQuest = objmgr.GetQuestTemplate(quest);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest);
if (pQuest)
{
if (pQuest->IsAutoAccept() && _player->CanAddQuest(pQuest, true))
@@ -266,7 +266,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket & recv_data)
recv_data >> quest;
sLog.outDebug("WORLD: Received CMSG_QUEST_QUERY quest = %u",quest);
- Quest const *pQuest = objmgr.GetQuestTemplate(quest);
+ Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
if (pQuest)
{
_player->PlayerTalkClass->SendQuestQueryResponse(pQuest);
@@ -297,7 +297,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
if (!pObject->hasInvolvedQuest(quest))
return;
- Quest const *pQuest = objmgr.GetQuestTemplate(quest);
+ Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
if (pQuest)
{
if (_player->CanRewardQuest(pQuest, reward, true))
@@ -350,7 +350,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data)
if (_player->GetQuestStatus(quest) != QUEST_STATUS_COMPLETE)
return;
- if (Quest const *pQuest = objmgr.GetQuestTemplate(quest))
+ if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest))
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
}
@@ -388,7 +388,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
if (!_player->TakeQuestSourceItem(quest, true))
return; // can't un-equip some items, reject quest cancel
- if (const Quest *pQuest = objmgr.GetQuestTemplate(quest))
+ if (const Quest *pQuest = sObjectMgr.GetQuestTemplate(quest))
{
if (pQuest->HasFlag(QUEST_TRINITY_FLAGS_TIMED))
_player->RemoveTimedQuest(quest);
@@ -412,7 +412,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
sLog.outDebug("WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest);
- if (const Quest* pQuest = objmgr.GetQuestTemplate(quest))
+ if (const Quest* pQuest = sObjectMgr.GetQuestTemplate(quest))
{
if (!pQuest->HasFlag(QUEST_FLAGS_PARTY_ACCEPT))
return;
@@ -451,7 +451,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest);
- Quest const *pQuest = objmgr.GetQuestTemplate(quest);
+ Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
if (pQuest)
{
// TODO: need a virtual function
@@ -489,7 +489,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
sLog.outDebug("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
- if (Quest const *pQuest = objmgr.GetQuestTemplate(questId))
+ if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(questId))
{
if (Group* pGroup = _player->GetGroup())
{
@@ -572,14 +572,14 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
{
case TYPEID_GAMEOBJECT:
{
- qir = &objmgr.mGOQuestInvolvedRelations;
- qr = &objmgr.mGOQuestRelations;
+ qir = &sObjectMgr.mGOQuestInvolvedRelations;
+ qr = &sObjectMgr.mGOQuestRelations;
break;
}
case TYPEID_UNIT:
{
- qir = &objmgr.mCreatureQuestInvolvedRelations;
- qr = &objmgr.mCreatureQuestRelations;
+ qir = &sObjectMgr.mCreatureQuestInvolvedRelations;
+ qr = &sObjectMgr.mCreatureQuestRelations;
break;
}
default:
@@ -592,7 +592,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
{
uint32 result2 = 0;
uint32 quest_id = i->second;
- Quest const *pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (!pQuest) continue;
QuestStatus status = pPlayer->GetQuestStatus(quest_id);
@@ -615,7 +615,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
{
uint32 result2 = 0;
uint32 quest_id = i->second;
- Quest const *pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (!pQuest)
continue;
diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
index a46d4e336d6..8c0e7c0735d 100644
--- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
@@ -358,7 +358,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
// auto-selection buff level base at target level (in spellInfo)
if (targets.getUnitTarget())
{
- SpellEntry const *actualSpellInfo = spellmgr.SelectAuraRankForPlayerLevel(spellInfo,targets.getUnitTarget()->getLevel());
+ SpellEntry const *actualSpellInfo = sSpellMgr.SelectAuraRankForPlayerLevel(spellInfo,targets.getUnitTarget()->getLevel());
// if rank not found then function return NULL but in explicit cast case original spell can be casted and later failed with appropriate error message
if (actualSpellInfo)
@@ -527,7 +527,7 @@ void WorldSession::HandleSpellClick(WorldPacket & recv_data)
if (!unit->IsInWorld())
return;
- SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(unit->GetEntry());
+ SpellClickInfoMapBounds clickPair = sObjectMgr.GetSpellClickInfoMapBounds(unit->GetEntry());
for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
{
if (itr->second.IsFitToRequirements(_player, unit))
diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
index ae74b714904..96cbece2240 100644
--- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
@@ -51,7 +51,7 @@ void WorldSession::SendTaxiStatus(uint64 guid)
return;
}
- uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
+ uint32 curloc = sObjectMgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
// not found nearest
if (curloc == 0)
@@ -96,7 +96,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data)
void WorldSession::SendTaxiMenu(Creature* unit)
{
// find current node
- uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
+ uint32 curloc = sObjectMgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
if (curloc == 0)
return;
@@ -136,7 +136,7 @@ void WorldSession::SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathN
bool WorldSession::SendLearnNewTaxiNode(Creature* unit)
{
// find current node
- uint32 curloc = objmgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
+ uint32 curloc = sObjectMgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
if (curloc == 0)
return true; // `true` send to avoid WorldSession::SendTaxiMenu call with one more curlock seartch with same false result.
@@ -257,10 +257,10 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
sLog.outDebug("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
- uint32 mountDisplayId = objmgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
+ uint32 mountDisplayId = sObjectMgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
- objmgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
+ sObjectMgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
if (path && mountDisplayId)
SendDoFlight(mountDisplayId, path, 1); // skip start fly node
diff --git a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp b/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
index 72ed25adbca..53ffcc359e3 100644
--- a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
@@ -33,7 +33,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
return;
}
- if (GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
+ if (GM_Ticket *ticket = sObjectMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
{
WorldPacket data(SMSG_GMTICKET_CREATE, 4);
data << uint32(1); // 1 - You already have GM ticket
@@ -57,7 +57,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
GM_Ticket *ticket = new GM_Ticket;
ticket->name = GetPlayer()->GetName();
- ticket->guid = objmgr.GenerateGMTicketId();
+ ticket->guid = sObjectMgr.GenerateGMTicketId();
ticket->playerGuid = GetPlayer()->GetGUID();
ticket->message = ticketText;
ticket->createtime = time(NULL);
@@ -70,7 +70,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
ticket->assignedToGM = 0;
ticket->comment = "";
- objmgr.AddOrUpdateGMTicket(*ticket, true);
+ sObjectMgr.AddOrUpdateGMTicket(*ticket, true);
data << uint32(2);
SendPacket(&data);
@@ -86,7 +86,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
std::string message;
recv_data >> message;
- GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
+ GM_Ticket *ticket = sObjectMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
if (!ticket)
{
data << uint32(1);
@@ -97,7 +97,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
ticket->message = message;
ticket->timestamp = time(NULL);
- objmgr.AddOrUpdateGMTicket(*ticket);
+ sObjectMgr.AddOrUpdateGMTicket(*ticket);
data << uint32(2);
SendPacket(&data);
@@ -108,7 +108,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recv_data*/)
{
- GM_Ticket* ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
+ GM_Ticket* ticket = sObjectMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
if (ticket)
{
@@ -117,7 +117,7 @@ void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recv_data*/)
SendPacket(&data);
sWorld.SendGMText(LANG_COMMAND_TICKETPLAYERABANDON, GetPlayer()->GetName(), ticket->guid);
- objmgr.RemoveGMTicket(ticket, GetPlayer()->GetGUID(), false);
+ sObjectMgr.RemoveGMTicket(ticket, GetPlayer()->GetGUID(), false);
SendGMTicketGetTicket(0x0A, 0);
}
}
@@ -126,7 +126,7 @@ void WorldSession::HandleGMTicketGetTicketOpcode(WorldPacket & /*recv_data*/)
{
SendQueryTimeResponse();
- GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
+ GM_Ticket *ticket = sObjectMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
if (ticket)
SendGMTicketGetTicket(0x06, ticket->message.c_str());
else
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 785168e9b23..47a35a62b0d 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -49,7 +49,7 @@
WorldSession::WorldSession(uint32 id, WorldSocket *sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale) :
LookingForGroup_auto_join(false), LookingForGroup_auto_add(false), m_muteTime(mute_time),
_player(NULL), m_Socket(sock),_security(sec), _accountId(id), m_expansion(expansion),
-m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(objmgr.GetIndexForLocale(locale)),
+m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(sObjectMgr.GetIndexForLocale(locale)),
_logoutTime(0), m_inQueue(false), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(false),
m_latency(0), m_TutorialsChanged(false), m_timeOutTime(0)
{
@@ -407,7 +407,7 @@ void WorldSession::LogoutPlayer(bool Save)
HandleMoveWorldportAckOpcode();
///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members
- Guild *guild = objmgr.GetGuildById(_player->GetGuildId());
+ Guild *guild = sObjectMgr.GetGuildById(_player->GetGuildId());
if (guild)
{
guild->SetMemberStats(_player->GetGUID());
@@ -527,7 +527,7 @@ void WorldSession::SendNotification(int32 string_id,...)
const char * WorldSession::GetTrinityString(int32 entry) const
{
- return objmgr.GetTrinityString(entry,GetSessionDbLocaleIndex());
+ return sObjectMgr.GetTrinityString(entry,GetSessionDbLocaleIndex());
}
void WorldSession::Handle_NULL(WorldPacket& recvPacket)
diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp
index fb34cff150c..658228fcabb 100644
--- a/src/server/game/Skills/SkillDiscovery.cpp
+++ b/src/server/game/Skills/SkillDiscovery.cpp
@@ -117,7 +117,7 @@ void LoadSkillDiscoveryTable()
}
else if (reqSkillOrSpell == 0) // skill case
{
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spellId);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spellId);
if (bounds.first == bounds.second)
{
@@ -166,7 +166,7 @@ uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)
if (tab == SkillDiscoveryStore.end())
return 0;
- SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spellId);
+ SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spellId);
uint32 skillvalue = bounds.first != bounds.second ? player->GetSkillValue(bounds.first->second->skillId) : 0;
float full_chance = 0;
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 4446b679790..c3988672113 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -616,7 +616,7 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
amount+=caster->ApplyEffectModifiers(m_spellProto,m_effIndex,int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.2f));
// "If used while your target is above 75% health, Rend does 35% more damage."
// as for 3.1.3 only ranks above 9 (wrong tooltip?)
- if (spellmgr.GetSpellRank(m_spellProto->Id) >= 9)
+ if (sSpellMgr.GetSpellRank(m_spellProto->Id) >= 9)
{
if (GetBase()->GetUnitOwner()->HasAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, m_spellProto, caster))
amount += int32(amount * SpellMgr::CalculateSpellEffectAmount(m_spellProto, 2, caster) / 100.0f);
@@ -968,7 +968,7 @@ void AuraEffect::ApplySpellMod(Unit * target, bool apply)
Aura * aura = iter->second->GetBase();
// only passive auras-active auras should have amount set on spellcast and not be affected
// if aura is casted by others, it will not be affected
- if (aura->IsPassive() && aura->GetCasterGUID() == guid && spellmgr.IsAffectedByMod(aura->GetSpellProto(), m_spellmod))
+ if (aura->IsPassive() && aura->GetCasterGUID() == guid && sSpellMgr.IsAffectedByMod(aura->GetSpellProto(), m_spellmod))
{
if (GetMiscValue() == SPELLMOD_ALL_EFFECTS)
{
@@ -3092,7 +3092,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
}
else
{
- CreatureInfo const * ci = objmgr.GetCreatureTemplate(GetMiscValue());
+ CreatureInfo const * ci = sObjectMgr.GetCreatureTemplate(GetMiscValue());
if (!ci)
{
target->SetDisplayId(16358); // pig pink ^_^
@@ -3166,14 +3166,14 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
if (!target->GetAuraEffectsByType(SPELL_AURA_MOUNTED).empty())
{
uint32 cr_id = target->GetAuraEffectsByType(SPELL_AURA_MOUNTED).front()->GetMiscValue();
- if (CreatureInfo const* ci = objmgr.GetCreatureTemplate(cr_id))
+ if (CreatureInfo const* ci = sObjectMgr.GetCreatureTemplate(cr_id))
{
uint32 team = 0;
if (target->GetTypeId() == TYPEID_PLAYER)
team = target->ToPlayer()->GetTeam();
- uint32 display_id = objmgr.ChooseDisplayId(team,ci);
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
+ uint32 display_id = sObjectMgr.ChooseDisplayId(team,ci);
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
@@ -3599,7 +3599,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
if (apply)
{
- CreatureInfo const* ci = objmgr.GetCreatureTemplate(GetMiscValue());
+ CreatureInfo const* ci = sObjectMgr.GetCreatureTemplate(GetMiscValue());
if (!ci)
{
sLog.outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need it modelid)",GetMiscValue());
@@ -3610,8 +3610,8 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
if (target->GetTypeId() == TYPEID_PLAYER)
team = target->ToPlayer()->GetTeam();
- uint32 display_id = objmgr.ChooseDisplayId(team,ci);
- CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
+ uint32 display_id = sObjectMgr.ChooseDisplayId(team,ci);
+ CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
@@ -6039,7 +6039,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
if (mode & AURA_EFFECT_HANDLE_REAL)
{
// pet auras
- if (PetAura const* petSpell = spellmgr.GetPetAura(GetId(), m_effIndex))
+ if (PetAura const* petSpell = sSpellMgr.GetPetAura(GetId(), m_effIndex))
{
if (apply)
target->AddPetAura(petSpell);
@@ -6171,7 +6171,7 @@ void AuraEffect::HandleAuraEmpathy(AuraApplication const * aurApp, uint8 mode, b
return;
}
- CreatureInfo const * ci = objmgr.GetCreatureTemplate(target->GetEntry());
+ CreatureInfo const * ci = sObjectMgr.GetCreatureTemplate(target->GetEntry());
if (ci && ci->type == CREATURE_TYPE_BEAST)
target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply);
}
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index a17f990307c..e0a41766fbd 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -506,7 +506,7 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply)
for (Unit::AuraApplicationMap::iterator iter = itr->first->GetAppliedAuras().begin(); iter != itr->first->GetAppliedAuras().end(); ++iter)
{
Aura const * aura = iter->second->GetBase();
- if (!spellmgr.CanAurasStack(GetSpellProto(), aura->GetSpellProto(), aura->GetCasterGUID() == GetCasterGUID()))
+ if (!sSpellMgr.CanAurasStack(GetSpellProto(), aura->GetSpellProto(), aura->GetCasterGUID() == GetCasterGUID()))
{
addUnit = false;
break;
@@ -844,7 +844,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
Unit * target = aurApp->GetTarget();
AuraRemoveMode removeMode = aurApp->GetRemoveMode();
// spell_area table
- SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAuraMapBounds(GetId());
+ SpellAreaForAreaMapBounds saBounds = sSpellMgr.GetSpellAreaForAuraMapBounds(GetId());
if (saBounds.first != saBounds.second)
{
uint32 zone, area;
@@ -867,9 +867,9 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
if (apply)
{
// Apply linked auras (On first aura apply)
- if (spellmgr.GetSpellCustomAttr(GetId()) & SPELL_ATTR_CU_LINK_AURA)
+ if (sSpellMgr.GetSpellCustomAttr(GetId()) & SPELL_ATTR_CU_LINK_AURA)
{
- if (const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(GetId() + SPELL_LINK_AURA))
+ if (const std::vector<int32> *spell_triggered = sSpellMgr.GetSpellLinked(GetId() + SPELL_LINK_AURA))
for (std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
{
if (*itr < 0)
@@ -1057,11 +1057,11 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
// Remove Linked Auras
if (removeMode != AURA_REMOVE_BY_STACK && removeMode != AURA_REMOVE_BY_DEATH)
{
- if (uint32 customAttr = spellmgr.GetSpellCustomAttr(GetId()))
+ if (uint32 customAttr = sSpellMgr.GetSpellCustomAttr(GetId()))
{
if (customAttr & SPELL_ATTR_CU_LINK_REMOVE)
{
- if (const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(-(int32)GetId()))
+ if (const std::vector<int32> *spell_triggered = sSpellMgr.GetSpellLinked(-(int32)GetId()))
for (std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
{
if (*itr < 0)
@@ -1072,7 +1072,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
}
if (customAttr & SPELL_ATTR_CU_LINK_AURA)
{
- if (const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(GetId() + SPELL_LINK_AURA))
+ if (const std::vector<int32> *spell_triggered = sSpellMgr.GetSpellLinked(GetId() + SPELL_LINK_AURA))
for (std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
{
if (*itr < 0)
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 5f1d60b1771..05c6c741e39 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -334,10 +334,10 @@ void SpellCastTargets::write (WorldPacket * data)
}
Spell::Spell(Unit* Caster, SpellEntry const *info, bool triggered, uint64 originalCasterGUID, Spell** triggeringContainer, bool skipCheck)
-: m_spellInfo(spellmgr.GetSpellForDifficultyFromSpell(info, Caster)), m_spellValue(new SpellValue(m_spellInfo))
+: m_spellInfo(sSpellMgr.GetSpellForDifficultyFromSpell(info, Caster)), m_spellValue(new SpellValue(m_spellInfo))
, m_caster(Caster)
{
- m_customAttr = spellmgr.GetSpellCustomAttr(m_spellInfo->Id);
+ m_customAttr = sSpellMgr.GetSpellCustomAttr(m_spellInfo->Id);
m_skipCheck = skipCheck;
m_selfContainer = NULL;
m_triggeringContainer = triggeringContainer;
@@ -619,7 +619,7 @@ void Spell::SelectSpellTargets()
case SPELL_EFFECT_SUMMON_PLAYER:
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->ToPlayer()->GetSelection())
{
- Player* target = objmgr.GetPlayer(m_caster->ToPlayer()->GetSelection());
+ Player* target = sObjectMgr.GetPlayer(m_caster->ToPlayer()->GetSelection());
if (target)
AddUnitTarget(target, i);
}
@@ -899,7 +899,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
ihit->scaleAura = false;
if (m_auraScaleMask && ihit->effectMask == m_auraScaleMask && m_caster != pVictim)
{
- SpellEntry const * auraSpell = sSpellStore.LookupEntry(spellmgr.GetFirstSpellInChain(m_spellInfo->Id));
+ SpellEntry const * auraSpell = sSpellStore.LookupEntry(sSpellMgr.GetFirstSpellInChain(m_spellInfo->Id));
if ((pVictim->getLevel() + 10) >= auraSpell->spellLevel)
ihit->scaleAura = true;
}
@@ -920,7 +920,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
target.scaleAura = false;
if (m_auraScaleMask && target.effectMask == m_auraScaleMask && m_caster != pVictim)
{
- SpellEntry const * auraSpell = sSpellStore.LookupEntry(spellmgr.GetFirstSpellInChain(m_spellInfo->Id));
+ SpellEntry const * auraSpell = sSpellStore.LookupEntry(sSpellMgr.GetFirstSpellInChain(m_spellInfo->Id));
if ((pVictim->getLevel() + 10) >= auraSpell->spellLevel)
target.scaleAura = true;
}
@@ -1406,7 +1406,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
int32 basePoints[3];
if (scaleAura)
{
- aurSpellInfo = spellmgr.SelectAuraRankForPlayerLevel(m_spellInfo,unitTarget->getLevel());
+ aurSpellInfo = sSpellMgr.SelectAuraRankForPlayerLevel(m_spellInfo,unitTarget->getLevel());
ASSERT (aurSpellInfo);
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
@@ -1528,7 +1528,7 @@ void Spell::DoTriggersOnSpellHit(Unit *unit)
if (m_customAttr & SPELL_ATTR_CU_LINK_HIT)
{
- if (const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(m_spellInfo->Id + SPELL_LINK_HIT))
+ if (const std::vector<int32> *spell_triggered = sSpellMgr.GetSpellLinked(m_spellInfo->Id + SPELL_LINK_HIT))
for (std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i)
if (*i < 0)
unit->RemoveAurasDueToSpell(-(*i));
@@ -2196,7 +2196,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
switch(cur)
{
case TARGET_DST_DB:
- if (SpellTargetPosition const* st = spellmgr.GetSpellTargetPosition(m_spellInfo->Id))
+ if (SpellTargetPosition const* st = sSpellMgr.GetSpellTargetPosition(m_spellInfo->Id))
{
//TODO: fix this check
if (m_spellInfo->Effect[0] == SPELL_EFFECT_TELEPORT_UNITS
@@ -3198,7 +3198,7 @@ void Spell::cast(bool skipCheck)
if (m_customAttr & SPELL_ATTR_CU_LINK_CAST)
{
- if (const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(m_spellInfo->Id))
+ if (const std::vector<int32> *spell_triggered = sSpellMgr.GetSpellLinked(m_spellInfo->Id))
for (std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i)
if (*i < 0)
m_caster->RemoveAurasDueToSpell(-(*i));
@@ -3714,7 +3714,7 @@ void Spell::SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 ca
for (int8 x=0;x < 3;x++)
if (spellInfo->EffectItemType[x])
item = spellInfo->EffectItemType[x];
- ItemPrototype const *pProto = objmgr.GetItemPrototype(item);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item);
if (pProto && pProto->ItemLimitCategory)
data << uint32(pProto->ItemLimitCategory);
break;
@@ -3894,7 +3894,7 @@ void Spell::WriteAmmoToPacket(WorldPacket * data)
uint32 ammoID = m_caster->ToPlayer()->GetUInt32Value(PLAYER_AMMO_ID);
if (ammoID)
{
- ItemPrototype const *pProto = objmgr.GetItemPrototype(ammoID);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(ammoID);
if (pProto)
{
ammoDisplayID = pProto->DisplayInfoID;
@@ -4541,14 +4541,14 @@ void Spell::HandleThreatSpells(uint32 spellId)
if (!m_targets.getUnitTarget()->CanHaveThreatList())
return;
- uint16 threat = spellmgr.GetSpellThreat(spellId);
+ uint16 threat = sSpellMgr.GetSpellThreat(spellId);
if (!threat)
return;
m_targets.getUnitTarget()->AddThreat(m_caster, float(threat));
- DEBUG_LOG("Spell %u, rank %u, added an additional %i threat", spellId, spellmgr.GetSpellRank(spellId), threat);
+ DEBUG_LOG("Spell %u, rank %u, added an additional %i threat", spellId, sSpellMgr.GetSpellRank(spellId), threat);
}
void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i)
@@ -4719,7 +4719,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (!m_IsTriggeredSpell && target == m_caster && m_spellInfo->AttributesEx & SPELL_ATTR_EX_CANT_TARGET_SELF)
return SPELL_FAILED_BAD_TARGETS;
- bool non_caster_target = target != m_caster && !spellmgr.IsSpellWithCasterSourceTargetsOnly(m_spellInfo);
+ bool non_caster_target = target != m_caster && !sSpellMgr.IsSpellWithCasterSourceTargetsOnly(m_spellInfo);
if (non_caster_target)
{
@@ -4894,7 +4894,7 @@ SpellCastResult Spell::CheckCast(bool strict)
uint32 zone, area;
m_caster->GetZoneAndAreaId(zone,area);
- SpellCastResult locRes= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),zone,area,
+ SpellCastResult locRes= sSpellMgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),zone,area,
m_caster->GetTypeId() == TYPEID_PLAYER ? m_caster->ToPlayer() : NULL);
if (locRes != SPELL_CAST_OK)
return locRes;
@@ -4928,8 +4928,8 @@ SpellCastResult Spell::CheckCast(bool strict)
m_spellInfo->EffectImplicitTargetA[j] == TARGET_DST_NEARBY_ENTRY ||
m_spellInfo->EffectImplicitTargetB[j] == TARGET_DST_NEARBY_ENTRY)
{
- SpellScriptTarget::const_iterator lower = spellmgr.GetBeginSpellScriptTarget(m_spellInfo->Id);
- SpellScriptTarget::const_iterator upper = spellmgr.GetEndSpellScriptTarget(m_spellInfo->Id);
+ SpellScriptTarget::const_iterator lower = sSpellMgr.GetBeginSpellScriptTarget(m_spellInfo->Id);
+ SpellScriptTarget::const_iterator upper = sSpellMgr.GetEndSpellScriptTarget(m_spellInfo->Id);
if (lower == upper)
sLog.outErrorDb("Spell (ID: %u) has effect EffectImplicitTargetA/EffectImplicitTargetB = TARGET_UNIT_NEARBY_ENTRY or TARGET_DST_NEARBY_ENTRY, but does not have record in `spell_script_target`",m_spellInfo->Id);
@@ -5377,7 +5377,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (!m_caster->ToPlayer()->GetSelection())
return SPELL_FAILED_BAD_TARGETS;
- Player* target = objmgr.GetPlayer(m_caster->ToPlayer()->GetSelection());
+ Player* target = sObjectMgr.GetPlayer(m_caster->ToPlayer()->GetSelection());
if (!target || m_caster->ToPlayer() == target || !target->IsInSameRaidWith(m_caster->ToPlayer()))
return SPELL_FAILED_BAD_TARGETS;
@@ -5388,7 +5388,7 @@ SpellCastResult Spell::CheckCast(bool strict)
InstanceTemplate const* instance = ObjectMgr::GetInstanceTemplate(pMap->GetId());
if (!instance)
return SPELL_FAILED_TARGET_NOT_IN_INSTANCE;
- if (!target->Satisfy(objmgr.GetAccessRequirement(pMap->GetId(), pMap->GetDifficulty()), pMap->GetId()))
+ if (!target->Satisfy(sObjectMgr.GetAccessRequirement(pMap->GetId(), pMap->GetDifficulty()), pMap->GetId()))
return SPELL_FAILED_BAD_TARGETS;
}
break;
@@ -5548,7 +5548,7 @@ SpellCastResult Spell::CheckCast(bool strict)
// Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells
bool AllowMount = !m_caster->GetMap()->IsDungeon() || m_caster->GetMap()->IsBattlegroundOrArena();
- InstanceTemplate const *it = objmgr.GetInstanceTemplate(m_caster->GetMapId());
+ InstanceTemplate const *it = sObjectMgr.GetInstanceTemplate(m_caster->GetMapId());
if (it)
AllowMount = it->allowMount;
if (m_caster->GetTypeId() == TYPEID_PLAYER && !AllowMount && !m_IsTriggeredSpell && !m_spellInfo->AreaGroupId)
@@ -6112,7 +6112,7 @@ SpellCastResult Spell::CheckItems()
uint8 msg = p_caster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->EffectItemType[i], 1);
if (msg != EQUIP_ERR_OK)
{
- ItemPrototype const *pProto = objmgr.GetItemPrototype(m_spellInfo->EffectItemType[i]);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(m_spellInfo->EffectItemType[i]);
// TODO: Needs review
if (pProto && !(pProto->ItemLimitCategory))
{
@@ -6297,7 +6297,7 @@ SpellCastResult Spell::CheckItems()
return SPELL_FAILED_NO_AMMO;
}
- ItemPrototype const *ammoProto = objmgr.GetItemPrototype(ammo);
+ ItemPrototype const *ammoProto = sObjectMgr.GetItemPrototype(ammo);
if (!ammoProto)
return SPELL_FAILED_NO_AMMO;
@@ -6333,7 +6333,7 @@ SpellCastResult Spell::CheckItems()
case SPELL_EFFECT_CREATE_MANA_GEM:
{
uint32 item_id = m_spellInfo->EffectItemType[i];
- ItemPrototype const *pProto = objmgr.GetItemPrototype(item_id);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item_id);
if (!pProto)
return SPELL_FAILED_ITEM_AT_MAX_CHARGES;
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 61ddba8e6bc..cb9e8312466 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -1890,7 +1890,7 @@ void Spell::EffectDummy(uint32 i)
}
// pet auras
- if (PetAura const* petSpell = spellmgr.GetPetAura(m_spellInfo->Id,i))
+ if (PetAura const* petSpell = sSpellMgr.GetPetAura(m_spellInfo->Id,i))
{
m_caster->AddPetAura(petSpell);
return;
@@ -2782,7 +2782,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
Player* player = (Player*)unitTarget;
uint32 newitemid = itemtype;
- ItemPrototype const *pProto = objmgr.GetItemPrototype(newitemid);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(newitemid);
if (!pProto)
{
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL);
@@ -2944,7 +2944,7 @@ void Spell::EffectPersistentAA(uint32 i)
if (!caster->IsInWorld())
return;
DynamicObject* dynObj = new DynamicObject;
- if (!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), caster, m_spellInfo->Id, m_targets.m_dstPos, radius, false))
+ if (!dynObj->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), caster, m_spellInfo->Id, m_targets.m_dstPos, radius, false))
{
delete dynObj;
return;
@@ -3028,10 +3028,10 @@ void Spell::EffectEnergize(uint32 i)
{
uint32 spell_id = itr->second->GetBase()->GetId();
if (!guardianFound)
- if (spellmgr.IsSpellMemberOfSpellGroup(spell_id, SPELL_GROUP_ELIXIR_GUARDIAN))
+ if (sSpellMgr.IsSpellMemberOfSpellGroup(spell_id, SPELL_GROUP_ELIXIR_GUARDIAN))
guardianFound = true;
if (!battleFound)
- if (spellmgr.IsSpellMemberOfSpellGroup(spell_id, SPELL_GROUP_ELIXIR_BATTLE))
+ if (sSpellMgr.IsSpellMemberOfSpellGroup(spell_id, SPELL_GROUP_ELIXIR_BATTLE))
battleFound = true;
if (battleFound && guardianFound)
break;
@@ -3040,17 +3040,17 @@ void Spell::EffectEnergize(uint32 i)
// get all available elixirs by mask and spell level
std::set<uint32> avalibleElixirs;
if (!guardianFound)
- spellmgr.GetSetOfSpellsInSpellGroup(SPELL_GROUP_ELIXIR_GUARDIAN, avalibleElixirs);
+ sSpellMgr.GetSetOfSpellsInSpellGroup(SPELL_GROUP_ELIXIR_GUARDIAN, avalibleElixirs);
if (!battleFound)
- spellmgr.GetSetOfSpellsInSpellGroup(SPELL_GROUP_ELIXIR_BATTLE, avalibleElixirs);
+ sSpellMgr.GetSetOfSpellsInSpellGroup(SPELL_GROUP_ELIXIR_BATTLE, avalibleElixirs);
for (std::set<uint32>::iterator itr = avalibleElixirs.begin(); itr != avalibleElixirs.end() ;)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(*itr);
if (spellInfo->spellLevel < m_spellInfo->spellLevel || spellInfo->spellLevel > unitTarget->getLevel())
avalibleElixirs.erase(itr++);
- else if (spellmgr.IsSpellMemberOfSpellGroup(*itr, SPELL_GROUP_ELIXIR_SHATTRATH))
+ else if (sSpellMgr.IsSpellMemberOfSpellGroup(*itr, SPELL_GROUP_ELIXIR_SHATTRATH))
avalibleElixirs.erase(itr++);
- else if (spellmgr.IsSpellMemberOfSpellGroup(*itr, SPELL_GROUP_ELIXIR_UNSTABLE))
+ else if (sSpellMgr.IsSpellMemberOfSpellGroup(*itr, SPELL_GROUP_ELIXIR_UNSTABLE))
avalibleElixirs.erase(itr++);
else
++itr;
@@ -3750,7 +3750,7 @@ void Spell::EffectAddFarsight(uint32 i)
if (!m_caster->IsInWorld())
return;
DynamicObject* dynObj = new DynamicObject;
- if (!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, m_targets.m_dstPos, radius, true))
+ if (!dynObj->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, m_targets.m_dstPos, radius, true))
{
delete dynObj;
return;
@@ -4203,7 +4203,7 @@ void Spell::EffectSummonPet(uint32 i)
pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
// generate new name for summon pet
- std::string new_name=objmgr.GeneratePetName(petentry);
+ std::string new_name=sObjectMgr.GeneratePetName(petentry);
if (!new_name.empty())
pet->SetName(new_name);
}
@@ -4639,7 +4639,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
Map *map = target->GetMap();
- if (!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, map,
+ if (!pGameObj->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, map,
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
{
delete pGameObj;
@@ -4688,7 +4688,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
{
GameObject* linkedGO = new GameObject;
- if (linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, map,
+ if (linkedGO->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, map,
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
{
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
@@ -5727,7 +5727,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT || !unitTarget->ToCreature()->isPet())
return;
- CreatureInfo const * ci = objmgr.GetCreatureTemplate(unitTarget->GetEntry());
+ CreatureInfo const * ci = sObjectMgr.GetCreatureTemplate(unitTarget->GetEntry());
switch (ci->family)
{
case CREATURE_FAMILY_SUCCUBUS:
@@ -6105,7 +6105,7 @@ void Spell::EffectDuel(uint32 i)
uint32 gameobject_id = m_spellInfo->EffectMiscValue[i];
Map *map = m_caster->GetMap();
- if (!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id,
+ if (!pGameObj->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id,
map, m_caster->GetPhaseMask(),
m_caster->GetPositionX()+(unitTarget->GetPositionX()-m_caster->GetPositionX())/2 ,
m_caster->GetPositionY()+(unitTarget->GetPositionY()-m_caster->GetPositionY())/2 ,
@@ -6416,7 +6416,7 @@ void Spell::EffectSummonObject(uint32 i)
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
Map *map = m_caster->GetMap();
- if (!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), go_id, map,
+ if (!pGameObj->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), go_id, map,
m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
{
delete pGameObj;
@@ -6550,7 +6550,7 @@ void Spell::EffectReputation(uint32 i)
if (!factionEntry)
return;
- if (RepRewardRate const * repData = objmgr.GetRepRewardRate(faction_id))
+ if (RepRewardRate const * repData = sObjectMgr.GetRepRewardRate(faction_id))
{
rep_change = (float)rep_change * repData->spell_rate;
}
@@ -6748,7 +6748,7 @@ void Spell::EffectQuestClear(uint32 i)
uint32 quest_id = m_spellInfo->EffectMiscValue[i];
- Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
+ Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
if (!pQuest)
return;
@@ -6940,7 +6940,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
{
uint32 name_id = m_spellInfo->EffectMiscValue[effIndex];
- GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(name_id);
+ GameObjectInfo const* goinfo = sObjectMgr.GetGameObjectInfo(name_id);
if (!goinfo)
{
@@ -6991,7 +6991,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
GameObject* pGameObj = new GameObject;
- if (!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), name_id, cMap,
+ if (!pGameObj->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), name_id, cMap,
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
{
delete pGameObj;
@@ -7055,7 +7055,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
{
GameObject* linkedGO = new GameObject;
- if (linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, cMap,
+ if (linkedGO->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, cMap,
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
{
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
@@ -7294,7 +7294,7 @@ void Spell::EffectQuestStart(uint32 i)
return;
Player * player = unitTarget->ToPlayer();
- if (Quest const* qInfo = objmgr.GetQuestTemplate(m_spellInfo->EffectMiscValue[i]))
+ if (Quest const* qInfo = sObjectMgr.GetQuestTemplate(m_spellInfo->EffectMiscValue[i]))
{
if (player->CanTakeQuest(qInfo, false) && player->CanAddQuest(qInfo, false))
{
@@ -7638,7 +7638,7 @@ void Spell::EffectRechargeManaGem(uint32 /*i*/)
uint32 item_id = m_spellInfo->EffectItemType[0];
- ItemPrototype const *pProto = objmgr.GetItemPrototype(item_id);
+ ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item_id);
if (!pProto)
{
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL);
@@ -7664,7 +7664,7 @@ void Spell::EffectBind(uint32 i)
WorldLocation loc;
if (m_spellInfo->EffectImplicitTargetA[i] == TARGET_DST_DB || m_spellInfo->EffectImplicitTargetB[i] == TARGET_DST_DB)
{
- SpellTargetPosition const* st = spellmgr.GetSpellTargetPosition(m_spellInfo->Id);
+ SpellTargetPosition const* st = sSpellMgr.GetSpellTargetPosition(m_spellInfo->Id);
if (!st)
{
sLog.outError( "Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id );
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index d3335042b23..97092eed362 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -364,7 +364,7 @@ bool IsAutocastableSpell(uint32 spellId)
bool IsHigherHankOfSpell(uint32 spellId_1, uint32 spellId_2)
{
- return spellmgr.GetSpellRank(spellId_1)<spellmgr.GetSpellRank(spellId_2);
+ return sSpellMgr.GetSpellRank(spellId_1)<sSpellMgr.GetSpellRank(spellId_2);
}
uint32 CalculatePowerCost(SpellEntry const * spellInfo, Unit const * caster, SpellSchoolMask schoolMask)
@@ -540,7 +540,7 @@ SpellSpecific GetSpellSpecific(SpellEntry const * spellInfo)
// scrolls effects
else
{
- uint32 firstSpell = spellmgr.GetFirstSpellInChain(spellInfo->Id);
+ uint32 firstSpell = sSpellMgr.GetFirstSpellInChain(spellInfo->Id);
switch (firstSpell)
{
case 8118: // Strength
@@ -981,7 +981,7 @@ bool IsPositiveSpell(uint32 spellId)
{
if (!sSpellStore.LookupEntry(spellId)) // non-existing spells
return false;
- return !(spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE);
+ return !(sSpellMgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE);
}
bool IsPositiveEffect(uint32 spellId, uint32 effIndex)
@@ -991,9 +991,9 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex)
switch(effIndex)
{
default:
- case 0: return !(spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE_EFF0);
- case 1: return !(spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE_EFF1);
- case 2: return !(spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE_EFF2);
+ case 0: return !(sSpellMgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE_EFF0);
+ case 1: return !(sSpellMgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE_EFF1);
+ case 2: return !(sSpellMgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE_EFF2);
}
}
@@ -1225,7 +1225,7 @@ void SpellMgr::LoadSpellTargetPositions()
}
if (found)
{
-// if (!spellmgr.GetSpellTargetPosition(i))
+// if (!sSpellMgr.GetSpellTargetPosition(i))
// sLog.outDebug("Spell (ID: %u) does not have record in `spell_target_position`", i);
}
}
@@ -1701,7 +1701,7 @@ bool SpellMgr::canStackSpellRanks(SpellEntry const *spellInfo)
if (IsProfessionOrRidingSpell(spellInfo->Id))
return false;
- if (spellmgr.IsSkillBonusSpell(spellInfo->Id))
+ if (sSpellMgr.IsSkillBonusSpell(spellInfo->Id))
return false;
// All stance spells. if any better way, change it.
@@ -2229,7 +2229,7 @@ bool LoadPetDefaultSpells_helper(CreatureInfo const* cInfo, PetDefaultSpellsEntr
return false;
// remove duplicates with levelupSpells if any
- if (PetLevelupSpellSet const *levelupSpells = cInfo->family ? spellmgr.GetPetLevelupSpellList(cInfo->family) : NULL)
+ if (PetLevelupSpellSet const *levelupSpells = cInfo->family ? sSpellMgr.GetPetLevelupSpellList(cInfo->family) : NULL)
{
for (uint8 j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
{
@@ -2527,7 +2527,7 @@ void SpellMgr::LoadSpellAreas()
continue;
}
- if (spellArea.questStart && !objmgr.GetQuestTemplate(spellArea.questStart))
+ if (spellArea.questStart && !sObjectMgr.GetQuestTemplate(spellArea.questStart))
{
sLog.outErrorDb("Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell,spellArea.questStart);
continue;
@@ -2535,7 +2535,7 @@ void SpellMgr::LoadSpellAreas()
if (spellArea.questEnd)
{
- if (!objmgr.GetQuestTemplate(spellArea.questEnd))
+ if (!sObjectMgr.GetQuestTemplate(spellArea.questEnd))
{
sLog.outErrorDb("Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell,spellArea.questEnd);
continue;
@@ -2683,7 +2683,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
}
// DB base check (if non empty then must fit at least single for allow)
- SpellAreaMapBounds saBounds = spellmgr.GetSpellAreaMapBounds(spellInfo->Id);
+ SpellAreaMapBounds saBounds = sSpellMgr.GetSpellAreaMapBounds(spellInfo->Id);
if (saBounds.first != saBounds.second)
{
for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index 798b2753710..40601cde80e 100644
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
@@ -1420,5 +1420,5 @@ class SpellMgr
SpellDifficultySearcherMap mSpellDifficultySearcherMap;
};
-#define spellmgr SpellMgr::Instance()
+#define sSpellMgr SpellMgr::Instance()
#endif
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index edd5b295f5c..402a274f3cf 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -384,7 +384,7 @@ void fixNULLfields(std::string &line)
DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, std::string name, uint32 guid)
{
- uint32 charcount = accmgr.GetCharactersCount(account);
+ uint32 charcount = sAccountMgr.GetCharactersCount(account);
if (charcount >= 10)
return DUMP_TOO_MANY_CHARS;
@@ -397,15 +397,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 < objmgr.m_hiCharGuid)
+ if (guid != 0 && guid < sObjectMgr.m_hiCharGuid)
{
result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE guid = '%d'", guid);
if (result)
- guid = objmgr.m_hiCharGuid; // use first free if exists
+ guid = sObjectMgr.m_hiCharGuid; // use first free if exists
else incHighest = false;
}
else
- guid = objmgr.m_hiCharGuid;
+ guid = sObjectMgr.m_hiCharGuid;
// normalize the name if specified and check if it exists
if (!normalizePlayerName(name))
@@ -425,7 +425,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
snprintf(newguid, 20, "%d", guid);
snprintf(chraccount, 20, "%d", account);
- snprintf(newpetid, 20, "%d", objmgr.GeneratePetNumber());
+ snprintf(newpetid, 20, "%d", sObjectMgr.GeneratePetNumber());
snprintf(lastpetid, 20, "%s", "");
std::map<uint32,uint32> items;
@@ -540,16 +540,16 @@ 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, objmgr.m_hiItemGuid, true))
+ if (!changeGuid(line, 2, items, sObjectMgr.m_hiItemGuid, true))
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.bag update
- if (!changeGuid(line, 4, items, objmgr.m_hiItemGuid))
+ if (!changeGuid(line, 4, items, sObjectMgr.m_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.item update
break;
}
case DTT_ITEM:
{
// item, owner, data field:item, owner guid
- if (!changeGuid(line, 1, items, objmgr.m_hiItemGuid))
+ if (!changeGuid(line, 1, items, sObjectMgr.m_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // item_instance.guid update
if (!changenth(line, 2, newguid)) // item_instance.owner_guid update
ROLLBACK(DUMP_FILE_BROKEN);
@@ -559,7 +559,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, objmgr.m_hiItemGuid))
+ if (!changeGuid(line, 2, items, sObjectMgr.m_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // character_gifts.item_guid update
break;
}
@@ -570,7 +570,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
if (strlen(lastpetid) == 0) snprintf(lastpetid, 20, "%s", currpetid);
if (strcmp(lastpetid,currpetid) != 0)
{
- snprintf(newpetid, 20, "%d", objmgr.GeneratePetNumber());
+ snprintf(newpetid, 20, "%d", sObjectMgr.GeneratePetNumber());
snprintf(lastpetid, 20, "%s", currpetid);
}
@@ -606,7 +606,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
}
case DTT_MAIL: // mail
{
- if (!changeGuid(line, 1, mails, objmgr.m_mailid))
+ if (!changeGuid(line, 1, mails, sObjectMgr.m_mailid))
ROLLBACK(DUMP_FILE_BROKEN); // mail.id update
if (!changenth(line, 6, newguid)) // mail.receiver update
ROLLBACK(DUMP_FILE_BROKEN);
@@ -614,9 +614,9 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
}
case DTT_MAIL_ITEM: // mail_items
{
- if (!changeGuid(line, 1, mails, objmgr.m_mailid))
+ if (!changeGuid(line, 1, mails, sObjectMgr.m_mailid))
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.id
- if (!changeGuid(line, 2, items, objmgr.m_hiItemGuid))
+ if (!changeGuid(line, 2, items, sObjectMgr.m_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.item_guid
if (!changenth(line, 4, newguid)) // mail_items.receiver
ROLLBACK(DUMP_FILE_BROKEN);
@@ -635,11 +635,11 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
CharacterDatabase.CommitTransaction();
- objmgr.m_hiItemGuid += items.size();
- objmgr.m_mailid += mails.size();
+ sObjectMgr.m_hiItemGuid += items.size();
+ sObjectMgr.m_mailid += mails.size();
if (incHighest)
- ++objmgr.m_hiCharGuid;
+ ++sObjectMgr.m_hiCharGuid;
fclose(fin);
diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp
index 9aa193bdcbc..b9bd21132ef 100644
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
@@ -130,7 +130,7 @@ void WeatherMgr::LoadWeatherData()
}
}
- wzc.ScriptId = objmgr.GetScriptId(fields[13].GetString());
+ wzc.ScriptId = sObjectMgr.GetScriptId(fields[13].GetString());
++count;
}
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index f9bc9eb74b8..2f4ae9a5a30 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1233,7 +1233,7 @@ void World::SetInitialWorldSettings()
LoadConfigSettings();
///- Init highest guids before any table loading to prevent using not initialized guids in some code.
- objmgr.SetHighestGuids();
+ sObjectMgr.SetHighestGuids();
///- Check the existence of the map files for all races' startup areas.
if (!MapManager::ExistMapAndVMap(0,-6240.32f, 331.033f)
@@ -1252,7 +1252,7 @@ void World::SetInitialWorldSettings()
///- Loading strings. Getting no records means core load has to be canceled because no error message can be output.
sLog.outString();
sLog.outString("Loading Trinity strings...");
- if (!objmgr.LoadTrinityStrings())
+ if (!sObjectMgr.LoadTrinityStrings())
exit(1); // Error message displayed in function already
///- Update the realm entry in the database with the realm type from the config file
@@ -1272,73 +1272,73 @@ void World::SetInitialWorldSettings()
DetectDBCLang();
sLog.outString("Loading Script Names...");
- objmgr.LoadScriptNames();
+ sObjectMgr.LoadScriptNames();
sLog.outString("Loading Instance Template...");
- objmgr.LoadInstanceTemplate();
+ sObjectMgr.LoadInstanceTemplate();
sLog.outString("Loading SkillLineAbilityMultiMap Data...");
- spellmgr.LoadSkillLineAbilityMap();
+ sSpellMgr.LoadSkillLineAbilityMap();
///- Clean up and pack instances
sLog.outString("Cleaning up instances...");
- sInstanceSaveManager.CleanupInstances(); // must be called before `creature_respawn`/`gameobject_respawn` tables
+ sInstanceSaveMgr.CleanupInstances(); // must be called before `creature_respawn`/`gameobject_respawn` tables
sLog.outString("Packing instances...");
- sInstanceSaveManager.PackInstances();
+ sInstanceSaveMgr.PackInstances();
sLog.outString("Loading Localization strings...");
- objmgr.LoadCreatureLocales();
- objmgr.LoadGameObjectLocales();
- objmgr.LoadItemLocales();
- objmgr.LoadItemSetNameLocales();
- objmgr.LoadQuestLocales();
- objmgr.LoadNpcTextLocales();
- objmgr.LoadPageTextLocales();
- objmgr.LoadGossipMenuItemsLocales();
- objmgr.LoadPointOfInterestLocales();
- objmgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
+ sObjectMgr.LoadCreatureLocales();
+ sObjectMgr.LoadGameObjectLocales();
+ sObjectMgr.LoadItemLocales();
+ sObjectMgr.LoadItemSetNameLocales();
+ sObjectMgr.LoadQuestLocales();
+ sObjectMgr.LoadNpcTextLocales();
+ sObjectMgr.LoadPageTextLocales();
+ sObjectMgr.LoadGossipMenuItemsLocales();
+ sObjectMgr.LoadPointOfInterestLocales();
+ sObjectMgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
sLog.outString(">>> Localization strings loaded");
sLog.outString();
sLog.outString("Loading Page Texts...");
- objmgr.LoadPageTexts();
+ sObjectMgr.LoadPageTexts();
sLog.outString("Loading Game Object Templates..."); // must be after LoadPageTexts
- objmgr.LoadGameobjectInfo();
+ sObjectMgr.LoadGameobjectInfo();
sLog.outString("Loading Spell Rank Data...");
- spellmgr.LoadSpellRanks();
+ sSpellMgr.LoadSpellRanks();
sLog.outString("Loading Spell Required Data...");
- spellmgr.LoadSpellRequired();
+ sSpellMgr.LoadSpellRequired();
sLog.outString("Loading Spell Group types...");
- spellmgr.LoadSpellGroups();
+ sSpellMgr.LoadSpellGroups();
sLog.outString("Loading Spell Learn Skills...");
- spellmgr.LoadSpellLearnSkills(); // must be after LoadSpellRanks
+ sSpellMgr.LoadSpellLearnSkills(); // must be after LoadSpellRanks
sLog.outString("Loading Spell Learn Spells...");
- spellmgr.LoadSpellLearnSpells();
+ sSpellMgr.LoadSpellLearnSpells();
sLog.outString("Loading Spell Proc Event conditions...");
- spellmgr.LoadSpellProcEvents();
+ sSpellMgr.LoadSpellProcEvents();
sLog.outString("Loading Spell Bonus Data...");
- spellmgr.LoadSpellBonusess();
+ sSpellMgr.LoadSpellBonusess();
sLog.outString("Loading Aggro Spells Definitions...");
- spellmgr.LoadSpellThreats();
+ sSpellMgr.LoadSpellThreats();
sLog.outString("Loading Spell Group Stack Rules...");
- spellmgr.LoadSpellGroupStackRules();
+ sSpellMgr.LoadSpellGroupStackRules();
sLog.outString("Loading NPC Texts...");
- objmgr.LoadGossipText();
+ sObjectMgr.LoadGossipText();
sLog.outString("Loading Enchant Spells Proc datas...");
- spellmgr.LoadSpellEnchantProcData();
+ sSpellMgr.LoadSpellEnchantProcData();
sLog.outString("Loading Item Random Enchantments Table...");
LoadRandomEnchantmentsTable();
@@ -1347,144 +1347,144 @@ void World::SetInitialWorldSettings()
sDisableMgr.LoadDisables(); // must be before loading quests and items
sLog.outString("Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
- objmgr.LoadItemPrototypes();
+ sObjectMgr.LoadItemPrototypes();
sLog.outString("Loading Item set names..."); // must be after LoadItemPrototypes
- objmgr.LoadItemSetNames();
+ sObjectMgr.LoadItemSetNames();
sLog.outString("Loading Creature Model Based Info Data...");
- objmgr.LoadCreatureModelInfo();
+ sObjectMgr.LoadCreatureModelInfo();
sLog.outString("Loading Equipment templates...");
- objmgr.LoadEquipmentTemplates();
+ sObjectMgr.LoadEquipmentTemplates();
sLog.outString("Loading Creature templates...");
- objmgr.LoadCreatureTemplates();
+ sObjectMgr.LoadCreatureTemplates();
sLog.outString("Loading Reputation Reward Rates...");
- objmgr.LoadReputationRewardRate();
+ sObjectMgr.LoadReputationRewardRate();
sLog.outString("Loading Creature Reputation OnKill Data...");
- objmgr.LoadReputationOnKill();
+ sObjectMgr.LoadReputationOnKill();
sLog.outString( "Loading Reputation Spillover Data..." );
- objmgr.LoadReputationSpilloverTemplate();
+ sObjectMgr.LoadReputationSpilloverTemplate();
sLog.outString("Loading Points Of Interest Data...");
- objmgr.LoadPointsOfInterest();
+ sObjectMgr.LoadPointsOfInterest();
sLog.outString("Loading Creature Base Stats...");
- objmgr.LoadCreatureClassLevelStats();
+ sObjectMgr.LoadCreatureClassLevelStats();
sLog.outString("Loading Creature Data...");
- objmgr.LoadCreatures();
+ sObjectMgr.LoadCreatures();
sLog.outString("Loading Creature Linked Respawn...");
- objmgr.LoadCreatureLinkedRespawn(); // must be after LoadCreatures()
+ sObjectMgr.LoadCreatureLinkedRespawn(); // must be after LoadCreatures()
sLog.outString("Loading pet levelup spells...");
- spellmgr.LoadPetLevelupSpellMap();
+ sSpellMgr.LoadPetLevelupSpellMap();
sLog.outString("Loading pet default spell additional to levelup spells...");
- spellmgr.LoadPetDefaultSpells();
+ sSpellMgr.LoadPetDefaultSpells();
sLog.outString("Loading Creature Template Addon Data...");
- objmgr.LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures()
+ sObjectMgr.LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures()
sLog.outString("Loading Vehicle Accessories...");
- objmgr.LoadVehicleAccessories(); // must be after LoadCreatureTemplates()
+ sObjectMgr.LoadVehicleAccessories(); // must be after LoadCreatureTemplates()
sLog.outString("Loading Creature Respawn Data..."); // must be after PackInstances()
- objmgr.LoadCreatureRespawnTimes();
+ sObjectMgr.LoadCreatureRespawnTimes();
sLog.outString("Loading Gameobject Data...");
- objmgr.LoadGameobjects();
+ sObjectMgr.LoadGameobjects();
sLog.outString("Loading Gameobject Respawn Data..."); // must be after PackInstances()
- objmgr.LoadGameobjectRespawnTimes();
+ sObjectMgr.LoadGameobjectRespawnTimes();
sLog.outString("Loading Objects Pooling Data...");
- poolhandler.LoadFromDB();
+ sPoolMgr.LoadFromDB();
sLog.outString("Loading Game Event Data...");
- gameeventmgr.LoadFromDB();
+ sGameEventMgr.LoadFromDB();
sLog.outString("Loading Weather Data...");
sWeatherMgr.LoadWeatherData();
sLog.outString("Loading Quests...");
- objmgr.LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables
+ sObjectMgr.LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables
sLog.outString("Checking Quest Disables");
sDisableMgr.CheckQuestDisables(); // must be after loading quests
sLog.outString("Loading Quest POI");
- objmgr.LoadQuestPOI();
+ sObjectMgr.LoadQuestPOI();
sLog.outString("Loading Quests Relations...");
- objmgr.LoadQuestRelations(); // must be after quest load
+ sObjectMgr.LoadQuestRelations(); // must be after quest load
sLog.outString("Loading UNIT_NPC_FLAG_SPELLCLICK Data...");
- objmgr.LoadNPCSpellClickSpells();
+ sObjectMgr.LoadNPCSpellClickSpells();
sLog.outString("Loading SpellArea Data..."); // must be after quest load
- spellmgr.LoadSpellAreas();
+ sSpellMgr.LoadSpellAreas();
sLog.outString("Loading AreaTrigger definitions...");
- objmgr.LoadAreaTriggerTeleports();
+ sObjectMgr.LoadAreaTriggerTeleports();
sLog.outString("Loading Access Requirements...");
- objmgr.LoadAccessRequirements(); // must be after item template load
+ sObjectMgr.LoadAccessRequirements(); // must be after item template load
sLog.outString("Loading Quest Area Triggers...");
- objmgr.LoadQuestAreaTriggers(); // must be after LoadQuests
+ sObjectMgr.LoadQuestAreaTriggers(); // must be after LoadQuests
sLog.outString("Loading Tavern Area Triggers...");
- objmgr.LoadTavernAreaTriggers();
+ sObjectMgr.LoadTavernAreaTriggers();
sLog.outString("Loading AreaTrigger script names...");
- objmgr.LoadAreaTriggerScripts();
+ sObjectMgr.LoadAreaTriggerScripts();
sLog.outString("Loading Graveyard-zone links...");
- objmgr.LoadGraveyardZones();
+ sObjectMgr.LoadGraveyardZones();
sLog.outString("Loading Spell target coordinates...");
- spellmgr.LoadSpellTargetPositions();
+ sSpellMgr.LoadSpellTargetPositions();
sLog.outString("Loading spell pet auras...");
- spellmgr.LoadSpellPetAuras();
+ sSpellMgr.LoadSpellPetAuras();
sLog.outString("Loading spell extra attributes...");
- spellmgr.LoadSpellCustomAttr();
+ sSpellMgr.LoadSpellCustomAttr();
sLog.outString("Loading enchant custom attributes...");
- spellmgr.LoadEnchantCustomAttr();
+ sSpellMgr.LoadEnchantCustomAttr();
sLog.outString("Loading linked spells...");
- spellmgr.LoadSpellLinked();
+ sSpellMgr.LoadSpellLinked();
sLog.outString("Loading Player Create Data...");
- objmgr.LoadPlayerInfo();
+ sObjectMgr.LoadPlayerInfo();
sLog.outString("Loading Exploration BaseXP Data...");
- objmgr.LoadExplorationBaseXP();
+ sObjectMgr.LoadExplorationBaseXP();
sLog.outString("Loading Pet Name Parts...");
- objmgr.LoadPetNames();
+ sObjectMgr.LoadPetNames();
CharacterDatabaseCleaner::CleanDatabase();
sLog.outString("Loading the max pet number...");
- objmgr.LoadPetNumber();
+ sObjectMgr.LoadPetNumber();
sLog.outString("Loading pet level stats...");
- objmgr.LoadPetLevelInfo();
+ sObjectMgr.LoadPetLevelInfo();
sLog.outString("Loading Player Corpses...");
- objmgr.LoadCorpses();
+ sObjectMgr.LoadCorpses();
sLog.outString("Loading Player level dependent mail rewards...");
- objmgr.LoadMailLevelRewards();
+ sObjectMgr.LoadMailLevelRewards();
// Loot tables
LoadLootTables();
@@ -1496,64 +1496,64 @@ void World::SetInitialWorldSettings()
LoadSkillExtraItemTable();
sLog.outString("Loading Skill Fishing base level requirements...");
- objmgr.LoadFishingBaseSkillLevel();
+ sObjectMgr.LoadFishingBaseSkillLevel();
sLog.outString("Loading Achievements...");
- achievementmgr.LoadAchievementReferenceList();
+ sAchievementMgr.LoadAchievementReferenceList();
sLog.outString("Loading Achievement Criteria Lists...");
- achievementmgr.LoadAchievementCriteriaList();
+ sAchievementMgr.LoadAchievementCriteriaList();
sLog.outString("Loading Achievement Criteria Data...");
- achievementmgr.LoadAchievementCriteriaData();
+ sAchievementMgr.LoadAchievementCriteriaData();
sLog.outString("Loading Achievement Rewards...");
- achievementmgr.LoadRewards();
+ sAchievementMgr.LoadRewards();
sLog.outString("Loading Achievement Reward Locales...");
- achievementmgr.LoadRewardLocales();
+ sAchievementMgr.LoadRewardLocales();
sLog.outString("Loading Completed Achievements...");
- achievementmgr.LoadCompletedAchievements();
+ sAchievementMgr.LoadCompletedAchievements();
///- Load dynamic data tables from the database
sLog.outString("Loading Item Auctions...");
- auctionmgr.LoadAuctionItems();
+ sAuctionMgr.LoadAuctionItems();
sLog.outString("Loading Auctions...");
- auctionmgr.LoadAuctions();
+ sAuctionMgr.LoadAuctions();
sLog.outString("Loading Guilds...");
- objmgr.LoadGuilds();
+ sObjectMgr.LoadGuilds();
sLog.outString("Loading ArenaTeams...");
- objmgr.LoadArenaTeams();
+ sObjectMgr.LoadArenaTeams();
sLog.outString("Loading Groups...");
- objmgr.LoadGroups();
+ sObjectMgr.LoadGroups();
sLog.outString("Loading ReservedNames...");
- objmgr.LoadReservedPlayersNames();
+ sObjectMgr.LoadReservedPlayersNames();
sLog.outString("Loading GameObjects for quests...");
- objmgr.LoadGameObjectForQuests();
+ sObjectMgr.LoadGameObjectForQuests();
sLog.outString("Loading BattleMasters...");
sBattlegroundMgr.LoadBattleMastersEntry();
sLog.outString("Loading GameTeleports...");
- objmgr.LoadGameTele();
+ sObjectMgr.LoadGameTele();
sLog.outString("Loading Npc Text Id...");
- objmgr.LoadNpcTextId(); // must be after load Creature and NpcText
+ sObjectMgr.LoadNpcTextId(); // must be after load Creature and NpcText
- objmgr.LoadGossipScripts(); // must be before gossip menu options
+ sObjectMgr.LoadGossipScripts(); // must be before gossip menu options
sLog.outString("Loading Gossip menu...");
- objmgr.LoadGossipMenu();
+ sObjectMgr.LoadGossipMenu();
sLog.outString("Loading Gossip menu options...");
- objmgr.LoadGossipMenuItems();
+ sObjectMgr.LoadGossipMenuItems();
sLog.outString("Loading Vendors...");
- objmgr.LoadVendors(); // must be after load CreatureTemplate and ItemTemplate
+ sObjectMgr.LoadVendors(); // must be after load CreatureTemplate and ItemTemplate
sLog.outString("Loading Trainers...");
- objmgr.LoadTrainerSpell(); // must be after load CreatureTemplate
+ sObjectMgr.LoadTrainerSpell(); // must be after load CreatureTemplate
sLog.outString("Loading Waypoints...");
sWaypointMgr->Load();
@@ -1565,14 +1565,14 @@ void World::SetInitialWorldSettings()
sConditionMgr.LoadConditions();
sLog.outString("Loading GM tickets...");
- objmgr.LoadGMTickets();
+ sObjectMgr.LoadGMTickets();
sLog.outString("Loading client addons...");
sAddonMgr.LoadFromDB();
///- Handle outdated emails (delete/return)
sLog.outString("Returning old mails...");
- objmgr.ReturnOrDeleteOldMails(false);
+ sObjectMgr.ReturnOrDeleteOldMails(false);
sLog.outString("Loading Autobroadcasts...");
LoadAutobroadcasts();
@@ -1580,35 +1580,35 @@ void World::SetInitialWorldSettings()
///- Load and initialize scripts
sLog.outString("Loading Scripts...");
sLog.outString();
- objmgr.LoadQuestStartScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
- objmgr.LoadQuestEndScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
- objmgr.LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
- objmgr.LoadGameObjectScripts(); // must be after load Creature/Gameobject(Template/Data)
- objmgr.LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
- objmgr.LoadWaypointScripts();
+ sObjectMgr.LoadQuestStartScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
+ sObjectMgr.LoadQuestEndScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
+ sObjectMgr.LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
+ sObjectMgr.LoadGameObjectScripts(); // must be after load Creature/Gameobject(Template/Data)
+ sObjectMgr.LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
+ sObjectMgr.LoadWaypointScripts();
sLog.outString(">>> Scripts loaded");
sLog.outString();
sLog.outString("Loading Scripts text locales..."); // must be after Load*Scripts calls
- objmgr.LoadDbScriptStrings();
+ sObjectMgr.LoadDbScriptStrings();
sLog.outString("Loading CreatureEventAI Texts...");
- CreatureEAI_Mgr.LoadCreatureEventAI_Texts();
+ sEventAIMgr.LoadCreatureEventAI_Texts();
sLog.outString("Loading CreatureEventAI Summons...");
- CreatureEAI_Mgr.LoadCreatureEventAI_Summons();
+ sEventAIMgr.LoadCreatureEventAI_Summons();
sLog.outString("Loading CreatureEventAI Scripts...");
- CreatureEAI_Mgr.LoadCreatureEventAI_Scripts();
+ sEventAIMgr.LoadCreatureEventAI_Scripts();
sLog.outString("Loading spell script names...");
- objmgr.LoadSpellScriptNames();
+ sObjectMgr.LoadSpellScriptNames();
sLog.outString("Initializing Scripts...");
sScriptMgr.Initialize();
sLog.outString("Validating spell scripts...");
- objmgr.ValidateSpellScripts();
+ sObjectMgr.ValidateSpellScripts();
///- Initialize game time and timers
sLog.outDebug("DEBUG:: Initialize game time and timers");
@@ -1658,14 +1658,14 @@ void World::SetInitialWorldSettings()
sMapMgr.Initialize();
sLog.outString("Starting Game Event system...");
- uint32 nextGameEvent = gameeventmgr.Initialize();
+ uint32 nextGameEvent = sGameEventMgr.Initialize();
m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event
// Delete all characters which have been deleted X days before
Player::DeleteOldCharacters();
sLog.outString("Starting Arena Season...");
- gameeventmgr.StartArenaSeason();
+ sGameEventMgr.StartArenaSeason();
sLog.outString("Loading World States..."); // must be loaded before battleground and outdoor PvP
LoadWorldStates();
@@ -1702,7 +1702,7 @@ void World::SetInitialWorldSettings()
InitRandomBGResetTime();
sLog.outString("Starting objects Pooling system...");
- poolhandler.Initialize();
+ sPoolMgr.Initialize();
// possibly enable db logging; avoid massive startup spam by doing it here.
if (sLog.GetLogDBLater())
@@ -1877,11 +1877,11 @@ void World::Update(uint32 diff)
if (++mail_timer > mail_timer_expires)
{
mail_timer = 0;
- objmgr.ReturnOrDeleteOldMails(true);
+ sObjectMgr.ReturnOrDeleteOldMails(true);
}
///- Handle expired auctions
- auctionmgr.Update();
+ sAuctionMgr.Update();
}
/// <li> Handle session updates when the timer has passed
@@ -1967,13 +1967,13 @@ void World::Update(uint32 diff)
if (m_timers[WUPDATE_EVENTS].Passed())
{
m_timers[WUPDATE_EVENTS].Reset(); // to give time for Update() to be processed
- uint32 nextGameEvent = gameeventmgr.Update();
+ uint32 nextGameEvent = sGameEventMgr.Update();
m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent);
m_timers[WUPDATE_EVENTS].Reset();
}
// update the instance reset times
- sInstanceSaveManager.Update();
+ sInstanceSaveMgr.Update();
// And last, but not least handle the issued cli commands
ProcessCliCommands();
@@ -1984,7 +1984,7 @@ void World::Update(uint32 diff)
void World::ForceGameEventUpdate()
{
m_timers[WUPDATE_EVENTS].Reset(); // to give time for Update() to be processed
- uint32 nextGameEvent = gameeventmgr.Update();
+ uint32 nextGameEvent = sGameEventMgr.Update();
m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent);
m_timers[WUPDATE_EVENTS].Reset();
}
@@ -2033,7 +2033,7 @@ namespace Trinity
explicit WorldWorldTextBuilder(int32 textId, va_list* args = NULL) : i_textId(textId), i_args(args) {}
void operator()(WorldPacketList& data_list, int32 loc_idx)
{
- char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
+ char const* text = sObjectMgr.GetTrinityString(i_textId,loc_idx);
if (i_args)
{
@@ -2258,9 +2258,9 @@ bool World::RemoveBanAccount(BanMode mode, std::string nameOrIP)
{
uint32 account = 0;
if (mode == BAN_ACCOUNT)
- account = accmgr.GetId (nameOrIP);
+ account = sAccountMgr.GetId (nameOrIP);
else if (mode == BAN_CHARACTER)
- account = objmgr.GetPlayerAccountIdByPlayerName (nameOrIP);
+ account = sObjectMgr.GetPlayerAccountIdByPlayerName (nameOrIP);
if (!account)
return false;
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index 536fd9bf883..d105f29f3c2 100644
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -131,7 +131,7 @@ bool ChatHandler::HandleAccountDeleteCommand(const char* args)
return false;
}
- uint32 account_id = accmgr.GetId(account_name);
+ uint32 account_id = sAccountMgr.GetId(account_name);
if(!account_id)
{
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
@@ -145,7 +145,7 @@ bool ChatHandler::HandleAccountDeleteCommand(const char* args)
if(HasLowerSecurityAccount (NULL,account_id,true))
return false;
- AccountOpResult result = accmgr.DeleteAccount(account_id);
+ AccountOpResult result = sAccountMgr.DeleteAccount(account_id);
switch(result)
{
case AOR_OK:
@@ -208,7 +208,7 @@ bool ChatHandler::GetDeletedCharacterInfoList(DeletedInfoList& foundList, std::s
info.accountId = fields[2].GetUInt32();
// account name will be empty for not existed account
- accmgr.GetName(info.accountId, info.accountName);
+ sAccountMgr.GetName(info.accountId, info.accountName);
info.deleteDate = time_t(fields[3].GetUInt64());
@@ -331,14 +331,14 @@ void ChatHandler::HandleCharacterDeletedRestoreHelper(DeletedInfo const& delInfo
}
// check character count
- uint32 charcount = accmgr.GetCharactersCount(delInfo.accountId);
+ uint32 charcount = sAccountMgr.GetCharactersCount(delInfo.accountId);
if (charcount >= 10)
{
PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.lowguid, delInfo.accountId);
return;
}
- if (objmgr.GetPlayerGUIDByName(delInfo.name))
+ if (sObjectMgr.GetPlayerGUIDByName(delInfo.name))
{
PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.lowguid, delInfo.accountId);
return;
@@ -403,7 +403,7 @@ bool ChatHandler::HandleCharacterDeletedRestoreCommand(const char* args)
if (newAccount && newAccount != delInfo.accountId)
{
delInfo.accountId = newAccount;
- accmgr.GetName(newAccount, delInfo.accountName);
+ sAccountMgr.GetName(newAccount, delInfo.accountName);
}
HandleCharacterDeletedRestoreHelper(delInfo);
@@ -498,7 +498,7 @@ bool ChatHandler::HandleCharacterEraseCommand(const char* args){
uint64 character_guid;
uint32 account_id;
- Player *player = objmgr.GetPlayer(character_name.c_str());
+ Player *player = sObjectMgr.GetPlayer(character_name.c_str());
if(player)
{
character_guid = player->GetGUID();
@@ -507,7 +507,7 @@ bool ChatHandler::HandleCharacterEraseCommand(const char* args){
}
else
{
- character_guid = objmgr.GetPlayerGUIDByName(character_name);
+ character_guid = sObjectMgr.GetPlayerGUIDByName(character_name);
if(!character_guid)
{
PSendSysMessage(LANG_NO_PLAYER,character_name.c_str());
@@ -515,11 +515,11 @@ bool ChatHandler::HandleCharacterEraseCommand(const char* args){
return false;
}
- account_id = objmgr.GetPlayerAccountIdByGUID(character_guid);
+ account_id = sObjectMgr.GetPlayerAccountIdByGUID(character_guid);
}
std::string account_name;
- accmgr.GetName (account_id,account_name);
+ sAccountMgr.GetName (account_id,account_name);
Player::DeleteFromDB(character_guid, account_id, true, true);
PSendSysMessage(LANG_CHARACTER_DELETED,character_name.c_str(),GUID_LOPART(character_guid),account_name.c_str(), account_id);
@@ -592,11 +592,11 @@ bool ChatHandler::HandleAccountCreateCommand(const char* args)
if(!szAcc || !szPassword)
return false;
- // normalized in accmgr.CreateAccount
+ // normalized in sAccountMgr.CreateAccount
std::string account_name = szAcc;
std::string password = szPassword;
- AccountOpResult result = accmgr.CreateAccount(account_name, password);
+ AccountOpResult result = sAccountMgr.CreateAccount(account_name, password);
switch(result)
{
case AOR_OK:
diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp
index de95c57479b..caa64becf0b 100644
--- a/src/server/worldserver/TCSoap/TCSoap.cpp
+++ b/src/server/worldserver/TCSoap/TCSoap.cpp
@@ -97,20 +97,20 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
return 401;
}
- uint32 accountId = accmgr.GetId(soap->userid);
+ uint32 accountId = sAccountMgr.GetId(soap->userid);
if(!accountId)
{
sLog.outDebug("TCSoap: Client used invalid username '%s'", soap->userid);
return 401;
}
- if(!accmgr.CheckPassword(accountId, soap->passwd))
+ if(!sAccountMgr.CheckPassword(accountId, soap->passwd))
{
sLog.outDebug("TCSoap: invalid password for account '%s'", soap->userid);
return 401;
}
- if(accmgr.GetSecurity(accountId) < SEC_ADMINISTRATOR)
+ if(sAccountMgr.GetSecurity(accountId) < SEC_ADMINISTRATOR)
{
sLog.outDebug("TCSoap: %s's gmlevel is too low", soap->userid);
return 403;