diff options
author | xinef1 <w.szyszko2@gmail.com> | 2017-02-05 23:14:19 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-02-05 23:14:19 +0100 |
commit | 59ce3d6c9bd82d55cbfa505bb945b71cab21a12f (patch) | |
tree | 11e0f0f2ae3f3baffff0586f785ebbc7b7efd8aa /src/server/game/Handlers/SocialHandler.cpp | |
parent | 3c605ba614c45c4b8f99c12fb49f342c068054a5 (diff) |
Core/Misc: Moved CharacterInfo out of world to separate class
Closes #19030
Diffstat (limited to 'src/server/game/Handlers/SocialHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SocialHandler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Handlers/SocialHandler.cpp b/src/server/game/Handlers/SocialHandler.cpp index c0deec1b90d..752ac0dace5 100644 --- a/src/server/game/Handlers/SocialHandler.cpp +++ b/src/server/game/Handlers/SocialHandler.cpp @@ -15,6 +15,7 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "CharacterCache.h" #include "WorldSession.h" #include "Player.h" #include "QueryCallback.h" @@ -40,10 +41,10 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket& recvData) GetPlayer()->GetName().c_str(), friendName.c_str()); FriendsResult friendResult = FRIEND_NOT_FOUND; - ObjectGuid friendGuid = sWorld->GetCharacterGuidByName(friendName); + ObjectGuid friendGuid = sCharacterCache->GetCharacterGuidByName(friendName); if (!friendGuid.IsEmpty()) { - if (CharacterInfo const* characterInfo = sWorld->GetCharacterInfo(friendGuid)) + if (CharacterCacheEntry const* characterInfo = sCharacterCache->GetCharacterCacheByGuid(friendGuid)) { uint32 team = Player::TeamForRace(characterInfo->Race); uint32 friendAccountId = characterInfo->AccountId; @@ -100,7 +101,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket& recvData) TC_LOG_DEBUG("network", "WorldSession::HandleAddIgnoreOpcode: %s asked to Ignore: %s", GetPlayer()->GetName().c_str(), ignoreName.c_str()); - ObjectGuid ignoreGuid = sWorld->GetCharacterGuidByName(ignoreName); + ObjectGuid ignoreGuid = sCharacterCache->GetCharacterGuidByName(ignoreName); FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND; if (!ignoreGuid.IsEmpty()) { |