Esempio n. 1
0
        public static LeaderInfo CreateLeaderInfo_Preset(int leaderID)
        {
            LeaderInfo info = new LeaderInfo();
            var        meta = LeaderModule.GetLeaderPresetDataByKey(leaderID);

            if (meta == null)
            {
                DebugPlus.LogError("CreateLeaderInfo_Preset Fail! leaderID=" + leaderID);
                return(null);
            }
            info.leaderID   = meta.LeaderID;
            info.leaderName = MultiLanguage.Instance.GetTextValue(meta.LeaderName);
            info.leaderDesc = MultiLanguage.Instance.GetTextValue(meta.LeaderDesc);
            info.currentAge = meta.Age;
            info.Gender     = (byte)meta.Gender;

            info.speciesInfo       = LeaderSpeciesInfo.InitSpeciesInfo(meta.SpeciesID);
            info.creedInfo         = LeaderCreedInfo.InitCreedInfo(meta.CreedID);
            info.skillInfoList     = LeaderModule.GetLeaderSkillInfoDefault(leaderID);
            info.attributeInfoList = LeaderModule.GetLeaderAttributePreset(leaderID);
            info.birthlandInfo     = LeaderBirthlandInfo.InitBirthlandInfo(meta.BirthlandID);
            info.storyInfoList     = LeaderModule.GetLeaderPresetStory(leaderID);

            info.portraitInfo = LeaderPortraitInfo.Generate_PresetInfo(meta.Portrait_BG, meta.Portrait_Cloth, meta.Portrait_Ear, meta.Portrait_Hair, meta.Portrait_Eyes, meta.Portrait_Face, meta.Portrait_Mouth, meta.Portrait_Nose);

            return(info);
        }
Esempio n. 2
0
        public static List <LeaderSpeciesInfo> GetAllSpecies()
        {
            List <LeaderSpeciesInfo> result = new List <LeaderSpeciesInfo>();

            foreach (var item in leaderSpeciesDataDic.Keys)
            {
                LeaderSpeciesInfo info = LeaderSpeciesInfo.InitSpeciesInfo(item);
                if (info != null)
                {
                    result.Add(info);
                }
            }
            return(result);
        }
Esempio n. 3
0
        public static LeaderSpeciesInfo InitSpeciesInfo(int speciesID)
        {
            LeaderSpeciesInfo info = new LeaderSpeciesInfo();
            var meta = LeaderModule.GetLeaderSpeciesDataByKey(speciesID);

            if (meta == null)
            {
                DebugPlus.LogError("Init LeaderSpeciesInfo Fail! speciesID=" + speciesID);
                return(null);
            }
            info.speciesID            = speciesID;
            info.speciesName          = MultiLanguage.Instance.GetTextValue(meta.SpeciesName);
            info.speciesDesc          = MultiLanguage.Instance.GetTextValue(meta.SpeciesDesc);
            info.Portrait_MaleGroup   = meta.Portrait_MaleGroup;
            info.Portrait_FemaleGroup = meta.Portrait_FemaleGroup;
            return(info);
        }