mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
[PR #473] Fix bug where leveling up while Smelting would consume ores. #14107
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Problem
Leveling up will clear
isSmeltingpreventing bars for being given but not hitting a condition to break out of the smelting loop.Fix
Utilize
resetSmeltingwhich, in addition to clearingisSmeltingwill 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.