Exemple #1
0
        private bool InitAllianceTechSkill(GM.DataCache.ConditionAlliance tbl)
        {
            if (tbl == null)
            {
                EB.Debug.LogError("InitAllianceTechSkill:tbl is null");
                return(false);
            }

            if (mTechSkillList == null)
            {
                mTechSkillList = new List <AllianceTechSkill>();
            }
            else
            {
                mTechSkillList.Clear();
            }
            for (int i = 0; i < tbl.TechSkillLength; i++)
            {
                AllianceTechSkill tpl = ParseAllianceTechSkill(tbl.GetTechSkill(i));
                if (tpl != null)
                {
                    List <AllianceTechSkillUpLevel> data = GetTechSkillUpLevelListById(tpl.skillid);
                    if (data != null)
                    {
                        tpl.levelinfo = data;
                    }
                    mTechSkillList.Add(tpl);
                }
            }
            return(true);
        }
Exemple #2
0
        private AllianceTechSkill ParseAllianceTechSkill(GM.DataCache.TechSkill obj)
        {
            if (obj == null)
            {
                return(null);
            }
            AllianceTechSkill tpl = new AllianceTechSkill();

            tpl.skillid          = obj.SkillId;
            tpl.charType         = obj.CharType;
            tpl.maxLevel         = obj.LevelLimit;
            tpl.addtionType      = obj.AdditionType;
            tpl.skillIcon        = obj.SkillIcon;
            tpl.skillName        = EB.Localizer.GetTableString(string.Format("ID_alliances_tech_skill_{0}_skill_name", obj.SkillId), obj.SkillName); //obj.SkillName;
            tpl.skilldesTemplate = EB.Localizer.GetTableString(string.Format("ID_alliances_tech_skill_{0}_skill_des", obj.SkillId), obj.SkillDes);
            return(tpl);
        }