Small improvements.

This commit is contained in:
Ottermandias 2022-02-22 22:04:56 +01:00
parent 564a4195cb
commit 689a4c73d9
4 changed files with 176 additions and 180 deletions

View file

@ -24,7 +24,7 @@ namespace Penumbra.Interop
PluginLog.Debug( "Found MusicInitCall location at 0x{Location:X16}. Framework offset for MusicManager is 0x{Offset:X8}",
musicInitCallLocation.ToInt64(), musicManagerOffset );
_musicManager = *( IntPtr* )( framework + musicManagerOffset );
PluginLog.Debug( "MusicManager found at 0x{Location:X16}", _musicManager );
PluginLog.Debug( "MusicManager found at 0x{Location:X16}", _musicManager.ToInt64() );
}
public bool StreamingEnabled

View file

@ -2,18 +2,16 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using Dalamud.Logging;
using Dalamud.Plugin;
using Penumbra.Mod;
using Penumbra.Structs;
namespace Penumbra.Mods
namespace Penumbra.Mods;
// Extracted to keep the main file a bit more clean.
// Contains all change functions on a specific mod that also require corresponding changes to collections.
public static class ModManagerEditExtensions
{
// Extracted to keep the main file a bit more clean.
// Contains all change functions on a specific mod that also require corresponding changes to collections.
public static class ModManagerEditExtensions
{
public static bool RenameMod( this ModManager manager, string newName, ModData mod )
{
if( newName.Length == 0 || string.Equals( newName, mod.Meta.Name, StringComparison.InvariantCulture ) )
@ -29,7 +27,7 @@ namespace Penumbra.Mods
public static bool ChangeSortOrder( this ModManager manager, ModData mod, string newSortOrder )
{
if( string.Equals(mod.SortOrder.FullPath, newSortOrder, StringComparison.InvariantCultureIgnoreCase ) )
if( string.Equals( mod.SortOrder.FullPath, newSortOrder, StringComparison.InvariantCultureIgnoreCase ) )
{
return false;
}
@ -215,5 +213,4 @@ namespace Penumbra.Mods
return true;
}
}
}

View file

@ -94,7 +94,7 @@ public partial class SettingsInterface
using var raii = ImGuiRaii.DeferredEnd( ImGui.EndTabItem );
var resourceHandler = *( ResourceManager** )( Dalamud.SigScanner.Module.BaseAddress + 0x1E603C0 );
var resourceHandler = *( ResourceManager** )Dalamud.SigScanner.GetStaticAddressFromSig( "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 32 C0" );
if( resourceHandler == null )
{

View file

@ -3,7 +3,6 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Dalamud.Logging;
using Penumbra.GameData.Files;
using Penumbra.Mod;