This commit is contained in:
Anna 2022-09-10 10:47:37 -04:00
parent 702b20be11
commit 154cc7e002
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0
1 changed files with 6 additions and 12 deletions

View File

@ -73,18 +73,12 @@ internal class MessageList : ITab {
ImGui.SameLine();
if (ImGuiHelper.SmallIconButton(FontAwesomeIcon.MapMarkerAlt, $"{message.Id}") && territory != null) {
var map = this.Plugin.DataManager.GetExcelSheet<Map>()!
.Where(map => map.TerritoryType.Row == territory.RowId)
.Where(map => message.X >= map.OffsetX && message.Y >= map.OffsetY)
.MaxBy(map => Math.Max(map.OffsetX, map.OffsetY));
if (map != null) {
this.Plugin.GameGui.OpenMapWithMapLink(new MapLinkPayload(
territory.RowId,
map.RowId,
(int) (message.X * 1_000),
(int) (message.Z * 1_000)
));
}
this.Plugin.GameGui.OpenMapWithMapLink(new MapLinkPayload(
territory.RowId,
territory.Map.Row,
(int) (message.X * 1_000),
(int) (message.Z * 1_000)
));
}
if (message.IsHidden) {