예제 #1
0
        public void FixBattleOfKarthal()
        {
            Party     party = LegacyLogic.Instance.WorldManager.Party;
            QuestStep step  = GetStep(18);

            if (step.QuestState == EQuestState.ACTIVE && party.TokenHandler.GetTokens(699) > 0)
            {
                step.SolveAllObjectives();
                if (step.CheckFinished())
                {
                    LegacyLogic.Instance.WorldManager.QuestHandler.FinalizeStep(step);
                }
                step = GetStep(31);
                step.SolveAllObjectives();
                if (step.CheckFinished())
                {
                    LegacyLogic.Instance.WorldManager.QuestHandler.FinalizeStep(step);
                }
                party.TokenHandler.AddToken(760);
            }
        }
예제 #2
0
        public void RepairLorebookQuest()
        {
            QuestStep step = GetStep(91);

            if (step.QuestState == EQuestState.ACTIVE)
            {
                step.Repair();
                if (step.CheckFinished())
                {
                    FinalizeStep(step);
                }
            }
        }
예제 #3
0
        internal void StartDialog(Object sender, Int32 p_questID)
        {
            QuestStep step = GetStep(p_questID);

            if (step != null && step.QuestState == EQuestState.ACTIVE && step.StartDialog((Npc)sender))
            {
                LegacyLogic.Instance.EventManager.InvokeEvent(this, EEventType.QUESTLOG_CHANGED, new QuestChangedEventArgs(QuestChangedEventArgs.Type.COMPLETED_OBJECTIVE, step));
                if (step.CheckFinished())
                {
                    FinalizeStep(step);
                }
            }
        }
예제 #4
0
        public void Load(SaveGameData p_data)
        {
            m_quests.Clear();
            Int32 num = p_data.Get <Int32>("Count", 0);

            for (Int32 i = 0; i < num; i++)
            {
                SaveGameData saveGameData = p_data.Get <SaveGameData>("QuestStep" + i, null);
                if (saveGameData != null)
                {
                    QuestStep questStep = new QuestStep();
                    questStep.Load(saveGameData);
                    if (questStep.StaticData != null)
                    {
                        m_quests.Add(questStep);
                    }
                }
            }
            AddDLCQuest(109);
            AddDLCQuest(111);
            AddDLCQuest(112);
            AddDLCQuest(114);
            AddDLCQuest(115);
            AddDLCQuest(116);
            AddDLCQuest(117);
            AddDLCQuest(118);
            AddDLCQuest(119);
            AddDLCQuest(120);
            if (GetStep(110) == null)
            {
                QuestStepStaticData staticData = StaticDataHandler.GetStaticData <QuestStepStaticData>(EDataType.QUEST_STEPS, 110);
                QuestStep           questStep2 = new QuestStep(staticData);
                QuestStep           step       = GetStep(3);
                if (step.QuestState == EQuestState.ACTIVE)
                {
                    if (step.GetObjective(4).QuestState == EQuestState.SOLVED)
                    {
                        step.QuestState       = EQuestState.SOLVED;
                        questStep2.QuestState = EQuestState.ACTIVE;
                    }
                }
                else
                {
                    questStep2.QuestState = step.QuestState;
                }
                questStep2.GetObjective(5).QuestState = step.GetObjective(5).QuestState;
                questStep2.GetObjective(6).QuestState = step.GetObjective(6).QuestState;
                questStep2.GetObjective(7).QuestState = step.GetObjective(7).QuestState;
                step.RemoveObjective(5);
                step.RemoveObjective(6);
                step.RemoveObjective(7);
                step.StaticData.UpdateFollowupStep(110);
                m_quests.Add(questStep2);
            }
            QuestStep step2 = GetStep(100);

            if (step2 != null)
            {
                QuestObjectiveStaticData staticData2 = StaticDataHandler.GetStaticData <QuestObjectiveStaticData>(EDataType.QUEST_OBJECTIVES, 167);
                QuestObjective           objective   = step2.GetObjective(167);
                objective.StaticData.SetMainObjective(staticData2.IsMainObjective);
                objective.StaticData.SetNpcID(staticData2.NpcID);
                objective.StaticData.SetTokenID(staticData2.TokenID);
            }
            step2 = GetStep(63);
            if (step2.QuestState == EQuestState.ACTIVE)
            {
                step2.Repair();
                if (step2.CheckFinished())
                {
                    FinalizeStep(step2);
                }
            }
        }