Implemented functionality where user can search for traps in some chests (#534)

* Initial commit

* Implemented cooldown timer and added ardougne castle chest

* Refactoring

* Removing unused variable
This commit is contained in:
AugustasK
2023-01-20 18:48:45 +02:00
committed by GitHub
parent 9fd4b470c8
commit f56402845b
7 changed files with 229 additions and 96 deletions
@@ -93,6 +93,9 @@ public class ItemAssistant {
} else if (!hasFreeSlots(amount) && !isStackable(item)) {
GameEngine.itemHandler.createGroundItem(player, item, player.getX(), player.getY(), amount, player.playerId);
player.getPacketSender().sendMessage("You have no inventory space, so the item(s) appear beneath you.");
} else if (isStackable(item) && !hasFreeSlots(1) && !playerHasItem(item)) {
GameEngine.itemHandler.createGroundItem(player, item, player.getX(), player.getY(), amount, player.playerId);
player.getPacketSender().sendMessage("You have no inventory space, so the item(s) appear beneath you.");
} else {
addItem(item, amount);
}