diff --git a/src/game/AccountMgr.h b/src/game/AccountMgr.h index 9bbc358d8..be6cb169b 100644 --- a/src/game/AccountMgr.h +++ b/src/game/AccountMgr.h @@ -55,5 +55,5 @@ class AccountMgr static bool normalizeString(std::string& utf8str); }; -#define accmgr MaNGOS::Singleton::Instance() +#define sAccountMgr MaNGOS::Singleton::Instance() #endif diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index f0c917ecb..83fe25ef3 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -97,7 +97,7 @@ void AuctionHouseMgr::SendAuctionWonMail( AuctionEntry *auction ) else { bidder_accId = sObjectMgr.GetPlayerAccountIdByGUID(bidder_guid); - bidder_security = accmgr.GetSecurity(bidder_accId); + bidder_security = sAccountMgr.GetSecurity(bidder_accId); if(bidder_security > SEC_PLAYER ) // not do redundant DB requests { diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 20473b17e..90c883152 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -725,7 +725,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) diff --git a/src/game/Level0.cpp b/src/game/Level0.cpp index 937f1b9cc..687327e01 100644 --- a/src/game/Level0.cpp +++ b/src/game/Level0.cpp @@ -200,14 +200,14 @@ bool ChatHandler::HandleAccountPasswordCommand(const char* args) return false; } - if (!accmgr.CheckPassword (m_session->GetAccountId(), password_old)) + if (!sAccountMgr.CheckPassword (m_session->GetAccountId(), password_old)) { SendSysMessage (LANG_COMMAND_WRONGOLDPASSWORD); SetSentErrorMessage (true); return false; } - AccountOpResult result = accmgr.ChangePassword(m_session->GetAccountId(), password_new); + AccountOpResult result = sAccountMgr.ChangePassword(m_session->GetAccountId(), password_new); switch(result) { diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 660e8e78f..55fd52b9e 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -863,7 +863,7 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char* args) arg2 = arg1; targetAccountId = targetPlayer->GetSession()->GetAccountId(); - accmgr.GetName(targetAccountId, targetAccountName); + sAccountMgr.GetName(targetAccountId, targetAccountName); } else { @@ -879,7 +879,7 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char* args) return false; } - targetAccountId = accmgr.GetId(targetAccountName); + targetAccountId = sAccountMgr.GetId(targetAccountName); if(!targetAccountId) { PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,targetAccountName.c_str()); @@ -945,7 +945,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()); @@ -965,7 +965,7 @@ bool ChatHandler::HandleAccountSetPasswordCommand(const char* args) return false; } - AccountOpResult result = accmgr.ChangePassword(targetAccountId, szPassword1); + AccountOpResult result = sAccountMgr.ChangePassword(targetAccountId, szPassword1); switch(result) { @@ -5027,7 +5027,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()); @@ -5047,7 +5047,7 @@ bool ChatHandler::HandleBanInfoCharacterCommand(const char* args) 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; @@ -5206,7 +5206,7 @@ bool ChatHandler::HandleBanListHelper(QueryResult* 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 *banInfo = loginDatabase.PQuery("SELECT bandate,unbandate,bannedby,banreason FROM account_banned WHERE id = %u ORDER BY unbandate", account_id); @@ -5400,7 +5400,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 @@ -5412,7 +5412,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); @@ -6100,7 +6100,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 @@ -6114,7 +6114,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()); diff --git a/src/game/World.cpp b/src/game/World.cpp index 0616f46fe..4491e4cf5 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1909,7 +1909,7 @@ 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 = sObjectMgr.GetPlayerAccountIdByPlayerName (nameOrIP); diff --git a/src/mangosd/CliRunnable.cpp b/src/mangosd/CliRunnable.cpp index 8c948e841..d84bd79cf 100644 --- a/src/mangosd/CliRunnable.cpp +++ b/src/mangosd/CliRunnable.cpp @@ -71,7 +71,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()); @@ -85,7 +85,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: @@ -145,7 +145,7 @@ bool ChatHandler::HandleCharacterDeleteCommand(const char* args) } std::string account_name; - accmgr.GetName (account_id,account_name); + sAccountMgr.GetName (account_id,account_name); Player::DeleteFromDB(character_guid, account_id, true); PSendSysMessage(LANG_CHARACTER_DELETED,character_name.c_str(),GUID_LOPART(character_guid),account_name.c_str(), account_id); @@ -223,7 +223,7 @@ bool ChatHandler::HandleAccountCreateCommand(const char* args) 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/shared/revision_nr.h b/src/shared/revision_nr.h index beb04501a..1db10ba5f 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8800" + #define REVISION_NR "8801" #endif // __REVISION_NR_H__