refactor: update for API changes
This commit is contained in:
parent
801c8f34b5
commit
9bf2caa17d
|
@ -1,11 +1,8 @@
|
||||||
using System;
|
using Dalamud.Data;
|
||||||
using System.Reflection;
|
|
||||||
using Dalamud.Data;
|
|
||||||
using Dalamud.Game;
|
using Dalamud.Game;
|
||||||
using Dalamud.Game.ClientState;
|
using Dalamud.Game.ClientState;
|
||||||
using Dalamud.Game.Command;
|
using Dalamud.Game.Command;
|
||||||
using Dalamud.Game.Gui;
|
using Dalamud.Game.Gui;
|
||||||
using Dalamud.Game.Text.SeStringHandling;
|
|
||||||
using Dalamud.IoC;
|
using Dalamud.IoC;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using FFXIVWeather.Lumina;
|
using FFXIVWeather.Lumina;
|
||||||
|
@ -32,9 +29,6 @@ namespace Tourist {
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal GameGui GameGui { get; init; } = null!;
|
internal GameGui GameGui { get; init; } = null!;
|
||||||
|
|
||||||
[PluginService]
|
|
||||||
internal SeStringManager SeStringManager { get; init; } = null!;
|
|
||||||
|
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal SigScanner SigScanner { get; init; } = null!;
|
internal SigScanner SigScanner { get; init; } = null!;
|
||||||
|
|
||||||
|
@ -51,13 +45,7 @@ namespace Tourist {
|
||||||
this.Config = this.Interface.GetPluginConfig() as Configuration ?? new Configuration();
|
this.Config = this.Interface.GetPluginConfig() as Configuration ?? new Configuration();
|
||||||
this.Config.Initialise(this);
|
this.Config.Initialise(this);
|
||||||
|
|
||||||
var gameDataField = this.DataManager.GetType().GetField("gameData", BindingFlags.Instance | BindingFlags.NonPublic);
|
this.Weather = new FFXIVWeatherLuminaService(this.DataManager.GameData);
|
||||||
if (gameDataField == null) {
|
|
||||||
throw new Exception("Missing gameData field");
|
|
||||||
}
|
|
||||||
|
|
||||||
var lumina = (Lumina.GameData) gameDataField.GetValue(this.DataManager)!;
|
|
||||||
this.Weather = new FFXIVWeatherLuminaService(lumina);
|
|
||||||
|
|
||||||
this.Functions = new GameFunctions(this);
|
this.Functions = new GameFunctions(this);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using Dalamud.Game.Text.SeStringHandling;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using Lumina.Excel.GeneratedSheets;
|
using Lumina.Excel.GeneratedSheets;
|
||||||
|
|
||||||
|
@ -194,7 +195,7 @@ namespace Tourist {
|
||||||
? string.Empty
|
? string.Empty
|
||||||
: $" ({(countdown.Value - DateTimeOffset.UtcNow).ToHumanReadable()})";
|
: $" ({(countdown.Value - DateTimeOffset.UtcNow).ToHumanReadable()})";
|
||||||
|
|
||||||
var name = this.Plugin.SeStringManager.Parse(adventure.Name.RawData.ToArray());
|
var name = (SeString) adventure.Name;
|
||||||
var header = ImGui.CollapsingHeader($"#{idx + 1} - {name.TextValue}{next}###adventure-{adventure.RowId}");
|
var header = ImGui.CollapsingHeader($"#{idx + 1} - {name.TextValue}{next}###adventure-{adventure.RowId}");
|
||||||
|
|
||||||
if (has || available) {
|
if (has || available) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user