File tree Expand file tree Collapse file tree
sku.0/sys.server/compiled/game/script/library Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2491,6 +2491,14 @@ public static boolean addRareLoot(obj_id target) throws InterruptedException
24912491 // get the attacker who did the most damage.
24922492 obj_id player = getObjIdObjVar (target , xp .VAR_TOP_GROUP );
24932493
2494+ // VAR_TOP_GROUP stores a group object when the top damage dealer is grouped.
2495+ // Pick a random member of that group to receive the RLS chest.
2496+ if (group .isGroupObject (player )) {
2497+ obj_id [] members = utils .getLocalGroupMemberIds (player );
2498+ if (members == null || members .length == 0 ) return false ;
2499+ player = members [rand (0 , members .length - 1 )];
2500+ }
2501+
24942502 // make sure the attacker is a player.
24952503 if (!isValidId (player ) || !isPlayer (player )){
24962504 return false ;
You can’t perform that action at this time.
0 commit comments