Use object table index instead of passing ICharacter/Character address. Seems like the dev who decided to shit talk behind my back about this forgot it was them who implemented it that way.
This commit is contained in:
@@ -7,13 +7,8 @@ using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Interop;
|
||||
using ObjectManager = CustomizePlus.GameData.Services.ObjectManager;
|
||||
using DalamudGameObject = Dalamud.Game.ClientState.Objects.Types.IGameObject;
|
||||
using ECommons.Configuration;
|
||||
using System;
|
||||
using CustomizePlus.Configuration.Data;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using Penumbra.GameData;
|
||||
using Penumbra.String;
|
||||
using Dalamud.Logging;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||
|
||||
namespace CustomizePlus.Game.Services;
|
||||
|
||||
@@ -145,6 +140,19 @@ public class GameObjectService
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find actor in object manager based on its Object ID.
|
||||
/// </summary>
|
||||
public Actor? GetActorByObjectIndex(ushort objectIndex)
|
||||
{
|
||||
if (objectIndex < 0 || objectIndex >= _objectManager.TotalCount)
|
||||
return null;
|
||||
|
||||
var ptr = _objectManager[(int)objectIndex];
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public enum SpecialResult
|
||||
{
|
||||
PartyBanner,
|
||||
|
||||
Reference in New Issue
Block a user