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

Also ensure that the targeted player is not hostile.
This commit is contained in:
Dehravor
2014-02-09 11:12:09 +01:00
parent 2e897d0453
commit 08cd624d0c

View File

@@ -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);
}
}