Exemple #1
0
        public static void ProgressClass(Character character, SkysteelProgress skysteelProgress, bool CompleteBool = false)
        {
            int StageIndex = SkysteelInfo.StageListString.IndexOf(skysteelProgress.Name);
            int JobIndex   = SkysteelInfo.JobListString.IndexOf(skysteelProgress.Job);

            SkysteelJob tempJob = character.SkysteelModel.SkysteelJobList[JobIndex];

            if (skysteelProgress.Progress == SkysteelProgress.States.NA)
            {
                CompletePreviousStages(tempJob, StageIndex);
            }
            else if (skysteelProgress.Progress == SkysteelProgress.States.Completed)
            {
                InCompleteFollowingStages(tempJob, StageIndex);
                return;
            }
            if (skysteelProgress.Progress == SkysteelProgress.States.Initiated | CompleteBool)
            {
                skysteelProgress.Progress = SkysteelProgress.States.Completed;
            }
            else
            {
                IncompleteOtherJobs(character, StageIndex);
                switch (StageIndex)
                {
                default:
                    skysteelProgress.Progress = SkysteelProgress.States.Completed;
                    break;
                    //case 1:
                    //case 2:
                    //    skysteelProgress.Progress++;
                    //    break;
                }
            }
        }
Exemple #2
0
        public SkysteelJob(string name)
        {
            this.Name = name;

            BaseTool            = new SkysteelProgress("BaseTool", name);
            BasePlus1           = new SkysteelProgress("BasePlus1", name);
            Dragonsung          = new SkysteelProgress("Dragonsung", name);
            AugmentedDragonsung = new SkysteelProgress("AugmentedDragonsung", name);
            Skysung             = new SkysteelProgress("Skysung", name);
        }
Exemple #3
0
 private static void IncompleteOtherJobs(Character SelectedCharacter, int StageIndex)
 {
     foreach (SkysteelJob Job in SelectedCharacter.SkysteelModel.SkysteelJobList)
     {
         SkysteelProgress stage = Job.StageList[StageIndex];
         if (stage.Progress == SkysteelProgress.States.Initiated)
         {
             stage.Progress = SkysteelProgress.States.NA;
         }
     }
 }
Exemple #4
0
        public void CheckObject()
        {
            //This method is used to fix the situation where an existing character is loaded and a new stage was added since the character was initially created
            //Without checking and replacing the Progress lists and objects, the Progress object is null, regardless of the initiator being in the class constructor
            //  or in the field


            List <SkysteelProgress> tempList = new List <SkysteelProgress>();

            for (int stageIndex = 0; stageIndex < StageList.Count; stageIndex++)
            {
                SkysteelProgress SkysteelProgress = new SkysteelProgress();
                if (StageList[stageIndex] != null)
                {
                    SkysteelProgress = StageList[stageIndex];
                }
                if (SkysteelProgress.Name == null)
                {
                    SkysteelProgress tempProgress = new SkysteelProgress(SkysteelInfo.StageListString[stageIndex], name);

                    tempList.Add(tempProgress);

                    switch (stageIndex)
                    {
                    case 0:
                        BaseTool = tempProgress;
                        break;

                    case 1:
                        BasePlus1 = tempProgress;
                        break;

                    case 2:
                        Dragonsung = tempProgress;
                        break;

                    case 3:
                        AugmentedDragonsung = tempProgress;
                        break;

                    case 4:
                        Skysung = tempProgress;
                        break;
                    }
                }
                else
                {
                    tempList.Add(SkysteelProgress);
                }
            }
            StageList = tempList;
        }