Skip to content

Fix RLS crates not dropping for grouped players#410

Merged
AconiteX merged 1 commit into
SWG-Source:masterfrom
nickk02:fix/343-group-rls-loot
May 17, 2026
Merged

Fix RLS crates not dropping for grouped players#410
AconiteX merged 1 commit into
SWG-Source:masterfrom
nickk02:fix/343-group-rls-loot

Conversation

@nickk02

@nickk02 nickk02 commented May 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Rare Loot System (RLS) chests never dropped for grouped players. Solo play was unaffected.

Root cause:

xp.VAR_TOP_GROUP stores a group object ID when the top damage dealer is part of a group (see xp.java line 824-836). In loot.addRareLoot(), this value is treated as the player recipient and immediately fails the isPlayer() check, returning false before any roll is made.

Fix:

Detect when VAR_TOP_GROUP holds a group object and resolve it to a random group member. This matches how other group loot mechanics are handled throughout the codebase (e.g., chooseRandomLootPlayerFromGroup).

Fixes #343

xp.VAR_TOP_GROUP stores the GROUP object ID when the top attacker is in
a group, not an individual player. The isPlayer() guard in addRareLoot()
was then failing immediately, preventing any RLS chest from spawning
whenever players were grouped.

Pick a random member of the group as the RLS recipient, consistent with
how other group loot mechanics work in the codebase.

Fixes #343
@AconiteX
AconiteX merged commit 8ba2ccf into SWG-Source:master May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group Loot Not Functioning for Rare Loot Crates.

2 participants