aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDehravor <dehravor@gmail.com>2014-02-09 11:12:09 +0100
committerDehravor <dehravor@gmail.com>2014-02-09 11:12:09 +0100
commit08cd624d0ce303e4ed10830469b5724094124efd (patch)
treef7112c1f6ffdf1026cca3dd32d6058d08bc1facf /src
parent2e897d045363e20b393418b1811db7372451bf1c (diff)
Core/Group: Any party member may mark targets (this does not apply to raid groups)
Also ensure that the targeted player is not hostile.
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Handlers/GroupHandler.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index c14ea5bdda5..fd7d0602265 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/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);
}
}