mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-21 23:37:47 +01:00
Add a small hack to interpret BattleNPC as Players in some cases for Anamnesis.
This commit is contained in:
parent
b65bef17b2
commit
d0ed8abab8
6 changed files with 23 additions and 14 deletions
|
|
@ -677,7 +677,7 @@ public class PenumbraApi : IDisposable, IPenumbraApi
|
|||
return PenumbraApiEc.InvalidArgument;
|
||||
}
|
||||
|
||||
var identifier = Penumbra.Actors.FromObject( Dalamud.Objects[ actorIndex ] );
|
||||
var identifier = Penumbra.Actors.FromObject( Dalamud.Objects[ actorIndex ], false, false );
|
||||
if( !identifier.IsValid )
|
||||
{
|
||||
return PenumbraApiEc.InvalidArgument;
|
||||
|
|
|
|||
|
|
@ -114,10 +114,10 @@ public sealed partial class IndividualCollections : IReadOnlyList< (string Displ
|
|||
}
|
||||
|
||||
public bool TryGetCollection( GameObject? gameObject, out ModCollection? collection )
|
||||
=> TryGetCollection( _actorManager.FromObject( gameObject, false ), out collection );
|
||||
=> TryGetCollection( _actorManager.FromObject( gameObject, true, false ), out collection );
|
||||
|
||||
public unsafe bool TryGetCollection( FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject* gameObject, out ModCollection? collection )
|
||||
=> TryGetCollection( _actorManager.FromObject( gameObject, out _, false ), out collection );
|
||||
=> TryGetCollection( _actorManager.FromObject( gameObject, out _, true, false ), out collection );
|
||||
|
||||
private bool CheckWorlds( ActorIdentifier identifier, out ModCollection? collection )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public unsafe partial class PathResolver
|
|||
return IdentifiedCache.Set( collection2, ActorIdentifier.Invalid, gameObject );
|
||||
}
|
||||
|
||||
var identifier = Penumbra.Actors.FromObject( gameObject, out var owner, false );
|
||||
var identifier = Penumbra.Actors.FromObject( gameObject, out var owner, true, false );
|
||||
identifier = Penumbra.CollectionManager.Individuals.ConvertSpecialIdentifier( identifier );
|
||||
var collection = CollectionByIdentifier( identifier )
|
||||
?? CheckYourself( identifier, gameObject )
|
||||
|
|
|
|||
|
|
@ -1,14 +1,10 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Resource;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using OtterGui;
|
||||
using Penumbra.Collections;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.Interop.Loader;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ public partial class ConfigWindow
|
|||
{
|
||||
ImGuiUtil.DrawTableColumn( $"{( ( GameObject* )obj.Address )->ObjectIndex}" );
|
||||
ImGuiUtil.DrawTableColumn( $"0x{obj.Address:X}" );
|
||||
var identifier = Penumbra.Actors.FromObject( obj, true );
|
||||
var identifier = Penumbra.Actors.FromObject( obj, false, true );
|
||||
ImGuiUtil.DrawTableColumn( Penumbra.Actors.ToString( identifier ) );
|
||||
var id = obj.ObjectKind == ObjectKind.BattleNpc ? $"{identifier.DataId} | {obj.DataId}" : identifier.DataId.ToString();
|
||||
ImGuiUtil.DrawTableColumn( id );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue