Exemple #1
0
 public override bool HasCompletedCurrentObjective()
 {
     switch (currentObjective)
     {
     case 0:
     default:
         QuestObjective.Collection c = (QuestObjective.Collection)questObjectives[0].subSectionObjectives[0];
         if (GameManagerScript.ins.playerInventory.HasItemCountInInventory(c.targetItem, c.targetCount))
         {
             return(true);
         }
         return(false);
     }
 }
Exemple #2
0
 public override void CompleteObjective()
 {
     switch (currentObjective)
     {
     case 0:
     default:
         QuestObjective.Collection c = (QuestObjective.Collection)questObjectives[0].subSectionObjectives[0];
         GameManagerScript.ins.playerInventory.RemoveItem(c.targetItem, c.targetCount);
         break;
     }
     currentObjective += 1;
     if (CanCompleteQuest())
     {
         CompleteQuest();
     }
 }