public void InitSlotSkills(InstituteSkillData headSkill)
        {
            if (dataManager == null)
            {
                dataManager = DataManager.GetInstance();
            }

            this.nextInstituteSkill = headSkill;

            DebugUtils.Log(DebugUtils.Type.InstitutesSkill, "InitSlotSkills thisInstituteSkill ID is " + this.nextInstituteSkill.skillID);

            List <InstituteSkillProto.InstituteSkill> protoSkills = dataManager.instituteSkillProtoData;

            slotInstituteSkills.Add(headSkill);

            int nextSkillID = headSkill.nextSkillID;

            while (nextSkillID != 0)
            {
                for (int i = 0; i < protoSkills.Count; i++)
                {
                    if (protoSkills[i].ID == nextSkillID)
                    {
                        InstituteSkillData tempSkill = new InstituteSkillData();
                        tempSkill.SetSkillData(protoSkills[i].ID, protoSkills[i].Level, protoSkills[i].RequiredLevel, protoSkills[i].IconID,
                                               protoSkills[i].Txt_ID, protoSkills[i].Description_Id, protoSkills[i].Cost, protoSkills[i].BuffId, protoSkills[i].NextSkill);
                        slotInstituteSkills.Add(tempSkill);
                        nextSkillID = protoSkills[i].NextSkill;
                        break;
                    }
                }
            }

            skillMaxLv = slotInstituteSkills.Count;
        }
Beispiel #2
0
        //Init institute seted all skill and skills all Level data.
        public void InitInstituteSkillsData()
        {
            DebugUtils.Log(DebugUtils.Type.InstitutesSkill, "InitInstituteSkills");

            instituteHeadSkills = new List <InstituteSkillData>();
            List <int> playerInstituteSkills = datamanager.GetPlayerSetedPackageInstituteSkills(datamanager.GetBattleConfigInsituteSkillIndex(datamanager.GetBattleType()));
            List <InstituteSkillProto> protoInstituteSkills = datamanager.instituteSkillProtoData;

            for (int i = 0; i < playerInstituteSkills.Count; i++)
            {
                for (int j = 0; j < protoInstituteSkills.Count; j++)
                {
                    if (protoInstituteSkills[j].ID == playerInstituteSkills[i])
                    {
                        InstituteSkillData tempSkill = new InstituteSkillData();
                        tempSkill.SetSkillData(protoInstituteSkills[j].ID, protoInstituteSkills[j].Level, protoInstituteSkills[j].RequiredLevel, protoInstituteSkills[j].IconID,
                                               protoInstituteSkills[j].Txt_ID, protoInstituteSkills[j].Description_Id, protoInstituteSkills[j].Cost, protoInstituteSkills[j].BuffId, protoInstituteSkills[j].NextSkill);
                        instituteHeadSkills.Add(tempSkill);
                        break;
                    }
                }
            }
        }