Пример #1
0
 public QuestObjective(Int32 staticID, Int32 count)
 {
     m_staticData            = StaticDataHandler.GetStaticData <QuestObjectiveStaticData>(EDataType.QUEST_OBJECTIVES, staticID);
     m_currentCounter        = 0;
     m_maxCounter            = count;
     m_questState            = EQuestState.INACTIVE;
     m_activationTime        = default(MMTime);
     m_currentStepsOnTerrain = 0;
 }
Пример #2
0
        public List <QuestStep> GetStepsByState(EQuestState p_state)
        {
            List <QuestStep> list = new List <QuestStep>();

            foreach (QuestStep questStep in m_quests)
            {
                if (questStep.QuestState == p_state)
                {
                    list.Add(questStep);
                }
            }
            return(list);
        }
Пример #3
0
        public void DeserializeStateObject(SaveState state)
        {
            // NOTE: There's a flaw in their serialization code. RewindCounter will occasionally have invalid values (non-0/1) which breaks
            // some type checking assumptions. Fields are also out of order. I guess this has to be done manually now.
            int unusedTypeIndex = state.ReadVariableLengthInt();

            QuestResourceUUID = state.ReadIndexedGUID();
            State             = (EQuestState)state.Reader.ReadInt32();
            Tracked           = state.Reader.ReadBooleanStrict();
            TrackingEnabled   = state.Reader.ReadBooleanStrict();
            StartTime         = state.ReadVariableLengthInt();
            LastProgressTime  = state.ReadVariableLengthInt();
            RunState          = (EQuestRunState)state.Reader.ReadSByte();
            RewindCounter     = state.Reader.ReadByte() > 0;//RewindCounter = state.Reader.ReadBooleanStrict();
            Version           = state.ReadVariableLengthInt();
        }
Пример #4
0
 public QuestStep(QuestStepStaticData p_data) : this()
 {
     if (p_data == null)
     {
         throw new ArgumentNullException("p_data");
     }
     m_staticData = p_data;
     m_questState = EQuestState.INACTIVE;
     String[] array = m_staticData.Objectives.Split(new Char[]
     {
         ','
     });
     for (Int32 i = 0; i < array.Length; i += 2)
     {
         QuestObjective item = new QuestObjective(Convert.ToInt32(array[i]), Convert.ToInt32(array[i + 1]));
         m_objectives.Add(item);
     }
 }