ByMykel / CSGO-API

An unofficial JSON API for Counter-Strike 2 in multiples languages. List of skins, cases, stickers, collections, collectibles, agents, graffiti, keys, patches and music kits.
https://bymykel.github.io/CSGO-API/
MIT License
296 stars 34 forks source link

The wear degree is incorrectly calculated #88

Closed hackeryutu closed 10 months ago

hackeryutu commented 10 months ago

const wears = [ { wear: "SFUI_InvTooltip_Wear_Amount_0", min: 0.0, max: 0.07 }, { wear: "SFUI_InvTooltip_Wear_Amount_1", min: 0.07, max: 0.15 }, { wear: "SFUI_InvTooltip_Wear_Amount_2", min: 0.15, max: 0.38 }, { wear: "SFUI_InvTooltip_Wear_Amount_3", min: 0.38, max: 0.45 }, { wear: "SFUI_InvTooltip_Wear_Amount_4", min: 0.45, max: 1.0 }, ];

return wears .filter((range) => { return range.min >= minFloat && range.max <= maxFloat; }) .map((range) => range.wear);

There's no such wear

StatTrak™ Dual Berettas | Retribution (Battle-Scarred) Dual Berettas | Ventilators (Battle-Scarred) StatTrak™ Dual Berettas | Ventilators (Battle-Scarred)

...

ByMykel commented 10 months ago

Fixed thanks!