refactor(Core/Social): Cleanup (#3843)
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user