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

Open
opened 2026-06-03 12:22:18 +00:00 by Dark98 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/2006-Scape/2006Scape/pull/474
Author: @nickgal
Created: 2/4/2021
Status: Merged
Merged: 2/5/2021
Merged by: @dginovker

Base: masterHead: gem-chance


📝 Commits (1)

  • ff53b9f Fix gem check being rolled twice.

📊 Changes

1 file changed (+7 additions, -8 deletions)

View changed files

📝 2006Redone Server/src/main/java/com/rebotted/game/content/skills/core/Mining.java (+7 -8)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/2006-Scape/2006Scape/pull/474 **Author:** [@nickgal](https://github.com/nickgal) **Created:** 2/4/2021 **Status:** ✅ Merged **Merged:** 2/5/2021 **Merged by:** [@dginovker](https://github.com/dginovker) **Base:** `master` ← **Head:** `gem-chance` --- ### 📝 Commits (1) - [`ff53b9f`](https://github.com/2006-Scape/2006Scape/commit/ff53b9f0e48d01e585d783642568197c82c199dd) Fix gem check being rolled twice. ### 📊 Changes **1 file changed** (+7 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `2006Redone Server/src/main/java/com/rebotted/game/content/skills/core/Mining.java` (+7 -8) </details> ### 📄 Description `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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Dark98 added the pull-request label 2026-06-03 12:22:18 +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#10524