少年修仙传客户端代码仓库
client_Wu Xijin
2019-03-18 eb2ebafaf819814ebac30808040e1589b1430c89
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
21个文件已修改
498 ■■■■■ 已修改文件
Fight/GameActor/GA_Hero.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Player.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/MapTransferUtility.cs 167 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/DungeonStage.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/MapTransfer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipGemModel.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyFeastTransmitShow.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FashionDress/FashionDressModel.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FashionDress/FashionDressWin.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Guard/GuardModel.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ModelShowPerfab.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackModel.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/PlayerMainDate.cs 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/PowerAddWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmAnimationBehaviour.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmBossShow.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmWin.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RoleParticulars/ViewFuncCell.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulPattern4.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulWin.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DHeroSkillShow.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Hero.cs
@@ -183,30 +183,23 @@
            return;
        }
        if (onOrOff)
        var _itemConfig = ItemConfig.Get((int)ClothesItemID);
        if (_itemConfig != null)
        {
            var _itemConfig = ItemConfig.Get((int)ClothesItemID);
            if (_itemConfig != null)
            Material _replaceMat = null;
            if (onOrOff)
            {
                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);
                }
                _replaceMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, true);
            }
        }
        else
        {
            var _itemConfig = ItemConfig.Get((int)ClothesItemID);
            if (_itemConfig != null)
            else
            {
                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);
                }
                _replaceMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, false);
            }
            if (_replaceMat)
            {
                MaterialLoader.Release(m_SMRenderer.material);
                m_SMRenderer.material = m_Material = _replaceMat;
                MaterialUtility.SwitchXrayShader(m_SMRenderer.material, true);
            }
        }
Fight/GameActor/GA_Player.cs
@@ -214,30 +214,22 @@
        // Debug.Log("_suitCount: " + _suitCount);
        var _itemConfig = ItemConfig.Get((int)ClothesItemID);
        if (onOrOff)
        if (_itemConfig != null)
        {
            if (_itemConfig != null)
            Material _replaceMat = null;
            if (onOrOff)
            {
                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);
                }
                _replaceMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, true);
            }
        }
        else
        {
            if (_itemConfig != null)
            else
            {
                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);
                }
                _replaceMat = MaterialLoader.LoadClothesMaterial(_itemConfig.ChangeOrd, false, false);
            }
            if (_replaceMat)
            {
                MaterialLoader.Release(m_SMRenderer.material);
                m_SMRenderer.material = m_Material = _replaceMat;
                MaterialUtility.SwitchXrayShader(m_SMRenderer.material, false);
            }
        }
Fight/MapTransferUtility.cs
@@ -37,6 +37,9 @@
    private float m_ClosedFuncNpcDistSqrt;
    public float conversationDistSqrt;
    private List<maptransportConfig> m_MapTransportCfgs;
    private List<int> m_TransMapLine = new List<int>();
    public void Initialize()
    {
        FuncConfigConfig _funcModel = FuncConfigConfig.Get("ConversationDistanc");
@@ -47,10 +50,56 @@
            m_ClosedFuncNpcDistSqrt = float.Parse(_funcModel.Numerical2);
            m_ClosedFuncNpcDistSqrt *= m_ClosedFuncNpcDistSqrt;
        }
        m_MapTransportCfgs = maptransportConfig.GetValues();
        m_TransMapLine.Clear();
        var _id = 122549;
        var _configs = maptransportConfig.Get(_id);
        m_TransMapLine.Add(_configs.OriginalMapID);
        while (true)
        {
            if (!m_TransMapLine.Contains(_configs.TargetMapID))
            {
                m_TransMapLine.Add(_configs.TargetMapID);
            }
            else
            {
                break;
            }
            var _nextID = GetMapID(_configs.TargetMapID, _configs.OriginalMapID);
            if (_nextID == -1)
            {
                break;
            }
            _configs = maptransportConfig.Get(_nextID);
        }
        conversationDistSqrt = conversationDistSqrt == 0 ? 6 : conversationDistSqrt;
        m_ClosedFuncNpcDistSqrt = m_ClosedFuncNpcDistSqrt == 0 ? 1 : m_ClosedFuncNpcDistSqrt;
    }
    private int GetMapID(int start, int target)
    {
        var _configs = maptransportConfig.GetValues();
        foreach (var _cfg in _configs)
        {
            if (_cfg.OriginalMapID == start && _cfg.TargetMapID != target)
            {
                return _cfg.TransportID;
            }
        }
        return -1;
    }
    private int GetNextTransportID(int start, int end)
    {
        foreach (var _cfg in m_MapTransportCfgs)
        {
            if (_cfg.OriginalMapID == start && _cfg.TargetMapID == end)
            {
                return _cfg.TransportID;
            }
        }
        return -1;
    }
    #region 打坐
@@ -191,6 +240,9 @@
    public void MoveToNPC(int _npcID, int _sid = 0)
    {
#if UNITY_EDITOR
        Debug.LogFormat("想要切换至目标npc: {0}", _npcID);
#endif
        StopCoroutine("CoMoveToNPC");
        var _data = new MoveToData
        {
@@ -208,29 +260,30 @@
            yield break;
        }
        var npcID = data.npcID;
        var sid = data.sid;
        NpcID = data.npcID;
        MapTransferDoType = E_MapTransferDoType.Npc;
        Vector3 _destPostion = Vector3.zero;
        // 判断是否能够得到到达指定点
        // 获取NPC位置数据
        GAStaticDefine.NPCLocation _npcLocation;
        var _findLocation = GAStaticDefine.TryGetMapNPCLocation(npcID, out _npcLocation);
        var _findLocation = GAStaticDefine.TryGetMapNPCLocation(NpcID, out _npcLocation);
        if (!_findLocation)
        {
#if UNITY_EDITOR
            Debug.LogWarningFormat("需要传送至的npcid有错,无法在mapnpc表中查询到, id: {0}", npcID);
            Debug.LogWarningFormat("需要传送至的npcid有错,无法在mapnpc表中查询到, id: {0}", NpcID);
#endif
            // 如果找不到配置, 可能为客户端战斗配置的刷怪逻辑
            // 由于可能有回包慢问题, 这里等待
            yield return WaitingForSecondConst.WaitMS200;
            GActor _npc = GAMgr.Instance.GetCloserNPC(_hero.Pos, npcID);
            GActor _npc = GAMgr.Instance.GetCloserNPC(_hero.Pos, NpcID);
            if (_npc != null)
            {
                _destPostion = _npc.Pos;
                NpcID = npcID;
                NpcID = NpcID;
                MapTransferDoType = E_MapTransferDoType.Npc;
                _hero.MoveToPosition(_destPostion);
@@ -239,28 +292,103 @@
        }
        else
        {
            _destPostion = new Vector3(_npcLocation.position.x, 0, _npcLocation.position.y);
            // 判断是否在同一张地图中
            if (_npcLocation.mapId != PlayerDatas.Instance.baseData.MapID)
            {
                _MoveToNPC(npcID, sid);
                int _idx1 = m_TransMapLine.IndexOf(PlayerDatas.Instance.baseData.MapID);
                int _idx2 = m_TransMapLine.IndexOf(_npcLocation.mapId);
                bool _valid = true;
                if (_idx1 == -1)
                {
                    _valid = false;
                    Debug.LogErrorFormat("寻找的地图ID不在线路中: {0}", PlayerDatas.Instance.baseData.MapID);
                }
                if (_idx2 == -1)
                {
                    _valid = false;
                    Debug.LogErrorFormat("寻找的地图ID不在线路中: {0}", _npcLocation.mapId);
                }
                if (_valid)
                {
                    int _nextMapID = -1;
                    // 顺序
                    if (_idx2 > _idx1)
                    {
                        _nextMapID = m_TransMapLine[_idx1 + 1];
                    }
                    // 逆序
                    else
                    {
                        _nextMapID = m_TransMapLine[_idx1 - 1];
                    }
                    // 先寻找传送点
                    int _transportID = GetNextTransportID(PlayerDatas.Instance.baseData.MapID,
                                                          _nextMapID);
                    if (_transportID != -1)
                    {
                        var _curStage = StageLoad.Instance.currentStage as DungeonStage;
                        if (_curStage)
                        {
                            Vector3 _moveToPos;
                            if (_curStage.TryGetTransportPosition(_transportID, out _moveToPos))
                            {
                                while (true)
                                {
                                    if (PathFinder.WalkAble(_hero.Pos, _moveToPos))
                                    {
                                        break;
                                    }
                                    var _nextPos = ClientSceneManager.Instance.GetTransPoint(_hero.Pos, _moveToPos);
                                    // 如果找到的下一个点
                                    if (!PathFinder.WalkAble(_hero.Pos, _nextPos)
                                     || _nextPos == Vector3.zero)
                                    {
                                        Debug.LogErrorFormat("移动至NPC: {0} 时找不到任何跳跃点", NpcID);
                                        break;
                                    }
                                    float _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
                                    while (_dis > 0.01f)
                                    {
                                        _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
                                        _hero.MoveToPosition(_nextPos);
                                        yield return null;
                                    }
                                    while (!GA_Hero.s_Flying)
                                    {
                                        yield return null;
                                    }
                                    while (GA_Hero.s_Flying)
                                    {
                                        yield return null;
                                    }
                                }
                                _hero.MoveToPosition(_moveToPos);
                                yield break;
                            }
                        }
                    }
                }
                _MoveToNPC(NpcID, sid);
                yield break;
            }
            _destPostion = new Vector3(_npcLocation.position.x, 0, _npcLocation.position.y);
        }
        if (_destPostion == Vector3.zero)
        {
            Debug.LogErrorFormat("移动至NPC: {0} 时找不到一个可以到达的点.", npcID);
            Debug.LogErrorFormat("移动至NPC: {0} 时找不到一个可以到达的点.", NpcID);
            yield break;
        }
        float _dist = 0.01f;
        var _config = NPCConfig.Get(npcID);
        var _config = NPCConfig.Get(NpcID);
        if (_config != null)
        {
            _dist = Mathf.Max(GeneralDefine.CloseNpcDist + _config.ModelRadius - 0.3f, 0);
        }
        if (PathFinder.WalkAble(_hero.Pos, _destPostion, _dist) || npcID == 32504001)
        if (PathFinder.WalkAble(_hero.Pos, _destPostion, _dist) || NpcID == 32504001)
        {
            _MoveToNPC(npcID, sid);
            _MoveToNPC(NpcID, sid);
        }
        else
        {
@@ -275,7 +403,7 @@
                if (!PathFinder.WalkAble(_hero.Pos, _nextPos)
                 || _nextPos == Vector3.zero)
                {
                    Debug.LogErrorFormat("移动至NPC: {0} 时找不到任何跳跃点", npcID);
                    Debug.LogErrorFormat("移动至NPC: {0} 时找不到任何跳跃点", NpcID);
                    break;
                }
                float _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
@@ -294,7 +422,7 @@
                    yield return null;
                }
            }
            _MoveToNPC(npcID, sid);
            _MoveToNPC(NpcID, sid);
        }
    }
@@ -325,10 +453,6 @@
        {
            return;
        }
#if UNITY_EDITOR
        Debug.LogFormat("想要切换至目标npc: {0}", npcID);
#endif
        m_DelayMoveToNPC = false;
        m_TempNpcID = 0;
@@ -1034,6 +1158,10 @@
                _hero.Behaviour.StartHandupAI();
                Clear();
            }
            else
            {
                Debug.LogFormat("_npc == null : {0}, _chkDistSqrt < Mathf.Pow(_fightConfigDist, 2): {1}", _npc == null, _chkDistSqrt < Mathf.Pow(_fightConfigDist, 2));
            }
        }
        else if (_npcConfig.NPCType == (int)E_NpcType.Collect
              || _npcConfig.NPCType == (int)E_NpcType.Flag)
@@ -1103,12 +1231,13 @@
    public void Clear()
    {
        StopCoroutine("CoMoveToNPC");
        if (m_SwitchMapFinished)
        {
            StopCoroutine("CoMoveToNPC");
            NpcID = 0;
            MapTransferDoType = E_MapTransferDoType.None;
            m_DelayMoveToNPC = false;
        }
    }
}
Fight/Stage/Dungeon/DungeonStage.cs
@@ -9,6 +9,7 @@
{
    public static Dictionary<MapArea.E_Type, List<MapArea>> s_MapAreaDict;
    public static MapType CurrentMapType;
    private static Dictionary<int, MapTransfer> s_MapTransferDict = new Dictionary<int, MapTransfer>();
    public override void Initialize()
    {
@@ -117,7 +118,7 @@
        base.UnInitialize();
        StopAllCoroutines();
        s_MapTransferDict.Clear();
        if (s_MapAreaDict != null)
        {
            foreach (var _list in s_MapAreaDict.Values)
@@ -279,6 +280,7 @@
    private void CreateMapTransfer()
    {
        s_MapTransferDict.Clear();
        // 创建传送点
        var _dict = maptransportConfig.GetValues();
        foreach (var _item in _dict)
@@ -326,9 +328,21 @@
            MapTransfer _maptransfer = _transport.AddMissingComponent<MapTransfer>();
            _maptransfer.transportModel = _item;
            _maptransfer.TransportID = _item.TransportID;
            s_MapTransferDict[_item.TransportID] = _maptransfer;
        }
    }
    public bool TryGetTransportPosition(int id, out Vector3 pos)
    {
        if (s_MapTransferDict.ContainsKey(id))
        {
            pos = s_MapTransferDict[id].transform.position;
            return true;
        }
        pos = Vector3.zero;
        return false;
    }
    private IEnumerator CreateMapArea()
    {
        yield return WaitingForSecondConst.WaitMS200;
Fight/Stage/Dungeon/MapTransfer.cs
@@ -64,7 +64,7 @@
            return;
        }
        MapTransferUtility.Instance.Clear();
        // MapTransferUtility.Instance.Clear();
        _hero.IdleImmediate();
        _hero.Behaviour.StopHandupAI();
        _hero.Behaviour.StopKillUntilDieAI();
System/EquipGem/EquipGemModel.cs
@@ -158,7 +158,11 @@
                    description = description,
                    itemType = itemType,
                    shopId = shopDict.ContainsKey(i) ? shopDict[i] : 0,
                    composeCount = composeCount
                    composeCount = composeCount,
                    filterParams = new SinglePack.FilterParams()
                    {
                        itemTypes = new List<int>() { itemType },
                    }
                });
            }
@@ -256,14 +260,14 @@
            return m_EquipGemRedpoints.TryGetValue(packIndex, out redpoint);
        }
        public bool TryGetRedpoint(int level,out Redpoint redpoint)
        public bool TryGetRedpoint(int level, out Redpoint redpoint)
        {
            return m_EquipSetRedpoints.TryGetValue(level, out redpoint);
        }
        public bool IsEquipGemHoleOpen(int level, int place, int hole)
        {
            var equipPosition = new Int2( level ,place);
            var equipPosition = new Int2(level, place);
            var equipGuid = equipModel.GetEquip(equipPosition);
            if (string.IsNullOrEmpty(equipGuid))
            {
@@ -394,7 +398,7 @@
            foreach (var type in types)
            {
                var gemType = m_GemTypes[type];
                var itemModels = packModel.GetItemsByType(PackType.Item, gemType.itemType);
                var itemModels = packModel.GetItems(PackType.Item, gemType.filterParams);
                if (itemModels != null)
                {
                    foreach (var itemModel in itemModels)
@@ -447,7 +451,7 @@
            GemType gemType;
            TryGetGemType(type, out gemType);
            var count = 0;
            var items = packModel.GetItemsByType(PackType.Item, gemType.itemType);
            var items = packModel.GetItems(PackType.Item, gemType.filterParams);
            if (items == null)
            {
                return 0;
@@ -469,7 +473,7 @@
            GemType gemType;
            TryGetGemType(type, out gemType);
            var count = 0;
            var items = packModel.GetItemsByType(PackType.Item, gemType.itemType);
            var items = packModel.GetItems(PackType.Item, gemType.filterParams);
            if (items == null)
            {
                return 0;
@@ -491,7 +495,7 @@
            GemType gemType;
            TryGetGemType(type, out gemType);
            var count = 0;
            var items = packModel.GetItemsByType(PackType.Item, gemType.itemType);
            var items = packModel.GetItems(PackType.Item, gemType.filterParams);
            if (items == null)
            {
                return 0;
@@ -873,6 +877,7 @@
        public int itemType;
        public int shopId;
        public int composeCount;
        public SinglePack.FilterParams filterParams;
    }
    public class EquipGemRedpoint
System/FairyAu/FairyFeastTransmitShow.cs
@@ -70,6 +70,7 @@
        PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        RoleParticularModel roleParticularModel { get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); } }
        FairyFeastModel model { get { return ModelCenter.Instance.GetModel<FairyFeastModel>(); } }
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
        public event Action<ulong> popUpExpEvent;
        public event Action onComplete;
@@ -201,20 +202,13 @@
        void DisplayPlayer()
        {
            var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
            var clothesId = clothes == null ? 0 : (int)clothes.itemId;
            var appearance = equipModel.GetAppearance();
            var wings = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
            var wingsId = wings == null ? 0 : (int)wings.itemId;
            var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
            var secondaryId = secondary == null ? 0 : (int)secondary.itemId;
            var fashionClothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
            var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemId;
            var fashionSecondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
            var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemId;
            var clothesId = appearance.clothes;
            var wingsId = appearance.wings;
            var secondaryId = appearance.secondary;
            var fashionClothesId = appearance.fashionClothes;
            var fashionSecondaryId = appearance.fashionSecondary;
            var data = new UI3DPlayerExhibitionData
            {
System/FashionDress/FashionDressModel.cs
@@ -227,7 +227,8 @@
            if (fashionTypeMapPlaceDict.ContainsKey(type)
                && fashionDressTypeDict.ContainsKey(type))
            {
                var equipPlace = fashionTypeMapPlaceDict[type];
                var equipType = fashionTypeMapPlaceDict[type];
                var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, equipType);
                var itemModel = packModel.GetItemByIndex(PackType.Equip, (int)equipPlace);
                var list = fashionDressTypeDict[type];
                if (itemModel != null)
System/FashionDress/FashionDressWin.cs
@@ -320,17 +320,12 @@
            var playerPack = ModelCenter.Instance.GetModel<PackModel>();
            var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
            var clothesId = clothes == null ? 0 : (int)clothes.itemId;
            var appearance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
            var weapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
            var weaponId = weapon == null ? 0 : (int)weapon.itemId;
            var wings = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
            var wingsId = wings == null ? 0 : (int)wings.itemId;
            var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
            var secondaryId = secondary == null ? 0 : (int)secondary.itemId;
            var clothesId = appearance.clothes;
            var wingsId = appearance.wings;
            var secondaryId = appearance.secondary;
            var weaponId = appearance.weapon;
            var fashionDressClothesId = 0;
            var fashionDressWeaponId = 0;
System/Guard/GuardModel.cs
@@ -102,7 +102,8 @@
        private void CheckFairyLandGuard()
        {
            fairyLandGuard = false;
            var itemModel = pack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Guard1);
            var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, (int)RoleEquipType.Guard1);
            var itemModel = pack.GetItemByIndex(PackType.Equip, equipPlace);
            if (itemModel == null || !fairyLandGuardItems.Contains(itemModel.itemId))
            {
                for (int i = 0; i < fairyLandGuardItems.Count; i++)
System/KnapSack/Logic/ModelShowPerfab.cs
@@ -174,26 +174,16 @@
        {
            var job = PlayerDatas.Instance.baseData.Job;
            var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
            var clothesId = clothes == null ? 0 : (int)clothes.itemId;
            var appearance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
            var weapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
            var weaponId = weapon == null ? 0 : (int)weapon.itemId;
            var clothesId = appearance.clothes;
            var weaponId = appearance.weapon;
            var wingsId = appearance.wings;
            var secondaryId = appearance.secondary;
            var wings = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
            var wingsId = wings == null ? 0 : (int)wings.itemId;
            var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
            var secondaryId = secondary == null ? 0 : (int)secondary.itemId;
            var fashionClothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
            var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemId;
            var fashionWeapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
            var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemId;
            var fashionSecondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
            var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemId;
            var fashionClothesId = appearance.fashionClothes;
            var fashionWeaponId = appearance.fashionWeapon;
            var fashionSecondaryId = appearance.fashionWeapon;
            int _suitLevel = 0;
            UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
System/KnapSack/Logic/PackModel.cs
@@ -660,19 +660,6 @@
            }
        }
        public List<ItemModel> GetItemsByType(PackType packType, int itemType)
        {
            if (playerPackDict.ContainsKey(packType))
            {
                var singlePack = playerPackDict[packType];
                return singlePack.GetItemsByType(itemType);
            }
            else
            {
                return null;
            }
        }
        public List<ItemModel> GetItems(PackType packType, SinglePack.FilterParams param)
        {
            if (playerPackDict.ContainsKey(packType))
System/MainInterfacePanel/PlayerMainDate.cs
@@ -104,9 +104,6 @@
    {
        WindowCenter.Instance.Get<MainInterfaceWin>().IsShowButtonGroup();
    }
    //-----是否在自动强化中
    public bool StrengthegingBool = false;//是否再自动强化中
    public int StrengthegingAddFight = 0;//存取需要添加的战斗力值
    // --用于任务仙玉不足购买飞鞋
    public bool IsFlyShoseBool = false;
    public int FlyShoseTaskID = 0;
@@ -135,6 +132,8 @@
    //---------记录主界面Top面板是否在可见位置
    public bool MainTopPanelShow = true;
    public event Func<bool> customDisplayPower;
    public override void Init()
    {
@@ -296,8 +295,6 @@
    {
        FlyShoseTaskID = 0;
        IsFlyShoseBool = false;
        StrengthegingAddFight = 0;
        StrengthegingBool = false;
        IsTipBool = true;
        prowNum = 0;
        ProwNumAdd = 0;
@@ -387,20 +384,16 @@
            if (power > prowNum)
            {
                ProwNumAdd = power - prowNum;
                if (StrengthegingBool || StrengthegingAddFight != 0)
                {
                    StrengthegingAddFight += ProwNumAdd;
                }
                prowNum = power;
                if (!StrengthegingBool && StrengthegingAddFight == 0)
                if (customDisplayPower != null && customDisplayPower())
                {
                    if (WindowCenter.Instance.IsOpen<PowerAddWin>())
                    {
                        WindowCenter.Instance.Close<PowerAddWin>();
                    }
                    WindowCenter.Instance.Open<PowerAddWin>();
                    return;
                }
                if (WindowCenter.Instance.IsOpen<PowerAddWin>())
                {
                    WindowCenter.Instance.CloseImmediately("PowerAddWin");
                }
                WindowCenter.Instance.Open<PowerAddWin>();
            }
            else
            {
@@ -409,11 +402,9 @@
        }
    }
    IEnumerator LoadingIE()
    public void CustomPowerUp(int power)
    {
        yield return new WaitForSeconds(0.5f);
        ProwNumAdd = StrengthegingAddFight;
        StrengthegingAddFight = 0;
        ProwNumAdd = power;
        if (WindowCenter.Instance.IsOpen<PowerAddWin>())
        {
            WindowCenter.Instance.Close<PowerAddWin>();
@@ -421,20 +412,6 @@
        WindowCenter.Instance.Open<PowerAddWin>();
    }
    public void FabaoPowerAdd(int power)
    {
        ProwNumAdd = power;
        if (WindowCenter.Instance.IsOpen<PowerAddWin>())
        {
            WindowCenter.Instance.Close<PowerAddWin>();
        }
        if (prowNum != 0)
        {
            prowNum += power;
        }
        WindowCenter.Instance.Open<PowerAddWin>();
    }
    public void KissMonsterExperience(int _source, int _ExpPoint, int _Exp)//(1.单位经验亿点,2.经验单位点)
    {
        if (Event_Experience != null)
System/MainInterfacePanel/PowerAddWin.cs
@@ -125,6 +125,10 @@
            {
                type = WindowType.TreasureLevelUp;
            }
            else if (WindowCenter.Instance.IsOpen<RealmWin>())
            {
                type = WindowType.Realm;
            }
            var _index = powerUpPositions.FindIndex((x)=> 
            {
                return x.windowType == type;
@@ -146,6 +150,7 @@
        {
            None,
            TreasureLevelUp,
            Realm,
        }
    }
System/Realm/RealmAnimationBehaviour.cs
@@ -20,21 +20,25 @@
        [SerializeField, Header("小境界升级特效时长")] float m_NormalLevelUpEffectTime = 1.5f;
        [SerializeField, Header("大境界升级特效时长")] float m_SpecialLevelUpEffectTime = 4.5f;
        [SerializeField, Header("Boss特效时长")] float m_BossEffectTime = 2f;
        Coroutine m_RotateCoroutine = null;
        float m_DeltaAngle { get { return 360f / 8; } }
        public bool rotating { get; private set; }
        public bool isPlayingAnimation { get; private set; }
        public event Action onRotateComplete;
        public event Action onLevelUpComplete;
        public event Action onBossAppearComplete;
        RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
        public void SetDefault()
        {
            rotating = false;
            isPlayingAnimation = false;
            m_ContainerLine.gameObject.SetActive(false);
            for (int i = 0; i < m_RealmStages.Length; i++)
            {
@@ -99,6 +103,8 @@
                yield break;
            }
            isPlayingAnimation = true;
            if (m_EffectBoss.IsPlaying)
            {
                if (m_EffectBase.target != null)
@@ -160,7 +166,16 @@
                        obj.gameObject.SetActive(false);
                    }
                }
                yield return WaitingForSecondConst.GetWaitForSeconds(m_BossEffectTime);
                if (onBossAppearComplete != null)
                {
                    onBossAppearComplete();
                }
                yield return WaitingForSecondConst.GetWaitForSeconds(Mathf.Max(0f, 3.1f - m_BossEffectTime));
            }
            isPlayingAnimation = false;
            if (onLevelUpComplete != null)
            {
@@ -193,6 +208,7 @@
        public void Dispose()
        {
            rotating = false;
            isPlayingAnimation = false;
            StopAllCoroutines();
            if (m_RotateCoroutine != null)
            {
System/Realm/RealmBossShow.cs
@@ -115,17 +115,13 @@
        {
            var _job = PlayerDatas.Instance.baseData.Job;
            #region 装备
            var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
            var _clothesId = clothes == null ? 0 : (int)clothes.itemId;
            var appearance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
            var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
            var _secondaryId = secondary == null ? 0 : (int)secondary.itemId;
            var _clothesId = appearance.clothes;
            var _secondaryId = appearance.secondary;
            var fashionClothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
            var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemId;
            var fashionSecondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
            var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemId;
            var fashionClothesId = appearance.fashionClothes;
            var fashionSecondaryId = appearance.fashionSecondary;
            #endregion
            showPoint = m_HeroStage;
System/Realm/RealmWin.cs
@@ -34,6 +34,8 @@
        [SerializeField] UIEffect m_EffectBase;
        int cacheRealmLevel = 0;
        long cacheFightPower = 0;
        long customUpPower = 0;
        const int REALM_STAGE_COUNT = 5;
@@ -77,6 +79,7 @@
        }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        PlayerMainDate mainDateModel { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } }
        #region Built-in
        protected override void BindController()
@@ -96,8 +99,12 @@
            model.selectRealmRefresh += SelectRealmRefresh;
            m_RealmAnimation.onRotateComplete += OnRotateComplete;
            m_RealmAnimation.onLevelUpComplete += OnLevelUpComplete;
            m_RealmAnimation.onBossAppearComplete += OnBossAppearComplete;
            mainDateModel.customDisplayPower += CustomDisplayPower;
            cacheRealmLevel = PlayerDatas.Instance.baseData.realmLevel;
            cacheFightPower = PlayerDatas.Instance.baseData.FightPoint;
            customUpPower = 0;
        }
        protected override void OnActived()
@@ -129,6 +136,8 @@
            model.selectRealmRefresh -= SelectRealmRefresh;
            m_RealmAnimation.onRotateComplete -= OnRotateComplete;
            m_RealmAnimation.onLevelUpComplete -= OnLevelUpComplete;
            m_RealmAnimation.onBossAppearComplete -= OnBossAppearComplete;
            mainDateModel.customDisplayPower -= CustomDisplayPower;
            HideRealmUp();
        }
@@ -336,6 +345,14 @@
                    }
                }
            }
            else if (dataType == PlayerDataType.FightPower)
            {
                if (CustomDisplayPower())
                {
                    customUpPower += (PlayerDatas.Instance.baseData.FightPoint - cacheFightPower);
                }
                cacheFightPower = PlayerDatas.Instance.baseData.FightPoint;
            }
        }
        private void TryStartAnimation()
@@ -417,6 +434,22 @@
                    TryStartAnimation();
                }
            }
            if (customUpPower != 0)
            {
                mainDateModel.CustomPowerUp((int)customUpPower);
                customUpPower = 0;
            }
        }
        public void OnBossAppearComplete()
        {
            m_GotoBoss.gameObject.SetActive(true);
        }
        private bool CustomDisplayPower()
        {
            return m_RealmAnimation.isPlayingAnimation;
        }
        private void SelectRealmRefresh()
System/RoleParticulars/ViewFuncCell.cs
@@ -133,7 +133,8 @@
                            {
                                targetCompareTxt.text = string.Format(viewRoleFuncModel.compareTip, Language.Get("RoleParticularWin_7"));
                            }
                            ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
                            var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, (int)RoleEquipType.Wing);
                            var itemModel = playerPack.GetItemByIndex(PackType.Equip, equipPlace);
                            if (itemModel != null)
                            {
                                ItemConfig _tagChinItemModel = ItemConfig.Get((int)itemModel.itemId);
System/Treasure/TreasureSoulPattern4.cs
@@ -60,7 +60,8 @@
                    break;
                case TreasurePrivilege.Wing:
                    var percentWing = (float)special.propertyDict[86] / 10000;
                    var itemModel = pack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
                    var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, (int)RoleEquipType.Wing);
                    var itemModel = pack.GetItemByIndex(PackType.Equip, equipPlace);
                    m_ContainerHas.gameObject.SetActive(itemModel != null);
                    m_ContainerNone.gameObject.SetActive(itemModel == null);
                    if (itemModel != null)
System/Treasure/TreasureSoulWin.cs
@@ -328,7 +328,8 @@
                    break;
                case TreasurePrivilege.Wing:
                    var percentWing = (float)special.propertyDict[86] / 10000;
                    var itemModel = pack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
                    var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, (int)RoleEquipType.Wing);
                    var itemModel = pack.GetItemByIndex(PackType.Equip, equipPlace);
                    m_ContainerPreview.gameObject.SetActive(itemModel != null);
                    if (itemModel != null)
                    {
UI/Common/UI3DHeroSkillShow.cs
@@ -91,26 +91,15 @@
            var _job = PlayerDatas.Instance.baseData.Job;
            #region 装备
            var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
            var _clothesId = clothes == null ? 0 : (int)clothes.itemId;
            var appearance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
            var weapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
            var _weaponId = weapon == null ? 0 : (int)weapon.itemId;
            var wings = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
            var _wingsId = wings == null ? 0 : (int)wings.itemId;
            var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
            var _secondaryId = secondary == null ? 0 : (int)secondary.itemId;
            var fashionClothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
            var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemId;
            var fashionWeapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
            var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemId;
            var fashionSecondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
            var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemId;
            var _clothesId = appearance.clothes;
            var _wingsId = appearance.wings;
            var _secondaryId = appearance.secondary;
            var _weaponId = appearance.weapon;
            var fashionClothesId = appearance.fashionClothes;
            var fashionWeaponId = appearance.fashionWeapon;
            var fashionSecondaryId = appearance.fashionSecondary;
            int _suitLevel = 0;
            #endregion