Exemple #1
0
    //FUNCTION : CheckQuest
    //DESCRIPTION : Checking to see if quest is done or not and assigning the correct dialoge/action
    void CheckQuest()
    {
        if (Quest.Completed && !Quest.SecondNPC)
        {
            if (Quest.isPortalSwitch)
            {
                Portal.SwitchPortalStage();
            }

            Quest.GiveReward();
            Helped        = true;
            AssignedQuest = false;
            QM.addToCQNList(Quest.QuestName);
            Quest.CompletedText();
            Quest.isActive = false;
            QM.RemoveActiveQuest(Quest);
        }
        else if (Quest.Completed && Quest.SecondNPC)
        {
            Quest.CompletedText();
        }
        else
        {
            Quest.InprogressText();
        }
    }
Exemple #2
0
    public override void Interact()
    {
        nameText.SetText(CharacterName);
        isActive = !isActive;
        if (!isSecondaryNPC)
        {
            if (!AssignedQuest && !Helped)
            {
                AssignQuest();
            }
            else if (AssignedQuest && !Helped)
            {
                CheckQuest();
            }
            else
            {
                NextQuest();
            }
        }
        else if (isSecondaryNPC)
        {
            if (!Quest.Completed)
            {
                Quest.SNPCInprogressText();
                Cleared();
            }
            else if (Quest.Completed)
            {
                if (Quest.isPortalSwitch)
                {
                    Portal.SwitchPortalStage();
                }

                Quest.ChangeHasQuests();
                Quest.SecondNPCCompletedText();
                Quest.GiveReward();
                QM.addToCQNList(Quest.QuestName);
                Quest.isActive = false;
                QM.RemoveActiveQuest(Quest);
                isSecondaryNPC = false;
                Helped         = true;
                AssignedQuest  = false;
            }
        }
    }