Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG-- branch : trunk
This commit is contained in:
1 parent
95daf7998f
commit
928443d899
245 files changed
+5711
-5714
No files matched your search
@@ -259,7 +259,7 @@ bool ChatHandler::HandleAddItemCommand(const char *args)
|
||||
if (!plTarget)
|
||||
plTarget = pl;
|
||||
|
||||
sLog.outDetail(GetTrinityString(LANG_ADDITEM), itemId, count);
|
||||
sLog->outDetail(GetTrinityString(LANG_ADDITEM), itemId, count);
|
||||
|
||||
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(itemId);
|
||||
if (!pProto)
|
||||
@@ -338,7 +338,7 @@ bool ChatHandler::HandleAddItemSetCommand(const char *args)
|
||||
if (!plTarget)
|
||||
plTarget = pl;
|
||||
|
||||
sLog.outDetail(GetTrinityString(LANG_ADDITEMSET), itemsetId);
|
||||
sLog->outDetail(GetTrinityString(LANG_ADDITEMSET), itemsetId);
|
||||
|
||||
bool found = false;
|
||||
for (uint32 id = 0; id < sItemStorage.MaxEntry; id++)
|
||||
@@ -756,7 +756,7 @@ bool ChatHandler::HandleLookupItemCommand(const char *args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
// Search in `item_template`
|
||||
for (uint32 id = 0; id < sItemStorage.MaxEntry; id++)
|
||||
@@ -841,7 +841,7 @@ bool ChatHandler::HandleLookupItemSetCommand(const char *args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
// Search in ItemSet.dbc
|
||||
for (uint32 id = 0; id < sItemSetStore.GetNumRows(); id++)
|
||||
@@ -914,7 +914,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char *args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
// Search in SkillLine.dbc
|
||||
for (uint32 id = 0; id < sSkillLineStore.GetNumRows(); id++)
|
||||
@@ -1001,7 +1001,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char *args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
// Search in Spell.dbc
|
||||
for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++)
|
||||
@@ -1110,7 +1110,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char *args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
ObjectMgr::QuestMap const& qTemplates = sObjectMgr->GetQuestTemplates();
|
||||
for (ObjectMgr::QuestMap::const_iterator iter = qTemplates.begin(); iter != qTemplates.end(); ++iter)
|
||||
@@ -1227,7 +1227,7 @@ bool ChatHandler::HandleLookupCreatureCommand(const char *args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
for (uint32 id = 0; id< sCreatureStorage.MaxEntry; ++id)
|
||||
{
|
||||
@@ -1311,7 +1311,7 @@ bool ChatHandler::HandleLookupObjectCommand(const char *args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
for (uint32 id = 0; id< sGOStorage.MaxEntry; id++)
|
||||
{
|
||||
@@ -1398,7 +1398,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char *args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
for (uint32 id = 0; id < sFactionStore.GetNumRows(); ++id)
|
||||
{
|
||||
@@ -1497,7 +1497,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args)
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = sWorld.getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
|
||||
|
||||
// Search in TaxiNodes.dbc
|
||||
for (uint32 id = 0; id < sTaxiNodesStore.GetNumRows(); id++)
|
||||
@@ -1575,7 +1575,7 @@ bool ChatHandler::HandleLookupMapCommand(const char *args)
|
||||
MapEntry const* MapInfo = sMapStore.LookupEntry(id);
|
||||
if (MapInfo)
|
||||
{
|
||||
uint8 loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
|
||||
uint8 loc = m_session ? m_session->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale();
|
||||
|
||||
std::string name = MapInfo->name[loc];
|
||||
if (name.empty())
|
||||
@@ -1851,7 +1851,7 @@ bool ChatHandler::HandleDieCommand(const char* /*args*/)
|
||||
|
||||
if (target->isAlive())
|
||||
{
|
||||
if (sWorld.getBoolConfig(CONFIG_DIE_COMMAND_MODE))
|
||||
if (sWorld->getBoolConfig(CONFIG_DIE_COMMAND_MODE))
|
||||
m_session->GetPlayer()->Kill(target);
|
||||
else
|
||||
m_session->GetPlayer()->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
@@ -1954,7 +1954,7 @@ bool ChatHandler::HandleReviveCommand(const char *args)
|
||||
}
|
||||
else
|
||||
// will resurrected at login without corpse
|
||||
sObjectAccessor.ConvertCorpseForPlayer(target_guid);
|
||||
sObjectAccessor->ConvertCorpseForPlayer(target_guid);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2367,7 +2367,7 @@ bool ChatHandler::HandleChangeWeather(const char *args)
|
||||
return false;
|
||||
|
||||
//Weather is OFF
|
||||
if (!sWorld.getBoolConfig(CONFIG_WEATHER))
|
||||
if (!sWorld->getBoolConfig(CONFIG_WEATHER))
|
||||
{
|
||||
SendSysMessage(LANG_WEATHER_DISABLED);
|
||||
SetSentErrorMessage(true);
|
||||
@@ -2505,7 +2505,7 @@ static bool HandleResetStatsOrLevelHelper(Player* player)
|
||||
ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(player->getClass());
|
||||
if (!cEntry)
|
||||
{
|
||||
sLog.outError("Class %u not found in DBC (Wrong DBC files?)",player->getClass());
|
||||
sLog->outError("Class %u not found in DBC (Wrong DBC files?)",player->getClass());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2548,8 +2548,8 @@ bool ChatHandler::HandleResetLevelCommand(const char * args)
|
||||
|
||||
// set starting level
|
||||
uint32 start_level = target->getClass() != CLASS_DEATH_KNIGHT
|
||||
? sWorld.getIntConfig(CONFIG_START_PLAYER_LEVEL)
|
||||
: sWorld.getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
|
||||
? sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL)
|
||||
: sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
|
||||
|
||||
sScriptMgr->OnPlayerLevelChanged(target, start_level);
|
||||
|
||||
@@ -2684,14 +2684,14 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
|
||||
if (casename == "spells")
|
||||
{
|
||||
atLogin = AT_LOGIN_RESET_SPELLS;
|
||||
sWorld.SendWorldText(LANG_RESETALL_SPELLS);
|
||||
sWorld->SendWorldText(LANG_RESETALL_SPELLS);
|
||||
if (!m_session)
|
||||
SendSysMessage(LANG_RESETALL_SPELLS);
|
||||
}
|
||||
else if (casename == "talents")
|
||||
{
|
||||
atLogin = AtLoginFlags(AT_LOGIN_RESET_TALENTS | AT_LOGIN_RESET_PET_TALENTS);
|
||||
sWorld.SendWorldText(LANG_RESETALL_TALENTS);
|
||||
sWorld->SendWorldText(LANG_RESETALL_TALENTS);
|
||||
if (!m_session)
|
||||
SendSysMessage(LANG_RESETALL_TALENTS);
|
||||
}
|
||||
@@ -2705,7 +2705,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
|
||||
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'",atLogin,atLogin);
|
||||
|
||||
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, *HashMapHolder<Player>::GetLock(), true);
|
||||
HashMapHolder<Player>::MapType const& plist = sObjectAccessor.GetPlayers();
|
||||
HashMapHolder<Player>::MapType const& plist = sObjectAccessor->GetPlayers();
|
||||
for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
|
||||
itr->second->SetAtLoginFlag(atLogin);
|
||||
|
||||
@@ -2714,7 +2714,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
|
||||
|
||||
bool ChatHandler::HandleServerShutDownCancelCommand(const char* /*args*/)
|
||||
{
|
||||
sWorld.ShutdownCancel();
|
||||
sWorld->ShutdownCancel();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2746,10 +2746,10 @@ bool ChatHandler::HandleServerShutDownCommand(const char *args)
|
||||
if (exitcode < 0 || exitcode > 125)
|
||||
return false;
|
||||
|
||||
sWorld.ShutdownServ (time, 0, exitcode);
|
||||
sWorld->ShutdownServ (time, 0, exitcode);
|
||||
}
|
||||
else
|
||||
sWorld.ShutdownServ(time,0,SHUTDOWN_EXIT_CODE);
|
||||
sWorld->ShutdownServ(time,0,SHUTDOWN_EXIT_CODE);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2781,10 +2781,10 @@ bool ChatHandler::HandleServerRestartCommand(const char *args)
|
||||
if (exitcode < 0 || exitcode > 125)
|
||||
return false;
|
||||
|
||||
sWorld.ShutdownServ (time, SHUTDOWN_MASK_RESTART, exitcode);
|
||||
sWorld->ShutdownServ (time, SHUTDOWN_MASK_RESTART, exitcode);
|
||||
}
|
||||
else
|
||||
sWorld.ShutdownServ(time, SHUTDOWN_MASK_RESTART, RESTART_EXIT_CODE);
|
||||
sWorld->ShutdownServ(time, SHUTDOWN_MASK_RESTART, RESTART_EXIT_CODE);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2816,10 +2816,10 @@ bool ChatHandler::HandleServerIdleRestartCommand(const char *args)
|
||||
if (exitcode < 0 || exitcode > 125)
|
||||
return false;
|
||||
|
||||
sWorld.ShutdownServ (time, SHUTDOWN_MASK_RESTART|SHUTDOWN_MASK_IDLE, exitcode);
|
||||
sWorld->ShutdownServ (time, SHUTDOWN_MASK_RESTART|SHUTDOWN_MASK_IDLE, exitcode);
|
||||
}
|
||||
else
|
||||
sWorld.ShutdownServ(time,SHUTDOWN_MASK_RESTART|SHUTDOWN_MASK_IDLE,RESTART_EXIT_CODE);
|
||||
sWorld->ShutdownServ(time,SHUTDOWN_MASK_RESTART|SHUTDOWN_MASK_IDLE,RESTART_EXIT_CODE);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2851,10 +2851,10 @@ bool ChatHandler::HandleServerIdleShutDownCommand(const char *args)
|
||||
if (exitcode < 0 || exitcode > 125)
|
||||
return false;
|
||||
|
||||
sWorld.ShutdownServ (time, SHUTDOWN_MASK_IDLE, exitcode);
|
||||
sWorld->ShutdownServ (time, SHUTDOWN_MASK_IDLE, exitcode);
|
||||
}
|
||||
else
|
||||
sWorld.ShutdownServ(time,SHUTDOWN_MASK_IDLE,SHUTDOWN_EXIT_CODE);
|
||||
sWorld->ShutdownServ(time,SHUTDOWN_MASK_IDLE,SHUTDOWN_EXIT_CODE);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2894,7 +2894,7 @@ bool ChatHandler::HandleBanCharacterCommand(const char *args)
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (sWorld.BanCharacter(name, duration, reason, m_session ? m_session->GetPlayerName() : ""))
|
||||
switch (sWorld->BanCharacter(name, duration, reason, m_session ? m_session->GetPlayerName() : ""))
|
||||
{
|
||||
case BAN_SUCCESS:
|
||||
{
|
||||
@@ -2965,7 +2965,7 @@ bool ChatHandler::HandleBanHelper(BanMode mode, const char *args)
|
||||
break;
|
||||
}
|
||||
|
||||
switch(sWorld.BanAccount(mode, nameOrIP, duration, reason,m_session ? m_session->GetPlayerName() : ""))
|
||||
switch(sWorld->BanAccount(mode, nameOrIP, duration, reason,m_session ? m_session->GetPlayerName() : ""))
|
||||
{
|
||||
case BAN_SUCCESS:
|
||||
if (atoi(duration)>0)
|
||||
@@ -3023,7 +3023,7 @@ bool ChatHandler::HandleUnBanCharacterCommand(const char *args)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sWorld.RemoveBanCharacter(name))
|
||||
if (!sWorld->RemoveBanCharacter(name))
|
||||
{
|
||||
SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
SetSentErrorMessage(true);
|
||||
@@ -3073,7 +3073,7 @@ bool ChatHandler::HandleUnBanHelper(BanMode mode, const char *args)
|
||||
break;
|
||||
}
|
||||
|
||||
if (sWorld.RemoveBanAccount(mode,nameOrIP))
|
||||
if (sWorld->RemoveBanAccount(mode,nameOrIP))
|
||||
PSendSysMessage(LANG_UNBAN_UNBANNED,nameOrIP.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_UNBAN_ERROR,nameOrIP.c_str());
|
||||
@@ -3771,30 +3771,30 @@ bool ChatHandler::HandleServerPLimitCommand(const char *args)
|
||||
int l = strlen(param);
|
||||
|
||||
if (strncmp(param,"player",l) == 0)
|
||||
sWorld.SetPlayerSecurityLimit(SEC_PLAYER);
|
||||
sWorld->SetPlayerSecurityLimit(SEC_PLAYER);
|
||||
else if (strncmp(param,"moderator",l) == 0)
|
||||
sWorld.SetPlayerSecurityLimit(SEC_MODERATOR);
|
||||
sWorld->SetPlayerSecurityLimit(SEC_MODERATOR);
|
||||
else if (strncmp(param,"gamemaster",l) == 0)
|
||||
sWorld.SetPlayerSecurityLimit(SEC_GAMEMASTER);
|
||||
sWorld->SetPlayerSecurityLimit(SEC_GAMEMASTER);
|
||||
else if (strncmp(param,"administrator",l) == 0)
|
||||
sWorld.SetPlayerSecurityLimit(SEC_ADMINISTRATOR);
|
||||
sWorld->SetPlayerSecurityLimit(SEC_ADMINISTRATOR);
|
||||
else if (strncmp(param,"reset",l) == 0)
|
||||
{
|
||||
sWorld.SetPlayerAmountLimit(sConfig.GetIntDefault("PlayerLimit", 100));
|
||||
sWorld.LoadDBAllowedSecurityLevel();
|
||||
sWorld->SetPlayerAmountLimit(sConfig->GetIntDefault("PlayerLimit", 100));
|
||||
sWorld->LoadDBAllowedSecurityLevel();
|
||||
}
|
||||
else
|
||||
{
|
||||
int val = atoi(param);
|
||||
if (val < 0)
|
||||
sWorld.SetPlayerSecurityLimit(AccountTypes(uint32(-val)));
|
||||
sWorld->SetPlayerSecurityLimit(AccountTypes(uint32(-val)));
|
||||
else
|
||||
sWorld.SetPlayerAmountLimit(uint32(val));
|
||||
sWorld->SetPlayerAmountLimit(uint32(val));
|
||||
}
|
||||
}
|
||||
|
||||
uint32 pLimit = sWorld.GetPlayerAmountLimit();
|
||||
AccountTypes allowedAccountType = sWorld.GetPlayerSecurityLimit();
|
||||
uint32 pLimit = sWorld->GetPlayerAmountLimit();
|
||||
AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit();
|
||||
char const* secName = "";
|
||||
switch(allowedAccountType)
|
||||
{
|
||||
@@ -4182,7 +4182,7 @@ bool ChatHandler::HandleInstanceSaveDataCommand(const char * /*args*/)
|
||||
/// Define the 'Message of the day' for the realm
|
||||
bool ChatHandler::HandleServerSetMotdCommand(const char *args)
|
||||
{
|
||||
sWorld.SetMotd(args);
|
||||
sWorld->SetMotd(args);
|
||||
PSendSysMessage(LANG_MOTD_NEW, args);
|
||||
return true;
|
||||
}
|
||||
@@ -4195,13 +4195,13 @@ bool ChatHandler::HandleServerSetClosedCommand(const char *args)
|
||||
if (strncmp(args, "on", 3) == 0)
|
||||
{
|
||||
SendSysMessage(LANG_WORLD_CLOSED);
|
||||
sWorld.SetClosed(true);
|
||||
sWorld->SetClosed(true);
|
||||
return true;
|
||||
}
|
||||
else if (strncmp(args, "off", 4) == 0)
|
||||
{
|
||||
SendSysMessage(LANG_WORLD_OPENED);
|
||||
sWorld.SetClosed(false);
|
||||
sWorld->SetClosed(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4465,7 +4465,7 @@ bool ChatHandler::HandlePlayAllCommand(const char *args)
|
||||
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << uint32(soundId) << m_session->GetPlayer()->GetGUID();
|
||||
sWorld.SendGlobalMessage(&data);
|
||||
sWorld->SendGlobalMessage(&data);
|
||||
|
||||
PSendSysMessage(LANG_COMMAND_PLAYED_TO_ALL, soundId);
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user