public bool CompleteQuest(IQuest quest) { bool result = quest.CompleteQuest(this); if (result) { switch (quest.Type) { case QuestType.Kill: KillEnemy -= quest.UpdateQuest; break; case QuestType.Delivery: break; case QuestType.Gather: PickItem -= quest.UpdateQuest; break; case QuestType.Escort: break; case QuestType.Craft: CraftItem -= quest.UpdateQuest; break; default: break; } } return(result); }
public void CompleteQuest(IEntity questor, IQuest quest, bool force = false) { if (!quest.CompleteQuest(questor, force)) { return; } GlobalConstants.ActionLog.Log(questor + " completed " + quest.ID); this.EntityQuests[questor.Guid].Remove(quest); GlobalConstants.GameManager.ItemHandler.CleanUpRewards(); }