diff --git a/inventory-service/main.py b/inventory-service/main.py index 1d9d3f49..389f47f7 100644 --- a/inventory-service/main.py +++ b/inventory-service/main.py @@ -3011,6 +3011,8 @@ async def search_items( COALESCE(cs.max_damage, -1) as max_damage, COALESCE(cs.armor_level, -1) as armor_level, COALESCE(cs.attack_bonus, -1.0) as attack_bonus, + COALESCE(cs.melee_defense_bonus, -1.0) as melee_defense_bonus, + COALESCE(cs.weapon_time, -1) as weapon_time, GREATEST( COALESCE((rd.int_values->>'314')::int, -1), COALESCE((rd.int_values->>'374')::int, -1) diff --git a/static/inventory.js b/static/inventory.js index eb27dca2..c69f5504 100644 --- a/static/inventory.js +++ b/static/inventory.js @@ -459,8 +459,12 @@ const RESULT_COLUMNS = [ render: item => `${item.armor_level > 0 ? item.armor_level : '-'}` }, { key: 'max_damage', label: 'Max Dmg', sort: 'max_damage', defaultVisible: true, cls: 'text-right', render: item => `${item.max_damage > 0 ? item.max_damage : '-'}` }, - { key: 'attack_bonus', label: 'Attack Bonus', sort: 'attack_bonus', defaultVisible: false, cls: 'text-right', - render: item => `${item.attack_bonus > 0 ? (item.attack_bonus * 100).toFixed(0) + '%' : '-'}` }, + { key: 'weapon_time', label: 'Speed', sort: 'weapon_time', defaultVisible: true, cls: 'text-right', + render: item => `${item.weapon_time > 0 ? item.weapon_time : '-'}` }, + { key: 'attack_bonus', label: 'Attack Bonus', sort: 'attack_bonus', defaultVisible: true, cls: 'text-right', + render: item => `${item.attack_bonus > 0 ? '+' + ((item.attack_bonus - 1) * 100).toFixed(0) + '%' : '-'}` }, + { key: 'melee_defense_bonus', label: 'Melee Def', sort: 'melee_defense_bonus', defaultVisible: true, cls: 'text-right', + render: item => `${item.melee_defense_bonus > 0 ? '+' + ((item.melee_defense_bonus - 1) * 100).toFixed(0) + '%' : '-'}` }, { key: 'material_name', label: 'Material', sort: 'material_name', defaultVisible: false }, { key: 'workmanship', label: 'Wkm', sort: 'workmanship', defaultVisible: false, cls: 'text-right', render: item => `${item.workmanship > 0 ? item.workmanship : '-'}` },