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
|
|
@ -224,9 +224,9 @@ public sealed class CachedPlayer : DisposableMediatorSubscriberBase
|
|||
var handler = changes.Key switch
|
||||
{
|
||||
ObjectKind.Player => _charaHandler!,
|
||||
ObjectKind.Companion => _gameObjectHandlerFactory(changes.Key, () => _dalamudUtil.GetCompanion(ptr), false),
|
||||
ObjectKind.Companion => _gameObjectHandlerFactory(changes.Key, () => _dalamudUtil.GetCompanion(ptr).GetAwaiter().GetResult(), false),
|
||||
ObjectKind.MinionOrMount => _gameObjectHandlerFactory(changes.Key, () => _dalamudUtil.GetMinionOrMount(ptr), false),
|
||||
ObjectKind.Pet => _gameObjectHandlerFactory(changes.Key, () => _dalamudUtil.GetPet(ptr), false),
|
||||
ObjectKind.Pet => _gameObjectHandlerFactory(changes.Key, () => _dalamudUtil.GetPet(ptr).GetAwaiter().GetResult(), false),
|
||||
_ => throw new NotSupportedException("ObjectKind not supported: " + changes.Key)
|
||||
};
|
||||
|
||||
|
|
@ -583,7 +583,7 @@ public sealed class CachedPlayer : DisposableMediatorSubscriberBase
|
|||
}
|
||||
else if (objectKind == ObjectKind.Pet)
|
||||
{
|
||||
var pet = _dalamudUtil.GetPet(address);
|
||||
var pet = await _dalamudUtil.GetPet(address);
|
||||
if (pet != IntPtr.Zero)
|
||||
{
|
||||
using GameObjectHandler tempHandler = _gameObjectHandlerFactory(ObjectKind.Pet, () => pet, false);
|
||||
|
|
@ -592,7 +592,7 @@ public sealed class CachedPlayer : DisposableMediatorSubscriberBase
|
|||
}
|
||||
else if (objectKind == ObjectKind.Companion)
|
||||
{
|
||||
var companion = _dalamudUtil.GetCompanion(address);
|
||||
var companion = await _dalamudUtil.GetCompanion(address);
|
||||
if (companion != IntPtr.Zero)
|
||||
{
|
||||
using GameObjectHandler tempHandler = _gameObjectHandlerFactory(ObjectKind.Pet, () => companion, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue