fix: use agentmap directly for offsets
This commit is contained in:
parent
3f84307b61
commit
4bc2f0d841
|
@ -3,10 +3,12 @@ using Dalamud.Game.ClientState.Objects.SubKinds;
|
|||
using Dalamud.Utility;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Housing;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Environment;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using Map = Lumina.Excel.GeneratedSheets.Map;
|
||||
|
||||
namespace Screenie;
|
||||
|
||||
|
@ -33,6 +35,9 @@ public class ScreenshotMetadata {
|
|||
EorzeaTime eorzea;
|
||||
uint ward;
|
||||
uint plot;
|
||||
short offsetX;
|
||||
short offsetY;
|
||||
float scale;
|
||||
Weather? weather;
|
||||
Map? map;
|
||||
unsafe {
|
||||
|
@ -56,14 +61,19 @@ public class ScreenshotMetadata {
|
|||
var weatherId = env->ActiveWeather;
|
||||
weather = plugin.DataManager.GetExcelSheet<Weather>()?.GetRow(weatherId);
|
||||
|
||||
var mapId = AgentMap.Instance()->CurrentMapId;
|
||||
var agentMap = AgentMap.Instance();
|
||||
offsetX = agentMap->CurrentOffsetX;
|
||||
offsetY = agentMap->CurrentOffsetY;
|
||||
scale = agentMap->CurrentMapSizeFactorFloat;
|
||||
var mapId = agentMap->CurrentMapId;
|
||||
map = plugin.DataManager.GetExcelSheet<Map>()?.GetRow(mapId);
|
||||
|
||||
var territoryInfo = TerritoryInfo.Instance();
|
||||
Plugin.Log.Info(plugin.DataManager.GetExcelSheet<PlaceName>()?.GetRow(territoryInfo->AreaPlaceNameID)?.Name.ToDalamudString().TextValue ?? "???");
|
||||
Plugin.Log.Info(plugin.DataManager.GetExcelSheet<PlaceName>()?.GetRow(territoryInfo->SubAreaPlaceNameID)?.Name.ToDalamudString().TextValue ?? "???");
|
||||
}
|
||||
|
||||
var territory = plugin.DataManager.GetExcelSheet<TerritoryType>()?.GetRow(plugin.ClientState.TerritoryType);
|
||||
var offsetX = map?.OffsetX ?? 0;
|
||||
var offsetY = map?.OffsetY ?? 0;
|
||||
var scale = map?.SizeFactor ?? 0;
|
||||
|
||||
Character? active = null;
|
||||
World? world = null;
|
||||
|
|
Loading…
Reference in New Issue