private void CollectQuestReward(Quest quest) { foreach (QuestReward reward in quest.Rewards) { if (!reward.IsCollected) { QuestActions.CallFunction(reward.OnRewardLuaFunction, reward); } } }
private bool IsQuestCompleted(Quest quest) { quest.IsCompleted = true; foreach (QuestGoal goal in quest.Goals) { QuestActions.CallFunction(goal.IsCompletedLuaFunction, goal); quest.IsCompleted &= goal.IsCompleted; } return(quest.IsCompleted); }