From b9516b2b1a626e0fd3db1d4ca876c88c28971fde Mon Sep 17 00:00:00 2001 From: Anna Clemens Date: Mon, 22 Aug 2022 13:46:17 -0400 Subject: [PATCH] feat: push changes --- XIVChat Desktop Installer/XIVChat Desktop.wxs | 418 +++++++++--------- XIVChat Desktop/XIVChat Desktop.csproj | 84 ++-- .../Message/Client/ClientPreferences.cs | 3 + XIVChatCommon/Message/Server/PlayerData.cs | 2 +- XIVChatCommon/Message/Server/ServerBacklog.cs | 8 +- .../Message/Server/ServerHousingLocation.cs | 57 +++ .../Message/Server/ServerOperation.cs | 2 +- XIVChatCommon/XIVChatCommon.csproj | 4 +- 8 files changed, 319 insertions(+), 259 deletions(-) create mode 100644 XIVChatCommon/Message/Server/ServerHousingLocation.cs diff --git a/XIVChat Desktop Installer/XIVChat Desktop.wxs b/XIVChat Desktop Installer/XIVChat Desktop.wxs index 8f30bda..ce7e732 100644 --- a/XIVChat Desktop Installer/XIVChat Desktop.wxs +++ b/XIVChat Desktop Installer/XIVChat Desktop.wxs @@ -2,625 +2,625 @@ - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -628,7 +628,7 @@ - + @@ -637,10 +637,7 @@ - - - - + @@ -648,177 +645,177 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -836,7 +833,7 @@ - + @@ -845,7 +842,7 @@ - + @@ -987,7 +984,6 @@ - diff --git a/XIVChat Desktop/XIVChat Desktop.csproj b/XIVChat Desktop/XIVChat Desktop.csproj index 9d83362..367c625 100644 --- a/XIVChat Desktop/XIVChat Desktop.csproj +++ b/XIVChat Desktop/XIVChat Desktop.csproj @@ -16,63 +16,63 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + all - - - - + + + + - - + + diff --git a/XIVChatCommon/Message/Client/ClientPreferences.cs b/XIVChatCommon/Message/Client/ClientPreferences.cs index 20bca92..0c1fdbf 100644 --- a/XIVChatCommon/Message/Client/ClientPreferences.cs +++ b/XIVChatCommon/Message/Client/ClientPreferences.cs @@ -26,6 +26,9 @@ namespace XIVChatCommon.Message.Client { [Preference(typeof(bool))] TargetingListSupport = 1, + + [Preference(typeof(bool))] + HousingLocationSupport = 2, } public static class ClientPreferencesExtension { diff --git a/XIVChatCommon/Message/Server/PlayerData.cs b/XIVChatCommon/Message/Server/PlayerData.cs index d4f0440..76b4e17 100644 --- a/XIVChatCommon/Message/Server/PlayerData.cs +++ b/XIVChatCommon/Message/Server/PlayerData.cs @@ -33,4 +33,4 @@ namespace XIVChatCommon.Message.Server { return MessagePackSerializer.Serialize(this); } } -} \ No newline at end of file +} diff --git a/XIVChatCommon/Message/Server/ServerBacklog.cs b/XIVChatCommon/Message/Server/ServerBacklog.cs index 0134ef1..a69ee61 100644 --- a/XIVChatCommon/Message/Server/ServerBacklog.cs +++ b/XIVChatCommon/Message/Server/ServerBacklog.cs @@ -6,10 +6,14 @@ namespace XIVChatCommon.Message.Server { [Key(0)] public readonly ServerMessage[] messages; + [Key(1)] + public readonly uint sequence; + protected override byte Code => (byte)ServerOperation.Backlog; - public ServerBacklog(ServerMessage[] messages) { + public ServerBacklog(ServerMessage[] messages, uint sequence) { this.messages = messages; + this.sequence = sequence; } public static ServerBacklog Decode(byte[] bytes) { @@ -20,4 +24,4 @@ namespace XIVChatCommon.Message.Server { return MessagePackSerializer.Serialize(this); } } -} \ No newline at end of file +} diff --git a/XIVChatCommon/Message/Server/ServerHousingLocation.cs b/XIVChatCommon/Message/Server/ServerHousingLocation.cs new file mode 100644 index 0000000..315a507 --- /dev/null +++ b/XIVChatCommon/Message/Server/ServerHousingLocation.cs @@ -0,0 +1,57 @@ +using MessagePack; + +namespace XIVChatCommon.Message.Server { + [MessagePackObject] + public class ServerHousingLocation : Encodable { + [Key(0)] + public readonly ushort? ward; + + [Key(1)] + public readonly ushort? plot; + + [Key(2)] + public readonly bool plotExterior; + + [Key(3)] + public readonly byte? apartmentWing; + + public ServerHousingLocation(ushort? ward, ushort? plot, bool plotExterior, byte? apartmentWing) { + this.ward = ward; + this.plot = plot; + this.plotExterior = plotExterior; + this.apartmentWing = apartmentWing; + } + + [IgnoreMember] + protected override byte Code => (byte) ServerOperation.HousingLocation; + + public static ServerHousingLocation Decode(byte[] bytes) { + return MessagePackSerializer.Deserialize(bytes); + } + + protected override byte[] PayloadEncode() { + return MessagePackSerializer.Serialize(this); + } + + public override bool Equals(object? obj) { + if (obj is not ServerHousingLocation other) { + return false; + } + + return this.ward == other.ward + && this.plot == other.plot + && this.plotExterior == other.plotExterior + && this.apartmentWing == other.apartmentWing; + } + + public override int GetHashCode() { + unchecked { + var hashCode = this.ward.GetHashCode(); + hashCode = (hashCode * 397) ^ this.plot.GetHashCode(); + hashCode = (hashCode * 397) ^ this.plotExterior.GetHashCode(); + hashCode = (hashCode * 397) ^ this.apartmentWing.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/XIVChatCommon/Message/Server/ServerOperation.cs b/XIVChatCommon/Message/Server/ServerOperation.cs index 1f51a4d..5dc6a7b 100644 --- a/XIVChatCommon/Message/Server/ServerOperation.cs +++ b/XIVChatCommon/Message/Server/ServerOperation.cs @@ -9,6 +9,6 @@ Backlog = 7, PlayerList = 8, LinkshellList = 9, - TargetingList = 10, + HousingLocation = 10, } } diff --git a/XIVChatCommon/XIVChatCommon.csproj b/XIVChatCommon/XIVChatCommon.csproj index 5bd4a62..984eadd 100644 --- a/XIVChatCommon/XIVChatCommon.csproj +++ b/XIVChatCommon/XIVChatCommon.csproj @@ -5,11 +5,11 @@ enable 1.0.0 1.0.0 - net48;net5.0 + net5.0 - +