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); }
public static LeaderBirthlandInfo InitBirthlandInfo(int landID) { LeaderBirthlandInfo info = new LeaderBirthlandInfo(); var meta = LeaderModule.GetLeaderBirthlandDataByKey(landID); if (meta == null) { DebugPlus.LogError("Init LeaderBirthlandInfo Fail ! landID=" + landID); return(null); } info.birthlandID = meta.LandID; info.landName = MultiLanguage.Instance.GetTextValue(meta.LandName); info.landDesc = MultiLanguage.Instance.GetTextValue(meta.LandDesc); info.landIconPath = meta.LandIconPath; info.landBGPath = meta.LandBGPath; return(info); }