mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[11062] Correctly show team member status while teleporting
This commit is contained in:
parent
fce48282ad
commit
a3315d0a11
2 changed files with 29 additions and 5 deletions
|
|
@ -806,7 +806,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
|
||||||
ObjectGuid guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Player *player = sObjectMgr.GetPlayer(guid);
|
Player * player = HashMapHolder<Player>::Find(guid);
|
||||||
if(!player)
|
if(!player)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
|
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
|
||||||
|
|
@ -837,9 +837,33 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
|
||||||
data << uint16(player->GetPower(powerType)); // GROUP_UPDATE_FLAG_CUR_POWER
|
data << uint16(player->GetPower(powerType)); // GROUP_UPDATE_FLAG_CUR_POWER
|
||||||
data << uint16(player->GetMaxPower(powerType)); // GROUP_UPDATE_FLAG_MAX_POWER
|
data << uint16(player->GetMaxPower(powerType)); // GROUP_UPDATE_FLAG_MAX_POWER
|
||||||
data << uint16(player->getLevel()); // GROUP_UPDATE_FLAG_LEVEL
|
data << uint16(player->getLevel()); // GROUP_UPDATE_FLAG_LEVEL
|
||||||
data << uint16(player->GetZoneId()); // GROUP_UPDATE_FLAG_ZONE
|
|
||||||
data << uint16(player->GetPositionX()); // GROUP_UPDATE_FLAG_POSITION
|
//verify player coordinates and zoneid to send to teammates
|
||||||
data << uint16(player->GetPositionY()); // GROUP_UPDATE_FLAG_POSITION
|
uint16 iZoneId = 0;
|
||||||
|
uint16 iCoordX = 0;
|
||||||
|
uint16 iCoordY = 0;
|
||||||
|
|
||||||
|
if (player->IsInWorld())
|
||||||
|
{
|
||||||
|
iZoneId = player->GetZoneId();
|
||||||
|
iCoordX = player->GetPositionX();
|
||||||
|
iCoordY = player->GetPositionY();
|
||||||
|
}
|
||||||
|
else if (player->IsBeingTeleported()) // Player is in teleportation
|
||||||
|
{
|
||||||
|
WorldLocation& loc = player->GetTeleportDest(); // So take teleportation destination
|
||||||
|
iZoneId = sTerrainMgr.GetZoneId(loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z);
|
||||||
|
iCoordX = loc.coord_x;
|
||||||
|
iCoordY = loc.coord_y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//unknown player status.
|
||||||
|
}
|
||||||
|
|
||||||
|
data << uint16(iZoneId); // GROUP_UPDATE_FLAG_ZONE
|
||||||
|
data << uint16(iCoordX); // GROUP_UPDATE_FLAG_POSITION
|
||||||
|
data << uint16(iCoordY); // GROUP_UPDATE_FLAG_POSITION
|
||||||
|
|
||||||
uint64 auramask = 0;
|
uint64 auramask = 0;
|
||||||
size_t maskPos = data.wpos();
|
size_t maskPos = data.wpos();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11061"
|
#define REVISION_NR "11062"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue