From 1d4b5aa1f38d9f4a71d8178457203bb112da44e2 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 5 Jul 2022 13:21:24 -0400 Subject: [PATCH] fix: switch to ushort --- csharp/RemotePartyFinder/UploadableListing.cs | 14 +++++++------- csharp/SourceGenerator/SourceGenerator.csproj | 2 +- server/src/listing.rs | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/csharp/RemotePartyFinder/UploadableListing.cs b/csharp/RemotePartyFinder/UploadableListing.cs index f16e0ed..3e30629 100644 --- a/csharp/RemotePartyFinder/UploadableListing.cs +++ b/csharp/RemotePartyFinder/UploadableListing.cs @@ -13,9 +13,9 @@ namespace RemotePartyFinder { public uint ContentIdLower { get; } public byte[] Name { get; } public byte[] Description { get; } - public byte CreatedWorld { get; } - public byte HomeWorld { get; } - public byte CurrentWorld { get; } + public ushort CreatedWorld { get; } + public ushort HomeWorld { get; } + public ushort CurrentWorld { get; } public DutyCategory Category { get; } public ushort Duty { get; } public DutyType DutyType { get; } @@ -38,9 +38,9 @@ namespace RemotePartyFinder { this.ContentIdLower = listing.ContentIdLower; this.Name = listing.Name.Encode(); this.Description = listing.Description.Encode(); - this.CreatedWorld = (byte) listing.World.Value.RowId; - this.HomeWorld = (byte) listing.HomeWorld.Value.RowId; - this.CurrentWorld = (byte) listing.CurrentWorld.Value.RowId; + this.CreatedWorld = (ushort) listing.World.Value.RowId; + this.HomeWorld = (ushort) listing.HomeWorld.Value.RowId; + this.CurrentWorld = (ushort) listing.CurrentWorld.Value.RowId; this.Category = listing.Category; this.Duty = listing.RawDuty; this.DutyType = listing.DutyType; @@ -66,7 +66,7 @@ namespace RemotePartyFinder { public JobFlags Accepting { get; } internal UploadableSlot(PartyFinderSlot slot) { - this.Accepting = slot.Accepting.Aggregate((JobFlags) 0, ((agg, flag) => agg | flag)); + this.Accepting = slot.Accepting.Aggregate((JobFlags) 0, (agg, flag) => agg | flag); } } } diff --git a/csharp/SourceGenerator/SourceGenerator.csproj b/csharp/SourceGenerator/SourceGenerator.csproj index 02c637d..03825f6 100644 --- a/csharp/SourceGenerator/SourceGenerator.csproj +++ b/csharp/SourceGenerator/SourceGenerator.csproj @@ -7,7 +7,7 @@ - + diff --git a/server/src/listing.rs b/server/src/listing.rs index 15a32cc..339249f 100644 --- a/server/src/listing.rs +++ b/server/src/listing.rs @@ -16,9 +16,9 @@ pub struct PartyFinderListing { pub name: SeString, #[serde(with = "crate::base64_sestring")] pub description: SeString, - pub created_world: u8, - pub home_world: u8, - pub current_world: u8, + pub created_world: u16, + pub home_world: u16, + pub current_world: u16, pub category: DutyCategory, pub duty: u16, pub duty_type: DutyType,