mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix parameters of EnableDraw
This commit is contained in:
parent
5805d5c798
commit
895e70555d
2 changed files with 6 additions and 3 deletions
|
|
@ -403,6 +403,9 @@ public static class FullEquipTypeExtensions
|
|||
_ => string.Empty,
|
||||
};
|
||||
|
||||
public static bool IsOffhandType(this FullEquipType type)
|
||||
=> type.OffhandTypeSuffix().Length > 0;
|
||||
|
||||
public static readonly IReadOnlyList<FullEquipType> WeaponTypes
|
||||
= Enum.GetValues<FullEquipType>().Where(v => v.IsWeapon()).ToArray();
|
||||
|
||||
|
|
|
|||
|
|
@ -132,15 +132,15 @@ public class DrawObjectState : IDisposable, IReadOnlyDictionary<nint, (nint, boo
|
|||
/// EnableDraw is what creates DrawObjects for gameObjects,
|
||||
/// so we always keep track of the current GameObject to be able to link it to the DrawObject.
|
||||
/// </summary>
|
||||
private delegate void EnableDrawDelegate(nint gameObject, nint b, nint c, nint d);
|
||||
private delegate void EnableDrawDelegate(nint gameObject);
|
||||
|
||||
[Signature(Sigs.EnableDraw, DetourName = nameof(EnableDrawDetour))]
|
||||
private readonly Hook<EnableDrawDelegate> _enableDrawHook = null!;
|
||||
|
||||
private void EnableDrawDetour(nint gameObject, nint b, nint c, nint d)
|
||||
private void EnableDrawDetour(nint gameObject)
|
||||
{
|
||||
_lastGameObject.Value!.Enqueue(gameObject);
|
||||
_enableDrawHook.Original.Invoke(gameObject, b, c, d);
|
||||
_enableDrawHook.Original.Invoke(gameObject);
|
||||
_lastGameObject.Value!.TryDequeue(out _);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue