Fix bots not having durability on armor
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user