Fixes regions implicit z level (#226)
Fixes regions implicit z level Bumps release
This commit is contained in:
parent
e8fe3852cd
commit
1f1e0595e1
4 changed files with 16 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>();
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ namespace Server.Mobiles
|
|||
{
|
||||
return Utility.Random(6) switch
|
||||
{
|
||||
0 => 0,
|
||||
1 => Utility.RandomBlueHue(),
|
||||
2 => Utility.RandomGreenHue(),
|
||||
3 => Utility.RandomRedHue(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue