少年修仙传客户端代码仓库
client_Zxw
2019-01-11 c8ced8fe339d392efbc84c10566b539dc5358083
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
3个文件已修改
284 ■■■■■ 已修改文件
System/FairyAu/FairyFeastTransmitShow.cs 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmBossShow.cs 190 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DShowHero.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyFeastTransmitShow.cs
@@ -219,11 +219,11 @@
            var data = new UI3DPlayerExhibitionData
            {
                job = PlayerDatas.Instance.baseData.Job,
                clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId,
                suitLevel = 0,
                weaponId = 0,
                clothesId = clothesId,
                wingsId = wingsId,
                secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId,
                secondaryId = secondaryId,
                fashionClothesId = fashionClothesId,
                fashionSecondaryId = fashionSecondaryId,
                isDialogue = false,
                godWeapons = null
            };
@@ -245,10 +245,11 @@
                {
                    clothesId = itemData.ItemID;
                }
                fashionClothesId = 0;
                itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionClothes);
                if (itemData != null)
                {
                    clothesId = itemData.ItemID;
                    fashionClothesId = itemData.ItemID;
                }
                wingsId = 0;
                itemData = roleParticularModel.GetItemData(RoleEquipType.retWing);
@@ -262,22 +263,21 @@
                {
                    secondaryId = itemData.ItemID;
                }
                fashionSecondaryId = 0;
                itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionWeapon2);
                if (itemData != null)
                {
                    secondaryId = itemData.ItemID;
                    fashionSecondaryId = itemData.ItemID;
                }
                data = new UI3DPlayerExhibitionData
                {
                    job = viewPlayerData.rolePropData.Job,
                    clothesId = clothesId,
                    suitLevel = 0,
                    weaponId = 0,
                    wingsId = wingsId,
                    secondaryId = secondaryId,
                    godWeapons = null,
                    isDialogue = false,
                    fashionClothesId = fashionClothesId,
                    fashionSecondaryId = fashionSecondaryId,
                };
                if (m_Player != null)
@@ -334,6 +334,7 @@
            GameObject clothesModel;
            Animator clothesAnimator;
            GameObject secondaryModel;
            GameObject extraSecondaryModel;
            GameObject wingsModel;
            Animator wingsAnimator;
@@ -344,10 +345,9 @@
                this.showPoint = showPoint;
                this.job = data.job;
                var clothes = data.clothesId;
                var clothes = data.fashionClothesId > 0 ? data.fashionClothesId : data.clothesId;
                var wingsId = data.wingsId;
                var secondaryId = data.secondaryId;
                var godWeapons = data.godWeapons;
                var secondaryId = data.fashionSecondaryId > 0 ? data.fashionSecondaryId : data.secondaryId;
                var jobConfig = Config.Instance.Get<JobSetupConfig>(job);
@@ -367,13 +367,16 @@
                var secondaryResId = 0;
                if (secondaryId == 0)
                {
                    if (this.job == 1)
                    if (data.fashionClothesId <= 0)
                    {
                        secondaryResId = clothes + 2900;
                    }
                    else
                    {
                        secondaryResId = jobConfig.BaseEquip[2];
                        if (this.job == 1)
                        {
                            secondaryResId = clothes + 2900;
                        }
                        else
                        {
                            secondaryResId = jobConfig.BaseEquip[2];
                        }
                    }
                }
                else
@@ -382,6 +385,23 @@
                    secondaryResId = item == null ? jobConfig.BaseEquip[2] : item.ChangeOrd;
                }
                PutOnSecondary(secondaryResId);
                var extraSecondaryId = 0;
                if (data.job == 1 && data.fashionSecondaryId > 0 && data.fashionClothesId == 0)
                {
                    if (data.clothesId == 0)
                    {
                        extraSecondaryId = jobConfig.BaseEquip[0] + 2900;
                    }
                    else
                    {
                        var item = Config.Instance.Get<ItemConfig>(data.clothesId);
                        var defaultClothesResId = item == null ? jobConfig.BaseEquip[0] : item.ChangeOrd;
                        extraSecondaryId = defaultClothesResId + 2900;
                    }
                }
                PutOnExtraSecondary(job, extraSecondaryId);
                var wingsResId = 0;
                if (wingsId != 0)
@@ -463,6 +483,10 @@
            private void PutOnSecondary(int secondaryResId)
            {
                if (this.job == 2)
                {
                    return;
                }
                if (secondaryResId != 0)
                {
                    var prefab = InstanceResourcesLoader.LoadModelRes(secondaryResId);
@@ -479,6 +503,32 @@
                        secondaryModel.layer = LayerUtility.BossShow;
                        var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
                        secondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
                    }
                }
            }
            private void PutOnExtraSecondary(int job, int extraSecondaryId)
            {
                if (this.job == 2)
                {
                    return;
                }
                if (extraSecondaryId != 0)
                {
                    var prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
                    if (!prefab)
                    {
                        var config = Config.Instance.Get<JobSetupConfig>(job);
                        extraSecondaryId = config.BaseEquip[2];
                        prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
                    }
                    if (prefab)
                    {
                        extraSecondaryModel = GameObject.Instantiate(prefab);
                        extraSecondaryModel.layer = LayerUtility.BossShow;
                        var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
                        extraSecondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
                    }
                }
            }
@@ -552,6 +602,10 @@
                {
                    Destroy(secondaryModel);
                }
                if (extraSecondaryModel != null)
                {
                    Destroy(extraSecondaryModel);
                }
                if (wingsModel != null)
                {
                    Destroy(wingsModel);
System/Realm/RealmBossShow.cs
@@ -13,6 +13,7 @@
        GameObject clothesModel;
        GameObject secondaryModel;
        GameObject extraSecondaryModel;
        Animator clothesAnimator;
        Transform showPoint;
@@ -117,29 +118,18 @@
            var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
            var _clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
            var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
            var _weaponId = weapon == null ? 0 : (int)weapon.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.retWeapon2);
            var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
            var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
            var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
            var fashionWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
            var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
            var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
            var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
            #endregion
            showPoint = m_HeroStage;
            var _hero = ShowHero(_job, fashionClothesId > 0 ? fashionClothesId : _clothesId,
                fashionWeaponId > 0 ? fashionWeaponId : _weaponId, _wingsId,
                fashionSecondaryId > 0 ? fashionSecondaryId : _secondaryId);
            var _hero = ShowHero(_job, _clothesId, _secondaryId, fashionClothesId, fashionSecondaryId);
            if (_hero != null)
            {
                SitDown();
@@ -218,29 +208,62 @@
            }
        }
        GameObject ShowHero(int _job, int _clothes, int _weaponId, int _wingsId, int _secondaryId)
        GameObject ShowHero(int job, int clothesId, int secondaryId, int fashionClothesId, int fashionSecondaryId)
        {
            PutOnClothes(_job, _clothes);
            var jobConfig = Config.Instance.Get<JobSetupConfig>(_job);
            var secondaryResId = 0;
            if (_secondaryId == 0)
            clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId;
            secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId;
            var jobConfig = Config.Instance.Get<JobSetupConfig>(job);
            var clothesResId = 0;
            if (clothesId == 0)
            {
                if (_job == 1)
                clothesResId = jobConfig.BaseEquip[0];
            }
            else
            {
                var item = Config.Instance.Get<ItemConfig>(clothesId);
                clothesResId = item == null ? clothesResId = jobConfig.BaseEquip[0] : item.ChangeOrd;
            }
            PutOnClothes(job, clothesResId);
            var secondaryResId = 0;
            if (secondaryId == 0)
            {
                if (fashionClothesId <= 0)
                {
                    secondaryResId = _clothes + 2900;
                }
                else
                {
                    secondaryResId = jobConfig.BaseEquip[2];
                    if (job == 1)
                    {
                        secondaryResId = clothesId + 2900;
                    }
                    else
                    {
                        secondaryResId = jobConfig.BaseEquip[2];
                    }
                }
            }
            else
            {
                var item = Config.Instance.Get<ItemConfig>(_secondaryId);
                var item = Config.Instance.Get<ItemConfig>(secondaryId);
                secondaryResId = item == null ? jobConfig.BaseEquip[2] : item.ChangeOrd;
            }
            PutOnSecondary(_job, secondaryResId);
            PutOnSecondary(job, secondaryResId);
            var extraSecondaryId = 0;
            if (job == 1 && fashionSecondaryId > 0 && fashionClothesId == 0)
            {
                if (clothesId == 0)
                {
                    extraSecondaryId = jobConfig.BaseEquip[0] + 2900;
                }
                else
                {
                    var item = Config.Instance.Get<ItemConfig>(clothesId);
                    var defaultClothesResId = item == null ? jobConfig.BaseEquip[0] : item.ChangeOrd;
                    extraSecondaryId = defaultClothesResId + 2900;
                }
            }
            PutOnExtraSecondary(job, extraSecondaryId);
            return clothesModel;
        }
@@ -254,28 +277,16 @@
            }
        }
        public void PutOnClothes(int _job, int itemID)
        public void PutOnClothes(int _job, int clothesResId)
        {
            var newClothes = 0;
            var config = Config.Instance.Get<JobSetupConfig>(_job);
            if (itemID == 0)
            {
                newClothes = config.BaseEquip[0];
            }
            else
            {
                var item = Config.Instance.Get<ItemConfig>(itemID);
                newClothes = item == null ? newClothes = config.BaseEquip[0] : item.ChangeOrd;
            }
            var _prefab = InstanceResourcesLoader.LoadModelRes(newClothes,true);
            var _prefab = InstanceResourcesLoader.LoadModelRes(clothesResId, true);
            if (!_prefab)
            {
                newClothes = config.BaseEquip[0];
                clothesResId = config.BaseEquip[0];
            }
            LoadClothes(newClothes, _job);
            LoadClothes(clothesResId, _job);
        }
        private void PutOnSecondary(int _job, int secondaryResId)
@@ -306,9 +317,38 @@
            }
        }
        private void LoadClothes(int resID,int job)
        private void PutOnExtraSecondary(int job, int extraSecondaryId)
        {
            var prefab = InstanceResourcesLoader.LoadModelRes(resID,true);
            if (job == 2)
            {
                return;
            }
            if (extraSecondaryId != 0)
            {
                var prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
                if (!prefab)
                {
                    var config = Config.Instance.Get<JobSetupConfig>(job);
                    extraSecondaryId = config.BaseEquip[2];
                    prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
                }
                if (prefab)
                {
                    if (extraSecondaryModel == null)
                    {
                        extraSecondaryModel = Instantiate(prefab, Constants.Special_Hide_Position, Quaternion.identity);
                        var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
                        extraSecondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
                    }
                }
            }
        }
        private void LoadClothes(int resID, int job)
        {
            var prefab = InstanceResourcesLoader.LoadModelRes(resID, true);
            if (clothesModel == null)
            {
                clothesModel = Instantiate(prefab, Constants.Special_Hide_Position, Quaternion.identity);
@@ -320,7 +360,7 @@
            LayerUtility.SetLayer(clothesModel, LayerUtility.Player, false);
            var skinnedMeshRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>(true);
            var mat = MaterialLoader.LoadClothesMaterial(resID, false, IsSuit(job, resID));
            var mat = MaterialLoader.LoadClothesMaterial(resID, false, false);
            if (mat)
            {
                skinnedMeshRenderer.material = mat;
@@ -343,66 +383,6 @@
                clothesAnimator.runtimeAnimatorController = _controller;
                clothesAnimator.enabled = true;
            }
        }
        public bool IsSuit(int job, int clothedID)
        {
            var _equipModel = ModelCenter.Instance.GetModel<PlayerPackModel>().GetSinglePackModel(PackType.rptEquip);
            if (_equipModel == null)
            {
                return false;
            }
            int _suitCount = 0;
            int _start = (int)RoleEquipType.retHat;
            int _end = (int)RoleEquipType.retShoes;
            ItemModel _itemModel = null;
            _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retClothes);
            if (_itemModel == null)
            {
                return false;
            }
            int _rank = _itemModel.chinItemModel.LV;
            for (int i = _start; i <= _end; ++i)
            {
                _itemModel = _equipModel.GetItemModelByIndex(i);
                if (_itemModel == null)
                {
                    continue;
                }
                if (_itemModel.chinItemModel.SuiteiD <= 0)
                {
                    continue;
                }
                if (i == (int)RoleEquipType.retClothes)
                {
                    _rank = _itemModel.chinItemModel.LV;
                }
                var suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>();
                if (suitModel.suitModelDict.ContainsKey(i))
                {
                    if (suitModel.suitModelDict[i].ContainsKey(1)
                     || suitModel.suitModelDict[i].ContainsKey(2))
                    {
                        if (_itemModel.chinItemModel.LV >= _rank)
                        {
                            _suitCount += 1;
                        }
                    }
                }
            }
            return _suitCount >= 5;
        }
    }
}
UI/Common/UI3DShowHero.cs
@@ -73,7 +73,7 @@
            var secondaryResId = 0;
            if (secondaryId == 0)
            {
                if (data.fashionClothesId < 0)
                if (data.fashionClothesId == 0)
                {
                    if (this.job == 1)
                    {