diff --git a/Projects/Server/JsonConfiguration/Converters/Rectangle3DConverter.cs b/Projects/Server/JsonConfiguration/Converters/Rectangle3DConverter.cs index 51269aed8..72f142018 100644 --- a/Projects/Server/JsonConfiguration/Converters/Rectangle3DConverter.cs +++ b/Projects/Server/JsonConfiguration/Converters/Rectangle3DConverter.cs @@ -53,6 +53,7 @@ namespace Server.Json // 0 - xyzwhd, 1 - x1y1z1x2y2z2, 2 - start/end var objType = -1; + var hasZ = false; while (true) { @@ -78,7 +79,8 @@ namespace Server.Json var offset = key == "end" ? 3 : 0; data[0 + offset] = point3D.X; data[1 + offset] = point3D.Y; - data[1 + offset] = point3D.Z; + // We can't do implicit z-level. Abandon using Point3D deserialization? + data[2 + offset] = point3D.Z; continue; } @@ -109,6 +111,7 @@ namespace Server.Json objType = 0; data[i] = reader.GetInt32(); + if (i == 2) hasZ = true; continue; } @@ -117,6 +120,14 @@ namespace Server.Json objType = 1; data[i - 10] = reader.GetInt32(); + if (i == 12 || i == 15) hasZ = true; + } + + if (!hasZ) + { + // Bottom to top? + data[2] = -128; + data[5] = 127; } return objType == 0 diff --git a/Projects/Server/Mobile.cs b/Projects/Server/Mobile.cs index dd4916839..1ebef0a57 100644 --- a/Projects/Server/Mobile.cs +++ b/Projects/Server/Mobile.cs @@ -4880,10 +4880,10 @@ namespace Server var c = CreateCorpseHandler?.Invoke(this, hair, facialhair, content, equip); /*m_Corpse = c; - + for ( int i = 0; c != null && i < content.Count; ++i ) c.DropItem( (Item)content[i] ); - + if (c != null) c.MoveToWorld( this.Location, this.Map );*/ @@ -7465,7 +7465,7 @@ namespace Server /// SendMessage( "That is too heavy for you to lift." ); /// return false; /// } - /// + /// /// return base.OnDragLift( item ); /// } /// diff --git a/Projects/Server/Sector.cs b/Projects/Server/Sector.cs index 1bf5ffe33..bcd90f64a 100644 --- a/Projects/Server/Sector.cs +++ b/Projects/Server/Sector.cs @@ -88,7 +88,7 @@ namespace Server public int Y { get; } - private void Add(ref List list, T value) + private static void Add(ref List list, T value) { list ??= new List(); diff --git a/Projects/UOContent/Mobiles/Townfolk/Messenger.cs b/Projects/UOContent/Mobiles/Townfolk/Messenger.cs index 90ee2a1a4..633305abc 100644 --- a/Projects/UOContent/Mobiles/Townfolk/Messenger.cs +++ b/Projects/UOContent/Mobiles/Townfolk/Messenger.cs @@ -18,7 +18,6 @@ namespace Server.Mobiles { return Utility.Random(6) switch { - 0 => 0, 1 => Utility.RandomBlueHue(), 2 => Utility.RandomGreenHue(), 3 => Utility.RandomRedHue(),