Losing runecrafting pouch of lower tiers requires dropping higher tier pouches to regain lower tier
From AbyssalNPC.java
private Item getPouch(Player player) {
Item pouch = RunePouch.SMALL.getPouch();
if (player.hasItem(pouch)) {
pouch = RunePouch.MEDIUM.getPouch();
}
if (player.hasItem(RunePouch.MEDIUM.getPouch()) || player.hasItem(RunePouch.MEDIUM.getDecayedPouch())) {
pouch = RunePouch.LARGE.getPouch();
}
if (player.hasItem(RunePouch.LARGE.getPouch()) || player.hasItem(RunePouch.LARGE.getDecayedPouch())) {
pouch = RunePouch.GIANT.getPouch();
}
if (player.hasItem(RunePouch.GIANT.getPouch()) || player.hasItem(RunePouch.GIANT.getDecayedPouch())) {
pouch = null;
}
return pouch;
}
In my case, I died in the abyss destroying SMALL and MEDIUM pouches, but I had LARGE pouch in my bank. The next pouch I received as a drop was GIANT pouch, even though SMALL and MEDIUM no longer exist in my bank, inventory, or equipment. It will be impossible to regain SMALL and MEDIUM pouches unless I drop LARGE and GIANT pouches.
I believe this code would be better, and from my memory, it is how it works in real RuneScape.
private Item getPouch(Player player) {
if (!player.hasItem(RunePouch.SMALL.getPouch())) {
return RunePouch.SMALL.getPouch();
}
if (!player.hasItem(RunePouch.MEDIUM.getPouch()) && !player.hasItem(RunePouch.MEDIUM.getDecayedPouch())) {
return RunePouch.MEDIUM.getPouch();
}
if (!player.hasItem(RunePouch.LARGE.getPouch()) && !player.hasItem(RunePouch.LARGE.getDecayedPouch())) {
return RunePouch.LARGE.getPouch();
}
if (!player.hasItem(RunePouch.GIANT.getPouch()) && !player.hasItem(RunePouch.GIANT.getDecayedPouch())) {
return RunePouch.GIANT.getPouch();
}
return null;
}