[PR #473] [MERGED] Fix bug where leveling up while Smelting would consume ores. #13140

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

📋 Pull Request Information

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

Base: masterHead: smelting-level-up


📝 Commits (2)

  • f3a58e4 Fix bug where leveling up while Smelting would consume ores.
  • 5128a41 Making sending message before adding skill xp more consistent.

📊 Changes

2 files changed (+10 additions, -12 deletions)

View changed files

📝 2006Redone Server/src/main/java/com/rebotted/game/content/skills/SkillHandler.java (+4 -6)
📝 2006Redone Server/src/main/java/com/rebotted/game/content/skills/smithing/Smelting.java (+6 -6)

📄 Description

Smelting doesn't stop when you level up. As it continues smelting you lose ores but do not gain bars.

Step to reproduce

::tp 2973 3370
::skill 13 1
::empty
::item 436 10
::item 438 10
// smelt 10, get 10 bars
::empty
::item 436 10
::item 438 10
// smelt 10 again, it will level up, keep smelting, removing ore but not giving bars

Problem

Leveling up will clear isSmelting preventing bars for being given but not hitting a condition to break out of the smelting loop.

Fix

Utilize resetSmelting which, in addition to clearing isSmelting will cause it to end the smelting at one of these checks:
https://github.com/2006rebotted/2006rebotted/blob/fa167bacd3999efda6c7dff6d3d357cdb0731064/2006Redone%20Server/src/main/java/com/rebotted/game/content/skills/smithing/Smelting.java#L158-L165

Additionally, giving the item before the xp ensures that you receive the bar that levels you up.


🔄 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/473 **Author:** [@nickgal](https://github.com/nickgal) **Created:** 2/2/2021 **Status:** ✅ Merged **Merged:** 2/4/2021 **Merged by:** [@dginovker](https://github.com/dginovker) **Base:** `master` ← **Head:** `smelting-level-up` --- ### 📝 Commits (2) - [`f3a58e4`](https://github.com/2006-Scape/2006Scape/commit/f3a58e47fd866e6e4aa18415c89bf78d29009690) Fix bug where leveling up while Smelting would consume ores. - [`5128a41`](https://github.com/2006-Scape/2006Scape/commit/5128a41a3d78cac0baa81fffa2d7047d0ede4b00) Making sending message before adding skill xp more consistent. ### 📊 Changes **2 files changed** (+10 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `2006Redone Server/src/main/java/com/rebotted/game/content/skills/SkillHandler.java` (+4 -6) 📝 `2006Redone Server/src/main/java/com/rebotted/game/content/skills/smithing/Smelting.java` (+6 -6) </details> ### 📄 Description Smelting doesn't stop when you level up. As it continues smelting you lose ores but do not gain bars. ### Step to reproduce ``` ::tp 2973 3370 ::skill 13 1 ::empty ::item 436 10 ::item 438 10 // smelt 10, get 10 bars ::empty ::item 436 10 ::item 438 10 // smelt 10 again, it will level up, keep smelting, removing ore but not giving bars ``` ### Problem Leveling up will clear `isSmelting` preventing bars for being given but not hitting a condition to break out of the smelting loop. ### Fix Utilize `resetSmelting` which, in addition to clearing `isSmelting` will cause it to end the smelting at one of these checks: https://github.com/2006rebotted/2006rebotted/blob/fa167bacd3999efda6c7dff6d3d357cdb0731064/2006Redone%20Server/src/main/java/com/rebotted/game/content/skills/smithing/Smelting.java#L158-L165 Additionally, giving the item before the xp ensures that you receive the bar that levels you up. --- <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-06 12:22:09 +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#13140