Esempio n. 1
0
 public void AddMileStone(QuestMilestone Mile)
 {
     if (Mile != null)
     {
         m_MileStones.Add(Mile.GetUId(), Mile);
     }
     if (m_Mile == null)
     {
         m_Mile   = Mile; //automatical activate entry milestone
         m_Hidden = Mile.GetHidden();
     }
 }
Esempio n. 2
0
    public bool Evaluate()
    {
        bool  ret   = false;
        Quest quest = QuestManager.getSingleton().GetQuestById(m_QuestId);

        if (quest != null)
        {
            QuestMilestone mile = quest.GetCurrMile();
            if (mile != null)
            {
                ret = (mile.GetUId() == m_MileId);
            }
        }
        return(ret);
    }
Esempio n. 3
0
    public Quest Setup()
    {
        Quest myQuest = new Quest((int)QuestGlobals.QuestEnum.QstWiseManGoogles, "Wise Man's Googles");

        myQuest.SetDescription("The old man needs his googles for reading");

        QuestMilestone _mile = new QuestMilestone((int)MileEnum.Start, "On visit");
        ICondition     _Cond = new nVisitsNPC((int)QuestGlobals.NpcEnum.WiseMan, false);

        _mile.AddCondition(_Cond, (int)MileEnum.BeginGoogleQuest);
        myQuest.AddMileStone(_mile);

        _mile = new QuestMilestone((int)MileEnum.FindHim, "Find the wise man");
        _Cond = new nVisitsNPC((int)QuestGlobals.NpcEnum.WiseMan, false);
        _mile.AddCondition(_Cond, (int)MileEnum.BeginGoogleQuest);
        _mile.SetDescription("You need to find a wise man to get more info");
        myQuest.AddMileStone(_mile);
        myQuest.SetHidden(false);

        _mile = new QuestMilestone((int)MileEnum.BeginGoogleQuest, "He might have a quest for you");
        //NoCondition ?
        _mile.SetDescription("Take the quest to find the wise mans googles.");
        myQuest.AddMileStone(_mile);

        _mile = new QuestMilestone((int)MileEnum.HuntGoogleQuest1, "Get his googles back");
        _Cond = new nVisitsNPC((int)QuestGlobals.NpcEnum.BanditChief, false);
        _mile.AddCondition(_Cond, (int)MileEnum.HuntGoogleQuest2);
        _mile.SetDescription("Talk to the grunts or just kill them all and search for the googles");
        myQuest.AddMileStone(_mile);

        _mile = new QuestMilestone((int)MileEnum.HuntGoogleQuest2, "You have the goggles, now bring them back.");
        _Cond = new nVisitsNPC((int)QuestGlobals.NpcEnum.WiseMan, false);
        _mile.AddCondition(_Cond, (int)MileEnum.EndGoogleQuest);
        _mile.SetDescription("You have the goggles, now bring them back.");
        //_mile.EnterMilestone = new Action(delegate { //add google quest item});
        myQuest.AddMileStone(_mile);

        _mile = new QuestMilestone((int)MileEnum.EndGoogleQuest, "You finished the task");
        //no Cond ??
        _mile.SetDescription("The old guy can read again");
        myQuest.AddMileStone(_mile);

        return(myQuest);
    }
Esempio n. 4
0
    public void ActivateMileByID(int ID)
    {
        QuestMilestone mile = GetMileByID(ID);

        if (mile != null)
        {
            if (m_Mile != null && m_Mile.ExitMilestone != null)
            {
                m_Mile.ExitMilestone();
            }
            m_Mile = mile;
            if (m_Mile != null && m_Mile.EnterMilestone != null)
            {
                m_Mile.EnterMilestone();
            }

            if (!mile.GetHidden())
            {
                SetHidden(false);
                QuestUpdated();
            }
        }
    }
Esempio n. 5
0
 internal bool Valid()
 {
     return(QuestMilestone.QuestMilestone_Valid(base.SelfPtr()));
 }
Esempio n. 6
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     QuestMilestone.QuestMilestone_Dispose(selfPointer);
 }