Merge pull request #9427 from TheStonedTurtle/death-never-ends

Items Kept on Death - Fix breakable death prices
This commit is contained in:
Adam
2019-08-12 20:05:16 -04:00
committed by GitHub
3 changed files with 92 additions and 60 deletions

View File

@@ -608,4 +608,24 @@ public class ItemsKeptOnDeathPluginTest
final List<ItemStack> kept = deathItems.getKeptItems();
assertTrue(kept.contains(new ItemStack(ItemID.SHADOW_SWORD, 1)));
}
@Test
public void brokenOnDeathTestRepairPrice()
{
// Dragon defender price should actually be pulled from BrokenOnDeathItem, and be lost on death
final Item[] inv = new Item[]
{
mItem(ItemID.BARROWS_GLOVES, 1, "Barrows gloves", false, 130000),
mItem(ItemID.DRAGON_DEFENDER, 1, "Dragon defender", false, 68007),
mItem(ItemID.DRAGON_SCIMITAR, 1, "Dragon scimitar", true, 63123),
mItem(ItemID.HELM_OF_NEITIZNOT, 1, "Helm of neitiznot", true, 45519),
};
plugin.wildyLevel = 21;
final DeathItems deathItems = plugin.calculateKeptLostItems(inv, new Item[0]);
final List<ItemStack> lost = deathItems.getLostItems();
assertTrue(lost.contains(new ItemStack(ItemID.DRAGON_DEFENDER, 1)));
}
}