public void SetQuestCompleted(Quest quest) { foreach (var reward in quest.Rewards) { for (int i = 0; i < reward.Count; i++) { InventoryItemBase item = Instantiate <InventoryItemBase>(reward.Item); Inventory.AddItem(item); item.OnPickup(); } } questUI.QuestSolved(quest); if (QuestCompleted != null) { QuestCompleted.Invoke(); } mQuests.Remove(quest); }