Core: Get rid of dirty operator workaround for ACE_Singleton class implementation

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-22 21:25:23 +01:00
parent 0948fc5bbe
commit 0f3b9019a8
159 changed files with 1943 additions and 1939 deletions
@@ -157,7 +157,7 @@ bool ChatHandler::GetDeletedCharacterInfoList(DeletedInfoList& foundList, std::s
info.accountId = fields[2].GetUInt32();
// account name will be empty for not existed account
sAccountMgr.GetName(info.accountId, info.accountName);
sAccountMgr->GetName(info.accountId, info.accountName);
info.deleteDate = time_t(fields[3].GetUInt64());
@@ -280,14 +280,14 @@ void ChatHandler::HandleCharacterDeletedRestoreHelper(DeletedInfo const& delInfo
}
// check character count
uint32 charcount = sAccountMgr.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 (sObjectMgr.GetPlayerGUIDByName(delInfo.name))
if (sObjectMgr->GetPlayerGUIDByName(delInfo.name))
{
PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.lowguid, delInfo.accountId);
return;
@@ -352,7 +352,7 @@ bool ChatHandler::HandleCharacterDeletedRestoreCommand(const char* args)
if (newAccount && newAccount != delInfo.accountId)
{
delInfo.accountId = newAccount;
sAccountMgr.GetName(newAccount, delInfo.accountName);
sAccountMgr->GetName(newAccount, delInfo.accountName);
}
HandleCharacterDeletedRestoreHelper(delInfo);
@@ -447,7 +447,7 @@ bool ChatHandler::HandleCharacterEraseCommand(const char* args){
uint64 character_guid;
uint32 account_id;
Player *player = sObjectMgr.GetPlayer(character_name.c_str());
Player *player = sObjectMgr->GetPlayer(character_name.c_str());
if (player)
{
character_guid = player->GetGUID();
@@ -456,7 +456,7 @@ bool ChatHandler::HandleCharacterEraseCommand(const char* args){
}
else
{
character_guid = sObjectMgr.GetPlayerGUIDByName(character_name);
character_guid = sObjectMgr->GetPlayerGUIDByName(character_name);
if (!character_guid)
{
PSendSysMessage(LANG_NO_PLAYER,character_name.c_str());
@@ -464,11 +464,11 @@ bool ChatHandler::HandleCharacterEraseCommand(const char* args){
return false;
}
account_id = sObjectMgr.GetPlayerAccountIdByGUID(character_guid);
account_id = sObjectMgr->GetPlayerAccountIdByGUID(character_guid);
}
std::string account_name;
sAccountMgr.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);
@@ -213,7 +213,7 @@ int RASocket::check_password(const std::string& user, const std::string& pass)
AccountMgr::normalizeString(safe_pass);
LoginDatabase.escape_string(safe_pass);
std::string hash = sAccountMgr.CalculateShaPassHash(safe_user, safe_pass);
std::string hash = sAccountMgr->CalculateShaPassHash(safe_user, safe_pass);
QueryResult check = LoginDatabase.PQuery(
"SELECT 1 FROM account WHERE username = '%s' AND sha_pass_hash = '%s'",
+3 -3
View File
@@ -91,20 +91,20 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
return 401;
}
uint32 accountId = sAccountMgr.GetId(soap->userid);
uint32 accountId = sAccountMgr->GetId(soap->userid);
if(!accountId)
{
sLog.outDebug("TCSoap: Client used invalid username '%s'", soap->userid);
return 401;
}
if(!sAccountMgr.CheckPassword(accountId, soap->passwd))
if(!sAccountMgr->CheckPassword(accountId, soap->passwd))
{
sLog.outDebug("TCSoap: invalid password for account '%s'", soap->userid);
return 401;
}
if(sAccountMgr.GetSecurity(accountId) < SEC_ADMINISTRATOR)
if(sAccountMgr->GetSecurity(accountId) < SEC_ADMINISTRATOR)
{
sLog.outDebug("TCSoap: %s's gmlevel is too low", soap->userid);
return 403;
@@ -46,7 +46,7 @@ void WorldRunnable::run()
uint32 prevSleepTime = 0; // used for balanced full tick time length near WORLD_SLEEP_CONST
sScriptMgr.OnStartup();
sScriptMgr->OnStartup();
///- While we have not World::m_stopEvent, update the world
while (!World::IsStopped())
@@ -80,16 +80,16 @@ void WorldRunnable::run()
#endif
}
sScriptMgr.OnShutdown();
sScriptMgr->OnShutdown();
sWorld.KickAll(); // save and kick all players
sWorld.UpdateSessions( 1 ); // real players unload required UpdateSessions call
// unload battleground templates before different singletons destroyed
sBattlegroundMgr.DeleteAllBattlegrounds();
sBattlegroundMgr->DeleteAllBattlegrounds();
sWorldSocketMgr->StopNetwork();
sMapMgr.UnloadAll(); // unload all grids (including locked in memory)
sMapMgr->UnloadAll(); // unload all grids (including locked in memory)
}