Core/Misc: Moved CharacterInfo out of world to separate class
Port From (https://github.com/TrinityCore/TrinityCore/commit/ad4e63bae145ae49b584ab2fc621660430cec0d3)
This commit is contained in:
@@ -128,7 +128,7 @@ namespace Game.BlackMarket
|
||||
_bidder = fields.Read<ulong>(4);
|
||||
|
||||
// Either no bidder or existing player
|
||||
if (_bidder != 0 && ObjectManager.GetPlayerAccountIdByGUID(ObjectGuid.Create(HighGuid.Player, _bidder)) == 0) // Probably a better way to check if player exists
|
||||
if (_bidder != 0 && Global.CharacterCacheStorage.GetCharacterAccountIdByGuid(ObjectGuid.Create(HighGuid.Player, _bidder)) == 0) // Probably a better way to check if player exists
|
||||
{
|
||||
Log.outError(LogFilter.Misc, "Black market auction {0} does not have a valid bidder (GUID: {1}).", _marketId, _bidder);
|
||||
return false;
|
||||
|
||||
@@ -229,13 +229,13 @@ namespace Game.BlackMarket
|
||||
}
|
||||
else
|
||||
{
|
||||
bidderAccId = ObjectManager.GetPlayerAccountIdByGUID(bidderGuid);
|
||||
bidderAccId = Global.CharacterCacheStorage.GetCharacterAccountIdByGuid(bidderGuid);
|
||||
if (bidderAccId == 0) // Account exists
|
||||
return;
|
||||
|
||||
logGmTrade = Global.AccountMgr.HasPermission(bidderAccId, RBACPermissions.LogGmTrade, Global.WorldMgr.GetRealmId().Realm);
|
||||
|
||||
if (logGmTrade && !ObjectManager.GetPlayerNameByGUID(bidderGuid, out bidderName))
|
||||
if (logGmTrade && !Global.CharacterCacheStorage.GetCharacterNameByGuid(bidderGuid, out bidderName))
|
||||
bidderName = Global.ObjectMgr.GetCypherString(CypherStrings.Unknown);
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace Game.BlackMarket
|
||||
|
||||
uint oldBidder_accId = 0;
|
||||
if (!oldBidder)
|
||||
oldBidder_accId = ObjectManager.GetPlayerAccountIdByGUID(oldBidder_guid);
|
||||
oldBidder_accId = Global.CharacterCacheStorage.GetCharacterAccountIdByGuid(oldBidder_guid);
|
||||
|
||||
// old bidder exist
|
||||
if (!oldBidder && oldBidder_accId == 0)
|
||||
|
||||
Reference in New Issue
Block a user