Jump to content

Recommended Posts

Posted

What bug does the patch fix? What features does the patch add?

Often when member of group is being teleported his status goes offline or die.

For which repository revision was the patch created?

Latest

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread

Probably.

Who has been writing this patch? Please include either forum user names or email addresses.

me but based on this https://github.com/TrinityCore/TrinityCore/commit/4fba0830d02e350918c7b3f9deae67338538055a

diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp
index 84c1559..31abd07 100644
--- a/src/game/GroupHandler.cpp
+++ b/src/game/GroupHandler.cpp
@@ -806,7 +806,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
    ObjectGuid guid;
    recv_data >> guid;

-    Player *player = sObjectMgr.GetPlayer(guid);
+    Player * player = HashMapHolder<Player>::Find(guid);
    if(!player)
    {
        WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
@@ -837,9 +837,30 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
    data << uint16(player->GetPower(powerType));            // GROUP_UPDATE_FLAG_CUR_POWER
    data << uint16(player->GetMaxPower(powerType));         // GROUP_UPDATE_FLAG_MAX_POWER
    data << uint16(player->getLevel());                     // GROUP_UPDATE_FLAG_LEVEL
-    data << uint16(player->GetZoneId());                    // GROUP_UPDATE_FLAG_ZONE
-    data << uint16(player->GetPositionX());                 // GROUP_UPDATE_FLAG_POSITION
-    data << uint16(player->GetPositionY());                 // GROUP_UPDATE_FLAG_POSITION
+
+    if (player->IsInWorld())
+    {
+        data << uint16(player->GetZoneId());                // GROUP_UPDATE_FLAG_ZONE
+        data << uint16(player->GetPositionX());             // GROUP_UPDATE_FLAG_POSITION
+        data << uint16(player->GetPositionY());             // GROUP_UPDATE_FLAG_POSITION
+    }
+    else
+    {
+        if (player->IsBeingTeleported())                    // Player is in teleportation
+        {
+            WorldLocation& loc = player->GetTeleportDest(); // So take teleportation destination
+            data << uint16(sTerrainMgr.GetZoneId(loc.mapid,loc.coord_x, loc.coord_y,loc.coord_z));
+            data << uint16(loc.coord_x);
+            data << uint16(loc.coord_y);
+       }
+        else
+        {
+            // unhandled situation
+            data << uint16(0);
+            data << uint16(0);
+            data << uint16(0);
+        }
+    }

    uint64 auramask = 0;
    size_t maskPos = data.wpos();

Thanks, to Ambal help and SPP.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use