From ad9cb25536b94e765f2032fd898a1f923a31f22d Mon Sep 17 00:00:00 2001 From: AzureGem Date: Tue, 21 Apr 2020 10:18:43 -0400 Subject: [PATCH] Make RawX and RawY ints in MapLinkPayload --- .../Chat/SeStringHandling/Payloads/MapLinkPayload.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dalamud/Game/Chat/SeStringHandling/Payloads/MapLinkPayload.cs b/Dalamud/Game/Chat/SeStringHandling/Payloads/MapLinkPayload.cs index 6115adab2..d33f32cef 100644 --- a/Dalamud/Game/Chat/SeStringHandling/Payloads/MapLinkPayload.cs +++ b/Dalamud/Game/Chat/SeStringHandling/Payloads/MapLinkPayload.cs @@ -12,8 +12,8 @@ public class MapLinkPayload : Payload // pre-Resolve() values public uint TerritoryTypeId { get; set; } public uint MapId { get; set; } - public uint RawX { get; set; } - public uint RawY { get; set; } + public int RawX { get; set; } + public int RawY { get; set; } // Resolved values // It might make sense to have Territory be an external type, that has assorted relevant info @@ -29,8 +29,8 @@ public override byte[] Encode() // eventually we should allow creation using 'nice' values that then encode properly var packedTerritoryAndMapBytes = MakePackedInteger(TerritoryTypeId, MapId); - var xBytes = MakeInteger(RawX); - var yBytes = MakeInteger(RawY); + var xBytes = MakeInteger((uint)RawX); + var yBytes = MakeInteger((uint)RawY); var chunkLen = 4 + packedTerritoryAndMapBytes.Length + xBytes.Length + yBytes.Length; @@ -68,8 +68,8 @@ public override void Resolve() protected override void ProcessChunkImpl(BinaryReader reader, long endOfStream) { (TerritoryTypeId, MapId) = GetPackedIntegers(reader); - RawX = (uint)GetInteger(reader); - RawY = (uint)GetInteger(reader); + RawX = (int)GetInteger(reader); + RawY = (int)GetInteger(reader); // the Z coordinate is never in this chunk, just the text (if applicable) // seems to always be FF 01