From 707fc9f7568dff3d32414f29adc696e023ce697c Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 29 Jul 2023 20:57:24 -0500 Subject: [PATCH] fixed mob loot crash --- src/engine/loot/LootManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/engine/loot/LootManager.java b/src/engine/loot/LootManager.java index 5e66c0f4..a3d3be43 100644 --- a/src/engine/loot/LootManager.java +++ b/src/engine/loot/LootManager.java @@ -137,11 +137,12 @@ public class LootManager { if (generalItemTables.containsKey(bse.lootTable + 1)) { int lootTableID = bse.lootTable + 1; MobLoot toAddHZ = getGenTableItem(lootTableID, mob); - if (toAddHZ != null) - if (toAdd.getPrefix() != null && toAdd.getPrefix().isEmpty() == true && toAdd.getSuffix() != null && toAdd.getSuffix().isEmpty() == true) { - toAdd.setIsID(true); + if (toAddHZ != null) { + if (toAddHZ.getPrefix() != null && toAddHZ.getPrefix().isEmpty() == true && toAddHZ.getSuffix() != null && toAddHZ.getSuffix().isEmpty() == true) { + toAddHZ.setIsID(true); } - mob.getCharItemManager().addItemToInventory(toAddHZ); + mob.getCharItemManager().addItemToInventory(toAddHZ); + } } } break;