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
@@ -315,16 +315,13 @@ PlayerSocial* SocialMgr::LoadFromDB(PreparedQueryResult result, uint64 guid)
if (!result) if (!result)
return social; return social;
uint8 flags = 0;
std::string note = "";
do do
{ {
Field* fields = result->Fetch(); Field* fields = result->Fetch();
auto friendGuid = fields[0].GetUInt32(); auto friendGuid = fields[0].GetUInt32();
flags = fields[1].GetUInt8(); auto flags = fields[1].GetUInt8();
note = fields[2].GetString(); auto note = fields[2].GetString();
social->m_playerSocialMap[friendGuid] = FriendInfo(flags, note); social->m_playerSocialMap[friendGuid] = FriendInfo(flags, note);
} while (result->NextRow()); } while (result->NextRow());
+1 -1
View File
@@ -113,7 +113,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket& recv_data)
return; return;
uint64 IgnoreGuid = MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER); uint64 IgnoreGuid = MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER);
FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND; FriendsResult ignoreResult;
if (IgnoreGuid == GetPlayer()->GetGUID()) //not add yourself if (IgnoreGuid == GetPlayer()->GetGUID()) //not add yourself
ignoreResult = FRIEND_IGNORE_SELF; ignoreResult = FRIEND_IGNORE_SELF;