Fix bots not having durability on armor

This commit is contained in:
KaenoDev
2025-01-26 14:47:40 +00:00
parent 17e4d1468f
commit e1dd0d5443
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ public class BotGeneratorHelper(
Upd itemProperties = new();
var hasProperties = false;
if (itemTemplate?.Properties?.MaxDurability is not null)
if (itemTemplate?.Properties?.MaxDurability is not null && itemTemplate.Properties.MaxDurability > 0)
{
if (itemTemplate.Properties.WeapClass is not null)
{
@@ -144,7 +144,7 @@ public class DurabilityLimitsHelper(
{
var lowestMaxPercent = _botConfig.Durability.Pmc.Armor.LowestMaxPercent;
var highestMaxPercent = _botConfig.Durability.Pmc.Armor.HighestMaxPercent;
var multiplier = _randomUtil.GetInt(lowestMaxPercent, highestMaxPercent);
var multiplier = _randomUtil.GetDouble(lowestMaxPercent, highestMaxPercent);
return itemMaxDurability * (multiplier / 100);
}