少年修仙传客户端代码仓库
client_Wu Xijin
2019-04-27 aafa7fb91e2f054cd0862f3efa44c227bd21e98b
6626 【2.0】【开发】查看玩家装备和查看玩家战力功能
4个文件已修改
46 ■■■■■ 已修改文件
System/Equip/EquipFightPower.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipSet.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RoleParticulars/OtherPlayerEquipModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RoleParticulars/OtherPlayerEquipWin.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipFightPower.cs
@@ -376,9 +376,9 @@
            }
            stars.Sort((int x, int y) => { return x.CompareTo(y); });
            var twoSuitLevel = stars.Count > 1 ? stars[1] : 0;
            var fiveSuitLevel = stars.Count > 4 ? stars[4] : 0;
            var eightSuitLevel = stars.Count > 7 ? stars[7] : 0;
            var twoSuitLevel = stars.Count > 1 ? stars[1] : -1;
            var fiveSuitLevel = stars.Count > 4 ? stars[4] : -1;
            var eightSuitLevel = stars.Count > 7 ? stars[7] : -1;
            CountSuitProperties(level, twoSuitLevel, fiveSuitLevel, eightSuitLevel, ref propertyContainer);
            Equation.Instance.Clear();
System/Equip/EquipSet.cs
@@ -82,6 +82,8 @@
        public EquipAppearance GetAppearance()
        {
            var appearance = new EquipAppearance();
            appearance.job = PlayerDatas.Instance.baseData.Job;
            var clothes = equipSlots[(int)RoleEquipType.Clothes].equip.value;
            if (string.IsNullOrEmpty(clothes))
            {
@@ -169,6 +171,7 @@
    public struct EquipAppearance
    {
        public int job;
        public int clothes;
        public int weapon;
        public int secondary;
System/RoleParticulars/OtherPlayerEquipModel.cs
@@ -151,6 +151,7 @@
                var suitLevels = equipDetailsGroup.GetSuitLevels();
                var appearance = new EquipAppearance()
                {
                    job = playerJob,
                    clothes = equips.ContainsKey((int)RoleEquipType.Clothes) ? equips[(int)RoleEquipType.Clothes].itemId : 0,
                    weapon = equips.ContainsKey((int)RoleEquipType.Weapon) ? equips[(int)RoleEquipType.Weapon].itemId : 0,
                    secondary = equips.ContainsKey((int)RoleEquipType.Weapon2) ? equips[(int)RoleEquipType.Weapon2].itemId : 0,
@@ -227,6 +228,7 @@
        public void Clear()
        {
            selectedLevel = 0;
            equipDetailsGroups.Clear();
        }
@@ -380,9 +382,9 @@
                stars.Sort((int x, int y) => { return x.CompareTo(y); });
                var twoSuitLevel = stars.Count > 1 ? stars[1] : 0;
                var fiveSuitLevel = stars.Count > 4 ? stars[4] : 0;
                var eightSuitLevel = stars.Count > 7 ? stars[7] : 0;
                var twoSuitLevel = stars.Count > 1 ? stars[1] : -1;
                var fiveSuitLevel = stars.Count > 4 ? stars[4] : -1;
                var eightSuitLevel = stars.Count > 7 ? stars[7] : -1;
                return new Dictionary<EquipSuitType, int>() {
                    { EquipSuitType.TwoSuit, twoSuitLevel },
System/RoleParticulars/OtherPlayerEquipWin.cs
@@ -14,6 +14,7 @@
    public class OtherPlayerEquipWin : Window
    {
        [SerializeField] RectTransform m_Content;
        [SerializeField] Button m_Close;
        [SerializeField] CyclicScroll m_EquipLevelScroll;
        [SerializeField] EquipSlots m_EquipSlots;
@@ -24,6 +25,7 @@
        OtherPlayerEquipModel model { get { return ModelCenter.Instance.GetModel<OtherPlayerEquipModel>(); } }
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
        bool resetRoleRotation = false;
        #region Built-in
        protected override void BindController()
        {
@@ -36,11 +38,13 @@
        protected override void OnPreOpen()
        {
            resetRoleRotation = true;
            m_Content.gameObject.SetActive(false);
            model.selectedLevelChangeEvent += OnSelectedLevelChange;
        }
        protected override void OnAfterOpen()
        {
            model.selectedLevelChangeEvent += OnSelectedLevelChange;
        }
        protected override void OnPreClose()
@@ -56,19 +60,24 @@
        {
            base.OnActived();
            DisplayEquipLevels();
            DisplayEquips();
            DisplayFightPoint();
            DisplayAppearance(true);
            DisplaySuitInfo();
            if (model.selectedLevel != 0)
            {
                m_Content.gameObject.SetActive(true);
                DisplayEquips();
                DisplayFightPoint();
                DisplayAppearance();
                DisplaySuitInfo();
            }
        }
        #endregion
        private void OnSelectedLevelChange()
        {
            m_Content.gameObject.SetActive(true);
            DisplayEquips();
            DisplayFightPoint();
            DisplayAppearance(false);
            DisplayAppearance();
            DisplaySuitInfo();
        }
@@ -106,17 +115,19 @@
            m_FightPoint.text = model.GetFightPoint().ToString();
        }
        private void DisplayAppearance(bool resetRotation)
        private void DisplayAppearance()
        {
            var appearance = model.GetEquipAppearance();
            UI3DModelExhibition.Instance.ShowPlayer(m_Role, new UI3DPlayerExhibitionData()
            {
                job = PlayerDatas.Instance.baseData.Job,
                job = appearance.job,
                clothesId = appearance.clothes,
                weaponId = appearance.weapon,
                secondaryId = appearance.secondary,
                keepRotation = !resetRotation,
                keepRotation = resetRoleRotation,
            });
            resetRoleRotation = false;
        }
        private void DisplaySuitInfo()