From e1018a48f09942fb4c15e86877f66ad03317cc14 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 10 Mar 2024 14:32:50 -0500 Subject: [PATCH] checkf o valid slot type when equipping item --- src/engine/objects/ItemTemplate.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index d9c4f820..1ced24f7 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -490,6 +490,11 @@ public class ItemTemplate { if (equipped == null) return false; + //Item not valid for slot + + if(item.template.item_eq_slots_or.contains(slot) == false) + return false; + // Slot is taken if (equipped.get(slot) != null && equipped.get(slot).equals(item) == false)