[PR #474] Fix gem check being rolled twice. #6102

Closed
opened 2026-05-28 12:21:51 +00:00 by Dark98 · 0 comments
Owner

Original Pull Request: https://github.com/2006-Scape/2006Scape/pull/474

State: closed
Merged: Yes


giveGem roll is not needed in obtainGem because it is already checked in order to call obtainGem.

https://github.com/2006rebotted/2006rebotted/blob/15ab6253499e5f5a38372a296d35aa30492dd6d6/2006Redone%20Server/src/main/java/com/rebotted/game/content/skills/core/Mining.java#L232-L238

Calling random inside the Glory loop results in multiple rolls, potentially hiding the double giveGem check.

**Original Pull Request:** https://github.com/2006-Scape/2006Scape/pull/474 **State:** closed **Merged:** Yes --- `giveGem` roll is not needed in `obtainGem` because it is already checked in order to call `obtainGem`. https://github.com/2006rebotted/2006rebotted/blob/15ab6253499e5f5a38372a296d35aa30492dd6d6/2006Redone%20Server/src/main/java/com/rebotted/game/content/skills/core/Mining.java#L232-L238 Calling random inside the Glory loop results in multiple rolls, potentially hiding the double `giveGem` check.
Dark98 added the pull-request label 2026-05-28 12:21:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 2006-Scape/2006Scape#6102