mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Let the glamour plate actor use the players character collection.
This commit is contained in:
parent
630469fc0e
commit
1ad7787e4c
1 changed files with 16 additions and 6 deletions
|
|
@ -34,6 +34,7 @@ public unsafe partial class PathResolver
|
|||
{
|
||||
DrawObjectToObject[ ret ] = ( _lastCreatedCollection!, LastGameObject->ObjectIndex );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -153,12 +154,21 @@ public unsafe partial class PathResolver
|
|||
|
||||
var data = *( byte** )( agent + 0x28 );
|
||||
if( data == null )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var block = data + 0x7A;
|
||||
return new Utf8String( block ).ToString();
|
||||
}
|
||||
|
||||
// Obtain the name of the player character if the glamour plate edit window is open.
|
||||
private static string? GetGlamourName()
|
||||
{
|
||||
var addon = Dalamud.GameGui.GetAddonByName( "MiragePrismMiragePlate", 1 );
|
||||
return addon == IntPtr.Zero ? null : GetPlayerName();
|
||||
}
|
||||
|
||||
// Guesstimate whether an unnamed cutscene actor corresponds to the player or not,
|
||||
// and if so, return the player name.
|
||||
private static string? GetCutsceneName( GameObject* gameObject )
|
||||
|
|
@ -189,7 +199,7 @@ public unsafe partial class PathResolver
|
|||
var name = gameObject->ObjectIndex switch
|
||||
{
|
||||
240 => GetPlayerName(), // character window
|
||||
241 => GetInspectName() ?? GetCardName(), // inspect, character card
|
||||
241 => GetInspectName() ?? GetCardName() ?? GetGlamourName(), // inspect, character card, glamour plate editor.
|
||||
242 => GetPlayerName(), // try-on
|
||||
>= 200 => GetCutsceneName( gameObject ),
|
||||
_ => null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue