From d22bad5f77a0936a84d83fdf3741a43f577d98bc Mon Sep 17 00:00:00 2001 From: sebastian-heinz Date: Mon, 10 Jan 2022 09:37:25 +0800 Subject: [PATCH] update nuget deps, add read/write Bool --- Arrowgene.Ddon.Server/Arrowgene.Ddon.Server.csproj | 2 +- Arrowgene.Ddon.Shared/Arrowgene.Ddon.Shared.csproj | 2 +- Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs | 12 +++++++++++- Arrowgene.Ddon.Test/Arrowgene.Ddon.Test.csproj | 12 +++++++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Arrowgene.Ddon.Server/Arrowgene.Ddon.Server.csproj b/Arrowgene.Ddon.Server/Arrowgene.Ddon.Server.csproj index 80ca1dee4..f4abab21e 100644 --- a/Arrowgene.Ddon.Server/Arrowgene.Ddon.Server.csproj +++ b/Arrowgene.Ddon.Server/Arrowgene.Ddon.Server.csproj @@ -9,7 +9,7 @@ Copyright © 2019-2022 DDON Team - + diff --git a/Arrowgene.Ddon.Shared/Arrowgene.Ddon.Shared.csproj b/Arrowgene.Ddon.Shared/Arrowgene.Ddon.Shared.csproj index c48180950..b263bf4db 100644 --- a/Arrowgene.Ddon.Shared/Arrowgene.Ddon.Shared.csproj +++ b/Arrowgene.Ddon.Shared/Arrowgene.Ddon.Shared.csproj @@ -11,7 +11,7 @@ - + diff --git a/Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs b/Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs index 878720cfb..34062b7ef 100644 --- a/Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs +++ b/Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs @@ -95,12 +95,22 @@ protected ushort ReadUInt16(IBuffer buffer) { return buffer.ReadUInt16(Endianness.Big); } + + protected void WriteBool(IBuffer buffer, bool value) + { + buffer.WriteBool(value); + } protected void WriteByte(IBuffer buffer, byte value) { buffer.WriteByte(value); } - + + protected bool ReadBool(IBuffer buffer) + { + return buffer.ReadBool(); + } + protected byte ReadByte(IBuffer buffer) { return buffer.ReadByte(); diff --git a/Arrowgene.Ddon.Test/Arrowgene.Ddon.Test.csproj b/Arrowgene.Ddon.Test/Arrowgene.Ddon.Test.csproj index c3b3615b0..94edc4f59 100644 --- a/Arrowgene.Ddon.Test/Arrowgene.Ddon.Test.csproj +++ b/Arrowgene.Ddon.Test/Arrowgene.Ddon.Test.csproj @@ -10,9 +10,15 @@ false - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive +