Beispiel #1
0
        public static string[] GetTaskDescription(MHSTaskType taskType)
        {
            string[] description = new string[] { };

            switch (taskType)
            {
            case MHSTaskType.Damage5PercentOfTotal: description = new string[] { "Deal over 5% of total damage" }; break;

            case MHSTaskType.Damage33PercentOfTotal: description = new string[] { "Deal over 33% of total damage" }; break;

            case MHSTaskType.Damage66PercentOfTotal: description = new string[] { "Deal over 66% of total damage" }; break;

            case MHSTaskType.Damage95PercentOfTotal: description = new string[] { "Deal over 95% of total damage" }; break;

            case MHSTaskType.Damage5PercentOfTotalNoPoisonOrCreatureDamage: description = new string[] { "Deal over 5% of total damage", "without poison or creature help" }; break;

            case MHSTaskType.Damage33PercentOfTotalNoPoisonOrCreatureDamage: description = new string[] { "Deal over 33% of total damage", "without poison or creature help" }; break;

            case MHSTaskType.Damage66PercentOfTotalNoPoisonOrCreatureDamage: description = new string[] { "Deal over 66% of total damage", "without poison or creature help" }; break;

            case MHSTaskType.Damage95PercentOfTotalNoPoisonOrCreatureDamage: description = new string[] { "Deal over 95% of total damage", "without poison or creature help" }; break;
            }

            return(description);
        }
Beispiel #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            //Version 0
            if (version >= 0)
            {
                m_PlayerMobile = (PlayerMobile)reader.ReadMobile();

                m_GrimoirePage       = (GrimoirePage)reader.ReadInt();
                m_BossPageNumber     = reader.ReadInt();
                m_ChampionPageNumber = reader.ReadInt();
                m_LoHBossPageNumber  = reader.ReadInt();
                m_RarePageNumber     = reader.ReadInt();
                m_ParagonPageNumber  = reader.ReadInt();

                m_TotalPointsEarned = reader.ReadInt();
                m_AvailablePoints   = reader.ReadInt();

                int creatureEntriesCount = reader.ReadInt();
                for (int a = 0; a < creatureEntriesCount; a++)
                {
                    Type         creatureType = Type.GetType(reader.ReadString());
                    MHSGroupType groupType    = (MHSGroupType)reader.ReadInt();
                    int          timesKilled  = reader.ReadInt();
                    DateTime     lastKilled   = reader.ReadDateTime();

                    MHSCreaturePlayerEntry creaturePlayerEntry = new MHSCreaturePlayerEntry(creatureType, groupType);
                    creaturePlayerEntry.m_TimesKilled = timesKilled;
                    creaturePlayerEntry.m_LastKilled  = lastKilled;

                    int taskCount = reader.ReadInt();
                    for (int b = 0; b < taskCount; b++)
                    {
                        MHSTaskType taskType       = (MHSTaskType)reader.ReadInt();
                        int         timesCompleted = reader.ReadInt();
                        DateTime    lastCompleted  = reader.ReadDateTime();

                        MHSCreatureTaskPlayerEntry taskEntry = new MHSCreatureTaskPlayerEntry(taskType);
                        taskEntry.m_TimesCompleted    = timesCompleted;
                        taskEntry.m_LastTimeCompleted = lastCompleted;

                        creaturePlayerEntry.m_Tasks.Add(taskEntry);
                    }

                    m_CreatureEntries.Add(creaturePlayerEntry);
                }
            }

            //---------

            MHSPersistance.m_PlayerEntries.Add(this);
        }
Beispiel #3
0
 public MHSCreatureTaskPlayerEntry(MHSTaskType taskType)
 {
     m_TaskType = taskType;
 }
Beispiel #4
0
 public MHSCreatureTask(MHSTaskType taskType, bool repeatable, int pointsGranted)
 {
     m_TaskType      = taskType;
     m_Repeatable    = repeatable;
     m_PointsGranted = pointsGranted;
 }