mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 22:37:46 +01:00
Turn Settings and Priority into their own types.
This commit is contained in:
parent
77bf441e62
commit
b1ca073276
29 changed files with 422 additions and 298 deletions
|
|
@ -18,6 +18,7 @@ public sealed unsafe class CollectionResolver(
|
|||
PerformanceTracker performance,
|
||||
IdentifiedCollectionCache cache,
|
||||
IClientState clientState,
|
||||
ObjectManager objects,
|
||||
IGameGui gameGui,
|
||||
ActorManager actors,
|
||||
CutsceneService cutscenes,
|
||||
|
|
@ -35,8 +36,8 @@ public sealed unsafe class CollectionResolver(
|
|||
public ModCollection PlayerCollection()
|
||||
{
|
||||
using var performance1 = performance.Measure(PerformanceType.IdentifyCollection);
|
||||
var gameObject = (GameObject*)(clientState.LocalPlayer?.Address ?? nint.Zero);
|
||||
if (gameObject == null)
|
||||
var gameObject = objects[0];
|
||||
if (!gameObject.Valid)
|
||||
return collectionManager.Active.ByType(CollectionType.Yourself)
|
||||
?? collectionManager.Active.Default;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue