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

Open
opened 2026-06-07 12:23:06 +00:00 by Dark98 · 0 comments
Owner

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

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/2006-Scape/2006Scape/pull/473 **State:** closed **Merged:** Yes --- 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.
Dark98 added the pull-request label 2026-06-07 12:23:06 +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#14107