mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Don't remove container loot tag if no eligible loot can be found
This commit is contained in:
parent
3b906699bc
commit
0f1bd5f66a
1 changed files with 2 additions and 2 deletions
|
@ -133,13 +133,13 @@ public class BlockUseRequest extends PlayerRequest {
|
|||
}
|
||||
|
||||
if(specialItem.equals("?")) {
|
||||
metadata.remove("$");
|
||||
LootManager lootManager = GameServer.getInstance().getLootManager();
|
||||
Loot loot = lootManager.getRandomLoot(15, zone.getBiome(), item.getLootCategories()); // TODO level
|
||||
|
||||
if(loot == null) {
|
||||
player.alert("How quaint, this container is empty!");
|
||||
player.alert("No eligible loot could be found for this container.");
|
||||
} else {
|
||||
metadata.remove("$");
|
||||
player.awardLoot(loot, item.getLootGraphic());
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue