From e7e0151b383ca5d873fb84af7f82e6485bf06e4d Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Tue, 31 Aug 2021 19:46:41 -0700 Subject: [PATCH] fix: Fixes armor not scaling properly from world deserialization (#752) --- Projects/UOContent/Items/Armor/BaseArmor.cs | 23 +++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Projects/UOContent/Items/Armor/BaseArmor.cs b/Projects/UOContent/Items/Armor/BaseArmor.cs index 8d6f3de67..cf91c5c43 100644 --- a/Projects/UOContent/Items/Armor/BaseArmor.cs +++ b/Projects/UOContent/Items/Armor/BaseArmor.cs @@ -208,6 +208,12 @@ namespace Server.Items get => _quality; set { + if (World.Loading) + { + _quality = value; + return; + } + UnscaleDurability(); _quality = value; ScaleDurability(); @@ -224,6 +230,12 @@ namespace Server.Items get => _durability; set { + if (World.Loading) + { + _durability = value; + return; + } + UnscaleDurability(); _durability = value; ScaleDurability(); @@ -265,7 +277,11 @@ namespace Server.Items { if (_resource != value) { - UnscaleDurability(); + if (!World.Loading) + { + UnscaleDurability(); + } + _resource = value; @@ -276,7 +292,10 @@ namespace Server.Items Invalidate(); (Parent as Mobile)?.UpdateResistances(); - ScaleDurability(); + if (!World.Loading) + { + ScaleDurability(); + } } } }