Permalink
Browse files

Merge pull request #11584 from Dehravor/group

Group related fixes
  • Loading branch information...
2 parents b722730 + 08cd624 commit 1aada1f5ef14174fca443ad7b5f9143d465cbbc4 @jackpoz jackpoz committed Feb 10, 2014
Showing with 19 additions and 1 deletion.
  1. +19 −1 src/server/game/Handlers/GroupHandler.cpp
@@ -425,6 +425,15 @@ void WorldSession::HandleLootMethodOpcode(WorldPacket& recvData)
/** error handling **/
if (!group->IsLeader(GetPlayer()->GetGUID()))
return;
+
+ if (lootMethod > NEED_BEFORE_GREED)
+ return;
+
+ if (lootThreshold < ITEM_QUALITY_UNCOMMON || lootThreshold > ITEM_QUALITY_ARTIFACT)
+ return;
+
+ if (lootMethod == MASTER_LOOT && !group->IsMember(lootMaster))
+ return;
/********************/
// everything's fine, do it
@@ -534,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 1aada1f

Please sign in to comment.