少年修仙传客户端代码仓库
client_linchunjie
2019-03-14 7859ac0daa7c8f0cbe9d2ebfd8f0e91a09f05cfc
6340  【前端】【2.0】境界改版开发单
5个文件已修改
50 ■■■■ 已修改文件
Core/GameEngine/Model/Config/RealmConfig.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmEquipPreviewWin.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmLevelUpBehaviour.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmConfig.cs
@@ -25,7 +25,7 @@
    public readonly int Quality;
    public readonly int FightPower;
    public readonly string equipNameIcon;
    public readonly int[] equips;
    public readonly string equips;
    public readonly int effectId;
    public readonly int requireIconEffect;
@@ -73,12 +73,7 @@
            equipNameIcon = tables[11];
            string[] equipsStringArray = tables[12].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
            equips = new int[equipsStringArray.Length];
            for (int i=0;i<equipsStringArray.Length;i++)
            {
                 int.TryParse(equipsStringArray[i],out equips[i]);
            }
            equips = tables[12];
            int.TryParse(tables[13],out effectId); 
Core/GameEngine/Model/Config/RealmConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: d49ca04ff4a91bc4fb645c417f9ef0b3
timeCreated: 1552547353
timeCreated: 1552548022
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Realm/RealmEquipPreviewWin.cs
@@ -19,6 +19,8 @@
        [SerializeField] Button m_Close;
        public static int selectRealmLevel = 0;
        RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
        #region Built-in
        protected override void BindController()
        {
@@ -53,13 +55,17 @@
            var config = RealmConfig.Get(selectRealmLevel);
            m_EquipName.SetSprite(config.equipNameIcon);
            var job = PlayerDatas.Instance.baseData.Job;
            int[] equips = null;
            model.TryGetRealmPreviewEquips(selectRealmLevel, job, out equips);
            UI3DModelExhibition.Instance.ShowPlayer(m_RawPlayer, new UI3DPlayerExhibitionData()
            {
                job = job,
                clothesId = config.equips != null && config.equips.Length > 0 ? config.equips[0] : 0,
                weaponId = config.equips != null && config.equips.Length > 1 ? config.equips[1] : 0,
                secondaryId = config.equips != null && config.equips.Length > 2 ? config.equips[2] : 0,
                clothesId = equips != null && equips.Length > 0 ? equips[0] : 0,
                weaponId = equips != null && equips.Length > 1 ? equips[1] : 0,
                secondaryId = equips != null && equips.Length > 2 ? equips[2] : 0,
                suitLevel = 1,
            });
        }
System/Realm/RealmLevelUpBehaviour.cs
@@ -142,7 +142,8 @@
        public void DisplayBoss(int realmLevel)
        {
            var config = RealmConfig.Get(realmLevel);
            m_Condition.text = Language.Get("RealmConditionBoss", config.Name);
            var label = UIHelper.GetRealmColorByLv(realmLevel, StringUtility.Contact("[", config.Name, "]"));
            m_Condition.text = Language.Get("RealmConditionBoss", label);
            var progress = model.isBossPass ? 1 : 0;
            m_Progress.text = StringUtility.Contact(progress, "/", 1);
            m_Progress.color = model.isBossPass ? UIHelper.s_LightGreen : UIHelper.s_DarkRedColor;
System/Realm/RealmModel.cs
@@ -11,6 +11,7 @@
    public class RealmModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize
    {
        Dictionary<int, Dictionary<int, int>> m_RealmProperties = new Dictionary<int, Dictionary<int, int>>();
        Dictionary<int, Dictionary<int, int[]>> m_RealmPreviewEquips = new Dictionary<int, Dictionary<int, int[]>>();
        List<List<int>> m_RealmStages = new List<List<int>>();
        public int realmMaxLevel { get; private set; }
        public bool isBossPass { get; private set; }
@@ -98,6 +99,19 @@
                        stages.Add(config.Lv + 1);
                    }
                }
                if (!string.IsNullOrEmpty(config.equips))
                {
                    var json = LitJson.JsonMapper.ToObject(config.equips);
                    Dictionary<int, int[]> dict = new Dictionary<int, int[]>();
                    foreach (var jobKey in json.Keys)
                    {
                        var job = int.Parse(jobKey);
                        var equipArray = LitJson.JsonMapper.ToObject<int[]>(json[jobKey].ToJson());
                        dict.Add(job, equipArray);
                    }
                    m_RealmPreviewEquips.Add(config.Lv, dict);
                }
            }
        }
@@ -117,6 +131,16 @@
            return false;
        }
        public bool TryGetRealmPreviewEquips(int level, int job, out int[] equips)
        {
            equips = null;
            if (m_RealmPreviewEquips.ContainsKey(level))
            {
                return m_RealmPreviewEquips[level].TryGetValue(job, out equips);
            }
            return false;
        }
        public bool IsUnlockEquipRealm(int realmLevel, out int level)
        {
            level = 0;