From e545cdd81cf40a498c34b49c99f024ed9a28280e Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Mon, 19 Apr 2021 23:49:04 -0700 Subject: [PATCH] fix: Fixes props gump read only (#581) --- Projects/UOContent/Gumps/Props/PropsGump.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projects/UOContent/Gumps/Props/PropsGump.cs b/Projects/UOContent/Gumps/Props/PropsGump.cs index 5a1b327b0..f88c3880a 100644 --- a/Projects/UOContent/Gumps/Props/PropsGump.cs +++ b/Projects/UOContent/Gumps/Props/PropsGump.cs @@ -229,8 +229,8 @@ namespace Server.Gumps var cpa = GetCPA(prop); - if ((!prop.GetType().IsValueType || prop.CanWrite) && cpa != null && - m_Mobile.AccessLevel >= cpa.WriteLevel && !cpa.ReadOnly) + if (!prop.GetType().IsValueType && prop.CanWrite && + m_Mobile.AccessLevel >= cpa?.WriteLevel && !cpa.ReadOnly) { AddButton(x + SetOffsetX, y + SetOffsetY, SetButtonID1, SetButtonID2, i + 3); } @@ -296,7 +296,7 @@ namespace Server.Gumps var attr = GetCPA(prop); - if (prop.GetType().IsValueType && !prop.CanWrite || attr == null || + if (prop.GetType().IsValueType || !prop.CanWrite || attr == null || from.AccessLevel < attr.WriteLevel || attr.ReadOnly) { return;