Skip to content

Commit

Permalink
Fix group member online state update
Browse files Browse the repository at this point in the history
Fixes groups not displaying a logging off player as an offline player correctly (usually when processed in another thread on another map).
Also sync online between cores.
  • Loading branch information
Warlockbugs committed Oct 13, 2016
1 parent a913e3b commit 157e6e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/Group.cpp
Expand Up @@ -549,12 +549,12 @@ void Group::SendUpdate()
if (citr->guid == citr2->guid)
continue;
Player* member = sObjectMgr.GetPlayer(citr2->guid);
uint8 onlineState = (member) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
uint8 onlineState = (member && member->GetSession() && !member->GetSession()->PlayerLogout()) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
onlineState = onlineState | ((isBGGroup()) ? MEMBER_STATUS_PVP : 0);

data << citr2->name;
data << citr2->guid;
data << uint8(onlineState); // online-state
data << uint8(onlineState);
data << uint8(citr2->group); // groupid
data << uint8(GetFlags(*citr2)); // group flags
data << uint8(0); // 3.3, role?
Expand Down

0 comments on commit 157e6e2

Please sign in to comment.