[10815] Use in social lists API ObjectGuid form.

0 GUID_LOPART uses in code. :)
This commit is contained in:
VladimirMangos 2010-12-02 08:31:56 +03:00
parent 3c0b80dada
commit a8a7f3c796
13 changed files with 55 additions and 53 deletions

View file

@ -474,7 +474,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 acc
friendResult = FRIEND_SELF;
else if(session->GetPlayer()->GetTeam() != team && !sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_ADD_FRIEND) && session->GetSecurity() < SEC_MODERATOR)
friendResult = FRIEND_ENEMY;
else if(session->GetPlayer()->GetSocial()->HasFriend(friendLowGuid))
else if(session->GetPlayer()->GetSocial()->HasFriend(friendGuid))
friendResult = FRIEND_ALREADY;
else
{
@ -484,32 +484,32 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 acc
else
friendResult = FRIEND_ADDED_OFFLINE;
if(!session->GetPlayer()->GetSocial()->AddToSocialList(friendLowGuid, false))
if(!session->GetPlayer()->GetSocial()->AddToSocialList(friendGuid, false))
{
friendResult = FRIEND_LIST_FULL;
DEBUG_LOG( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName());
}
session->GetPlayer()->GetSocial()->SetFriendNote(friendLowGuid, friendNote);
session->GetPlayer()->GetSocial()->SetFriendNote(friendGuid, friendNote);
}
}
sSocialMgr.SendFriendStatus(session->GetPlayer(), friendResult, friendLowGuid, false);
sSocialMgr.SendFriendStatus(session->GetPlayer(), friendResult, friendGuid, false);
DEBUG_LOG( "WORLD: Sent (SMSG_FRIEND_STATUS)" );
}
void WorldSession::HandleDelFriendOpcode( WorldPacket & recv_data )
{
uint64 FriendGUID;
uint64 friendGuid;
DEBUG_LOG( "WORLD: Received CMSG_DEL_FRIEND" );
recv_data >> FriendGUID;
recv_data >> friendGuid;
_player->GetSocial()->RemoveFromSocialList(GUID_LOPART(FriendGUID), false);
_player->GetSocial()->RemoveFromSocialList(friendGuid, false);
sSocialMgr.SendFriendStatus(GetPlayer(), FRIEND_REMOVED, GUID_LOPART(FriendGUID), false);
sSocialMgr.SendFriendStatus(GetPlayer(), FRIEND_REMOVED, friendGuid, false);
DEBUG_LOG( "WORLD: Sent motd (SMSG_FRIEND_STATUS)" );
}
@ -552,34 +552,34 @@ void WorldSession::HandleAddIgnoreOpcodeCallBack(QueryResult *result, uint32 acc
{
if (ignoreGuid == session->GetPlayer()->GetObjectGuid())
ignoreResult = FRIEND_IGNORE_SELF;
else if (session->GetPlayer()->GetSocial()->HasIgnore(ignoreLowGuid))
else if (session->GetPlayer()->GetSocial()->HasIgnore(ignoreGuid))
ignoreResult = FRIEND_IGNORE_ALREADY;
else
{
ignoreResult = FRIEND_IGNORE_ADDED;
// ignore list full
if(!session->GetPlayer()->GetSocial()->AddToSocialList(ignoreLowGuid, true))
if(!session->GetPlayer()->GetSocial()->AddToSocialList(ignoreGuid, true))
ignoreResult = FRIEND_IGNORE_FULL;
}
}
sSocialMgr.SendFriendStatus(session->GetPlayer(), ignoreResult, ignoreLowGuid, false);
sSocialMgr.SendFriendStatus(session->GetPlayer(), ignoreResult, ignoreGuid, false);
DEBUG_LOG( "WORLD: Sent (SMSG_FRIEND_STATUS)" );
}
void WorldSession::HandleDelIgnoreOpcode( WorldPacket & recv_data )
{
uint64 IgnoreGUID;
uint64 ignoreGuid;
DEBUG_LOG( "WORLD: Received CMSG_DEL_IGNORE" );
recv_data >> IgnoreGUID;
recv_data >> ignoreGuid;
_player->GetSocial()->RemoveFromSocialList(GUID_LOPART(IgnoreGUID), true);
_player->GetSocial()->RemoveFromSocialList(ignoreGuid, true);
sSocialMgr.SendFriendStatus(GetPlayer(), FRIEND_IGNORE_REMOVED, GUID_LOPART(IgnoreGUID), false);
sSocialMgr.SendFriendStatus(GetPlayer(), FRIEND_IGNORE_REMOVED, ignoreGuid, false);
DEBUG_LOG( "WORLD: Sent motd (SMSG_FRIEND_STATUS)" );
}
@ -590,7 +590,7 @@ void WorldSession::HandleSetContactNotesOpcode( WorldPacket & recv_data )
ObjectGuid guid;
std::string note;
recv_data >> guid >> note;
_player->GetSocial()->SetFriendNote(guid.GetCounter(), note);
_player->GetSocial()->SetFriendNote(guid, note);
}
void WorldSession::HandleBugOpcode( WorldPacket & recv_data )