mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
adapt pointers to framework stuff
This commit is contained in:
parent
46c58c6cfd
commit
c9aa890f08
4 changed files with 26 additions and 11 deletions
|
|
@ -88,7 +88,12 @@ public class DalamudUtilService : IHostedService
|
|||
return (Dalamud.Game.ClientState.Objects.Types.Character)objTableObj;
|
||||
}
|
||||
|
||||
public unsafe IntPtr GetCompanion(IntPtr? playerPointer = null)
|
||||
public async Task<IntPtr> GetCompanion(IntPtr? playerPointer = null)
|
||||
{
|
||||
return await RunOnFrameworkThread(() => GetCompanionInternal(playerPointer));
|
||||
}
|
||||
|
||||
private unsafe IntPtr GetCompanionInternal(IntPtr? playerPointer = null)
|
||||
{
|
||||
var mgr = CharacterManager.Instance();
|
||||
playerPointer ??= PlayerPointer;
|
||||
|
|
@ -108,7 +113,12 @@ public class DalamudUtilService : IHostedService
|
|||
return _objectTable.GetObjectAddress(((GameObject*)playerPointer)->ObjectIndex + 1);
|
||||
}
|
||||
|
||||
public unsafe IntPtr GetPet(IntPtr? playerPointer = null)
|
||||
public async Task<IntPtr> GetPet(IntPtr? playerPointer = null)
|
||||
{
|
||||
return await RunOnFrameworkThread(() => GetPetInternal(playerPointer));
|
||||
}
|
||||
|
||||
private unsafe IntPtr GetPetInternal(IntPtr? playerPointer = null)
|
||||
{
|
||||
if (ClassJobIdsIgnoredForPets.Contains(_classJobId ?? 0)) return IntPtr.Zero;
|
||||
var mgr = CharacterManager.Instance();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue