Fixes regions implicit z level (#226)

Fixes regions implicit z level
Bumps release
This commit is contained in:
Kamron Batman 2020-09-05 14:17:20 -07:00 committed by GitHub
parent e8fe3852cd
commit 1f1e0595e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View file

@ -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

View file

@ -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 );
/// }</code>
/// </example>

View file

@ -88,7 +88,7 @@ namespace Server
public int Y { get; }
private void Add<T>(ref List<T> list, T value)
private static void Add<T>(ref List<T> list, T value)
{
list ??= new List<T>();

View file

@ -18,7 +18,6 @@ namespace Server.Mobiles
{
return Utility.Random(6) switch
{
0 => 0,
1 => Utility.RandomBlueHue(),
2 => Utility.RandomGreenHue(),
3 => Utility.RandomRedHue(),