Core: Define helper functions to know if an account is Player, Moderator, GM, Admin or Console

This commit is contained in:
Spp-
2011-09-08 15:11:55 +02:00
parent d5cbc97373
commit 327fe7c247
23 changed files with 174 additions and 90 deletions
@@ -112,13 +112,13 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction, SQLTransaction&
bidder_accId = sObjectMgr->GetPlayerAccountIdByGUID(bidder_guid);
bidder_security = AccountMgr::GetSecurity(bidder_accId, realmID);
if (bidder_security > SEC_PLAYER) // not do redundant DB requests
if (!AccountMgr::IsPlayerAccount(bidder_security)) // not do redundant DB requests
{
if (!sObjectMgr->GetPlayerNameByGUID(bidder_guid, bidder_name))
bidder_name = sObjectMgr->GetTrinityStringForDBCLocale(LANG_UNKNOWN);
}
}
if (bidder_security > SEC_PLAYER)
if (!AccountMgr::IsPlayerAccount(bidder_security))
{
std::string owner_name;
if (!sObjectMgr->GetPlayerNameByGUID(auction->owner, owner_name))