add LinkedModCollection to be able to retrospectively verify which gamepath was resolved for which game object

This commit is contained in:
Stanley Dimant 2022-09-03 16:09:31 +02:00 committed by Ottermandias
parent 07af64feed
commit dcdc6d1be1
16 changed files with 151 additions and 79 deletions

View file

@ -0,0 +1,32 @@
using System;
using FFXIVClientStructs.FFXIV.Client.Game.Object;
namespace Penumbra.Collections;
public class LinkedModCollection
{
private IntPtr? _associatedGameObject;
public IntPtr AssociatedGameObject
{
get => _associatedGameObject ?? IntPtr.Zero;
set => _associatedGameObject = value;
}
public ModCollection ModCollection;
public LinkedModCollection(ModCollection modCollection)
{
ModCollection = modCollection;
}
public LinkedModCollection(IntPtr? gameObject, ModCollection collection)
{
AssociatedGameObject = gameObject ?? IntPtr.Zero;
ModCollection = collection;
}
public unsafe LinkedModCollection(GameObject* gameObject, ModCollection collection)
{
AssociatedGameObject = ( IntPtr )gameObject;
ModCollection = collection;
}
}