Turn Settings and Priority into their own types.

This commit is contained in:
Ottermandias 2024-04-05 16:35:55 +02:00
parent 77bf441e62
commit b1ca073276
29 changed files with 422 additions and 298 deletions

View file

@ -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;