forked from liza/Influx
Compare commits
No commits in common. "master" and "master" have entirely different histories.
68
Influx.sln
68
Influx.sln
@ -1,58 +1,34 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Influx", "Influx\Influx.csproj", "{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}"
|
||||||
VisualStudioVersion = 17.11.35222.181
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Influx", "Influx\Influx.csproj", "{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}"
|
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LLib", "LLib\LLib.csproj", "{C11552A8-9C8C-4084-A669-AAFE55E24DCC}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LLib", "LLib\LLib.csproj", "{C11552A8-9C8C-4084-A669-AAFE55E24DCC}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{FC6E184C-5B01-4298-87DF-CC10C4955936}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{FC6E184C-5B01-4298-87DF-CC10C4955936}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoRetainerAPI", "AutoRetainerAPI\AutoRetainerAPI\AutoRetainerAPI.csproj", "{7352C470-D652-4909-AD90-8A5171A86698}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoRetainerAPI", "AutoRetainerAPI\AutoRetainerAPI\AutoRetainerAPI.csproj", "{7352C470-D652-4909-AD90-8A5171A86698}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|x64 = Debug|x64
|
Debug|Any CPU = Debug|Any CPU
|
||||||
DebugForms|x64 = DebugForms|x64
|
Release|Any CPU = Release|Any CPU
|
||||||
Release|x64 = Release|x64
|
|
||||||
ReleaseForms|x64 = ReleaseForms|x64
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.Debug|x64.ActiveCfg = Debug|x64
|
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.Debug|x64.Build.0 = Debug|x64
|
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.DebugForms|x64.ActiveCfg = Debug|x64
|
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.DebugForms|x64.Build.0 = Debug|x64
|
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.Release|x64.ActiveCfg = Release|x64
|
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.Release|x64.Build.0 = Release|x64
|
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.ReleaseForms|x64.ActiveCfg = Release|x64
|
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{588F6FDE-C6DF-42D9-BD7A-941BE2EB7E44}.ReleaseForms|x64.Build.0 = Release|x64
|
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.Debug|x64.ActiveCfg = Debug|x64
|
{FC6E184C-5B01-4298-87DF-CC10C4955936}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.Debug|x64.Build.0 = Debug|x64
|
{FC6E184C-5B01-4298-87DF-CC10C4955936}.Debug|Any CPU.Build.0 = Debug|x64
|
||||||
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.DebugForms|x64.ActiveCfg = Debug|x64
|
{FC6E184C-5B01-4298-87DF-CC10C4955936}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.DebugForms|x64.Build.0 = Debug|x64
|
{FC6E184C-5B01-4298-87DF-CC10C4955936}.Release|Any CPU.Build.0 = Release|x64
|
||||||
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.Release|x64.ActiveCfg = Release|x64
|
{7352C470-D652-4909-AD90-8A5171A86698}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.Release|x64.Build.0 = Release|x64
|
{7352C470-D652-4909-AD90-8A5171A86698}.Debug|Any CPU.Build.0 = Debug|x64
|
||||||
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.ReleaseForms|x64.ActiveCfg = Release|x64
|
{7352C470-D652-4909-AD90-8A5171A86698}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
{C11552A8-9C8C-4084-A669-AAFE55E24DCC}.ReleaseForms|x64.Build.0 = Release|x64
|
{7352C470-D652-4909-AD90-8A5171A86698}.Release|Any CPU.Build.0 = Release|x64
|
||||||
{FC6E184C-5B01-4298-87DF-CC10C4955936}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{FC6E184C-5B01-4298-87DF-CC10C4955936}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{FC6E184C-5B01-4298-87DF-CC10C4955936}.DebugForms|x64.ActiveCfg = DebugForms|x64
|
|
||||||
{FC6E184C-5B01-4298-87DF-CC10C4955936}.DebugForms|x64.Build.0 = DebugForms|x64
|
|
||||||
{FC6E184C-5B01-4298-87DF-CC10C4955936}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{FC6E184C-5B01-4298-87DF-CC10C4955936}.Release|x64.Build.0 = Release|x64
|
|
||||||
{FC6E184C-5B01-4298-87DF-CC10C4955936}.ReleaseForms|x64.ActiveCfg = ReleaseForms|x64
|
|
||||||
{FC6E184C-5B01-4298-87DF-CC10C4955936}.ReleaseForms|x64.Build.0 = ReleaseForms|x64
|
|
||||||
{7352C470-D652-4909-AD90-8A5171A86698}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{7352C470-D652-4909-AD90-8A5171A86698}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{7352C470-D652-4909-AD90-8A5171A86698}.DebugForms|x64.ActiveCfg = Debug|x64
|
|
||||||
{7352C470-D652-4909-AD90-8A5171A86698}.DebugForms|x64.Build.0 = Debug|x64
|
|
||||||
{7352C470-D652-4909-AD90-8A5171A86698}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{7352C470-D652-4909-AD90-8A5171A86698}.Release|x64.Build.0 = Release|x64
|
|
||||||
{7352C470-D652-4909-AD90-8A5171A86698}.ReleaseForms|x64.ActiveCfg = Release|x64
|
|
||||||
{7352C470-D652-4909-AD90-8A5171A86698}.ReleaseForms|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
@ -8,7 +8,6 @@ internal sealed class Configuration : IPluginConfiguration
|
|||||||
public int Version { get; set; } = 1;
|
public int Version { get; set; } = 1;
|
||||||
|
|
||||||
public ServerConfiguration Server { get; set; } = new();
|
public ServerConfiguration Server { get; set; } = new();
|
||||||
public bool AutoEnrollCharacters { get; set; }
|
|
||||||
|
|
||||||
public IList<CharacterInfo> IncludedCharacters { get; set; } = new List<CharacterInfo>();
|
public IList<CharacterInfo> IncludedCharacters { get; set; } = new List<CharacterInfo>();
|
||||||
public IList<FilterInfo> IncludedInventoryFilters { get; set; } = new List<FilterInfo>();
|
public IList<FilterInfo> IncludedInventoryFilters { get; set; } = new List<FilterInfo>();
|
||||||
|
@ -8,7 +8,6 @@ using Dalamud.Game.Command;
|
|||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using ECommons;
|
|
||||||
using Influx.AllaganTools;
|
using Influx.AllaganTools;
|
||||||
using Influx.Influx;
|
using Influx.Influx;
|
||||||
using Influx.LocalStatistics;
|
using Influx.LocalStatistics;
|
||||||
@ -66,13 +65,7 @@ internal sealed class InfluxPlugin : IDalamudPlugin
|
|||||||
_configurationWindow.ConfigUpdated += (_, _) => _influxStatisticsClient.UpdateClient();
|
_configurationWindow.ConfigUpdated += (_, _) => _influxStatisticsClient.UpdateClient();
|
||||||
_windowSystem.AddWindow(_configurationWindow);
|
_windowSystem.AddWindow(_configurationWindow);
|
||||||
|
|
||||||
_commandManager.AddHandler("/influx", new CommandInfo(ProcessCommand)
|
_commandManager.AddHandler("/influx", new CommandInfo(ProcessCommand));
|
||||||
{
|
|
||||||
HelpMessage = """
|
|
||||||
Opens influx configuration
|
|
||||||
/influx gil - Opens influx statistics
|
|
||||||
"""
|
|
||||||
});
|
|
||||||
|
|
||||||
_timer = new Timer(TimeSpan.FromMinutes(1));
|
_timer = new Timer(TimeSpan.FromMinutes(1));
|
||||||
_timer.Elapsed += (_, _) => UpdateStatistics();
|
_timer.Elapsed += (_, _) => UpdateStatistics();
|
||||||
@ -81,10 +74,7 @@ internal sealed class InfluxPlugin : IDalamudPlugin
|
|||||||
|
|
||||||
_pluginInterface.UiBuilder.Draw += _windowSystem.Draw;
|
_pluginInterface.UiBuilder.Draw += _windowSystem.Draw;
|
||||||
_pluginInterface.UiBuilder.OpenConfigUi += _configurationWindow.Toggle;
|
_pluginInterface.UiBuilder.OpenConfigUi += _configurationWindow.Toggle;
|
||||||
_pluginInterface.UiBuilder.OpenMainUi += _statisticsWindow.Toggle;
|
|
||||||
_condition.ConditionChange += UpdateOnLogout;
|
_condition.ConditionChange += UpdateOnLogout;
|
||||||
_clientState.Login += AutoEnrollCharacter;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Configuration LoadConfig()
|
private Configuration LoadConfig()
|
||||||
@ -204,22 +194,6 @@ internal sealed class InfluxPlugin : IDalamudPlugin
|
|||||||
return allSubs;
|
return allSubs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void AutoEnrollCharacter()
|
|
||||||
{
|
|
||||||
if (_configuration.AutoEnrollCharacters)
|
|
||||||
{
|
|
||||||
_configuration.IncludedCharacters.Add(new Configuration.CharacterInfo
|
|
||||||
{
|
|
||||||
LocalContentId = _clientState.LocalContentId,
|
|
||||||
CachedPlayerName = _clientState.LocalPlayer?.Name.ToString() ?? "??",
|
|
||||||
CachedWorldName = _clientState.LocalPlayer?.HomeWorld.Value.Name.ToString(),
|
|
||||||
});
|
|
||||||
_pluginInterface.SavePluginConfig(_configuration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void UpdateOnLogout(ConditionFlag flag, bool value)
|
private void UpdateOnLogout(ConditionFlag flag, bool value)
|
||||||
{
|
{
|
||||||
if (flag == ConditionFlag.LoggingOut && value)
|
if (flag == ConditionFlag.LoggingOut && value)
|
||||||
@ -246,11 +220,9 @@ internal sealed class InfluxPlugin : IDalamudPlugin
|
|||||||
_timer.Dispose();
|
_timer.Dispose();
|
||||||
_windowSystem.RemoveAllWindows();
|
_windowSystem.RemoveAllWindows();
|
||||||
_commandManager.RemoveHandler("/influx");
|
_commandManager.RemoveHandler("/influx");
|
||||||
_commandManager.RemoveHandler("/influx gil");
|
|
||||||
_influxStatisticsClient.Dispose();
|
_influxStatisticsClient.Dispose();
|
||||||
_fcStatsCalculator.Dispose();
|
_fcStatsCalculator.Dispose();
|
||||||
_localStatsCalculator.Dispose();
|
_localStatsCalculator.Dispose();
|
||||||
_allaganToolsIpc.Dispose();
|
_allaganToolsIpc.Dispose();
|
||||||
_clientState.Login -= AutoEnrollCharacter;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,8 +243,6 @@ internal sealed class LocalStatsCalculator : IDisposable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private unsafe List<short> ExtractClassJobLevels(PlayerState* playerState)
|
private unsafe List<short> ExtractClassJobLevels(PlayerState* playerState)
|
||||||
{
|
{
|
||||||
List<short> levels = new();
|
List<short> levels = new();
|
||||||
|
@ -103,13 +103,6 @@ internal sealed class ConfigurationWindow : Window
|
|||||||
if (!tabItem)
|
if (!tabItem)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var refIncludeAll = _configuration.AutoEnrollCharacters;
|
|
||||||
if (ImGui.Checkbox("Auto enroll characters on login", ref refIncludeAll))
|
|
||||||
{
|
|
||||||
_configuration.AutoEnrollCharacters = refIncludeAll;
|
|
||||||
Save(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_clientState is { IsLoggedIn: true, LocalContentId: > 0, LocalPlayer.HomeWorld.RowId: > 0 })
|
if (_clientState is { IsLoggedIn: true, LocalContentId: > 0, LocalPlayer.HomeWorld.RowId: > 0 })
|
||||||
{
|
{
|
||||||
string worldName = _clientState.LocalPlayer.HomeWorld.Value.Name.ToString();
|
string worldName = _clientState.LocalPlayer.HomeWorld.Value.Name.ToString();
|
||||||
|
Loading…
Reference in New Issue
Block a user