public static void ProgressClass(Character character, HWProgress hwProgress, bool CompleteBool = false)
        {
            int StageIndex = HWInfo.StageListString.IndexOf(hwProgress.Name);
            int JobIndex   = HWInfo.JobListString.IndexOf(hwProgress.Job);

            HWJob tempJob = character.HWModel.HWJobList[JobIndex];

            if (hwProgress.Progress == HWProgress.States.NA)
            {
                CompletePreviousStages(tempJob, StageIndex);
            }
            else if (hwProgress.Progress == HWProgress.States.Completed)
            {
                InCompleteFollowingStages(tempJob, StageIndex);
                return;
            }
            if (hwProgress.Progress == HWProgress.States.Initiated | CompleteBool)
            {
                hwProgress.Progress = HWProgress.States.Completed;
            }
            else
            {
                IncompleteOtherJobs(character, StageIndex);
                switch (StageIndex)
                {
                default:
                    hwProgress.Progress = HWProgress.States.Completed;
                    break;
                    //case 1:
                    //case 2:
                    //    hwProgress.Progress++;
                    //    break;
                }
            }
        }
 private static void IncompleteOtherJobs(Character SelectedCharacter, int StageIndex)
 {
     foreach (HWJob Job in SelectedCharacter.HWModel.HWJobList)
     {
         HWProgress stage = Job.StageList[StageIndex];
         if (stage.Progress == HWProgress.States.Initiated)
         {
             stage.Progress = HWProgress.States.NA;
         }
     }
 }
Esempio n. 3
0
        public HWJob(string name)
        {
            this.name = name;

            Animated        = new HWProgress("Animated", Name);
            Awoken          = new HWProgress("Awoken", Name);
            Anima           = new HWProgress("Anima", Name);
            Hyperconductive = new HWProgress("Hyperconductive", Name);
            Reconditioned   = new HWProgress("Reconditioned", Name);
            Sharpened       = new HWProgress("Sharpened", Name);
            Complete        = new HWProgress("Complete", Name);
            Lux             = new HWProgress("Lux", Name);
        }
Esempio n. 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 <HWProgress> tempList = new List <HWProgress>();

            foreach (HWProgress skysteelProgress in StageList)
            {
                if (skysteelProgress == null)
                {
                    int stageIndex = StageList.IndexOf(skysteelProgress);

                    HWProgress tempProgress = new HWProgress(HWInfo.StageListString[stageIndex], name);

                    tempList.Add(tempProgress);

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

                    case 1:
                        Awoken = tempProgress;
                        break;

                    case 2:
                        Anima = tempProgress;
                        break;

                    case 3:
                        Hyperconductive = tempProgress;
                        break;

                    case 4:
                        Reconditioned = tempProgress;
                        break;

                    case 5:
                        Sharpened = tempProgress;
                        break;

                    case 6:
                        Complete = tempProgress;
                        break;

                    case 7:
                        Lux = tempProgress;
                        break;
                    }
                }
                else
                {
                    tempList.Add(skysteelProgress);
                }
            }

            StageList = tempList;
        }