mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Merge pull request #84 from rreminy/patch-4
Make RawX and RawY ints in MapLinkPayload
This commit is contained in:
commit
21da9d80c9
1 changed files with 6 additions and 6 deletions
|
|
@ -12,8 +12,8 @@ namespace Dalamud.Game.Chat.SeStringHandling.Payloads
|
||||||
// pre-Resolve() values
|
// pre-Resolve() values
|
||||||
public uint TerritoryTypeId { get; set; }
|
public uint TerritoryTypeId { get; set; }
|
||||||
public uint MapId { get; set; }
|
public uint MapId { get; set; }
|
||||||
public uint RawX { get; set; }
|
public int RawX { get; set; }
|
||||||
public uint RawY { get; set; }
|
public int RawY { get; set; }
|
||||||
|
|
||||||
// Resolved values
|
// Resolved values
|
||||||
// It might make sense to have Territory be an external type, that has assorted relevant info
|
// It might make sense to have Territory be an external type, that has assorted relevant info
|
||||||
|
|
@ -29,8 +29,8 @@ namespace Dalamud.Game.Chat.SeStringHandling.Payloads
|
||||||
// eventually we should allow creation using 'nice' values that then encode properly
|
// eventually we should allow creation using 'nice' values that then encode properly
|
||||||
|
|
||||||
var packedTerritoryAndMapBytes = MakePackedInteger(TerritoryTypeId, MapId);
|
var packedTerritoryAndMapBytes = MakePackedInteger(TerritoryTypeId, MapId);
|
||||||
var xBytes = MakeInteger(RawX);
|
var xBytes = MakeInteger((uint)RawX);
|
||||||
var yBytes = MakeInteger(RawY);
|
var yBytes = MakeInteger((uint)RawY);
|
||||||
|
|
||||||
var chunkLen = 4 + packedTerritoryAndMapBytes.Length + xBytes.Length + yBytes.Length;
|
var chunkLen = 4 + packedTerritoryAndMapBytes.Length + xBytes.Length + yBytes.Length;
|
||||||
|
|
||||||
|
|
@ -73,8 +73,8 @@ namespace Dalamud.Game.Chat.SeStringHandling.Payloads
|
||||||
protected override void ProcessChunkImpl(BinaryReader reader, long endOfStream)
|
protected override void ProcessChunkImpl(BinaryReader reader, long endOfStream)
|
||||||
{
|
{
|
||||||
(TerritoryTypeId, MapId) = GetPackedIntegers(reader);
|
(TerritoryTypeId, MapId) = GetPackedIntegers(reader);
|
||||||
RawX = (uint)GetInteger(reader);
|
RawX = (int)GetInteger(reader);
|
||||||
RawY = (uint)GetInteger(reader);
|
RawY = (int)GetInteger(reader);
|
||||||
// the Z coordinate is never in this chunk, just the text (if applicable)
|
// the Z coordinate is never in this chunk, just the text (if applicable)
|
||||||
|
|
||||||
// seems to always be FF 01
|
// seems to always be FF 01
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue