mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
[PR #473] [MERGED] Fix bug where leveling up while Smelting would consume ores. #7487
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?
📋 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:
master← Head:smelting-level-up📝 Commits (2)
f3a58e4Fix bug where leveling up while Smelting would consume ores.5128a41Making 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
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.