fix: filter garbage weapon_time values (67108882 is flag data, not speed)

Some unidentified items have IntValues[218103835] = 67108882 which is
a bitmask/flags value, not weapon speed. Cap at 100 in extraction and
filter >100 in frontend display. AC weapon speed is typically 0-50.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-04-09 11:18:00 +02:00
parent 8943133ae3
commit 84d651ac44
2 changed files with 2 additions and 2 deletions

View file

@ -1367,7 +1367,7 @@ def extract_item_properties(item_data: Dict[str, Any]) -> Dict[str, Any]:
"attack_bonus": double_values.get("167772170", double_values.get(167772170, item_data.get("AttackBonus", -1.0))),
"variance": double_values.get("167772171", double_values.get(167772171, -1.0)),
"damage_type": int_values.get("218103832", int_values.get(218103832, -1)),
"weapon_time": int_values.get("218103835", int_values.get(218103835, -1)),
"weapon_time": min(int_values.get("218103835", int_values.get(218103835, -1)), 100), # Cap at 100; values like 67108882 are garbage flag data
"weapon_skill": int_values.get("218103840", int_values.get(218103840, -1)),
# Defense bonuses from raw values
"melee_defense_bonus": double_values.get("29", double_values.get(29, -1.0)),