mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9982] Group out of range member must based at client existances.
Signed-off-by: VladimirMangos <vladimir@getmangos.com> Also move empty mask check from build function to caller.
This commit is contained in:
parent
ce85076033
commit
d0398b94f6
3 changed files with 10 additions and 11 deletions
|
|
@ -1016,16 +1016,16 @@ void Group::UpdatePlayerOutOfRange(Player* pPlayer)
|
|||
if(!pPlayer || !pPlayer->IsInWorld())
|
||||
return;
|
||||
|
||||
Player *player;
|
||||
if (pPlayer->GetGroupUpdateFlag() == GROUP_UPDATE_FLAG_NONE)
|
||||
return;
|
||||
|
||||
WorldPacket data;
|
||||
pPlayer->GetSession()->BuildPartyMemberStatsChangedPacket(pPlayer, &data);
|
||||
|
||||
for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
player = itr->getSource();
|
||||
if (player && player != pPlayer && !pPlayer->isVisibleFor(player,player->GetViewPoint()))
|
||||
if (Player *player = itr->getSource())
|
||||
if (player != pPlayer && !player->HaveAtClient(pPlayer))
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
}
|
||||
|
||||
void Group::BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int group, uint64 ignore)
|
||||
|
|
|
|||
|
|
@ -632,13 +632,10 @@ void WorldSession::HandleRaidReadyCheckFinishedOpcode( WorldPacket & /*recv_data
|
|||
// Is any reaction need?
|
||||
}
|
||||
|
||||
void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacket *data)
|
||||
bool WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacket *data)
|
||||
{
|
||||
uint32 mask = player->GetGroupUpdateFlag();
|
||||
|
||||
if (mask == GROUP_UPDATE_FLAG_NONE)
|
||||
return;
|
||||
|
||||
if (mask & GROUP_UPDATE_FLAG_POWER_TYPE) // if update power type, update current/max power also
|
||||
mask |= (GROUP_UPDATE_FLAG_CUR_POWER | GROUP_UPDATE_FLAG_MAX_POWER);
|
||||
|
||||
|
|
@ -789,6 +786,8 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
|
|||
else
|
||||
*data << uint64(0);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*this procedure handles clients CMSG_REQUEST_PARTY_MEMBER_STATS request*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9981"
|
||||
#define REVISION_NR "9982"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue