aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/SocialHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/SocialHandler.cpp')
-rw-r--r--src/server/game/Handlers/SocialHandler.cpp7
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())
{