This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -24,6 +24,7 @@ using System.IO;
|
|||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Server.Guilds;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
|
|
@ -583,7 +584,10 @@ namespace Server
|
|||
|
||||
public override void Write(BaseGuild value)
|
||||
{
|
||||
Write(value?.Id ?? 0);
|
||||
if (value == null)
|
||||
Write(0);
|
||||
else
|
||||
Write(value.Id);
|
||||
}
|
||||
|
||||
public override void WriteItem<T>(T value)
|
||||
|
|
@ -912,7 +916,10 @@ namespace Server
|
|||
public override IEntity ReadEntity()
|
||||
{
|
||||
Serial serial = ReadUInt();
|
||||
return World.FindEntity(serial) ?? new Entity(serial, new Point3D(0, 0, 0), Map.Internal);
|
||||
IEntity entity = World.FindEntity(serial);
|
||||
if (entity == null)
|
||||
return new Entity(serial, new Point3D(0, 0, 0), Map.Internal);
|
||||
return entity;
|
||||
}
|
||||
|
||||
public override Item ReadItem() => World.FindItem(ReadUInt());
|
||||
|
|
@ -1363,7 +1370,10 @@ namespace Server
|
|||
|
||||
public override void Write(BaseGuild value)
|
||||
{
|
||||
Write(value?.Id ?? 0);
|
||||
if (value == null)
|
||||
Write(0);
|
||||
else
|
||||
Write(value.Id);
|
||||
}
|
||||
|
||||
public override void WriteItem<T>(T value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue