mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix group banner identification.
This commit is contained in:
parent
deb630795d
commit
471005b5b1
1 changed files with 4 additions and 9 deletions
|
|
@ -13,6 +13,7 @@ using Dalamud.Utility;
|
|||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Group;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
|
|
@ -204,21 +205,15 @@ public sealed partial class ActorManager : IDisposable
|
|||
public unsafe bool ResolvePartyBannerPlayer(ScreenActor type, out ActorIdentifier id)
|
||||
{
|
||||
id = ActorIdentifier.Invalid;
|
||||
var addon = _gameGui.GetAddonByName("BannerParty");
|
||||
if (addon == IntPtr.Zero)
|
||||
var addon = Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.BannerParty);
|
||||
if (addon == null || !addon->IsAgentActive())
|
||||
return false;
|
||||
|
||||
var idx = (ushort)type - (ushort)ScreenActor.CharacterScreen;
|
||||
if (idx is < 0 or > 7)
|
||||
return true;
|
||||
|
||||
if (idx == 0)
|
||||
{
|
||||
id = GetCurrentPlayer();
|
||||
return true;
|
||||
}
|
||||
|
||||
var obj = GroupManager.Instance()->GetPartyMemberByIndex(idx - 1);
|
||||
var obj = GroupManager.Instance()->GetPartyMemberByIndex(idx);
|
||||
if (obj != null)
|
||||
id = CreatePlayer(new ByteString(obj->Name), obj->HomeWorld);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue