fix: Reverts GetProtOffset, Adds PreT2A Weapon Damage & PreUOR Armor Durability (#2114)
This commit is contained in:
parent
51367df0d2
commit
772511d1e8
2 changed files with 43 additions and 65 deletions
|
|
@ -887,61 +887,40 @@ namespace Server.Items
|
|||
|
||||
public int GetProtOffset()
|
||||
{
|
||||
if (Core.T2A)
|
||||
return _protectionLevel switch
|
||||
{
|
||||
return _protectionLevel switch
|
||||
{
|
||||
ArmorProtectionLevel.Defense => 5,
|
||||
ArmorProtectionLevel.Guarding => 10,
|
||||
ArmorProtectionLevel.Hardening => 15,
|
||||
ArmorProtectionLevel.Fortification => 20,
|
||||
ArmorProtectionLevel.Invulnerability => 25,
|
||||
_ => 0 // regular
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
return _protectionLevel switch
|
||||
{
|
||||
ArmorProtectionLevel.Defense => 2,
|
||||
ArmorProtectionLevel.Guarding => 4,
|
||||
ArmorProtectionLevel.Hardening => 6,
|
||||
ArmorProtectionLevel.Fortification => 8,
|
||||
ArmorProtectionLevel.Invulnerability => 10,
|
||||
_ => 0 // regular
|
||||
};
|
||||
}
|
||||
ArmorProtectionLevel.Guarding => 1,
|
||||
ArmorProtectionLevel.Hardening => 2,
|
||||
ArmorProtectionLevel.Fortification => 3,
|
||||
ArmorProtectionLevel.Invulnerability => 4,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
|
||||
public int GetDurabilityBonus()
|
||||
{
|
||||
if (Core.UOR)
|
||||
if (!Core.UOR)
|
||||
{
|
||||
var bonus = _durability switch
|
||||
{
|
||||
ArmorDurabilityLevel.Durable => 20,
|
||||
ArmorDurabilityLevel.Substantial => 50,
|
||||
ArmorDurabilityLevel.Massive => 70,
|
||||
ArmorDurabilityLevel.Fortified => 100,
|
||||
ArmorDurabilityLevel.Indestructible => 120,
|
||||
_ => 0
|
||||
};
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
var resInfo = CraftResources.GetInfo(_resource);
|
||||
bonus += ArmorAttributes.DurabilityBonus + (resInfo?.AttributeInfo?.ArmorDurability ?? 0);
|
||||
}
|
||||
|
||||
if (_quality == ArmorQuality.Exceptional)
|
||||
{
|
||||
return bonus + 20;
|
||||
}
|
||||
|
||||
return bonus;
|
||||
return (int)_durability * 5 + ((int)_quality - 1) * 10;
|
||||
}
|
||||
|
||||
return (int)_durability * 5 + ((int)_quality - 1) * 10;
|
||||
var bonus = _durability switch
|
||||
{
|
||||
ArmorDurabilityLevel.Durable => 20,
|
||||
ArmorDurabilityLevel.Substantial => 50,
|
||||
ArmorDurabilityLevel.Massive => 70,
|
||||
ArmorDurabilityLevel.Fortified => 100,
|
||||
ArmorDurabilityLevel.Indestructible => 120,
|
||||
_ => 0
|
||||
};
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
var resInfo = CraftResources.GetInfo(_resource);
|
||||
bonus += ArmorAttributes.DurabilityBonus + (resInfo?.AttributeInfo?.ArmorDurability ?? 0);
|
||||
}
|
||||
|
||||
return _quality == ArmorQuality.Exceptional ? bonus + 20 : bonus;
|
||||
}
|
||||
|
||||
public static void ValidateMobile(Mobile m)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue