少年修仙传客户端代码仓库
client_Wu Xijin
2019-01-10 55d4f223c4926cb1957ee01e37dbe1fd9d6af13c
5729 【前端】【1.5】时装功能开发
7个文件已修改
210 ■■■■ 已修改文件
System/FairyAu/KingTempleWin.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/CreateRoleHeroShow.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/GodWeaponPreviewWin.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RoleParticulars/RoleParticularsWin.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DHeroSkillShow.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DModelExhibition.cs 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DShowHero.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/KingTempleWin.cs
@@ -215,11 +215,14 @@
                var data = new UI3DPlayerExhibitionData
                {
                    job = _leaderData.rolePropData.Job,
                    clothesId = fashionClothes > 0 ? fashionClothes : clothes,
                    fashionClothesId = fashionClothes,
                    fashionWeaponId = fashionWeapon,
                    fashionSecondaryId = fashionWeapon2,
                    clothesId =  clothes,
                    suitLevel = _suitEffect,
                    weaponId = fashionWeapon > 0 ? fashionWeapon : weapon,
                    weaponId =   weapon,
                    wingsId = wing,
                    secondaryId = fashionWeapon2 > 0 ? fashionWeapon2 : weapon2,
                    secondaryId =  weapon2,
                    godWeapons = godWeapons,
                    isDialogue = false,
                };
System/Login/CreateRoleHeroShow.cs
@@ -78,9 +78,9 @@
    {
        Dispose();
        var flashClothes = 0;
        var flashWeapon = 0;
        var flashSecondary = 0;
        var fashionClothes = 0;
        var fashionWeapon = 0;
        var fashionSecondary = 0;
        var clothesItemId = 0;
        var weaponItemId = 0;
        var wingsItemId = 0;
@@ -93,13 +93,13 @@
            switch ((RoleEquipType)equipInfo.ItemPlace)
            {
                case RoleEquipType.retFashionClothes:
                    flashClothes = (int)equipInfo.ItemID;
                    fashionClothes = (int)equipInfo.ItemID;
                    break;
                case RoleEquipType.retFashionWeapon:
                    flashWeapon = (int)equipInfo.ItemID;
                    fashionWeapon = (int)equipInfo.ItemID;
                    break;
                case RoleEquipType.retFashionWeapon2:
                    flashSecondary = (int)equipInfo.ItemID;
                    fashionSecondary = (int)equipInfo.ItemID;
                    break;
                case RoleEquipType.retWeapon:
                    weaponItemId = (int)equipInfo.ItemID;
@@ -128,11 +128,14 @@
        var data = new UI3DPlayerExhibitionData()
        {
            job = PlayerDatas.Instance.loginInfo.Job,
            clothesId = flashClothes > 0 ? flashClothes : clothesItemId,
            fashionClothesId = fashionClothes,
            clothesId = clothesItemId,
            suitLevel = suitLevel,
            weaponId = flashWeapon > 0 ? flashWeapon : weaponItemId,
            fashionWeaponId = fashionWeapon,
            weaponId = weaponItemId,
            wingsId = wingsItemId,
            secondaryId = flashSecondary > 0 ? flashSecondary : secondaryItemId,
            fashionSecondaryId = fashionSecondary,
            secondaryId = secondaryItemId,
            godWeapons = new Dictionary<int, int>() {
                    { 1,  (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
                    { 2,  (int)PlayerDatas.Instance.loginInfo.ExAttr16},
System/Role/GodWeaponPreviewWin.cs
@@ -33,8 +33,7 @@
        int selectStage = 1;
        public static int selectGodWeaponType = 1;
        MagicianModel model
        {
        MagicianModel model {
            get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
        }
@@ -278,11 +277,15 @@
            UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
            {
                job = job,
                clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId,
                fashionClothesId = fashionClothesId,
                fashionWeaponId = fashionWeaponId,
                fashionSecondaryId = fashionSecondaryId,
                clothesId = clothesId,
                suitLevel = _suitLevel,
                weaponId = fashionWeaponId > 0 ? fashionWeaponId : weaponId,
                weaponId = weaponId,
                wingsId = wingsId,
                secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId,
                secondaryId = secondaryId,
                isDialogue = false,
                godWeapons = dict
            };
System/RoleParticulars/RoleParticularsWin.cs
@@ -269,11 +269,14 @@
                var data = new UI3DPlayerExhibitionData
                {
                    job = viewPlayerData.rolePropData.Job,
                    clothesId = fashionClothes > 0 ? fashionClothes : clothes,
                    fashionClothesId = fashionClothes,
                    fashionWeaponId = fashionWeapon,
                    fashionSecondaryId = fashionWeapon2,
                    clothesId = clothes,
                    suitLevel = _suitLevel,
                    weaponId = fashionWeapon > 0 ? fashionWeapon : weapon,
                    weaponId = weapon,
                    wingsId = wing,
                    secondaryId = fashionWeapon2 > 0 ? fashionWeapon2 : weapon2,
                    secondaryId = weapon2,
                    godWeapons = godWeapons,
                    isDialogue = false,
                };
UI/Common/UI3DHeroSkillShow.cs
@@ -10,10 +10,8 @@
    public class UI3DHeroSkillShow : MonoBehaviour
    {
        static UI3DHeroSkillShow m_Instance = null;
        public static UI3DHeroSkillShow Instance
        {
            get
            {
        public static UI3DHeroSkillShow Instance {
            get {
                if (m_Instance == null)
                {
                    var gameObject = Instantiate(UILoader.LoadPrefab("UI3DHeroSkillShow"));
@@ -39,10 +37,8 @@
        PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        Transform m_HeroPoint;
        public Transform hero
        {
            get
            {
        public Transform hero {
            get {
                return m_HeroPoint;
            }
        }
@@ -57,10 +53,8 @@
        public Camera showCamera { get { return m_ShowCamera; } }
        public Transform MP_Name1
        {
            get
            {
        public Transform MP_Name1 {
            get {
                var mp_name = hero.GetChildTransformDeeply("A_Name2");
                if (!mp_name)
                {
@@ -70,10 +64,8 @@
            }
        }
        public Transform MP_Weapon
        {
            get
            {
        public Transform MP_Weapon {
            get {
                var mp_weapon = hero.GetChildTransformDeeply(WEAPON_NODE);
                if (mp_weapon != null)
                {
@@ -146,11 +138,14 @@
            UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
            {
                job = _job,
                clothesId = fashionClothesId > 0 ? fashionClothesId : _clothesId,
                fashionClothesId = fashionClothesId,
                clothesId = _clothesId,
                suitLevel = _suitLevel,
                weaponId = fashionWeaponId > 0 ? fashionWeaponId : _weaponId,
                fashionWeaponId = fashionWeaponId,
                weaponId = _weaponId,
                wingsId = _wingsId,
                secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : _secondaryId,
                fashionSecondaryId = fashionSecondaryId,
                secondaryId = _secondaryId,
                godWeapons = dict,
                isDialogue = false,
            };
@@ -270,7 +265,7 @@
                }
            }
        }
        IEnumerator Co_PlaySkill()
UI/Common/UI3DModelExhibition.cs
@@ -162,11 +162,14 @@
            var data = new UI3DPlayerExhibitionData
            {
                job = _job,
                clothesId = flashClothes > 0 ? flashClothes : clothesItemId,
                fashionClothesId = flashClothes,
                fashionWeaponId = flashWeapon,
                fashionSecondaryId = flashSecondary,
                clothesId = clothesItemId,
                suitLevel = suitLevel,
                weaponId = flashWeapon > 0 ? flashWeapon : weaponItemId,
                weaponId = weaponItemId,
                wingsId = wingsItemId,
                secondaryId = flashSecondary > 0 ? flashSecondary : secondaryItemId,
                secondaryId = secondaryItemId,
                isDialogue = false,
                godWeapons = new Dictionary<int, int>() {
                    { 1,  (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
@@ -180,20 +183,23 @@
        public void ShowPlayer(RawImage _rawImage, int _job, bool _isDialogue = false)
        {
            var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
            clothes = clothes ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
            var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
            var flashClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
            var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
            var flashClothesId = flashClothes == null ? 0 : flashClothes.itemInfo.ItemID;
            var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
            weapon = weapon ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
            var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
            var flashWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
            var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
            var flashWeaponId = flashWeapon == null ? 0 : flashWeapon.itemInfo.ItemID;
            var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
            var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
            var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
            secondary = secondary ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
            var flahsSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
            var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
            var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
            var flashSecondaryId = flahsSecondary == null ? 0 : flahsSecondary.itemInfo.ItemID;
            int suitLevel = 0;
            if (clothes != null)
@@ -215,6 +221,9 @@
            var data = new UI3DPlayerExhibitionData
            {
                job = _job,
                fashionClothesId = flashClothesId,
                fashionWeaponId = flashWeaponId,
                fashionSecondaryId = flashSecondaryId,
                clothesId = clothesId,
                suitLevel = suitLevel,
                weaponId = weaponId,
@@ -238,20 +247,26 @@
            var weaponId = 0;
            var wingsId = 0;
            var secondaryId = 0;
            var flashClothesId = 0;
            var flashWeaponId = 0;
            var flashSecondaryId = 0;
            ItemModel clothes = null;
            if (exceptEquip != RoleEquipType.retClothes)
            {
                clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
                clothes = clothes ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
                clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
                var flashClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
                clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
                flashClothesId = flashClothes == null ? 0 : flashClothes.itemInfo.ItemID;
            }
            if (exceptEquip != RoleEquipType.retWeapon)
            {
                var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
                weapon = weapon ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
                var flashWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
                var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
                weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
                flashWeaponId = flashWeapon == null ? 0 : flashWeapon.itemInfo.ItemID;
            }
            if (exceptEquip != RoleEquipType.retWing)
@@ -262,9 +277,10 @@
            if (exceptEquip != RoleEquipType.retWeapon2)
            {
                var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
                secondary = secondary ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
                var flashSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
                var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
                secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
                flashSecondaryId = secondary == null ? 0 : flashSecondary.itemInfo.ItemID;
            }
            var suitLevel = 0;
@@ -292,6 +308,9 @@
                weaponId = weaponId,
                wingsId = wingsId,
                secondaryId = secondaryId,
                fashionClothesId = flashClothesId,
                fashionWeaponId = flashWeaponId,
                fashionSecondaryId = flashSecondaryId,
                isDialogue = false,
                godWeapons = new Dictionary<int, int>() {
                    { 1, godWeapon1==null?0:godWeapon1.level },
@@ -895,6 +914,9 @@
        public int weaponId;
        public int wingsId;
        public int secondaryId;
        public int fashionClothesId;
        public int fashionWeaponId;
        public int fashionSecondaryId;
        public bool isDialogue;
        public Dictionary<int, int> godWeapons;
    }
UI/Common/UI3DShowHero.cs
@@ -16,12 +16,15 @@
        int clothesId;
        int wingsId;
        int secondaryId;
        int extraSecondaryId;
        int job;
        GameObject weaponModel;
        GameObject clothesModel;
        GameObject wingsModel;
        GameObject secondaryModel;
        GameObject extraSecondaryModel;
        Animator wingsAnimator;
        Animator clothesAnimator;
        RuntimeAnimatorController cacheClothedAC;
@@ -34,11 +37,11 @@
            this.showPoint = showPoint;
            this.job = data.job;
            var clothes = data.clothesId;
            var clothes = data.fashionClothesId > 0 ? data.fashionClothesId : data.clothesId;
            var suitID = data.suitLevel;
            var weaponId = data.weaponId;
            var weaponId = data.fashionWeaponId > 0 ? data.fashionWeaponId : data.weaponId;
            var wingsId = data.wingsId;
            var secondaryId = data.secondaryId;
            var secondaryId = data.fashionSecondaryId > 0 ? data.fashionSecondaryId : data.secondaryId;
            var godWeapons = data.godWeapons;
            var jobConfig = Config.Instance.Get<JobSetupConfig>(job);
@@ -84,7 +87,10 @@
                var item = Config.Instance.Get<ItemConfig>(secondaryId);
                secondaryResId = item == null ? jobConfig.BaseEquip[2] : item.ChangeOrd;
            }
            PutOnSecondary(job, secondaryResId);
            var extraSecondaryId = (data.job == 1 && data.fashionSecondaryId > 0) ? this.clothesId + 2900 : 0;
            PutOnExtraSecondary(job, extraSecondaryId);
            var wingsResId = 0;
            if (wingsId != 0)
@@ -92,6 +98,7 @@
                var item = Config.Instance.Get<ItemConfig>(wingsId);
                wingsResId = item == null ? 0 : item.ChangeOrd;
            }
            PutOnWing(wingsResId);
            PutOnGodWeaponEffect(godWeapons);
@@ -141,6 +148,21 @@
                    pool.Release(secondaryModel);
                }
                secondaryModel = null;
            }
            if (extraSecondaryId != 0)
            {
                prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
                if (prefab)
                {
                    if (extraSecondaryModel)
                    {
                        extraSecondaryModel.SetActive(true);
                    }
                    pool = GameObjectPoolManager.Instance.RequestPool(prefab);
                    pool.Release(extraSecondaryModel);
                }
                extraSecondaryModel = null;
            }
            if (wingsId != 0)
@@ -193,6 +215,7 @@
            weaponId = 0;
            wingsId = 0;
            secondaryId = 0;
            extraSecondaryId = 0;
            TakeOffGodWeaponEffect();
        }
@@ -389,6 +412,48 @@
            weaponId = resoureceId;
        }
        private void PutOnExtraSecondary(int job, int extraSecondaryId)
        {
            var oldSecondary = extraSecondaryId;
            if (oldSecondary == extraSecondaryId)
            {
                return;
            }
            GameObject prefab = null;
            GameObjectPoolManager.GameObjectPool pool = null;
            if (oldSecondary != 0)
            {
                prefab = InstanceResourcesLoader.LoadModelRes(oldSecondary);
                pool = GameObjectPoolManager.Instance.RequestPool(prefab);
                pool.Release(extraSecondaryModel);
                extraSecondaryModel = null;
            }
            if (extraSecondaryId != 0)
            {
                prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
                if (!prefab)
                {
                    var config = Config.Instance.Get<JobSetupConfig>(job);
                    extraSecondaryId = config.BaseEquip[2];
                    prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
                }
                if (prefab)
                {
                    pool = GameObjectPoolManager.Instance.RequestPool(prefab);
                    secondaryModel = pool.Request();
                    var parent = this.clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[this.job - 1]);
                    secondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
                }
            }
            this.extraSecondaryId = extraSecondaryId;
        }
        private void PutOnSecondary(int _job, int secondaryResId)
        {
            var oldSecondary = secondaryId;