[8801] Rename accmgr macro to sAccountMgr. Thanks to astriconX for pointing out.

This commit is contained in:
XTZGZoReX 2009-11-10 23:09:32 +01:00
parent 22fb22ee5e
commit da2cceb9da
8 changed files with 22 additions and 22 deletions

View file

@ -55,5 +55,5 @@ class AccountMgr
static bool normalizeString(std::string& utf8str);
};
#define accmgr MaNGOS::Singleton<AccountMgr>::Instance()
#define sAccountMgr MaNGOS::Singleton<AccountMgr>::Instance()
#endif

View file

@ -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
{

View file

@ -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)

View file

@ -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)
{

View file

@ -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());

View file

@ -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);

View file

@ -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:

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8800"
#define REVISION_NR "8801"
#endif // __REVISION_NR_H__