少年修仙传客户端代码仓库
client_Wu Xijin
2018-09-26 5405aa473d1ebb20bcb15d28213093e6753dd136
3867 【前端】神兽地图优化
3个文件已修改
117 ■■■■■ 已修改文件
System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WorldMap/LocalMapFindPath.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WorldMap/MapModel.cs 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
@@ -16,22 +16,17 @@
        [SerializeField] Image m_Attention;
        protected override int selectedBossId
        {
            get
            {
        protected override int selectedBossId {
            get {
                return model.selectedBoss;
            }
            set
            {
            set {
                model.selectedBoss = value;
            }
        }
        protected override InteractorableState interactorableState
        {
            get
            {
        protected override InteractorableState interactorableState {
            get {
                var selected = selectedBossId == bossId;
                var config = Config.Instance.Get<DogzDungeonConfig>(bossId);
                var dieOrLocked = false;
@@ -58,16 +53,13 @@
                    return selected ? InteractorableState.DieOrLockedSelected : InteractorableState.DieOrLockedUnSelected;
                }
            }
            set
            {
            set {
                base.interactorableState = value;
            }
        }
        protected override bool isUnLocked
        {
            get
            {
        protected override bool isUnLocked {
            get {
                return model.IsBossUnLocked(bossId);
            }
        }
@@ -179,6 +171,48 @@
            UpdateBossPortrait(interactorableState);
        }
        protected override void DrawBossBaseInfo(string _icon, string _name, int _level, int _realm)
        {
            var config = Config.Instance.Get<DogzDungeonConfig>(bossId);
            switch (config.MonsterType)
            {
                case 1:
                    m_BossName.text = _name;
                    m_BossLevel.text = string.Empty;
                    break;
                case 2:
                    m_BossName.text = _name;
                    m_BossLevel.text = string.Empty;
                    break;
                case 3:
                case 4:
                    m_BossName.text = _name;
                    m_BossLevel.text = Language.Get("Z1024", _level);
                    break;
            }
            m_Portrait.SetSprite(_icon);
            m_Portrait.SetNativeSize();
            if (m_Realm != null)
            {
                if (Config.Instance.ContainKey<RealmConfig>(_realm))
                {
                    m_Realm.gameObject.SetActive(true);
                    var realmConfig = Config.Instance.Get<RealmConfig>(_realm);
                    if (realmConfig != null)
                    {
                        m_Realm.SetSprite(realmConfig.Img);
                    }
                }
                else
                {
                    m_Realm.gameObject.SetActive(false);
                }
            }
        }
        private void OnSelected(int _bossId)
        {
            UpdateBossNameLevelFont(interactorableState);
System/WorldMap/LocalMapFindPath.cs
@@ -292,9 +292,11 @@
            var npcRefreshIds = model.GetMapNPCRefreshIds(mapId);
            if (npcRefreshIds != null)
            {
                for (int i = 0; i < npcRefreshIds.Count; i++)
                foreach ( var item in   npcRefreshIds)
                {
                    DrawFunctionNPC(npcRefreshIds[i]);
                    var config = Config.Instance.Get<mapnpcConfig>(item);
                    var npcConfig = Config.Instance.Get<NPCConfig>(config.NPCID);
                    DrawFunctionNPC(item);
                }
            }
        }
System/WorldMap/MapModel.cs
@@ -584,33 +584,36 @@
            foreach (var config in mapNpcConfigs)
            {
                var mapId = config.MapID;
                if (config.NPCType == (int)E_NpcType.Func)
                if (config.NPCID != 0)
                {
                    List<string> npcRefreshIs;
                    if (!mapFunctionNPCsToRefreshID.ContainsKey(mapId))
                    if (config.NPCType == (int)E_NpcType.Func)
                    {
                        mapFunctionNPCsToRefreshID[mapId] = npcRefreshIs = new List<string>();
                    }
                    else
                    {
                        npcRefreshIs = mapFunctionNPCsToRefreshID[mapId];
                    }
                        List<string> npcRefreshIs;
                        if (!mapFunctionNPCsToRefreshID.ContainsKey(mapId))
                        {
                            mapFunctionNPCsToRefreshID[mapId] = npcRefreshIs = new List<string>();
                        }
                        else
                        {
                            npcRefreshIs = mapFunctionNPCsToRefreshID[mapId];
                        }
                    npcRefreshIs.Add(config.RefreshID.ToString());
                }
                else if (config.NPCType == (int)E_NpcType.Flag)
                {
                    List<string> npcRefreshIs;
                    if (!mapCollectNPCsToRefreshID.ContainsKey(mapId))
                    {
                        mapCollectNPCsToRefreshID[mapId] = npcRefreshIs = new List<string>();
                        npcRefreshIs.Add(config.RefreshID.ToString());
                    }
                    else
                    else if (config.NPCType == (int)E_NpcType.Flag)
                    {
                        npcRefreshIs = mapCollectNPCsToRefreshID[mapId];
                    }
                        List<string> npcRefreshIs;
                        if (!mapCollectNPCsToRefreshID.ContainsKey(mapId))
                        {
                            mapCollectNPCsToRefreshID[mapId] = npcRefreshIs = new List<string>();
                        }
                        else
                        {
                            npcRefreshIs = mapCollectNPCsToRefreshID[mapId];
                        }
                    npcRefreshIs.Add(config.RefreshID.ToString());
                        npcRefreshIs.Add(config.RefreshID.ToString());
                    }
                }
            }