Core/Misc: Moved CharacterInfo out of world to separate class
Port From (https://github.com/TrinityCore/TrinityCore/commit/ad4e63bae145ae49b584ab2fc621660430cec0d3)
This commit is contained in:
@@ -19,6 +19,7 @@ using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using Game.Network;
|
||||
using Game.Network.Packets;
|
||||
using Game.Cache;
|
||||
|
||||
namespace Game.Chat
|
||||
{
|
||||
@@ -399,9 +400,9 @@ namespace Game.Chat
|
||||
_ownerGuid = ownerGuid;
|
||||
_ownerName = "";
|
||||
|
||||
CharacterInfo characterInfo = Global.WorldMgr.GetCharacterInfo(_ownerGuid);
|
||||
if (characterInfo != null)
|
||||
_ownerName = characterInfo.Name;
|
||||
CharacterCacheEntry characterCacheEntry = Global.CharacterCacheStorage.GetCharacterCacheByGuid(_ownerGuid);
|
||||
if (characterCacheEntry != null)
|
||||
_ownerName = characterCacheEntry.Name;
|
||||
}
|
||||
|
||||
public ChatNotify GetNotificationType() => ChatNotify.ChannelOwnerNotice;
|
||||
|
||||
Reference in New Issue
Block a user