From 341eee88cfbb5988747cef9030532e85616cb717 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 4 Aug 2020 21:19:26 -0400 Subject: [PATCH] fix: use new constructor for payloads --- Globetrotter/TreasureMaps.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Globetrotter/TreasureMaps.cs b/Globetrotter/TreasureMaps.cs index bc0c0d0..562686d 100644 --- a/Globetrotter/TreasureMaps.cs +++ b/Globetrotter/TreasureMaps.cs @@ -4,8 +4,6 @@ using Dalamud.Plugin; using Lumina.Excel.GeneratedSheets; using System; using System.Collections.Generic; -using System.Linq; -using System.Reflection; using System.Runtime.InteropServices; namespace Globetrotter { @@ -105,20 +103,16 @@ namespace Globetrotter { } TerritoryType terr = map.TerritoryType.Value; - // TODO: can probably fix this up to be nicer after Dalamud releases a new version and fixes the big with MapLinkPayload - float x = ToMapCoordinate(loc.X, map.SizeFactor); float y = ToMapCoordinate(loc.Z, map.SizeFactor); MapLinkPayload mapLink = new MapLinkPayload( + this.pi.Data, terr.RowId, map.RowId, ConvertMapCoordinateToRawPosition(x, map.SizeFactor), ConvertMapCoordinateToRawPosition(y, map.SizeFactor) ); - // fix bug in Dalamud - mapLink.GetType().GetField("DataResolver", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(mapLink, this.pi.Data); - this.pi.Framework.Gui.OpenMapWithMapLink(mapLink); }