Core - Modifies a few security checks to take realm id into consideration. It will enable add friends which have moderators (or more) status in other realms and cease undue AH activity logging from those same accounts.

Signed-off-by: click <per.wilhelmsen@gmail.com>
This commit is contained in:
JohnHoliver
2011-01-14 16:55:50 -02:00
committed by click
parent 458c7c642f
commit db72c4f561
3 changed files with 3 additions and 3 deletions

View File

@@ -111,7 +111,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction, SQLTransaction&
else
{
bidder_accId = sObjectMgr->GetPlayerAccountIdByGUID(bidder_guid);
bidder_security = sAccountMgr->GetSecurity(bidder_accId);
bidder_security = sAccountMgr->GetSecurity(bidder_accId, realmID);
if (bidder_security > SEC_PLAYER) // not do redundant DB requests
{

View File

@@ -529,7 +529,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac
if (target)
target_sec = target->GetSecurity();
else if (target_account)
target_sec = sAccountMgr->GetSecurity(target_account);
target_sec = sAccountMgr->GetSecurity(target_account, realmID);
else
return true; // caller must report error for (target == NULL && target_account == 0)

View File

@@ -587,7 +587,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult result, std::string
team = Player::TeamForRace((*result)[1].GetUInt8());
friendAcctid = (*result)[2].GetUInt32();
if (GetSecurity() >= SEC_MODERATOR || sWorld->getBoolConfig(CONFIG_ALLOW_GM_FRIEND) || sAccountMgr->GetSecurity(friendAcctid) < SEC_MODERATOR)
if (GetSecurity() >= SEC_MODERATOR || sWorld->getBoolConfig(CONFIG_ALLOW_GM_FRIEND) || sAccountMgr->GetSecurity(friendAcctid, realmID) < SEC_MODERATOR)
{
if (friendGuid)
{