fix: correct weapon ObjectClass IDs (1, 9, 31 not 6, 7, 8)
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) <noreply@anthropic.com>
This commit is contained in:
parent
1e9dffb65b
commit
35a11d0cf1
1 changed files with 2 additions and 2 deletions
|
|
@ -3238,9 +3238,9 @@ async def search_items(
|
||||||
# Jewelry: ObjectClass 4 (Jewelry) - rings, bracelets, necklaces, amulets
|
# Jewelry: ObjectClass 4 (Jewelry) - rings, bracelets, necklaces, amulets
|
||||||
conditions.append("object_class = 4")
|
conditions.append("object_class = 4")
|
||||||
elif weapon_only:
|
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(
|
conditions.append(
|
||||||
"(object_class IN (6, 7, 8) AND COALESCE(max_damage, 0) > 0)"
|
"object_class IN (1, 9, 31)"
|
||||||
)
|
)
|
||||||
elif clothing_only:
|
elif clothing_only:
|
||||||
# Clothing: ObjectClass 3 (Clothing) - shirts and pants only, exclude cloaks and robes
|
# Clothing: ObjectClass 3 (Clothing) - shirts and pants only, exclude cloaks and robes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue