Fixed bug with using Salvage on stacked items. Stacked items will now

return the appropriate amount of materials. Fixes #802
This commit is contained in:
GJ 2013-03-07 08:03:18 -05:00
parent 3219674678
commit 9377de930f
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Version 1.4.03-dev
= Fixed bug where players were unable to salvage leather armor = Fixed bug where players were unable to salvage leather armor
= Fixed bug with repairing using materials with byte metadata = Fixed bug with repairing using materials with byte metadata
= Fixed bug where Fishing was becoming less successful at higher levels = Fixed bug where Fishing was becoming less successful at higher levels
= Fixed bug with using Salvage on stacked items.
! Moved the Salvage unlock level from config.yml to advanced.yml ! Moved the Salvage unlock level from config.yml to advanced.yml
- Removed option to disable Salvage via the config file. This should be handled via permissions instead. - Removed option to disable Salvage via the config file. This should be handled via permissions instead.
- Removed the option to use Woodcutting without an axe from the config file. - Removed the option to use Woodcutting without an axe from the config file.

View File

@ -188,7 +188,7 @@ public class RepairManager extends SkillManager {
player.setItemInHand(new ItemStack(Material.AIR)); player.setItemInHand(new ItemStack(Material.AIR));
location.setY(location.getY() + 1); location.setY(location.getY() + 1);
Misc.dropItems(location, new ItemStack(Repair.getSalvagedItem(item)), Repair.getSalvagedAmount(item)); Misc.dropItems(location, new ItemStack(Repair.getSalvagedItem(item)), Repair.getSalvagedAmount(item) * item.getAmount());
player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH); player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
player.sendMessage(LocaleLoader.getString("Repair.Skills.SalvageSuccess")); player.sendMessage(LocaleLoader.getString("Repair.Skills.SalvageSuccess"));