Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions sku.0/sys.server/compiled/game/script/library/loot.java
Original file line number Diff line number Diff line change
Expand Up @@ -2491,6 +2491,14 @@ public static boolean addRareLoot(obj_id target) throws InterruptedException
// get the attacker who did the most damage.
obj_id player = getObjIdObjVar(target, xp.VAR_TOP_GROUP);

// VAR_TOP_GROUP stores a group object when the top damage dealer is grouped.
// Pick a random member of that group to receive the RLS chest.
if (group.isGroupObject(player)) {
obj_id[] members = utils.getLocalGroupMemberIds(player);
if (members == null || members.length == 0) return false;
player = members[rand(0, members.length - 1)];
}

// make sure the attacker is a player.
if(!isValidId(player) || !isPlayer(player)){
return false;
Expand Down