少年修仙传客户端代码仓库
client_Hale
2019-01-14 370156278063fb4c11623b41c65135d7aa088248
5729 【前端】【1.5】时装功能开发 时装手臂拆分逻辑
11个文件已修改
289 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/ModelResConfig.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/ModelResConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H07_PlayerItem/DTC0704_tagRolePackRefresh.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H07_PlayerItem/DTC0725_tagRolePackRefreshEx.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorPlayerBase.cs 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/PartialModelResConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageManager.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyFeastTransmitShow.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmBossShow.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DShowHero.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/ModelResConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Monday, December 10, 2018
//    [  Date ]:           Monday, January 14, 2019
//--------------------------------------------------------
using UnityEngine;
@@ -26,6 +26,7 @@
        public Vector3 UIRotation { get ; private set; } 
        public Vector3 UIScale { get ; private set; } 
        public Vector3 Scale { get ; private set; } 
        public int RelatedPartID { get ; private set ; }
        public override string getKey()
        {
@@ -64,6 +65,8 @@
                UIScale=rawContents[13].Vector3Parse();
            
                Scale=rawContents[14].Vector3Parse();
                RelatedPartID=IsNumeric(rawContents[15]) ? int.Parse(rawContents[15]):0;
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/ModelResConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 290b3d02a826d6b4daabb2e80dfaa3ab
timeCreated: 1544430338
timeCreated: 1547446994
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs
@@ -9,7 +9,7 @@
    {
        base.Done(vNetPack);
        if (GameNetSystem.Instance.crossServerSocketConnected)
        if (CrossServerUtility.IsCrossServer())
        {
            if (vNetPack.socketType == GameNetSystem.SocketType.Main)
            {
Core/NetworkPackage/DTCFile/ServerPack/H07_PlayerItem/DTC0704_tagRolePackRefresh.cs
@@ -22,6 +22,18 @@
        H0704_tagRolePackRefresh vNetData = vNetPack as H0704_tagRolePackRefresh;
        playerPack.SetItemModel(vNetData);
        var _equipInfo = new GActorPlayerBase.EquipInfo
        {
            itemID = vNetData.ItemID,
            place = vNetData.ItemPlace
        };
        var _hero = PlayerDatas.Instance.hero;
        if (_hero != null)
        {
            _hero.ChangeEquip(_equipInfo);
        }
    }
}
Core/NetworkPackage/DTCFile/ServerPack/H07_PlayerItem/DTC0725_tagRolePackRefreshEx.cs
@@ -22,6 +22,27 @@
        H0725_tagRolePackRefreshEx vNetData = vNetPack as H0725_tagRolePackRefreshEx;
        playerPack.SetPlayerPackModel(vNetData);
        if (vNetData.PackType == 1)
        {
            if (vNetData.ItemCount > 0)
            {
                foreach (var _item in vNetData.ItemInfo)
                {
                    var _equipInfo = new GActorPlayerBase.EquipInfo
                    {
                        itemID = _item.ItemID,
                        place = _item.ItemPlace
                    };
                    var _hero = PlayerDatas.Instance.hero;
                    if (_hero != null)
                    {
                        _hero.ChangeEquip(_equipInfo);
                    }
                }
            }
        }
    }
}
Fight/GameActor/GActorPlayerBase.cs
@@ -649,11 +649,8 @@
            return;
        }
        int _resID = JobSetup.BaseEquip[2];
        if (JobSetup.Job == 1)
        {
            _resID = JobSetup.BaseEquip[0] + 2900;
        }
        int _baseHandResID = ModelResConfig.GetHandByClothesID((int)ClothesItemID);
        int _resID = _baseHandResID;
        EquipInfo _equipInfo;
@@ -675,15 +672,6 @@
            if (m_EquipDict.ContainsKey((int)RoleEquipType.retFashionWeapon2))
            {
                return;
            }
        }
        ItemConfig _clothesItemConfig = Config.Instance.Get<ItemConfig>((int)ClothesItemID);
        if (JobSetup.Job == 1)
        {
            if (_clothesItemConfig != null)
            {
                _resID = _clothesItemConfig.ChangeOrd + 2900;
            }
        }
@@ -709,17 +697,7 @@
        {
            if (SecondaryID == 0)
            {
                int _baseHandResId = JobSetup.BaseEquip[2];
                if (JobSetup.Job == 1)
                {
                    if (_clothesItemConfig != null)
                    {
                        _baseHandResId = _clothesItemConfig.ChangeOrd + 2900;
                    }
                }
                if (!TryRelease(_baseHandResId, m_SecondaryModel))
                if (!TryRelease(_baseHandResID, m_SecondaryModel))
                {
                    return;
                }
@@ -753,28 +731,33 @@
                    return;
                }
            }
            if (m_EquipDict.ContainsKey((int)RoleEquipType.retFashionWeapon2))
            {
                SwitchHand(true);
            }
            else
            {
                SwitchHand(false);
            }
            // 替换当前衣服上的武器
            Transform _secondaryNode = m_ClothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[JobSetup.Job - 1]);
            m_SecondaryModel.transform.SetParent(_secondaryNode);
            m_SecondaryModel.transform.localPosition = Vector3.zero;
            m_SecondaryModel.transform.localRotation = Quaternion.identity;
            SecondaryID = itemID;
            OnPutonSecondary(SecondaryID, m_SecondaryModel);
            ShowSecondaryEffect();
        }
        else
        {
            if (!TryRequest(_resID, ref m_SecondaryModel))
            {
                return;
            }
            SwitchHand(true);
            OnPutonSecondary(SecondaryID, m_HandModel);
        }
        // 替换当前衣服上的武器
        Transform _secondaryNode = m_ClothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[JobSetup.Job - 1]);
        m_SecondaryModel.transform.SetParent(_secondaryNode);
        m_SecondaryModel.transform.localPosition = Vector3.zero;
        m_SecondaryModel.transform.localRotation = Quaternion.identity;
        SecondaryID = itemID;
        OnPutonSecondary(SecondaryID, m_SecondaryModel);
        RequestShadow();
        ShowSecondaryEffect();
    }
    public void SwitchWing(uint itemID)
@@ -902,16 +885,6 @@
                {
                    itemID = _equipInfo.itemID;
                }
                // 如果有副手则卸下手臂
                if (m_EquipDict.ContainsKey((int)RoleEquipType.retWeapon2))
                {
                    SwitchHand(false);
                }
            }
            else
            {
                SwitchHand(true);
            }
        }
        else if (index == (int)RoleEquipType.retClothes)
@@ -1072,9 +1045,17 @@
            m_SecondaryModel.transform.localPosition = Vector3.zero;
            m_SecondaryModel.transform.localRotation = Quaternion.identity;
        }
        else
        // 决定副手逻辑
        // 如果当前是时装副手, 则装备时装手臂
        // 如果当前是普通副手, 则卸下手臂
        if (m_EquipDict.ContainsKey((int)RoleEquipType.retFashionWeapon2))
        {
            SwitchHand(true);
        }
        else
        {
            SwitchHand(false);
        }
        // 重新确定当前状态
@@ -1241,16 +1222,24 @@
        if (onOrOff)
        {
            int _resID = JobSetup.BaseEquip[0] + 2900;
            EquipInfo _equipInfo;
            if (m_EquipDict.TryGetValue((int)RoleEquipType.retClothes, out _equipInfo))
            int _itemID = 4100;
            if (!m_EquipDict.TryGetValue((int)RoleEquipType.retFashionClothes, out _equipInfo))
            {
                var _clothesItem = Config.Instance.Get<ItemConfig>((int)_equipInfo.itemID);
                if (_clothesItem != null)
                if (!m_EquipDict.TryGetValue((int)RoleEquipType.retClothes, out _equipInfo))
                {
                    _resID = _clothesItem.ChangeOrd + 2900;
                    _itemID = 4100;
                }
            }
            if (_equipInfo.itemID != 0)
            {
                _itemID = (int)_equipInfo.itemID;
            }
            var _itemConfig = Config.Instance.Get<ItemConfig>(_itemID);
            int _resID = ModelResConfig.GetHandByClothesID(_itemConfig.ChangeOrd);
            if (m_HandModel)
            {
@@ -1267,7 +1256,6 @@
                m_HandModel.transform.SetParent(_secondaryNode);
                m_HandModel.transform.localPosition = Vector3.zero;
                m_HandModel.transform.localRotation = Quaternion.identity;
                HandResID = _resID;
            }
        }
Fight/GameActor/PartialModelResConfig.cs
@@ -113,5 +113,21 @@
            }
            return null;
        }
        public static int GetHandByClothesID(int id)
        {
            if (id <= 0)
            {
                id = 4100;// 默认值
            }
            var _config = Config.Instance.Get<ModelResConfig>(id);
            if (_config == null)
            {
                return 7000;// 默认值
            }
            return _config.RelatedPartID;
        }
    }
}
Fight/Stage/StageManager.cs
@@ -18,38 +18,47 @@
    public event Action<float> loadingProgressEvent;
    bool m_IsServerPreparing = false;
    public bool isServerPreparing {
    public bool isServerPreparing
    {
        get { return m_IsServerPreparing; }
        set { m_IsServerPreparing = value; }
    }
    bool m_IsCrossServerPreparing = false;
    public bool isCrossServerPreparing {
    public bool isCrossServerPreparing
    {
        get { return m_IsCrossServerPreparing; }
        set { m_IsCrossServerPreparing = value; }
    }
    public Stage.E_StageType StageType {
        get {
    public Stage.E_StageType StageType
    {
        get
        {
            return m_StageType;
        }
    }
    public Stage CurrentStage {
        get {
    public Stage CurrentStage
    {
        get
        {
            return m_CurrentStage;
        }
    }
    int m_CurrentMapId;
    public int currentMapId {
    public int currentMapId
    {
        get { return m_CurrentMapId; }
        private set { m_CurrentMapId = value; }
    }
    int m_CurrentMapResID;
    public int currentMapResId {
        get {
    public int currentMapResId
    {
        get
        {
            return m_CurrentMapResID;
        }
        private set { m_CurrentMapResID = value; }
@@ -60,9 +69,11 @@
    float m_LoadingProgress = 0f;
    float loadingProgress {
    float loadingProgress
    {
        get { return m_LoadingProgress; }
        set {
        set
        {
            m_LoadingProgress = value;
            if (loadingProgressEvent != null)
            {
@@ -418,9 +429,9 @@
        WindowCenter.Instance.Close<LoadingWin>();
        SystemSetting.Instance.SetGameFps(SystemSetting.Instance.GetGameFps());
        foreach(var _actor in GAMgr.Instance.reAdjustPosList)
        foreach (var _actor in GAMgr.Instance.reAdjustPosList)
        {
            _actor.AdjustPos((ushort)_actor.ActorInfo.serverBornPos.x,(ushort)_actor.ActorInfo.serverBornPos.y);
            _actor.AdjustPos((ushort)_actor.ActorInfo.serverBornPos.x, (ushort)_actor.ActorInfo.serverBornPos.y);
        }
        GAMgr.Instance.reAdjustPosList.Clear();
    }
@@ -483,7 +494,6 @@
    private void InitHero()
    {
        // 初始化摄像机
        if (!CameraController.Instance)
        {
@@ -515,9 +525,9 @@
        if (_fashion != null)
        {
            _hero.SwitchClothes((uint)_fashion.itemInfo.ItemID);
            _hero.SwitchClothes((uint)_fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionClothes);
        }
        else if(_itemModel != null)
        else if (_itemModel != null)
        {
            _hero.SwitchClothes((uint)_itemModel.itemInfo.ItemID);
        }
@@ -531,7 +541,7 @@
        if (_fashion != null)
        {
            _hero.SwitchWeapon((uint)_fashion.itemInfo.ItemID);
            _hero.SwitchWeapon((uint)_fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionWeapon);
        }
        else if (_itemModel != null)
        {
@@ -547,7 +557,7 @@
        if (_fashion != null)
        {
            _hero.SwitchSecondary((uint)_fashion.itemInfo.ItemID);
            _hero.SwitchSecondary((uint)_fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionWeapon2);
        }
        else if (_itemModel != null)
        {
System/FairyAu/FairyFeastTransmitShow.cs
@@ -371,7 +371,7 @@
                    {
                        if (this.job == 1)
                        {
                            secondaryResId = clothes + 2900;
                            secondaryResId = ModelResConfig.GetHandByClothesID(clothesResId);
                        }
                    }
                }
@@ -390,21 +390,28 @@
                PutOnSecondary(secondaryResId);
                var extraSecondaryId = 0;
                if (data.job == 1 && data.fashionSecondaryId > 0 && data.fashionClothesId == 0)
                if (data.job == 1)
                {
                    if (data.clothesId == 0)
                    extraSecondaryId = ModelResConfig.GetHandByClothesID(0);
                    if (data.fashionClothesId > 0)
                    {
                        extraSecondaryId = jobConfig.BaseEquip[0] + 2900;
                        var _item = Config.Instance.Get<ItemConfig>(data.fashionClothesId);
                        if (_item != null)
                        {
                            extraSecondaryId = ModelResConfig.GetHandByClothesID(_item.ChangeOrd);
                        }
                    }
                    else
                    else if (data.clothesId > 0)
                    {
                        var item = Config.Instance.Get<ItemConfig>(data.clothesId);
                        var defaultClothesResId = item == null ? jobConfig.BaseEquip[0] : item.ChangeOrd;
                        extraSecondaryId = defaultClothesResId + 2900;
                        var _item = Config.Instance.Get<ItemConfig>(data.clothesId);
                        if (_item != null)
                        {
                            extraSecondaryId = ModelResConfig.GetHandByClothesID(_item.ChangeOrd);
                        }
                    }
                }
                PutOnExtraSecondary(job, extraSecondaryId);
                    PutOnExtraSecondary(job, extraSecondaryId);
                }
                var wingsResId = 0;
                if (wingsId != 0)
System/Realm/RealmBossShow.cs
@@ -233,7 +233,7 @@
                {
                    if (job == 1)
                    {
                        secondaryResId = clothesId + 2900;
                        secondaryResId = ModelResConfig.GetHandByClothesID(clothesId);
                    }
                }
            }
@@ -252,21 +252,28 @@
            PutOnSecondary(job, secondaryResId);
            var extraSecondaryId = 0;
            if (job == 1 && fashionSecondaryId > 0 && fashionClothesId == 0)
            if (job == 1)
            {
                if (clothesId == 0)
                extraSecondaryId = ModelResConfig.GetHandByClothesID(0);
                if (fashionClothesId > 0)
                {
                    extraSecondaryId = jobConfig.BaseEquip[0] + 2900;
                    var _item = Config.Instance.Get<ItemConfig>(fashionClothesId);
                    if (_item != null)
                    {
                        extraSecondaryId = ModelResConfig.GetHandByClothesID(_item.ChangeOrd);
                    }
                }
                else
                else if (clothesId > 0)
                {
                    var item = Config.Instance.Get<ItemConfig>(clothesId);
                    var defaultClothesResId = item == null ? jobConfig.BaseEquip[0] : item.ChangeOrd;
                    extraSecondaryId = defaultClothesResId + 2900;
                    var _item = Config.Instance.Get<ItemConfig>(clothesId);
                    if (_item != null)
                    {
                        extraSecondaryId = ModelResConfig.GetHandByClothesID(_item.ChangeOrd);
                    }
                }
            }
            PutOnExtraSecondary(job, extraSecondaryId);
                PutOnExtraSecondary(job, extraSecondaryId);
            }
            return clothesModel;
        }
UI/Common/UI3DShowHero.cs
@@ -77,7 +77,7 @@
                {
                    if (this.job == 1)
                    {
                        secondaryResId = this.clothesId + 2900;
                        secondaryResId = ModelResConfig.GetHandByClothesID(clothesId);
                    }
                }
            }
@@ -98,21 +98,28 @@
            PutOnSecondary(job, secondaryResId);
            var extraSecondaryId = 0;
            if (data.job == 1 && data.fashionSecondaryId > 0 && data.fashionClothesId == 0)
            if (data.job == 1)
            {
                if (data.clothesId == 0)
                extraSecondaryId = ModelResConfig.GetHandByClothesID(0);
                if (data.fashionClothesId > 0)
                {
                    extraSecondaryId = jobConfig.BaseEquip[0] + 2900;
                    var _item = Config.Instance.Get<ItemConfig>(data.fashionClothesId);
                    if (_item != null)
                    {
                        extraSecondaryId = ModelResConfig.GetHandByClothesID(_item.ChangeOrd);
                    }
                }
                else
                else if (data.clothesId > 0)
                {
                    var item = Config.Instance.Get<ItemConfig>(data.clothesId);
                    var defaultClothesResId = item == null ? jobConfig.BaseEquip[0] : item.ChangeOrd;
                    extraSecondaryId = defaultClothesResId + 2900;
                    var _item = Config.Instance.Get<ItemConfig>(data.clothesId);
                    if (_item != null)
                    {
                        extraSecondaryId = ModelResConfig.GetHandByClothesID(_item.ChangeOrd);
                    }
                }
            }
            PutOnExtraSecondary(job, extraSecondaryId);
                PutOnExtraSecondary(job, extraSecondaryId);
            }
            var wingsResId = 0;
            if (wingsId != 0)