mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix incorrectly disposed VFX.
This commit is contained in:
parent
8ecf7e2381
commit
f17e9be824
2 changed files with 44 additions and 34 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Logging;
|
||||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||
using Penumbra.Collections;
|
||||
|
|
@ -59,16 +60,16 @@ public unsafe partial class PathResolver
|
|||
_animationLoadCollection = last;
|
||||
}
|
||||
|
||||
public delegate ulong LoadSomeAvfx( uint a1, IntPtr gameObject, IntPtr gameObject2 );
|
||||
public delegate ulong LoadSomeAvfx( uint a1, IntPtr gameObject, IntPtr gameObject2, float unk1, IntPtr unk2, IntPtr unk3 );
|
||||
|
||||
[Signature( "E8 ?? ?? ?? ?? 45 0F B6 F7", DetourName = nameof( LoadSomeAvfxDetour ) )]
|
||||
public Hook< LoadSomeAvfx >? LoadSomeAvfxHook;
|
||||
|
||||
private ulong LoadSomeAvfxDetour( uint a1, IntPtr gameObject, IntPtr gameObject2 )
|
||||
private ulong LoadSomeAvfxDetour( uint a1, IntPtr gameObject, IntPtr gameObject2, float unk1, IntPtr unk2, IntPtr unk3 )
|
||||
{
|
||||
var last = _animationLoadCollection;
|
||||
_animationLoadCollection = IdentifyCollection( ( GameObject* )gameObject );
|
||||
var ret = LoadSomeAvfxHook!.Original( a1, gameObject, gameObject2 );
|
||||
var ret = LoadSomeAvfxHook!.Original( a1, gameObject, gameObject2, unk1, unk2, unk3 );
|
||||
_animationLoadCollection = last;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections.Concurrent;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Logging;
|
||||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||
|
|
@ -277,6 +278,8 @@ public unsafe partial class PathResolver
|
|||
return Penumbra.CollectionManager.Default;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Housing Retainers
|
||||
if( Penumbra.Config.UseDefaultCollectionForRetainers
|
||||
&& gameObject->ObjectKind == ( byte )ObjectKind.EventNpc
|
||||
|
|
@ -310,7 +313,13 @@ public unsafe partial class PathResolver
|
|||
?? GetOwnerName( gameObject ) ?? actorName ?? new Utf8String( gameObject->Name ).ToString();
|
||||
|
||||
// First check temporary character collections, then the own configuration.
|
||||
return Penumbra.TempMods.Collections.TryGetValue(actualName, out var c) ? c : Penumbra.CollectionManager.Character( actualName );
|
||||
return Penumbra.TempMods.Collections.TryGetValue( actualName, out var c ) ? c : Penumbra.CollectionManager.Character( actualName );
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Error( $"Error identifying collection:\n{e}" );
|
||||
return Penumbra.CollectionManager.Default;
|
||||
}
|
||||
}
|
||||
|
||||
// Update collections linked to Game/DrawObjects due to a change in collection configuration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue