feat: give classifier game process info
This commit is contained in:
parent
d921a8cfb0
commit
c7c89b33bc
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<Costura>
|
||||
<ExcludeAssemblies>
|
||||
Costura
|
||||
</ExcludeAssemblies>
|
||||
</Costura>
|
||||
<Costura>
|
||||
<ExcludeAssemblies>
|
||||
Costura
|
||||
CpuMathNative
|
||||
LdaNative
|
||||
</ExcludeAssemblies>
|
||||
</Costura>
|
||||
</Weavers>
|
||||
|
|
0
NoSoliciting.MessageClassifier/NoSoliciting.MessageClassifier.csproj
Normal file → Executable file
0
NoSoliciting.MessageClassifier/NoSoliciting.MessageClassifier.csproj
Normal file → Executable file
Binary file not shown.
Binary file not shown.
|
@ -9,7 +9,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ConsoleTables" Version="2.4.2" />
|
||||
<PackageReference Include="CsvHelper" Version="21.3.1" />
|
||||
<PackageReference Include="CsvHelper" Version="22.1.2" />
|
||||
<PackageReference Include="Microsoft.ML" Version="1.5.4" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -55,6 +55,8 @@ namespace NoSoliciting {
|
|||
public Filter(Plugin plugin) {
|
||||
this.Plugin = plugin ?? throw new ArgumentNullException(nameof(plugin), "Plugin cannot be null");
|
||||
|
||||
this.Plugin.Interface.Framework.Gui.Chat.OnCheckMessageHandled += this.OnChat;
|
||||
|
||||
var listingPtr = this.Plugin.Interface.TargetModuleScanner.ScanText("40 53 41 57 48 83 EC 28 48 8B D9");
|
||||
var summaryPtr = this.Plugin.Interface.TargetModuleScanner.ScanText("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B FA 48 8B F1 45 84 C0 74 ?? 0F B7 0A");
|
||||
|
||||
|
@ -74,10 +76,14 @@ namespace NoSoliciting {
|
|||
goto Return;
|
||||
}
|
||||
|
||||
if (this.Plugin.MlReady) {
|
||||
this.MlTransformPfPacket(data);
|
||||
} else if (this.Plugin.DefsReady) {
|
||||
this.DefsTransformPfPacket(data);
|
||||
try {
|
||||
if (this.Plugin.MlReady) {
|
||||
this.MlTransformPfPacket(data);
|
||||
} else if (this.Plugin.DefsReady) {
|
||||
this.DefsTransformPfPacket(data);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
PluginLog.LogError($"Error in PF hook: {ex}");
|
||||
}
|
||||
|
||||
Return:
|
||||
|
@ -364,6 +370,7 @@ namespace NoSoliciting {
|
|||
}
|
||||
|
||||
if (disposing) {
|
||||
this.Plugin.Interface.Framework.Gui.Chat.OnCheckMessageHandled -= this.OnChat;
|
||||
this._handlePacketHook?.Dispose();
|
||||
this._handleSummaryHook?.Dispose();
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</PackageReference>
|
||||
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.18.2" />
|
||||
<PackageReference Include="JKang.IpcServiceFramework.Client.NamedPipe" Version="3.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
|
||||
<PackageReference Include="Resourcer.Fody" Version="1.8.0" PrivateAssets="all" />
|
||||
<PackageReference Include="YamlDotNet" Version="9.1.4" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -62,7 +62,6 @@ namespace NoSoliciting {
|
|||
// pre-compute the max ilvl to prevent stutter
|
||||
FilterUtil.MaxItemLevelAttainable(this.Interface.Data);
|
||||
|
||||
this.Interface.Framework.Gui.Chat.OnCheckMessageHandled += this.Filter.OnChat;
|
||||
this.Interface.UiBuilder.OnBuildUi += this.Ui.Draw;
|
||||
this.Interface.UiBuilder.OnOpenConfigUi += this.Ui.OpenSettings;
|
||||
this.Interface.CommandManager.AddHandler("/prmt", new CommandInfo(this.OnCommand) {
|
||||
|
@ -128,7 +127,6 @@ namespace NoSoliciting {
|
|||
if (disposing) {
|
||||
this.Filter.Dispose();
|
||||
this.MlFilter?.Dispose();
|
||||
this.Interface.Framework.Gui.Chat.OnCheckMessageHandled -= this.Filter.OnChat;
|
||||
this.Interface.UiBuilder.OnBuildUi -= this.Ui.Draw;
|
||||
this.Interface.UiBuilder.OnOpenConfigUi -= this.Ui.OpenSettings;
|
||||
this.Interface.CommandManager.RemoveHandler("/prmt");
|
||||
|
|
Loading…
Reference in New Issue