mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[11458] Non-item related uint64 guids replaced by ObjectGUids in Player.h
Also let ObjectAccessor::FindPlayer optimize empty guid case work.
This commit is contained in:
parent
1d781cd431
commit
151e5eae9c
13 changed files with 123 additions and 125 deletions
|
|
@ -35,7 +35,7 @@ void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data )
|
|||
{
|
||||
DEBUG_LOG("WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
|
||||
Player *player = GetPlayer();
|
||||
ObjectGuid lguid = player->GetLootGUID();
|
||||
ObjectGuid lguid = player->GetLootGuid();
|
||||
Loot *loot;
|
||||
uint8 lootSlot;
|
||||
Item* pItem = NULL;
|
||||
|
|
@ -179,7 +179,7 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
|
|||
DEBUG_LOG("WORLD: CMSG_LOOT_MONEY");
|
||||
|
||||
Player *player = GetPlayer();
|
||||
ObjectGuid guid = player->GetLootGUID();
|
||||
ObjectGuid guid = player->GetLootGuid();
|
||||
if (guid.IsEmpty())
|
||||
return;
|
||||
|
||||
|
|
@ -297,8 +297,9 @@ void WorldSession::HandleLootReleaseOpcode( WorldPacket & recv_data )
|
|||
// use internal stored guid
|
||||
recv_data.read_skip<uint64>(); // guid;
|
||||
|
||||
if(uint64 lguid = GetPlayer()->GetLootGUID())
|
||||
DoLootRelease(lguid);
|
||||
ObjectGuid lootGuid = GetPlayer()->GetLootGuid();
|
||||
if (!lootGuid.IsEmpty())
|
||||
DoLootRelease(lootGuid);
|
||||
}
|
||||
|
||||
void WorldSession::DoLootRelease(ObjectGuid lguid)
|
||||
|
|
@ -306,7 +307,7 @@ void WorldSession::DoLootRelease(ObjectGuid lguid)
|
|||
Player *player = GetPlayer();
|
||||
Loot *loot;
|
||||
|
||||
player->SetLootGUID(ObjectGuid());
|
||||
player->SetLootGuid(ObjectGuid());
|
||||
player->SendLootRelease(lguid);
|
||||
|
||||
player->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_LOOTING);
|
||||
|
|
@ -508,7 +509,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
|
|||
|
||||
if (!_player->GetGroup() || _player->GetGroup()->GetLooterGuid() != _player->GetObjectGuid())
|
||||
{
|
||||
_player->SendLootRelease(GetPlayer()->GetLootGUID());
|
||||
_player->SendLootRelease(GetPlayer()->GetLootGuid());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -518,7 +519,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
|
|||
|
||||
DEBUG_LOG("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = %s [%s].", target_playerguid.GetString().c_str(), target->GetName());
|
||||
|
||||
if (_player->GetLootGUID() != lootguid.GetRawValue())
|
||||
if (_player->GetLootGuid() != lootguid)
|
||||
return;
|
||||
|
||||
Loot *pLoot = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue