Core/Entities: Use ObjectGuid class in game project
This commit is contained in:
1 parent
ce67a097bf
commit
a0e50ea35f
256 files changed
+3334
-3833
No files matched your search
@@ -124,7 +124,7 @@ WorldSession::WorldSession(uint32 id, std::shared_ptr<WorldSocket> sock, Account
|
||||
_RBACData(NULL),
|
||||
expireTime(60000), // 1 min after socket loss, session is deleted
|
||||
forceExit(false),
|
||||
m_currentBankerGUID(0)
|
||||
m_currentBankerGUID()
|
||||
{
|
||||
memset(m_Tutorials, 0, sizeof(m_Tutorials));
|
||||
|
||||
@@ -173,7 +173,7 @@ std::string WorldSession::GetPlayerInfo() const
|
||||
std::ostringstream ss;
|
||||
|
||||
ss << "[Player: " << GetPlayerName()
|
||||
<< " (Guid: " << (_player != NULL ? _player->GetGUID() : 0)
|
||||
<< " (Guid: " << (_player != NULL ? _player->GetGUID().ToString() : "")
|
||||
<< ", Account: " << GetAccountId() << ")]";
|
||||
|
||||
return ss.str();
|
||||
@@ -445,7 +445,7 @@ void WorldSession::LogoutPlayer(bool save)
|
||||
|
||||
if (_player)
|
||||
{
|
||||
if (uint64 lguid = _player->GetLootGUID())
|
||||
if (ObjectGuid lguid = _player->GetLootGUID())
|
||||
DoLootRelease(lguid);
|
||||
|
||||
///- If the player just died before logging out, make him appear as a ghost
|
||||
@@ -512,7 +512,7 @@ void WorldSession::LogoutPlayer(bool save)
|
||||
for (int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; ++j)
|
||||
{
|
||||
eslot = j - BUYBACK_SLOT_START;
|
||||
_player->SetUInt64Value(PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), 0);
|
||||
_player->SetGuidValue(PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), ObjectGuid::Empty);
|
||||
_player->SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, 0);
|
||||
_player->SetUInt32Value(PLAYER_FIELD_BUYBACK_TIMESTAMP_1 + eslot, 0);
|
||||
}
|
||||
@@ -796,8 +796,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi)
|
||||
|
||||
if (mi->HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
|
||||
{
|
||||
data.readPackGUID(mi->transport.guid);
|
||||
|
||||
data >> mi->transport.guid.ReadAsPacked();
|
||||
data >> mi->transport.pos.PositionXYZOStream();
|
||||
data >> mi->transport.time;
|
||||
data >> mi->transport.seat;
|
||||
@@ -904,8 +903,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi)
|
||||
|
||||
void WorldSession::WriteMovementInfo(WorldPacket* data, MovementInfo* mi)
|
||||
{
|
||||
data->appendPackGUID(mi->guid);
|
||||
|
||||
*data << mi->guid.WriteAsPacked();
|
||||
*data << mi->flags;
|
||||
*data << mi->flags2;
|
||||
*data << mi->time;
|
||||
@@ -913,8 +911,7 @@ void WorldSession::WriteMovementInfo(WorldPacket* data, MovementInfo* mi)
|
||||
|
||||
if (mi->HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
|
||||
{
|
||||
data->appendPackGUID(mi->transport.guid);
|
||||
|
||||
*data << mi->transport.guid.WriteAsPacked();
|
||||
*data << mi->transport.pos.PositionXYZOStream();
|
||||
*data << mi->transport.time;
|
||||
*data << mi->transport.seat;
|
||||
@@ -1148,7 +1145,7 @@ void WorldSession::ProcessQueryCallbacks()
|
||||
//- SendStabledPet
|
||||
if (_sendStabledPetCallback.IsReady())
|
||||
{
|
||||
uint64 param = _sendStabledPetCallback.GetParam();
|
||||
ObjectGuid param = _sendStabledPetCallback.GetParam();
|
||||
_sendStabledPetCallback.GetResult(result);
|
||||
SendStablePetCallback(result, param);
|
||||
_sendStabledPetCallback.FreeResult();
|
||||
|
||||
Reference in new issue
Block a user