mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[11490] Alow implicit cast ObjectGuid->uint64 and only explicit uint64->ObjectGuid
Now safe allow this casts in like way after completed convertion to ObjectGuid use. Also simplify code in result allowed auto cast to uint64. Please _not_ add new uint64 storages (local and in structures) for guid values.
This commit is contained in:
parent
ecdb435b1e
commit
249fb836ca
47 changed files with 194 additions and 210 deletions
|
|
@ -264,8 +264,7 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ )
|
|||
{
|
||||
DEBUG_LOG( "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity() );
|
||||
|
||||
ObjectGuid lootGuid = GetPlayer()->GetLootGuid();
|
||||
if (!lootGuid.IsEmpty())
|
||||
if (ObjectGuid lootGuid = GetPlayer()->GetLootGuid())
|
||||
DoLootRelease(lootGuid);
|
||||
|
||||
//Can not logout if...
|
||||
|
|
@ -472,7 +471,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 acc
|
|||
return;
|
||||
|
||||
FriendsResult friendResult = FRIEND_NOT_FOUND;
|
||||
if (!friendGuid.IsEmpty())
|
||||
if (friendGuid)
|
||||
{
|
||||
if (friendGuid == session->GetPlayer()->GetObjectGuid())
|
||||
friendResult = FRIEND_SELF;
|
||||
|
|
@ -552,7 +551,7 @@ void WorldSession::HandleAddIgnoreOpcodeCallBack(QueryResult *result, uint32 acc
|
|||
return;
|
||||
|
||||
FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND;
|
||||
if (!ignoreGuid.IsEmpty())
|
||||
if (ignoreGuid)
|
||||
{
|
||||
if (ignoreGuid == session->GetPlayer()->GetObjectGuid())
|
||||
ignoreResult = FRIEND_IGNORE_SELF;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue