少年修仙传客户端代码仓库
client_Wu Xijin
2019-01-11 980553499f5c03761c911ff9eb8f04e337940509
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
8个文件已修改
591 ■■■■ 已修改文件
Core/GameEngine/Model/Player/PlayerDatas.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Hero.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Player.cs 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyFeastTransmitShow.cs 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServiceAchievementModel.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServiceAchievementWin.cs 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmBossShow.cs 190 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -34,7 +34,8 @@
    public PlayerRankData rank { get { return m_Rank; } }
    StoreModel m_StoreModel;
    StoreModel StoreModel {
    StoreModel StoreModel
    {
        get { return m_StoreModel ?? (m_StoreModel = ModelCenter.Instance.GetModel<StoreModel>()); }
    }
@@ -513,6 +514,36 @@
                break;
            case PlayerDataRefresh.EquipShowSwitch:
                baseData.equipShowSwitch = value;
                if (hero != null)
                {
                    int _level = baseData.godWeaponLV_4;
                    if (EquipShowSwitch.IsGodWeaponEffectOn(value, 4, out _level))
                    {
                        hero.SwitchGodWeapon(4, _level);
                    }
                    else
                    {
                        hero.SwitchGodWeapon(4, 0);
                    }
                    _level = baseData.godWeaponLV_1;
                    if (EquipShowSwitch.IsGodWeaponEffectOn(value, 1, out _level))
                    {
                        hero.SwitchGodWeapon(1, _level);
                    }
                    else
                    {
                        hero.SwitchGodWeapon(1, 0);
                    }
                    _level = baseData.godWeaponLV_2;
                    if (EquipShowSwitch.IsGodWeaponEffectOn(value, 2, out _level))
                    {
                        hero.SwitchGodWeapon(2, _level);
                    }
                    else
                    {
                        hero.SwitchGodWeapon(2, 0);
                    }
                }
                break;
            case PlayerDataRefresh.LuckValue:
                break;
@@ -799,28 +830,60 @@
                baseData.godWeaponLV_1 = (int)value;
                if (hero != null)
                {
                    hero.SwitchGodWeapon(1, baseData.godWeaponLV_1);
                    int _level = (int)value;
                    if (EquipShowSwitch.IsGodWeaponEffectOn(baseData.equipShowSwitch, 1, out _level))
                    {
                        hero.SwitchGodWeapon(1, _level);
                    }
                    else
                    {
                        hero.SwitchGodWeapon(1, 0);
                    }
                }
                break;
            case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_2:
                baseData.godWeaponLV_2 = (int)value;
                if (hero != null)
                {
                    hero.SwitchGodWeapon(2, baseData.godWeaponLV_2);
                    int _level = (int)value;
                    if (EquipShowSwitch.IsGodWeaponEffectOn(baseData.equipShowSwitch, 2, out _level))
                    {
                        hero.SwitchGodWeapon(2, _level);
                    }
                    else
                    {
                        hero.SwitchGodWeapon(2, 0);
                    }
                }
                break;
            case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_3:
                baseData.godWeaponLV_3 = (int)value;
                if (hero != null)
                {
                    hero.SwitchGodWeapon(3, baseData.godWeaponLV_3);
                    int _level = (int)value;
                    if (EquipShowSwitch.IsGodWeaponEffectOn(baseData.equipShowSwitch, 3, out _level))
                    {
                        hero.SwitchGodWeapon(3, _level);
                    }
                    else
                    {
                        hero.SwitchGodWeapon(3, 0);
                    }
                }
                break;
            case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_4:
                baseData.godWeaponLV_4 = (int)value;
                if (hero != null)
                {
                    hero.SwitchGodWeapon(4, baseData.godWeaponLV_4);
                    int _level = (int)value;
                    if (EquipShowSwitch.IsGodWeaponEffectOn(baseData.equipShowSwitch, 4, out _level))
                    {
                        hero.SwitchGodWeapon(4, _level);
                    }
                    else
                    {
                        hero.SwitchGodWeapon(4, 0);
                    }
                }
                break;
            case PlayerDataRefresh.CDBPlayerRefresh_SoulDust:
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs
@@ -100,6 +100,8 @@
                return;
            }
            _player.UpdateData(vNetData);
            switch ((PlayerDataRefresh)vNetData.RefreshType)
            {
                case PlayerDataRefresh.SpeedValue:
@@ -119,18 +121,6 @@
                    break;
                case PlayerDataRefresh.OfficialRank:
                    _player.ActorInfo.realm = vNetData.Value;
                    break;
                case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_1:
                    _player.SwitchGodWeapon(1, (int)vNetData.Value);
                    break;
                case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_2:
                    _player.SwitchGodWeapon(2, (int)vNetData.Value);
                    break;
                case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_3:
                    _player.SwitchGodWeapon(3, (int)vNetData.Value);
                    break;
                case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_4:
                    _player.SwitchGodWeapon(4, (int)vNetData.Value);
                    break;
            }
Fight/GameActor/GA_Hero.cs
@@ -482,7 +482,15 @@
        Behaviour.StopKillUntilDieAI();
        SwitchGodWeapon(4, PlayerDatas.Instance.baseData.godWeaponLV_4);
        int _level = PlayerDatas.Instance.baseData.godWeaponLV_4;
        if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 4, out _level))
        {
            SwitchGodWeapon(4, _level);
        }
        else
        {
            SwitchGodWeapon(4, 0);
        }
    }
    protected sealed override void OnPutonSecondary(uint secondaryItemID, GameObject secondary)
@@ -495,7 +503,16 @@
            MaterialUtility.SwitchXrayShader(m_SecondaryMaterial, true);
        }
        GameObjectPoolManager.Instance.AddDontDestroyGoInstID(secondary.GetInstanceID());
        SwitchGodWeapon(1, PlayerDatas.Instance.baseData.godWeaponLV_1);
        int _level = PlayerDatas.Instance.baseData.godWeaponLV_1;
        if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 1, out _level))
        {
            SwitchGodWeapon(1, _level);
        }
        else
        {
            SwitchGodWeapon(1, 0);
        }
    }
    protected sealed override void OnPutonWeapon(uint weaponItemID, GameObject weapon)
@@ -508,7 +525,16 @@
            MaterialUtility.SwitchXrayShader(m_WeaponMaterial, true);
        }
        GameObjectPoolManager.Instance.AddDontDestroyGoInstID(weapon.GetInstanceID());
        SwitchGodWeapon(2, PlayerDatas.Instance.baseData.godWeaponLV_2);
        int _level = PlayerDatas.Instance.baseData.godWeaponLV_2;
        if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 2, out _level))
        {
            SwitchGodWeapon(2, _level);
        }
        else
        {
            SwitchGodWeapon(2, 0);
        }
    }
    protected sealed override void OnPutonWing(uint wingItemID, GameObject wing)
Fight/GameActor/GA_Player.cs
@@ -419,6 +419,93 @@
        base.OnFixedUpdate();
    }
    public void UpdateData(H0418_tagObjInfoRefresh data)
    {
        int _level = 0;
        switch ((PlayerDataRefresh)data.RefreshType)
        {
            case PlayerDataRefresh.EquipShowSwitch:
                m_H0434.EquipShowSwitch = data.Value;
                _level = (int)m_H0434.ExAttr18;
                if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 4, out _level))
                {
                    SwitchGodWeapon(4, _level);
                }
                else
                {
                    SwitchGodWeapon(4, 0);
                }
                _level = (int)m_H0434.ExAttr15;
                if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 1, out _level))
                {
                    SwitchGodWeapon(1, _level);
                }
                else
                {
                    SwitchGodWeapon(1, 0);
                }
                _level = (int)m_H0434.ExAttr16;
                if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 2, out _level))
                {
                    SwitchGodWeapon(2, _level);
                }
                else
                {
                    SwitchGodWeapon(2, 0);
                }
                break;
            case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_1:
                _level = (int)data.Value;
                m_H0434.ExAttr15 = data.Value;
                if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 1, out _level))
                {
                    SwitchGodWeapon(1, _level);
                }
                else
                {
                    SwitchGodWeapon(1, 0);
                }
                break;
            case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_2:
                _level = (int)data.Value;
                m_H0434.ExAttr16 = data.Value;
                if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 2, out _level))
                {
                    SwitchGodWeapon(2, _level);
                }
                else
                {
                    SwitchGodWeapon(2, 0);
                }
                break;
            case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_3:
                _level = (int)data.Value;
                m_H0434.ExAttr17 = data.Value;
                if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 3, out _level))
                {
                    SwitchGodWeapon(3, _level);
                }
                else
                {
                    SwitchGodWeapon(3, 0);
                }
                break;
            case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_4:
                _level = (int)data.Value;
                m_H0434.ExAttr18 = data.Value;
                if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 4, out _level))
                {
                    SwitchGodWeapon(4, _level);
                }
                else
                {
                    SwitchGodWeapon(4, 0);
                }
                break;
        }
    }
    protected sealed override void OnPutonClothes(uint clothesItemID, GameObject clothed)
    {
        clothed.layer = LayerUtility.Player;
@@ -427,7 +514,15 @@
        _renderer.gameObject.SetLayer(LayerUtility.Player, false);
        MaterialUtility.SwitchXrayShader(m_Material, false);
        SwitchGodWeapon(4, (int)m_H0434.ExAttr18);
        int _level = (int)m_H0434.ExAttr18;
        if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 4, out _level))
        {
            SwitchGodWeapon(4, _level);
        }
        else
        {
            SwitchGodWeapon(4, 0);
        }
    }
    protected sealed override void OnPutonSecondary(uint secondaryItemID, GameObject secondary)
@@ -438,7 +533,16 @@
            _renderer.gameObject.SetLayer(LayerUtility.Player, false);
            MaterialUtility.SwitchXrayShader(m_SecondaryMaterial, false);
        }
        SwitchGodWeapon(1, (int)m_H0434.ExAttr15);
        int _level = (int)m_H0434.ExAttr15;
        if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 1, out _level))
        {
            SwitchGodWeapon(1, (int)m_H0434.ExAttr15);
        }
        else
        {
            SwitchGodWeapon(1, 0);
        }
    }
    protected sealed override void OnPutonWeapon(uint weaponItemID, GameObject weapon)
@@ -449,7 +553,16 @@
            _renderer.gameObject.SetLayer(LayerUtility.Player, false);
            MaterialUtility.SwitchXrayShader(m_WeaponMaterial, false);
        }
        SwitchGodWeapon(2, (int)m_H0434.ExAttr16);
        int _level = (int)m_H0434.ExAttr16;
        if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 2, out _level))
        {
            SwitchGodWeapon(2, (int)m_H0434.ExAttr16);
        }
        else
        {
            SwitchGodWeapon(2, 0);
        }
    }
    protected sealed override void OnPutonWing(uint wingItemID, GameObject wing)
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/OpenServerActivity/OpenServiceAchievementModel.cs
@@ -71,6 +71,14 @@
    private int _SelectedNow = 0;
    private int ResetType = 0;// 重置类型,0-0点重置;1-5点重置
    public event Action IsOpenEvent;
    private int _JumpIndex = -1;//跳转选中值
    public int JumpIndex
    {
        get { return _JumpIndex; }
        set { _JumpIndex = value; }
    }
    public int SelectedNow//选中天
    {
        get { return _SelectedNow; }
@@ -507,6 +515,28 @@
        }
    }
    public bool IsJumpOpen()
    {
        bool Isbool = false;
        if (LimitLV == 0)//活动未开启
        {
            SysNotifyMgr.Instance.ShowTip("OutofActivityTime");
            return false;
        }
        else
        {
            if (PlayerDatas.Instance.baseData.LV < LimitLV)//等级未到达
            {
                SysNotifyMgr.Instance.ShowTip("NotEenoughGrade");
                return Isbool;
            }
        }
        if (_IsOpen)
        {
            Isbool = true;
        }
        return Isbool;
    }
}
System/OpenServerActivity/OpenServiceAchievementWin.cs
@@ -13,7 +13,7 @@
namespace Snxxz.UI
{
    //开服成就
    //开服成就(8-14天)
    [XLua.Hotfix]
    public class OpenServiceAchievementWin : Window
    {
@@ -47,7 +47,7 @@
        protected override void OnPreOpen()
        {
            model.SelectedNow = model.DayNow;
            ChooseDay();
            SetTextIntegral();
            OnCreateGridLineCell1(m_ScrollerController1);
            OnCreateGridLineCell2(m_ScrollerController2);
@@ -60,6 +60,7 @@
        protected override void OnPreClose()
        {
            model.JumpIndex = -1;
            model.WeekPartyDayInfoUpdate -= WeekPartyDayInfoUpdate;
        }
@@ -98,7 +99,7 @@
            GameObject IsNotGary = cell.transform.Find("Obj1").gameObject;
            Text IsNotGary_text = IsNotGary.transform.Find("DayText").GetComponent<Text>();
            GameObject Gary= cell.transform.Find("Obj2").gameObject;
            GameObject Gary = cell.transform.Find("Obj2").gameObject;
            Text Gary_text = Gary.transform.Find("DayText").GetComponent<Text>();
            RedpointBehaviour redPoint = cell.transform.Find("RedPoint").GetComponent<RedpointBehaviour>();//红点
@@ -149,7 +150,7 @@
                SelectedObj.SetActive(true);
                SelectedObj1.SetActive(true);
                Unselected.SetActive(false);
                IsNotGary_text.text = (Index + 1).ToString();
            }
            Btn.SetListener(() =>
@@ -201,7 +202,7 @@
                    dailyIdlist.Add(_list[i]);
                }
            }
            foreach (var key in model.WeekPartyDayDic.Keys)
            {
                if (key == model.SelectedNow)
@@ -220,15 +221,15 @@
                            {
                                SortList.Add(TemplateId);
                            }
                           // var Dailyquse = Config.Instance.Get<DailyQuestConfig>(TemplateId);
                            // var Dailyquse = Config.Instance.Get<DailyQuestConfig>(TemplateId);
                        }
                        else
                        {
                            SortList.Add(TemplateId);
                        }
                    }
                }
            }
@@ -354,16 +355,34 @@
            {
                m_One.SetActive(false);
                m_Two.SetActive(true);
                m_OpenServiceItemA1.SetReward(model.SelectedNow, ItemDayList[0],0,2);
                m_OpenServiceItemB1.SetReward(model.SelectedNow, ItemDayList[1],1,2);
                m_OpenServiceItemA1.SetReward(model.SelectedNow, ItemDayList[0], 0, 2);
                m_OpenServiceItemB1.SetReward(model.SelectedNow, ItemDayList[1], 1, 2);
            }
            else
            {
                m_One.SetActive(true);
                m_Two.SetActive(false);
                m_OpenServiceItemA.SetReward(model.SelectedNow, ItemDayList[0], 0,2);
                m_OpenServiceItemA.SetReward(model.SelectedNow, ItemDayList[0], 0, 2);
            }
        }
        private void ChooseDay()//选择天
        {
            if (model.JumpIndex != -1)//跳转选择的天
            {
                model.SelectedNow = model.JumpIndex;
                return;
            }
            foreach (var key in model.RedPointDic.Keys)//红点选择可领取的天
            {
                if (model.RedPointDic[key].state == RedPointState.Simple)
                {
                    model.SelectedNow = key;
                    return;
                }
            }
            model.SelectedNow = model.DayNow;
        }
    }
}
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;
        }
    }
}