Merge branch 'master' into actor_table_debug

# Conflicts:
#	Dalamud/Game/ClientState/Actors/ActorTable.cs
This commit is contained in:
meli 2020-03-31 14:42:03 -07:00
commit 88d8f2d4ba
6 changed files with 27 additions and 22 deletions

View file

@ -1,5 +1,5 @@
name: Build Dalamud
on: [push]
on: [push, pull_request]
jobs:
build:

View file

@ -14,10 +14,10 @@
</PropertyGroup>
<PropertyGroup Label="Feature">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyVersion>4.7.22.0</AssemblyVersion>
<FileVersion>4.7.22.0</FileVersion>
<AssemblyVersion>4.8.0.0</AssemblyVersion>
<FileVersion>4.8.0.0</FileVersion>
<Description>XIVLauncher addon injection</Description>
<Version>4.7.22.0</Version>
<Version>4.8.0.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile></DocumentationFile>

View file

@ -14,9 +14,9 @@
</PropertyGroup>
<PropertyGroup Label="Feature">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyVersion>4.7.22.0</AssemblyVersion>
<Version>4.7.22.0</Version>
<FileVersion>4.7.22.0</FileVersion>
<AssemblyVersion>4.8.0.0</AssemblyVersion>
<Version>4.8.0</Version>
<FileVersion>4.8.0.0</FileVersion>
</PropertyGroup>
<ItemGroup Label="Resources">
<None Include="$(SolutionDir)/Resources/**/*" CopyToOutputDirectory="PreserveNewest" Visible="false" />

View file

@ -1,9 +1,7 @@
using System;
using System.Collections;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Dalamud.Game.ClientState.Actors.Types;
using Dalamud.Game.ClientState.Actors.Types.NonPlayer;
using Dalamud.Hooking;
@ -76,20 +74,20 @@ namespace Dalamud.Game.ClientState.Actors {
if (!this.isReady)
return null;
if (this.someActorTableAccessHook != null) {
if (this.someActorTableAccessHook != null)
{
this.someActorTableAccessHook.Dispose();
this.someActorTableAccessHook = null;
}
if (index >= Length)
return null;
//Log.Information("Trying to get actor at {0}", index);
var tblIndex = this.realActorTablePtr + 8 + index * 8;
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)
return null;

View file

@ -77,7 +77,10 @@ namespace Dalamud.Plugin
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.Text(pluginDefinition.Name);
@ -86,9 +89,6 @@ namespace Dalamud.Plugin
ImGui.Text(pluginDefinition.Description);
var isInstalled = this.manager.Plugins.Where(x => x.Definition != null).Any(
x => x.Definition.InternalName == pluginDefinition.InternalName);
if (!isInstalled) {
if (this.installStatus == PluginInstallStatus.InProgress) {
ImGui.Button("Install in progress...");

View file

@ -142,11 +142,6 @@ namespace Dalamud.Plugin
// 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
// 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)
{
@ -161,6 +156,18 @@ namespace Dalamud.Plugin
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);
if (installSuccess)