From 35a11d0cf12927a3cce0044d45a09433f19678ad Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 8 Apr 2026 17:35:09 +0200 Subject: [PATCH] fix: correct weapon ObjectClass IDs (1, 9, 31 not 6, 7, 8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DECAL ObjectClass enum: MeleeWeapon=1, MissileWeapon=9, WandStaffOrb=31. The weapon_only filter was using Food=6, Money=7, Misc=8 — completely wrong classes. Also removed max_damage>0 requirement so weapons show even before combat stats are populated. Co-Authored-By: Claude Opus 4.6 (1M context) --- inventory-service/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory-service/main.py b/inventory-service/main.py index 4845e5f2..3a78d2f4 100644 --- a/inventory-service/main.py +++ b/inventory-service/main.py @@ -3238,9 +3238,9 @@ async def search_items( # Jewelry: ObjectClass 4 (Jewelry) - rings, bracelets, necklaces, amulets conditions.append("object_class = 4") elif weapon_only: - # Weapons: ObjectClass 6 (MeleeWeapon), 7 (MissileWeapon), 8 (Caster) with max_damage > 0 + # Weapons: ObjectClass 1 (MeleeWeapon), 9 (MissileWeapon), 31 (WandStaffOrb) conditions.append( - "(object_class IN (6, 7, 8) AND COALESCE(max_damage, 0) > 0)" + "object_class IN (1, 9, 31)" ) elif clothing_only: # Clothing: ObjectClass 3 (Clothing) - shirts and pants only, exclude cloaks and robes