少年修仙传客户端代码仓库
client_Hale
2018-12-04 7bf8f11c1b5cff9bf7d9b6d03466c78007b542c1
5098 【开发】【1.3】新版套装特效显示与配置 资源整合. 逻辑修改
16个文件已修改
679 ■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0413_tagPlayerChangeEquip.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0415_tagPlayerUnEquipItem.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H07_PlayerItem/DTC0721_tagMakeItemAnswer.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA309_tagMCEquipPartSuiteLVInfo.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/ResModule/MaterialLoader.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAMgr.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Hero.cs 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcFightZZPlayer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Player.cs 137 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_PlayerClient.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_PlayerXMZZ.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorPlayerBase.cs 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageManager.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyFeastModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DShowHero.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/RuntimeLogUtility.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0413_tagPlayerChangeEquip.cs
@@ -26,13 +26,17 @@
        if (_player != null)
        {
            byte _suitLevel = 0;
            var _equipInfo = new GActorPlayerBase.EquipInfo();
            _equipInfo.place = vNetData.EquipIndex;
            _equipInfo.itemID = vNetData.EquipID;
            if (vNetData.UserDataLen > 2)
            {
                Dictionary<int, List<int>> _userDataDict = ConfigParse.Analysis(vNetData.UserData);
                if (_userDataDict.ContainsKey(30))
                if (_userDataDict.ContainsKey(25))
                {
                    _suitLevel = (byte)_userDataDict[30][0];
                    _equipInfo.suitLV_1 = (byte)_userDataDict[25][0];
                    _equipInfo.suitLV_2 = (byte)_userDataDict[25][1];
                }
            }
@@ -70,7 +74,15 @@
                }
            }
            _player.ChangeEquip(vNetData.EquipIndex, vNetData.EquipID, _suitLevel);
            if (vNetData.EquipIndex == (int)RoleEquipType.retClothes
             || vNetData.EquipIndex == (int)RoleEquipType.retHat
             || vNetData.EquipIndex == (int)RoleEquipType.retShoes
             || vNetData.EquipIndex == (int)RoleEquipType.retTrousers
             || vNetData.EquipIndex == (int)RoleEquipType.retBelt)
            {
                _player.ChangeEquip(_equipInfo);
            }
        }
    }
}
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0415_tagPlayerUnEquipItem.cs
@@ -56,7 +56,15 @@
             || vNetData.EquipIndex == (int)RoleEquipType.retTrousers
             || vNetData.EquipIndex == (int)RoleEquipType.retBelt)
            {
                _player.UnloadSuitSFX();
                var _equipInfo = new GActorPlayerBase.EquipInfo
                {
                    place = vNetData.EquipIndex,
                    itemID = 0,
                    suitLV_1 = 0,
                    suitLV_2 = 0
                };
                // 脱下衣服
                _player.ChangeEquip(_equipInfo);
            }
        }
    }
Core/NetworkPackage/DTCFile/ServerPack/H07_PlayerItem/DTC0721_tagMakeItemAnswer.cs
@@ -42,27 +42,7 @@
        if (PlayerDatas.Instance.hero != null
         && vNetData.Result == 1)
        {
            // 这里处理套装合成的时候同步套装特效的逻辑
            int _start = (int)RoleEquipType.retHat;
            int _end = (int)RoleEquipType.retShoes;
            PlayerPackModel _packModel = ModelCenter.Instance.GetModel<PlayerPackModel>();
            SinglePackModel _equipModel = _packModel.GetSinglePackModel(PackType.rptEquip);
            ItemModel _itemModel = null;
            int _suitLevel = 0;
            for (int i = _start; i <= _end; ++i)
            {
                _itemModel = _equipModel.GetItemModelByIndex(i);
                if (_itemModel != null)
                {
                    if (_itemModel.itemInfo.IsSuite == 1)
                    {
                        _suitLevel = 0;
                        _suitLevel = (byte)_itemModel.useDataDict[30][0];
                        PlayerDatas.Instance.hero.ChangeEquip(i, (uint)_itemModel.itemInfo.ItemID, _suitLevel);
                    }
                }
            }
            PlayerDatas.Instance.hero.ChangeEquip(default(GActorPlayerBase.EquipInfo));
        }
    }
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA309_tagMCEquipPartSuiteLVInfo.cs
@@ -26,7 +26,7 @@
        GA_Hero _hero = PlayerDatas.Instance.hero;
        if (_hero != null)
        {
            _hero.ChangeEquip(0, 0, 0);
            _hero.ChangeEquip(default(GActorPlayerBase.EquipInfo));
        }
    }
Core/ResModule/MaterialLoader.cs
@@ -1,30 +1,9 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MaterialLoader
{
    public static Material Load(string modelName, string materialName)
    {
        string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME,
                                                   ResourcesPath.MOB_SUFFIX,
                                                   modelName);
        string _assetName = materialName;
        AssetInfo _assetInfo = new AssetInfo(_bundleName, _assetName);
        Material _controller = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as Material;
        if (_controller == null)
        {
            DebugEx.LogErrorFormat("MaterialLoader.Load() => 加载不到资源: {0}.", _assetName);
        }
        return _controller;
    }
    readonly static Dictionary<string, ObjectPool<Material>> s_MatDict = new Dictionary<string, ObjectPool<Material>>();
    public static Material LoadClothesMaterial(int id, bool isUI, bool isSuit)
    {
@@ -65,6 +44,19 @@
            return null;
        }
        //Debug.LogFormat("想要加载的材质的名称: {0}", _assetName);
        ObjectPool<Material> _pool = null;
        if (s_MatDict.TryGetValue(_assetName, out _pool))
        {
            if (_pool.inactivedCount > 0)
            {
                //Debug.Log(" |-- 池里有, 从池里取");
                return _pool.Get();
            }
        }
        string _name = _modelResConfig.ResourcesName;
        int _index = _name.IndexOf('/');
        if (_index != -1)
@@ -72,13 +64,15 @@
            _name = _name.Substring(_index + 1);
        }
        var _parentDirName = string.Empty;
        if (_name.Contains("A_Zs"))
        {
            _name = "A_Zs";
            _parentDirName = "A_Zs";
        }
        else if (_name.Contains("A_Fs"))
        {
            _name = "A_Fs";
            _parentDirName = "A_Fs";
        }
        Material _mat = null;
@@ -87,7 +81,7 @@
#if UNITY_EDITOR
            string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
                                                    "Mob/",
                                                    _name,
                                                    _parentDirName,
                                                    "/Materials/",
                                                    _assetName,
                                                    ".mat");
@@ -96,16 +90,37 @@
        }
        else
        {
            string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME, _name.ToLower(), "_materials");
            string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME, InstanceResourcesLoader.raceSuffix, _name.ToLower());
            AssetInfo _assetInfo = new AssetInfo(_bundleName, _assetName);
            _mat = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as Material;
        }
        if (_mat == null)
        {
            DebugEx.LogErrorFormat("MaterialLoader.Load() => 加载不到资源: {0}.", _assetName);
            DebugEx.LogErrorFormat("MaterialLoader.Load() => 加载不到资源: {0}", _assetName);
        }
        return _mat;
    }
    public static void Release(Material mat)
    {
        if (!mat)
        {
            return;
        }
        var _name = mat.name.Replace(" (Instance)", "");
        //Debug.LogFormat("要释放的材质的名称: {0}, 修改后的名称: {1}", mat.name, _name);
        ObjectPool<Material> _pool = null;
        if (!s_MatDict.TryGetValue(_name, out _pool))
        {
            _pool = new ObjectPool<Material>(null, null);
            s_MatDict.Add(_name, _pool);
        }
        _pool.Add(mat);
    }
}
Fight/GameActor/GAMgr.cs
@@ -348,6 +348,8 @@
    public void UnInit()
    {
        ClearOffLinePlayer();
        if (PreFightMission.Instance.IsFinished())
        {
            for (int i = m_AllList.Count - 1; i >= 0; --i)
Fight/GameActor/GA_Hero.cs
@@ -164,6 +164,110 @@
        m_LastSyncTickTime = Time.realtimeSinceStartup;
    }
    private PlayerSuitModel _suitModel;
    private PlayerSuitModel SuitModel
    {
        get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
    }
    private PlayerPackModel m_PlayerBackModel;
    private PlayerPackModel PlayerBackModel
    {
        get
        {
            return m_PlayerBackModel ?? (m_PlayerBackModel = ModelCenter.Instance.GetModel<PlayerPackModel>());
        }
    }
    public override void ChangeEquip(EquipInfo equipInfo)
    {
        var _equipModel = PlayerBackModel.GetSinglePackModel(PackType.rptEquip);
        var _suitCount = 0;
        int _start = (int)RoleEquipType.retHat;
        int _end = (int)RoleEquipType.retShoes;
        int _rank = 0;
        ItemModel _itemModel = null;
        // 先取得衣服的阶数
        _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retClothes);
        if (_itemModel == null)
        {
            return;
        }
        _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 (SuitModel.suitModelDict.ContainsKey(i))
            {
                if (SuitModel.suitModelDict[i].ContainsKey(1)
                 || SuitModel.suitModelDict[i].ContainsKey(2))
                {
                    if (_itemModel.chinItemModel.LV >= _rank)
                    {
                        _suitCount += 1;
                    }
                }
            }
        }
        if (m_SuitCount == _suitCount)
        {
            return;
        }
        if (m_SuitCount < 5 && _suitCount < 5)
        {
            m_SuitCount = _suitCount;
            return;
        }
        if (_suitCount == 5)
        {
            var _itemConfig = Config.Instance.Get<ItemConfig>((int)ClothesItemID);
            if (_itemConfig != null)
            {
                var _newMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, true);
                if (_newMat)
                {
                    m_SMRenderer.material = m_Material = _newMat;
                    MaterialUtility.SwitchXrayShader(m_SMRenderer.material, this is GA_Hero);
                }
            }
        }
        else
        {
            var _itemConfig = Config.Instance.Get<ItemConfig>((int)ClothesItemID);
            if (_itemConfig != null)
            {
                var _newMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, false);
                if (_newMat)
                {
                    m_SMRenderer.material = m_Material = _newMat;
                    MaterialUtility.SwitchXrayShader(m_SMRenderer.material, this is GA_Hero);
                }
            }
        }
        m_SuitCount = _suitCount;
    }
    protected sealed override void OnUnit()
    {
        Object.Destroy(m_BhvFindEnemy);
@@ -549,6 +653,7 @@
            && !IsStun()
            && !IsHurt()
            && !IsDaZuo()
            && !IsCollect()
            && State != E_ActorState.Roll
            && State != E_ActorState.Mocked
            && !s_MapSwitching
@@ -890,7 +995,7 @@
        {
            yield break;
        }
        yield return WaitingForSecondConst.WaitMS1500;
        yield return WaitingForSecondConst.WaitMS1500;
        if (PlayerDatas.Instance.extersion.bossState == 1)
        {
            yield break;
Fight/GameActor/GA_NpcFightZZPlayer.cs
@@ -84,6 +84,10 @@
        }
    }
    public override void ChangeEquip(EquipInfo equipInfo)
    {
    }
    public void SyncHelpPlayerInfo()
    {
        var _valueInfo = LocalSave.GetString("GA_NpcFightZZPlayer_" + m_H0406.ObjID);
Fight/GameActor/GA_Player.cs
@@ -19,6 +19,8 @@
    private int m_ComAtkIndex;// 普攻索引
    protected Dictionary<int, EquipInfo> m_EquipDict = new Dictionary<int, EquipInfo>();
    protected override void OnInit(GameNetPackBasic package)
    {
        m_H0434 = package as H0434_tagAreaPlayerAppearEx;
@@ -57,26 +59,30 @@
        // 处理装备
        H0434_tagAreaPlayerAppearEx.tagEquipInfo _equipInfo;
        Dictionary<int, List<int>> _userDataDict;
        EquipInfo _info;
        // 因为衣服是所有装备的父节点, 需要预先处理衣服
        for (int i = 0; i < m_H0434.EquipCount; ++i)
        {
            _equipInfo = m_H0434.EquipInfo[i];
            _info = new EquipInfo
            {
                itemID = _equipInfo.ItemID
            };
            _userDataDict = ConfigParse.Analysis(_equipInfo.UserData);
            if (_userDataDict.ContainsKey(25))
            {
                _info.suitLV_1 = (byte)_userDataDict[25][0];
                _info.suitLV_2 = (byte)_userDataDict[25][1];
            }
            m_EquipDict[_equipInfo.Place] = _info;
            if (_equipInfo.Place == (byte)RoleEquipType.retClothes)
            {
                m_SuitLevel = 0;
                if (_equipInfo.IsSuite == 1)
                {
                    Dictionary<int, List<int>> _userData = ConfigParse.Analysis(_equipInfo.UserData);
                    if (_userData.ContainsKey(30))
                    {
                        m_SuitLevel = (byte)_userData[30][0];
                    }
                }
                SwitchClothes(_equipInfo.ItemID);
                ChangeEquip(_equipInfo.Place, _equipInfo.ItemID, m_SuitLevel);
                break;
            }
        }
@@ -111,19 +117,9 @@
            {
                ActorInfo.horseItemID = _equipInfo.ItemID;
            }
            m_SuitLevel = 0;
            if (_equipInfo.IsSuite == 1)
            {
                Dictionary<int, List<int>> _userData = ConfigParse.Analysis(_equipInfo.UserData);
                if (_userData.ContainsKey(30))
                {
                    m_SuitLevel = (byte)_userData[30][0];
                }
            }
            ChangeEquip(_equipInfo.Place, _equipInfo.ItemID, m_SuitLevel);
        }
        ChangeEquip(default(EquipInfo));
        if (ActorInfo.horseItemID != 0 && m_H0434.PlayerState == 2)
        {
@@ -186,6 +182,97 @@
        }
    }
    public override void ChangeEquip(EquipInfo equipInfo)
    {
        // 传入ID为0代表脱下了装备
        if(equipInfo.itemID == 0 && equipInfo.place != 0)
        {
            if(m_EquipDict.ContainsKey(equipInfo.place))
            {
                m_EquipDict.Remove(equipInfo.place);
            }
        }
        var _suitCount = 0;
        int _start = (int)RoleEquipType.retHat;
        int _end = (int)RoleEquipType.retShoes;
        int _rank = 0;
        EquipInfo _equipInfo;
        // 先取得衣服的阶数
        if (!m_EquipDict.TryGetValue((int)RoleEquipType.retClothes, out _equipInfo))
        {
            return;
        }
        var _itemConfig = Config.Instance.Get<ItemConfig>((int)_equipInfo.itemID);
        _rank = _itemConfig.LV;
        for (int i = _start; i <= _end; ++i)
        {
            if (!m_EquipDict.TryGetValue(i, out _equipInfo))
            {
                continue;
            }
            if (_equipInfo.suitLV_1 > 0
             || _equipInfo.suitLV_2 > 0)
            {
                _itemConfig = Config.Instance.Get<ItemConfig>((int)_equipInfo.itemID);
                if (_itemConfig.LV >= _rank)
                {
                    _suitCount += 1;
                }
            }
        }
        if (m_SuitCount == _suitCount)
        {
            return;
        }
        if (m_SuitCount < 5 && _suitCount < 5)
        {
            m_SuitCount = _suitCount;
            return;
        }
        // Debug.Log("_suitCount: " + _suitCount);
        if (_suitCount == 5)
        {
            _itemConfig = Config.Instance.Get<ItemConfig>((int)ClothesItemID);
            if (_itemConfig != null)
            {
                var _newMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, true);
                if (_newMat)
                {
                    MaterialLoader.Release(m_SMRenderer.material);
                    m_SMRenderer.material = m_Material = _newMat;
                    MaterialUtility.SwitchXrayShader(m_SMRenderer.material, false);
                }
            }
        }
        else
        {
            _itemConfig = Config.Instance.Get<ItemConfig>((int)ClothesItemID);
            if (_itemConfig != null)
            {
                var _newMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, false);
                if (_newMat)
                {
                    MaterialLoader.Release(m_SMRenderer.material);
                    m_SMRenderer.material = m_Material = _newMat;
                    MaterialUtility.SwitchXrayShader(m_SMRenderer.material, false);
                }
            }
        }
        m_SuitCount = _suitCount;
    }
    protected sealed override void OnUnit()
    {
        ShowOrHideModel(true);
Fight/GameActor/GA_PlayerClient.cs
@@ -65,13 +65,13 @@
                if (_itemInfo.place == (int)RoleEquipType.retClothes)
                {
                    m_SuitLevel = 0;
                    if (_itemInfo.isSuit == 1)
                    {
                        m_SuitLevel = (byte)_itemInfo.suitLevel;
                    }
                    //m_SuitLevel = 0;
                    //if (_itemInfo.isSuit == 1)
                    //{
                    //    m_SuitLevel = (byte)_itemInfo.suitLevel;
                    //}
                    SwitchClothes((uint)_itemInfo.id);
                    ChangeEquip(_itemInfo.place, (uint)_itemInfo.id, m_SuitLevel);
                    //ChangeEquip(_itemInfo.place, (uint)_itemInfo.id, m_SuitLevel);
                    break;
                }
            }
@@ -110,13 +110,13 @@
                    ActorInfo.horseItemID = (uint)_itemInfo.id;
                }
                m_SuitLevel = 0;
                if (_itemInfo.isSuit == 1)
                {
                    m_SuitLevel = (byte)_itemInfo.suitLevel;
                }
                //m_SuitLevel = 0;
                //if (_itemInfo.isSuit == 1)
                //{
                //    m_SuitLevel = (byte)_itemInfo.suitLevel;
                //}
                ChangeEquip(_itemInfo.place, (uint)_itemInfo.id, m_SuitLevel);
                //ChangeEquip(_itemInfo.place, (uint)_itemInfo.id, m_SuitLevel);
            }
        }
@@ -134,6 +134,10 @@
        RequestName();
    }
    public override void ChangeEquip(EquipInfo equipInfo)
    {
    }
    public sealed override void Destroy()
    {
    }
Fight/GameActor/GA_PlayerXMZZ.cs
@@ -71,13 +71,13 @@
                if (_itemInfo.place == (int)RoleEquipType.retClothes)
                {
                    m_SuitLevel = 0;
                    if (_itemInfo.isSuit == 1)
                    {
                        m_SuitLevel = (byte)_itemInfo.suitLevel;
                    }
                    //m_SuitLevel = 0;
                    //if (_itemInfo.isSuit == 1)
                    //{
                    //    m_SuitLevel = (byte)_itemInfo.suitLevel;
                    //}
                    SwitchClothes((uint)_itemInfo.id);
                    ChangeEquip(_itemInfo.place, (uint)_itemInfo.id, m_SuitLevel);
                    //ChangeEquip(_itemInfo.place, (uint)_itemInfo.id, m_SuitLevel);
                    break;
                }
            }
@@ -116,13 +116,13 @@
                    ActorInfo.horseItemID = (uint)_itemInfo.id;
                }
                m_SuitLevel = 0;
                if (_itemInfo.isSuit == 1)
                {
                    m_SuitLevel = (byte)_itemInfo.suitLevel;
                }
                //m_SuitLevel = 0;
                //if (_itemInfo.isSuit == 1)
                //{
                //    m_SuitLevel = (byte)_itemInfo.suitLevel;
                //}
                ChangeEquip(_itemInfo.place, (uint)_itemInfo.id, m_SuitLevel);
                //ChangeEquip(_itemInfo.place, (uint)_itemInfo.id, m_SuitLevel);
            }
        }
@@ -152,6 +152,10 @@
        IdleImmediate();
    }
    public override void ChangeEquip(EquipInfo equipInfo)
    {
    }
    public override void Destroy()
    {
    }
Fight/GameActor/GActorPlayerBase.cs
@@ -9,12 +9,14 @@
{
    public static UnityAction<bool> onShowEffect;
    private bool m_LoadDefaultHorse;
    protected struct EquipInfo
    public struct EquipInfo
    {
        public int place;
        public uint itemID;
        public int suitID;
        public int suitLevel;
        public int suitLV_1;
        public int suitLV_2;
    }
    protected int m_SuitCount;
    protected Material m_WingMaterial;
    protected Material m_HorseMaterial;
@@ -214,7 +216,6 @@
        WeaponItemID = uint.MaxValue;
        SecondaryID = uint.MaxValue;
        WingItemID = uint.MaxValue;
        m_SuitLevel = 0;
        MovingState = E_MovingState.Normal;
        SystemSetting.Instance.qualityLevelChangeEvent += OnGameQualityChange;
@@ -327,13 +328,19 @@
            }
        }
        if (m_SMRenderer)
        {
            MaterialLoader.Release(m_SMRenderer.material);
            m_SMRenderer.material = null;
        }
        m_Material = null;
        foreach (var _effect in m_GodWeaponEffectDict.Values)
        {
            SFXPlayUtility.Instance.Release(_effect);
        }
        m_GodWeaponEffectDict.Clear();
        UnloadSuitSFX();
        ReleaseLifeBar();
        ReleaseName();
        ReleaseShadow();
@@ -382,8 +389,6 @@
    private GameObject m_HorseModel;
    private GA_Guard m_Guard;
    private List<SFXController> m_SuitEffect = new List<SFXController>();
    private Transform m_HorseBindNode;
    protected uint ClothesItemID { get; private set; }
@@ -392,8 +397,6 @@
    protected uint SecondaryID { get; private set; }
    protected uint WingItemID { get; private set; }
    protected uint GuardID { get; private set; }
    protected byte m_SuitLevel;// 套装等级
    private Animator m_ClothesAnimator;
    private Animator m_WingAnimator;
@@ -901,7 +904,8 @@
        m_SMRenderer = m_ClothesModel.GetComponentInChildren<SkinnedMeshRenderer>();
        if (m_SMRenderer)
        {
            m_Material = m_SMRenderer.material;
            MaterialLoader.Release(m_SMRenderer.material);
            m_Material = m_SMRenderer.material = MaterialLoader.LoadClothesMaterial(_resID, false, false);
        }
        m_ClothesAnimator = m_ClothesModel.GetComponent<Animator>();
@@ -1373,151 +1377,7 @@
        HorseID = _newHorseID;
    }
    private void SyncSuitSFX(int suitEffectID)
    {
        if (!m_ClothesModel)
        {
            return;
        }
        UnloadSuitSFX();
        if (suitEffectID <= 0)
        {
            return;
        }
        SuitEffectConfig _suitEffect = Config.Instance.Get<SuitEffectConfig>(suitEffectID);
        // 上特效
        if (_suitEffect != null)
        {
            Transform _parent = null;
            SFXController _sfx = null;
            for (int i = 0; _suitEffect.bindbones != null && i < _suitEffect.bindbones.Length; ++i)
            {
                if (string.IsNullOrEmpty(_suitEffect.bindbones[i])
                    || _suitEffect.effectIds[i] == 0)
                {
                    continue;
                }
                _parent = m_ClothesModel.transform.GetChildTransformDeeply(_suitEffect.bindbones[i]);
                if (_parent == null)
                {
                    Debug.LogErrorFormat("套装: {0} 配置的骨骼节点: {1} 不存在", suitEffectID, _suitEffect.bindbones[i]);
                    continue;
                }
                _sfx = SFXPlayUtility.Instance.PlayBattleEffect(_suitEffect.effectIds[i], _parent);
                m_SuitEffect.Add(_sfx);
            }
        }
    }
    private PlayerSuitModel _suitModel;
    private PlayerSuitModel SuitModel
    {
        get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
    }
    private PlayerPackModel m_PlayerBackModel;
    private PlayerPackModel PlayerBackModel
    {
        get
        {
            return m_PlayerBackModel ?? (m_PlayerBackModel = ModelCenter.Instance.GetModel<PlayerPackModel>());
        }
    }
    public void ChangeEquip(int place, uint itemID, int suitLevel)
    {
        if (PlayerDatas.Instance.PlayerId != ServerInstID)
        {
            return;
        }
        var _equipModel = PlayerBackModel.GetSinglePackModel(PackType.rptEquip);
        int _suitCount = 0;
        int _start = (int)RoleEquipType.retHat;
        int _end = (int)RoleEquipType.retShoes;
        int _rank = 0;
        ItemModel _itemModel = null;
        // 先取得衣服的阶数
        _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retClothes);
        if (_itemModel == null)
        {
            return;
        }
        _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 (SuitModel.suitModelDict.ContainsKey(i))
            {
                if (SuitModel.suitModelDict[i].ContainsKey(1)
                 || SuitModel.suitModelDict[i].ContainsKey(2))
                {
                    if (_itemModel.chinItemModel.LV >= _rank)
                    {
                        _suitCount += 1;
                    }
                }
            }
        }
        if (_suitCount == 5)
        {
            var _itemConfig = Config.Instance.Get<ItemConfig>((int)ClothesItemID);
            if (_itemConfig != null)
            {
                var _newMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, true);
                if (_newMat)
                {
                    m_SMRenderer.material = m_Material = _newMat;
                }
            }
        }
        else
        {
            var _itemConfig = Config.Instance.Get<ItemConfig>((int)ClothesItemID);
            if (_itemConfig != null)
            {
                var _newMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, false);
                if (_newMat)
                {
                    m_SMRenderer.material = m_Material = _newMat;
                }
            }
        }
    }
    public void UnloadSuitSFX()
    {
        for (int i = 0; i < m_SuitEffect.Count; ++i)
        {
            SFXPlayUtility.Instance.Release(m_SuitEffect[i]);
        }
        m_SuitEffect.Clear();
    }
    public abstract void ChangeEquip(EquipInfo equipInfo);
    private bool TryRequest(uint itemID, ref GameObject model)
    {
@@ -1690,18 +1550,6 @@
        AnimatorStateInfo _stateInfo = m_ClothesAnimator.GetCurrentAnimatorStateInfo(0);
        return _stateInfo.shortNameHash == GAStaticDefine.State_StunHash;
    }
    public bool IsCollecting()
    {
        if (!m_ClothesAnimator)
        {
            return false;
        }
        AnimatorStateInfo _stateInfo = m_ClothesAnimator.GetCurrentAnimatorStateInfo(0);
        return _stateInfo.shortNameHash == GAStaticDefine.State_CollectHash;
    }
    public sealed override void Hurt()
Fight/Stage/StageManager.cs
@@ -480,7 +480,6 @@
            }
            _hero.SwitchClothes((uint)_itemModel.itemInfo.ItemID);
            _hero.ChangeEquip((int)RoleEquipType.retClothes, (uint)_itemModel.itemInfo.ItemID, _suitLevel);
        }
        else
        {
@@ -538,45 +537,7 @@
            _hero.SwitchGuard((uint)_itemModel.itemInfo.ItemID);
        }
        _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retHat);
        if (_itemModel != null)
        {
            if (_itemModel.itemInfo.IsSuite == 1)
            {
                _suitLevel = (byte)_itemModel.useDataDict[30][0];
                _hero.ChangeEquip((int)RoleEquipType.retHat, (uint)_itemModel.itemInfo.ItemID, _suitLevel);
            }
        }
        _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retBelt);
        if (_itemModel != null)
        {
            if (_itemModel.itemInfo.IsSuite == 1)
            {
                _suitLevel = (byte)_itemModel.useDataDict[30][0];
                _hero.ChangeEquip((int)RoleEquipType.retBelt, (uint)_itemModel.itemInfo.ItemID, _suitLevel);
            }
        }
        _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retShoes);
        if (_itemModel != null)
        {
            if (_itemModel.itemInfo.IsSuite == 1)
            {
                _suitLevel = (byte)_itemModel.useDataDict[30][0];
                _hero.ChangeEquip((int)RoleEquipType.retShoes, (uint)_itemModel.itemInfo.ItemID, _suitLevel);
            }
        }
        _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retTrousers);
        if (_itemModel != null)
        {
            if (_itemModel.itemInfo.IsSuite == 1)
            {
                _suitLevel = (byte)_itemModel.useDataDict[30][0];
                _hero.ChangeEquip((int)RoleEquipType.retTrousers, (uint)_itemModel.itemInfo.ItemID, _suitLevel);
            }
        }
        _hero.ChangeEquip(default(GActorPlayerBase.EquipInfo));
        _hero.IdleImmediate();
System/FairyAu/FairyFeastModel.cs
@@ -137,7 +137,7 @@
        bool SatisfyTransmitState()
        {
            var hero = PlayerDatas.Instance.hero;
            if (hero == null || hero.IsCollecting()
            if (hero == null || hero.IsCollect()
                || hero.IsCollect() || hero.IsDaZuo() || nearNpc)
            {
                return false;
UI/Common/UI3DShowHero.cs
@@ -157,6 +157,16 @@
            if (clothesId != 0)
            {
                if (clothesModel)
                {
                    var smRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>();
                    if (smRenderer != null)
                    {
                        MaterialLoader.Release(smRenderer.material);
                        smRenderer.material = null;
                    }
                }
                prefab = InstanceResourcesLoader.LoadModelRes(clothesId, true);
                if (prefab)
                {
@@ -308,6 +318,13 @@
            if (clothesModel == null)
            {
                return;
            }
            var smRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>();
            if (smRenderer != null)
            {
                MaterialLoader.Release(smRenderer.material);
                smRenderer.material = null;
            }
            var prefab = InstanceResourcesLoader.LoadModelRes(clothesId, true);
@@ -608,6 +625,8 @@
                return;
            }
            MaterialLoader.Release(smRenderer.material);
            var newMat = MaterialLoader.LoadClothesMaterial(this.clothesId, true, isSuit);
            if (newMat != null)
            {
Utility/RuntimeLogUtility.cs
@@ -259,7 +259,7 @@
            GA_Hero _hero = PlayerDatas.Instance.hero;
            if (_hero != null)
            {
                if (_hero.IsCollecting())
                if (_hero.IsCollect())
                {
                    _hero.Idle();
                }