Remove reduandant else from getRepairableItemQualityValue()

This commit is contained in:
Dev 2023-11-05 13:19:10 +00:00
parent c527824d60
commit df6a08367b

View File

@ -363,7 +363,7 @@ class ItemHelper
// Edge case, max durability is below durability
if (repairable.Durability < repairable.MaxDurability)
{
this.logger.warning(`Max durability ${repairable.MaxDurability} for item id: ${item._id} was below Durability ${repairable.Durability}, adjusting values to match`);
this.logger.warning(`Max durability: ${repairable.MaxDurability} for item id: ${item._id} was below Durability: ${repairable.Durability}, adjusting values to match`);
repairable.MaxDurability = repairable.Durability;
}
@ -372,8 +372,7 @@ class ItemHelper
{
return repairable.Durability / itemDetails._props.MaxDurability;
}
else
{
// Weapon
// Get max dura from props, if it isnt there use repairable max dura value
const maxDurability = (itemDetails._props.MaxDurability)
@ -390,7 +389,6 @@ class ItemHelper
return Math.sqrt(durability);
}
}
/**
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results