少年修仙传客户端代码仓库
client_linchunjie
2019-01-11 9677d292086c2f99d33230208b5ba173344a8a19
5649 【1.5】【前端】神兵界面优化
4个文件已修改
55 ■■■■■ 已修改文件
System/Role/GodWeaponSkillBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/MagicianModel.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/SkillBehaviour.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/FunctionUnlockFlyObject.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/GodWeaponSkillBehaviour.cs
@@ -54,7 +54,7 @@
            m_Effect.StopImediatly();
            if (config != null)
            {
                m_SkillIcon.SetSprite(config.icon);
                m_SkillIcon.SetSprite(model.GetEffectSkillIcon(config.type, config.level));
                var weaponInfo = model.GetGodWeaponInfo(config.type);
                bool active = weaponInfo != null && weaponInfo.level >= config.level;
                m_SkillCondition.gameObject.SetActive(!active);
System/Role/MagicianModel.cs
@@ -94,6 +94,7 @@
            new Dictionary<int, List<GodWeaponEffectProperty>>();
        Dictionary<int, Dictionary<int, int>> effectFightPower = new Dictionary<int, Dictionary<int, int>>();
        Dictionary<int, int> godWeaponEffectEquipDict = new Dictionary<int, int>();
        Dictionary<int, List<GodWeaponEffectInfo>> godWeaponEffectInfos = new Dictionary<int, List<GodWeaponEffectInfo>>();
        int[] autoHammerExpArea { get; set; }
        int[] autoHammerCount { get; set; }
@@ -262,6 +263,25 @@
                {
                    godWeaponEffectTypes.Add(config.type);
                }
                List<GodWeaponEffectInfo> effectInfos;
                if (!godWeaponEffectInfos.TryGetValue(config.type, out effectInfos))
                {
                    effectInfos = new List<GodWeaponEffectInfo>();
                    godWeaponEffectInfos.Add(config.type, effectInfos);
                }
                Dictionary<int, string> skillIconDict = new Dictionary<int, string>();
                var iconJson = LitJson.JsonMapper.ToObject(config.icon);
                foreach (var key in iconJson.Keys)
                {
                    var job = int.Parse(key);
                    skillIconDict.Add(job, iconJson[key].ToString());
                }
                effectInfos.Add(new GodWeaponEffectInfo()
                {
                    level = config.level,
                    skillIconDict = skillIconDict,
                });
            }
            funcConfig = Config.Instance.Get<FuncConfigConfig>("MagicExterior");
@@ -829,6 +849,27 @@
            return displaySkillLevels;
        }
        public string GetEffectSkillIcon(int type, int level)
        {
            var job = PlayerDatas.Instance.baseData.Job;
            if (godWeaponEffectInfos.ContainsKey(type))
            {
                var list = godWeaponEffectInfos[type];
                var index = list.FindIndex((x) =>
                 {
                     return x.level == level;
                 });
                if (index != -1)
                {
                    if (list[index].skillIconDict.ContainsKey(job))
                    {
                        return list[index].skillIconDict[job];
                    }
                }
            }
            return string.Empty;
        }
        void CheckGodWeaponEffectOn()
        {
            var value = PlayerDatas.Instance.baseData.equipShowSwitch;
@@ -894,5 +935,11 @@
        public int level;
        public Dictionary<int, int> propertyDict;
    }
    public struct GodWeaponEffectInfo
    {
        public int level;
        public Dictionary<int, string> skillIconDict;
    }
}
System/Skill/SkillBehaviour.cs
@@ -40,7 +40,8 @@
        public void DisplayGodWeaponEffect(GodWeaponEffectConfig config)
        {
            godWeaponEffectConfig = config;
            m_SkillIcon.SetSprite(config.icon);
            var _model = ModelCenter.Instance.GetModel<MagicianModel>();
            m_SkillIcon.SetSprite(_model.GetEffectSkillIcon(config.type, config.level));
            if (m_SkillName != null)
            {
                m_SkillName.text = config.skillName;
System/Treasure/FunctionUnlockFlyObject.cs
@@ -110,7 +110,8 @@
        {
            m_UnLockType = FunctionUnlockType.GodWeaponEffect;
            m_Id = config.level;
            m_FunctionIcon.SetSprite(config.icon);
            var _model = ModelCenter.Instance.GetModel<MagicianModel>();
            m_FunctionIcon.SetSprite(_model.GetEffectSkillIcon(config.type, config.level));
            originalScale = 1f;
            this.transform.localScale = Vector3.one * originalScale;