/// <summary> /// Gives feedback to the user if the current creature in the extractor is already in the library. /// This uses the ARK-ID and only works if exported creatures are imported /// </summary> private void DisplayIfCreatureAlreadyInLibrary() { creatureInfoInputExtractor.UpdateExistingCreature = creatureInfoInputExtractor.CreatureGuid != Guid.Empty && Utils.IsArkIdImported(creatureInfoInputExtractor.ArkId, creatureInfoInputExtractor.CreatureGuid) && creatureCollection.creatures.Any(c => c.guid == creatureInfoInputExtractor.CreatureGuid && !c.flags.HasFlag(CreatureFlags.Placeholder) && !c.flags.HasFlag(CreatureFlags.Deleted)); }
/// <summary> /// Gives feedback to the user if the current creature in the extractor is already in the library. /// This uses the ARK-ID and only works if exported creatures are imported /// </summary> private bool IsCreatureAlreadyInLibrary(Guid creatureGuid, long arkId, out Creature existingCreature) { existingCreature = null; bool creatureAlreadyExistsInLibrary = false; if (creatureGuid != Guid.Empty && Utils.IsArkIdImported(arkId, creatureGuid)) { existingCreature = creatureCollection.creatures.FirstOrDefault(c => c.guid == creatureGuid && !c.flags.HasFlag(CreatureFlags.Placeholder) ); if (existingCreature != null) { creatureAlreadyExistsInLibrary = true; } } return(creatureAlreadyExistsInLibrary); }