mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user