Some updates.

This commit is contained in:
Ottermandias 2024-07-02 17:08:27 +02:00
parent c2e74ed382
commit 221b18751d
121 changed files with 338 additions and 328 deletions

View file

@ -20,7 +20,7 @@ public sealed unsafe class CopyCharacter : EventWrapperPtr<Character, Character,
private readonly Task<Hook<Delegate>> _task;
public nint Address
=> (nint)CharacterSetup.MemberFunctionPointers.CopyFromCharacter;
=> (nint)CharacterSetupContainer.MemberFunctionPointers.CopyFromCharacter;
public void Enable()
=> _task.Result.Enable();
@ -34,9 +34,9 @@ public sealed unsafe class CopyCharacter : EventWrapperPtr<Character, Character,
public bool Finished
=> _task.IsCompletedSuccessfully;
private delegate ulong Delegate(CharacterSetup* target, Character* source, uint unk);
private delegate ulong Delegate(CharacterSetupContainer* target, Character* source, uint unk);
private ulong Detour(CharacterSetup* target, Character* source, uint unk)
private ulong Detour(CharacterSetupContainer* target, Character* source, uint unk)
{
// TODO: update when CS updated.
var character = ((Character**)target)[1];

View file

@ -39,7 +39,7 @@ public sealed unsafe class WeaponReload : EventWrapperPtr<DrawDataContainer, Cha
private void Detour(DrawDataContainer* drawData, uint slot, ulong weapon, byte d, byte e, byte f, byte g)
{
var gameObject = drawData->Parent;
var gameObject = drawData->OwnerObject;
Penumbra.Log.Verbose($"[{Name}] Triggered with drawData: 0x{(nint)drawData:X}, {slot}, {weapon}, {d}, {e}, {f}, {g}.");
Invoke(drawData, gameObject, (CharacterWeapon*)(&weapon));
_task.Result.Original(drawData, slot, weapon, d, e, f, g);