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 Dalamud.Utility.Signatures;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Game.Group;
|
using FFXIVClientStructs.FFXIV.Client.Game.Group;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||||
|
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||||
using Lumina.Excel.GeneratedSheets;
|
using Lumina.Excel.GeneratedSheets;
|
||||||
|
|
@ -204,21 +205,15 @@ public sealed partial class ActorManager : IDisposable
|
||||||
public unsafe bool ResolvePartyBannerPlayer(ScreenActor type, out ActorIdentifier id)
|
public unsafe bool ResolvePartyBannerPlayer(ScreenActor type, out ActorIdentifier id)
|
||||||
{
|
{
|
||||||
id = ActorIdentifier.Invalid;
|
id = ActorIdentifier.Invalid;
|
||||||
var addon = _gameGui.GetAddonByName("BannerParty");
|
var addon = Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.BannerParty);
|
||||||
if (addon == IntPtr.Zero)
|
if (addon == null || !addon->IsAgentActive())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var idx = (ushort)type - (ushort)ScreenActor.CharacterScreen;
|
var idx = (ushort)type - (ushort)ScreenActor.CharacterScreen;
|
||||||
if (idx is < 0 or > 7)
|
if (idx is < 0 or > 7)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (idx == 0)
|
var obj = GroupManager.Instance()->GetPartyMemberByIndex(idx);
|
||||||
{
|
|
||||||
id = GetCurrentPlayer();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var obj = GroupManager.Instance()->GetPartyMemberByIndex(idx - 1);
|
|
||||||
if (obj != null)
|
if (obj != null)
|
||||||
id = CreatePlayer(new ByteString(obj->Name), obj->HomeWorld);
|
id = CreatePlayer(new ByteString(obj->Name), obj->HomeWorld);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue