fix: Fixes AR/Durability/Tool Uses for Pre-UOR and LBR (#2113)

This commit is contained in:
Bohica 2025-02-05 19:54:56 -08:00 committed by GitHub
parent d407847fc4
commit 51367df0d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 173 additions and 82 deletions

View file

@ -56,7 +56,7 @@ public abstract partial class BaseTool : Item, IUsesRemaining, ICraftable
private bool ShowUsesRemaining { get; set; } = true;
public int OnCraft(
public virtual int OnCraft(
int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool,
CraftItem craftItem, int resHue
)
@ -68,6 +68,18 @@ public abstract partial class BaseTool : Item, IUsesRemaining, ICraftable
Crafter = from?.RawName;
}
if (Core.UOR)
{
if (Quality == ToolQuality.Exceptional)
{
UsesRemaining = 100;
}
}
else if (Quality != ToolQuality.Regular)
{
UsesRemaining += (int)(UsesRemaining * ((int)Quality - 1) * 0.2);
}
return quality;
}