From 7142f771fc2b5b31d5035b8cea80717c60ffb17b Mon Sep 17 00:00:00 2001 From: Archangel Date: Sat, 22 Jun 2024 00:54:09 +0200 Subject: [PATCH] Check if quest item is Active and Enabled --- Fika.Core/Coop/Players/CoopPlayer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Fika.Core/Coop/Players/CoopPlayer.cs b/Fika.Core/Coop/Players/CoopPlayer.cs index 0d3080f8..8c94ad97 100644 --- a/Fika.Core/Coop/Players/CoopPlayer.cs +++ b/Fika.Core/Coop/Players/CoopPlayer.cs @@ -1555,13 +1555,13 @@ public Item FindItem(string itemId, bool questItem = false) { if (lootItem is LootItem observedLootItem) { - if (observedLootItem.Item.TemplateId == itemId) + if (observedLootItem.Item.TemplateId == itemId && observedLootItem.isActiveAndEnabled) { return observedLootItem.Item; } } } - FikaPlugin.Instance.FikaLogger.LogError($"CoopPlayer::FindItem: Could not find questItem with id '{itemId}' in the world at all."); + FikaPlugin.Instance.FikaLogger.LogInfo($"CoopPlayer::FindItem: Could not find questItem with id '{itemId}' in the current session, either the quest is not active or something else occured."); return null; }