From 406c864b178fc2767cd0b739635575c91ee32005 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 10 Mar 2024 14:53:14 -0400 Subject: [PATCH 1/2] Exclude Cloth for now --- src/engine/objects/ItemTemplate.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index d9c4f820..a7f37397 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -166,8 +166,10 @@ public class ItemTemplate { Object skill_used = jsonObject.get("item_skill_used"); - if (skill_used instanceof String) - item_skill_used = (String) skill_used; + if (skill_used instanceof String) { + if (skill_used.equals("Cloth") == false) + item_skill_used = (String) skill_used; + } Object mastery_used = jsonObject.get("item_skill_mastery_used"); @@ -265,7 +267,9 @@ public class ItemTemplate { JSONObject skill_req = (JSONObject) o; String skill_type = (String) skill_req.get("skill_type"); int skill_level = ((Long) skill_req.get("skill_level")).intValue(); - item_skill_required.put(skill_type, skill_level); + + if (skill_type.equals("Cloth") == false) + item_skill_required.put(skill_type, skill_level); } JSONObject race_required = (JSONObject) jsonObject.get("item_race_req"); From 50d75eecc6f280e1b178c3642f39115d5e220cb1 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 10 Mar 2024 15:21:35 -0400 Subject: [PATCH 2/2] Pass weaponslot not slot. --- src/engine/gameManager/CombatManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 62147bc9..f6760780 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -312,7 +312,7 @@ public enum CombatManager { //get Weapon boolean isWeapon = true; - Item weapon = equipped.get(slot); + Item weapon = equipped.get(weaponSlot); ItemBase wb = null; if (weapon == null)