Skip to content

Commit 895e705

Browse files
committed
Fix parameters of EnableDraw
1 parent 5805d5c commit 895e705

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Penumbra.GameData/Enums/FullEquipType.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,9 @@ internal static string OffhandTypeSuffix(this FullEquipType type)
403403
_ => string.Empty,
404404
};
405405

406+
public static bool IsOffhandType(this FullEquipType type)
407+
=> type.OffhandTypeSuffix().Length > 0;
408+
406409
public static readonly IReadOnlyList<FullEquipType> WeaponTypes
407410
= Enum.GetValues<FullEquipType>().Where(v => v.IsWeapon()).ToArray();
408411

Penumbra/Interop/PathResolving/DrawObjectState.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ private unsafe void IterateDrawObjectTree(Object* drawObject, nint gameObject, b
132132
/// EnableDraw is what creates DrawObjects for gameObjects,
133133
/// so we always keep track of the current GameObject to be able to link it to the DrawObject.
134134
/// </summary>
135-
private delegate void EnableDrawDelegate(nint gameObject, nint b, nint c, nint d);
135+
private delegate void EnableDrawDelegate(nint gameObject);
136136

137137
[Signature(Sigs.EnableDraw, DetourName = nameof(EnableDrawDetour))]
138138
private readonly Hook<EnableDrawDelegate> _enableDrawHook = null!;
139139

140-
private void EnableDrawDetour(nint gameObject, nint b, nint c, nint d)
140+
private void EnableDrawDetour(nint gameObject)
141141
{
142142
_lastGameObject.Value!.Enqueue(gameObject);
143-
_enableDrawHook.Original.Invoke(gameObject, b, c, d);
143+
_enableDrawHook.Original.Invoke(gameObject);
144144
_lastGameObject.Value!.TryDequeue(out _);
145145
}
146146
}

0 commit comments

Comments
 (0)