refactor(Core/Social): Cleanup (#3843)

This commit is contained in:
Francesco Borzì
2020-12-14 20:45:43 +01:00
committed by GitHub
parent 00a634efad
commit f5f3360e01
2 changed files with 3 additions and 6 deletions

View File

@@ -315,16 +315,13 @@ PlayerSocial* SocialMgr::LoadFromDB(PreparedQueryResult result, uint64 guid)
if (!result)
return social;
uint8 flags = 0;
std::string note = "";
do
{
Field* fields = result->Fetch();
auto friendGuid = fields[0].GetUInt32();
flags = fields[1].GetUInt8();
note = fields[2].GetString();
auto flags = fields[1].GetUInt8();
auto note = fields[2].GetString();
social->m_playerSocialMap[friendGuid] = FriendInfo(flags, note);
} while (result->NextRow());

View File

@@ -113,7 +113,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket& recv_data)
return;
uint64 IgnoreGuid = MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER);
FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND;
FriendsResult ignoreResult;
if (IgnoreGuid == GetPlayer()->GetGUID()) //not add yourself
ignoreResult = FRIEND_IGNORE_SELF;