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:
parent
8943133ae3
commit
84d651ac44
2 changed files with 2 additions and 2 deletions
|
|
@ -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)),
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ const RESULT_COLUMNS = [
|
|||
{ key: 'max_damage', label: 'Max Dmg', sort: 'max_damage', defaultVisible: true, cls: 'text-right',
|
||||
render: item => `<td class="text-right">${item.max_damage > 0 ? item.max_damage : '-'}</td>` },
|
||||
{ key: 'weapon_time', label: 'Speed', sort: 'weapon_time', defaultVisible: true, cls: 'text-right',
|
||||
render: item => `<td class="text-right">${item.weapon_time > 0 ? item.weapon_time : '-'}</td>` },
|
||||
render: item => `<td class="text-right">${item.weapon_time > 0 && item.weapon_time < 100 ? item.weapon_time : '-'}</td>` },
|
||||
{ key: 'attack_bonus', label: 'Attack Bonus', sort: 'attack_bonus', defaultVisible: true, cls: 'text-right',
|
||||
render: item => `<td class="text-right">${item.attack_bonus > 0 ? '+' + ((item.attack_bonus - 1) * 100).toFixed(0) + '%' : '-'}</td>` },
|
||||
{ key: 'melee_defense_bonus', label: 'Melee Def', sort: 'melee_defense_bonus', defaultVisible: true, cls: 'text-right',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue