2021-08-24 18:00:42 +00:00
|
|
|
|
using Dalamud.Data;
|
|
|
|
|
using Dalamud.Game.ClientState;
|
|
|
|
|
using Dalamud.Game.Command;
|
|
|
|
|
using Dalamud.Game.Gui;
|
|
|
|
|
using Dalamud.Game.Gui.PartyFinder;
|
|
|
|
|
using Dalamud.Game.Text.SeStringHandling;
|
|
|
|
|
using Dalamud.IoC;
|
|
|
|
|
using Dalamud.Plugin;
|
2021-04-11 13:31:00 +00:00
|
|
|
|
using XivCommon;
|
2021-01-14 04:06:35 +00:00
|
|
|
|
|
|
|
|
|
namespace BetterPartyFinder {
|
2021-05-02 03:06:28 +00:00
|
|
|
|
// ReSharper disable once ClassNeverInstantiated.Global
|
2021-01-14 04:06:35 +00:00
|
|
|
|
public class Plugin : IDalamudPlugin {
|
|
|
|
|
public string Name => "Better Party Finder";
|
|
|
|
|
|
2021-08-24 18:00:42 +00:00
|
|
|
|
[PluginService]
|
|
|
|
|
internal DalamudPluginInterface Interface { get; init; } = null!;
|
2021-01-14 04:06:35 +00:00
|
|
|
|
|
2021-08-24 18:00:42 +00:00
|
|
|
|
[PluginService]
|
|
|
|
|
internal ChatGui ChatGui { get; init; } = null!;
|
2021-01-14 04:06:35 +00:00
|
|
|
|
|
2021-08-24 18:00:42 +00:00
|
|
|
|
[PluginService]
|
|
|
|
|
internal ClientState ClientState { get; init; } = null!;
|
|
|
|
|
|
|
|
|
|
[PluginService]
|
|
|
|
|
internal CommandManager CommandManager { get; init; } = null!;
|
|
|
|
|
|
|
|
|
|
[PluginService]
|
|
|
|
|
internal DataManager DataManager { get; init; } = null!;
|
|
|
|
|
|
|
|
|
|
[PluginService]
|
|
|
|
|
internal GameGui GameGui { get; init; } = null!;
|
|
|
|
|
|
|
|
|
|
[PluginService]
|
|
|
|
|
internal PartyFinderGui PartyFinderGui { get; init; } = null!;
|
|
|
|
|
|
|
|
|
|
[PluginService]
|
|
|
|
|
internal SeStringManager SeStringManager { get; init; } = null!;
|
|
|
|
|
|
|
|
|
|
internal Configuration Config { get; }
|
|
|
|
|
private Filter Filter { get; }
|
|
|
|
|
internal PluginUi Ui { get; }
|
|
|
|
|
private Commands Commands { get; }
|
|
|
|
|
internal XivCommonBase Common { get; }
|
|
|
|
|
private JoinHandler JoinHandler { get; }
|
|
|
|
|
|
|
|
|
|
public Plugin() {
|
2021-01-14 22:12:30 +00:00
|
|
|
|
this.Config = Configuration.Load(this) ?? new Configuration();
|
2021-01-14 04:06:35 +00:00
|
|
|
|
this.Config.Initialise(this);
|
|
|
|
|
|
2021-08-24 18:00:42 +00:00
|
|
|
|
this.Common = new XivCommonBase(Hooks.PartyFinder);
|
2021-01-14 04:06:35 +00:00
|
|
|
|
this.Filter = new Filter(this);
|
2021-05-02 03:06:28 +00:00
|
|
|
|
this.JoinHandler = new JoinHandler(this);
|
2021-01-14 04:06:35 +00:00
|
|
|
|
this.Ui = new PluginUi(this);
|
2021-01-16 01:12:46 +00:00
|
|
|
|
this.Commands = new Commands(this);
|
2021-01-14 04:06:35 +00:00
|
|
|
|
|
|
|
|
|
// start task to determine maximum item level (based on max chestpiece)
|
2021-08-24 18:00:42 +00:00
|
|
|
|
Util.CalculateMaxItemLevel(this.DataManager);
|
2021-01-14 04:06:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Dispose() {
|
2021-01-16 01:12:46 +00:00
|
|
|
|
this.Commands.Dispose();
|
2021-01-14 04:06:35 +00:00
|
|
|
|
this.Ui.Dispose();
|
2021-05-02 03:06:28 +00:00
|
|
|
|
this.JoinHandler.Dispose();
|
2021-01-14 04:06:35 +00:00
|
|
|
|
this.Filter.Dispose();
|
2021-04-11 13:31:00 +00:00
|
|
|
|
this.Common.Dispose();
|
2021-01-14 04:06:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|