mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
refactor(Core/Cache): move the GlobalPlayerCache to its own class (#9166)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "AuctionHouseMgr.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "CharacterCache.h"
|
||||
#include "CalendarMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Item.h"
|
||||
@@ -146,7 +147,9 @@ void MailDraft::SendReturnToSender(uint32 /*sender_acc*/, ObjectGuid::LowType se
|
||||
|
||||
uint32 rc_account = 0;
|
||||
if (!receiver)
|
||||
rc_account = sObjectMgr->GetPlayerAccountIdByGUID(receiver_guid);
|
||||
{
|
||||
rc_account = sCharacterCache->GetCharacterAccountIdByGuid(ObjectGuid(HighGuid::Player, receiver_guid));
|
||||
}
|
||||
|
||||
if (!receiver && !rc_account) // sender not exist
|
||||
{
|
||||
@@ -250,8 +253,7 @@ void MailDraft::SendMailTo(CharacterDatabaseTransaction trans, MailReceiver cons
|
||||
trans->Append(stmt);
|
||||
}
|
||||
|
||||
// xinef: update global data
|
||||
sWorld->UpdateGlobalPlayerMails(receiver.GetPlayerGUIDLow(), 1);
|
||||
sCharacterCache->IncreaseCharacterMailCount(ObjectGuid(HighGuid::Player, receiver.GetPlayerGUIDLow()));
|
||||
|
||||
// For online receiver update in game mail status and data
|
||||
if (pReceiver)
|
||||
|
||||
Reference in New Issue
Block a user