private static void StoreConfigReferences(ZDO zdo, CharacterDrop drop, List <KeyValuePair <GameObject, int> > drops)
        {
            try
            {
#if DEBUG
                Log.LogDebug($"Packing config references for zdo {zdo.m_uid}");
#endif

                var cache = TempDropListCache.GetDrops(drops);
                cache ??= TempDropListCache.GetDrops(drop); // If we somehow failed to keep a consistent list reference (probably mod conflict). Attempt with the original CharacterDrop instead.

                if (cache is null)
                {
#if DEBUG
                    Log.LogDebug($"Found no drops for zdo {zdo.m_uid}");
#endif
                    return;
                }

                List <DropConfig> package = cache.ConfigByIndex
                                            .Select(x =>
                                                    new DropConfig
                {
                    Index     = x.Key,
                    ConfigKey = x.Value.Config.SectionKey,
                    IsList    = x.Value.Config.IsFromNamedList,
                })
                                            .ToList();

                using (MemoryStream memStream = new MemoryStream())
                {
                    BinaryFormatter binaryFormatter = new BinaryFormatter();
                    binaryFormatter.Serialize(memStream, package);

                    byte[] serialized = memStream.ToArray();

#if DEBUG
                    Log.LogDebug($"Serialized and set drops for zdo {zdo.m_uid}");
#endif

                    zdo.Set(ZDOKey, serialized);
                }
            }
            catch (Exception e)
            {
                Log.LogError("Error while attempting to store configurations for items to be dropped on ragdoll 'puff'.", e);
            }
        }
        private static void MoveConfigReferenceFromComponentToDrop(CharacterDrop __instance, List <KeyValuePair <GameObject, int> > __result)
        {
            try
            {
                var instanceReferences = TempDropListCache.GetDrops(__instance);

                if (instanceReferences is not null)
                {
                    //Re-associate result with configs.
                    foreach (var reference in instanceReferences.ConfigByIndex)
                    {
                        TempDropListCache.SetDrop(__result, reference.Key, reference.Value);
                    }
                }
            }
            catch (Exception e)
            {
                Log.LogWarning("Error while attempting to keep track of drops.", e);
            }
        }