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
255 stars 29 forks source link

The wear degree is incorrectly calculated #88

Closed hackeryutu closed 7 months ago

hackeryutu commented 7 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 7 months ago

Fixed thanks!