Permalink
Browse files

Core/Group: Any party member may mark targets (this does not apply to…

… raid groups)

Also ensure that the targeted player is not hostile.
  • Loading branch information...
1 parent 2e897d0 commit 08cd624d0ce303e4ed10830469b5724094124efd Dehravor committed Feb 9, 2014
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/server/game/Handlers/GroupHandler.cpp
@@ -543,11 +543,20 @@ void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket& recvData)
}
else // target icon update
{
- if (!group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID()))
+ if (group->isRaidGroup() && !group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID()))
return;
uint64 guid;
recvData >> guid;
+
+ if (IS_PLAYER_GUID(guid))
+ {
+ Player* target = ObjectAccessor::FindPlayer(guid);
+
+ if (!target || target->IsHostileTo(GetPlayer()))
+ return;
+ }
+
group->SetTargetIcon(x, _player->GetGUID(), guid);
}
}

0 comments on commit 08cd624

Please sign in to comment.