mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-15 20:37:42 +01:00
Merge branch 'master' into actor_table_debug
# Conflicts: # Dalamud/Game/ClientState/Actors/ActorTable.cs
This commit is contained in:
commit
88d8f2d4ba
6 changed files with 27 additions and 22 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
name: Build Dalamud
|
name: Build Dalamud
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Feature">
|
<PropertyGroup Label="Feature">
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>4.7.22.0</AssemblyVersion>
|
<AssemblyVersion>4.8.0.0</AssemblyVersion>
|
||||||
<FileVersion>4.7.22.0</FileVersion>
|
<FileVersion>4.8.0.0</FileVersion>
|
||||||
<Description>XIVLauncher addon injection</Description>
|
<Description>XIVLauncher addon injection</Description>
|
||||||
<Version>4.7.22.0</Version>
|
<Version>4.8.0.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
<DocumentationFile></DocumentationFile>
|
<DocumentationFile></DocumentationFile>
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Feature">
|
<PropertyGroup Label="Feature">
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>4.7.22.0</AssemblyVersion>
|
<AssemblyVersion>4.8.0.0</AssemblyVersion>
|
||||||
<Version>4.7.22.0</Version>
|
<Version>4.8.0</Version>
|
||||||
<FileVersion>4.7.22.0</FileVersion>
|
<FileVersion>4.8.0.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Resources">
|
<ItemGroup Label="Resources">
|
||||||
<None Include="$(SolutionDir)/Resources/**/*" CopyToOutputDirectory="PreserveNewest" Visible="false" />
|
<None Include="$(SolutionDir)/Resources/**/*" CopyToOutputDirectory="PreserveNewest" Visible="false" />
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Windows.Forms;
|
|
||||||
using Dalamud.Game.ClientState.Actors.Types;
|
using Dalamud.Game.ClientState.Actors.Types;
|
||||||
using Dalamud.Game.ClientState.Actors.Types.NonPlayer;
|
using Dalamud.Game.ClientState.Actors.Types.NonPlayer;
|
||||||
using Dalamud.Hooking;
|
using Dalamud.Hooking;
|
||||||
|
|
@ -76,20 +74,20 @@ namespace Dalamud.Game.ClientState.Actors {
|
||||||
if (!this.isReady)
|
if (!this.isReady)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (this.someActorTableAccessHook != null) {
|
if (this.someActorTableAccessHook != null)
|
||||||
|
{
|
||||||
this.someActorTableAccessHook.Dispose();
|
this.someActorTableAccessHook.Dispose();
|
||||||
this.someActorTableAccessHook = null;
|
this.someActorTableAccessHook = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index >= Length)
|
if (index >= Length)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
//Log.Information("Trying to get actor at {0}", index);
|
|
||||||
var tblIndex = this.realActorTablePtr + 8 + index * 8;
|
var tblIndex = this.realActorTablePtr + 8 + index * 8;
|
||||||
|
|
||||||
var offset = Marshal.ReadIntPtr(tblIndex);
|
var offset = Marshal.ReadIntPtr(tblIndex);
|
||||||
|
|
||||||
//Log.Information("Actor at {0}", offset.ToString());
|
Log.Verbose("Actor at {0} for {1}", offset.ToInt64().ToString("X"), index);
|
||||||
|
|
||||||
if (offset == IntPtr.Zero)
|
if (offset == IntPtr.Zero)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,10 @@ namespace Dalamud.Plugin
|
||||||
|
|
||||||
ImGui.PushID(pluginDefinition.InternalName + pluginDefinition.AssemblyVersion);
|
ImGui.PushID(pluginDefinition.InternalName + pluginDefinition.AssemblyVersion);
|
||||||
|
|
||||||
if (ImGui.CollapsingHeader(pluginDefinition.Name)) {
|
var isInstalled = this.manager.Plugins.Where(x => x.Definition != null).Any(
|
||||||
|
x => x.Definition.InternalName == pluginDefinition.InternalName);
|
||||||
|
|
||||||
|
if (ImGui.CollapsingHeader(pluginDefinition.Name + (isInstalled ? " (installed)" : string.Empty))) {
|
||||||
ImGui.Indent();
|
ImGui.Indent();
|
||||||
|
|
||||||
ImGui.Text(pluginDefinition.Name);
|
ImGui.Text(pluginDefinition.Name);
|
||||||
|
|
@ -86,9 +89,6 @@ namespace Dalamud.Plugin
|
||||||
|
|
||||||
ImGui.Text(pluginDefinition.Description);
|
ImGui.Text(pluginDefinition.Description);
|
||||||
|
|
||||||
var isInstalled = this.manager.Plugins.Where(x => x.Definition != null).Any(
|
|
||||||
x => x.Definition.InternalName == pluginDefinition.InternalName);
|
|
||||||
|
|
||||||
if (!isInstalled) {
|
if (!isInstalled) {
|
||||||
if (this.installStatus == PluginInstallStatus.InProgress) {
|
if (this.installStatus == PluginInstallStatus.InProgress) {
|
||||||
ImGui.Button("Install in progress...");
|
ImGui.Button("Install in progress...");
|
||||||
|
|
|
||||||
|
|
@ -142,11 +142,6 @@ namespace Dalamud.Plugin
|
||||||
|
|
||||||
// DisablePlugin() below immediately creates a .disabled file anyway, but will fail
|
// DisablePlugin() below immediately creates a .disabled file anyway, but will fail
|
||||||
// with an exception if we try to do it twice in row like this
|
// with an exception if we try to do it twice in row like this
|
||||||
// TODO: not sure if doing this for all versions is really necessary, since the
|
|
||||||
// others really needed to be disabled before anyway
|
|
||||||
//foreach (var sortedVersion in sortedVersions) {
|
|
||||||
// File.Create(Path.Combine(sortedVersion.FullName, ".disabled"));
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (!dryRun)
|
if (!dryRun)
|
||||||
{
|
{
|
||||||
|
|
@ -161,6 +156,18 @@ namespace Dalamud.Plugin
|
||||||
hasError = true;
|
hasError = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Just to be safe
|
||||||
|
foreach (var sortedVersion in sortedVersions)
|
||||||
|
{
|
||||||
|
var disabledFile = new FileInfo(Path.Combine(sortedVersion.FullName, ".disabled"));
|
||||||
|
if (!disabledFile.Exists)
|
||||||
|
disabledFile.Create();
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.Error(ex, "Plugin disable failed");
|
||||||
|
}
|
||||||
|
|
||||||
var installSuccess = InstallPlugin(remoteInfo);
|
var installSuccess = InstallPlugin(remoteInfo);
|
||||||
|
|
||||||
if (installSuccess)
|
if (installSuccess)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue