Change getRepairableItemQualityValue()
to handle max durability being lower than durability
This commit is contained in:
parent
8f70b03284
commit
c527824d60
@ -360,6 +360,13 @@ class ItemHelper
|
||||
*/
|
||||
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number
|
||||
{
|
||||
// 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`);
|
||||
repairable.MaxDurability = repairable.Durability;
|
||||
}
|
||||
|
||||
// Armor
|
||||
if (itemDetails._props.armorClass)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user