Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

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