少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-20 25012b3553affc493ff502799c65a9edcb51b088
2691 【前端】前端境界NPC配置新增读取列
13个文件已修改
174 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/NPCConfig.cs 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/NPCConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorPlayerBase.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialDungeonEntranceWin.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/BossHomeBreifInfoBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/DemonJarBriefInfoBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/ElderGodBreifInfoBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/PersonalBossBriefInfoBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/WorldBossBreifInfoBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RuneTower/RuneTowerWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/BossLifeBar.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/HUD/HeadUpName.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/NPCConfig.cs
@@ -1,14 +1,14 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Thursday, August 02, 2018
//--------------------------------------------------------
using UnityEngine;
using System;
namespace TableConfig {
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Monday, August 20, 2018
//--------------------------------------------------------
using UnityEngine;
using System;
namespace TableConfig {
    public partial class NPCConfig : ConfigBase {
        public int NPCID { get ; private set ; }
@@ -68,13 +68,14 @@
        public int LifeBarCount { get ; private set ; }
        public int NPCEffect { get ; private set ; }
        public int NPCSpeakID { get ; private set ; }
        public int ClientRealm { get ; private set ; }
        public override string getKey()
        {
            return NPCID.ToString();
        }
        public override void Parse() {
        }
        public override void Parse() {
            try
            {
                NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
@@ -195,17 +196,19 @@
                NPCEffect=IsNumeric(rawContents[55]) ? int.Parse(rawContents[55]):0; 
            
                NPCSpeakID=IsNumeric(rawContents[56]) ? int.Parse(rawContents[56]):0; 
                ClientRealm=IsNumeric(rawContents[57]) ? int.Parse(rawContents[57]):0;
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            }
        }
    }
}
            }
        }
    }
}
Core/GameEngine/Model/Config/NPCConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 1862c84997887d142ab127719c4d5c7f
timeCreated: 1533189772
timeCreated: 1534744183
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Fight/GameActor/GActorPlayerBase.cs
@@ -262,7 +262,7 @@
            return;
        }
        m_HeadUpName.SetRealm(_realm);
        m_HeadUpName.SetPlayerRealm(_realm);
    }
    public void SwitchTitle(uint titleID)
System/Dungeon/TrialDungeonEntranceWin.cs
@@ -153,12 +153,20 @@
            var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
            if (npcConfig != null)
            {
                var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
                if (realmConfig != null)
                if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
                {
                    m_BossRealm.gameObject.SetActive(true);
                    m_BossRealm.SetSprite(realmConfig.Img);
                    var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
                    if (realmConfig != null)
                    {
                        m_BossRealm.SetSprite(realmConfig.Img);
                    }
                }
                else
                {
                    m_BossRealm.gameObject.SetActive(false);
                }
                m_BossName.text = npcConfig.charName;
            }
        }
System/FindPrecious/BossHomeBreifInfoBehaviour.cs
@@ -55,7 +55,7 @@
            var config = ConfigManager.Instance.GetTemplate<BossHomeConfig>(bossId);
            var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV,npcConfig.Realm);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV,npcConfig.ClientRealm);
            UpdateBossPortrait(interactorableState);
            UpdateBossRebornCoolDown(true);
            OnSelected(bossId);
System/FindPrecious/DemonJarBriefInfoBehaviour.cs
@@ -72,7 +72,7 @@
            m_Participant.gameObject.SetActive(isUnLocked && findPreciousModel.IsBossAlive(bossId));
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
            UpdateBossRebornCoolDown(isUnLocked);
            UpdateBossPortrait(interactorableState);
            UpdateBossParticipant(bossId);
System/FindPrecious/ElderGodBreifInfoBehaviour.cs
@@ -54,7 +54,7 @@
            var config = ConfigManager.Instance.GetTemplate<ElderGodAreaConfig>(bossId);
            var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
            UpdateBossPortrait(interactorableState);
            UpdateBossRebornCoolDown(true);
            OnSelected(bossId);
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
@@ -92,11 +92,18 @@
            if (m_Realm != null)
            {
                m_Realm.gameObject.SetActive(true);
                var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
                if (realmConfig != null)
                if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
                {
                    m_Realm.SetSprite(realmConfig.Img);
                    m_Realm.gameObject.SetActive(true);
                    var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
                    if (realmConfig != null)
                    {
                        m_Realm.SetSprite(realmConfig.Img);
                    }
                }
                else
                {
                    m_Realm.gameObject.SetActive(false);
                }
            }
        }
System/FindPrecious/PersonalBossBriefInfoBehaviour.cs
@@ -50,7 +50,7 @@
            var config = ConfigManager.Instance.GetTemplate<PersonalBossConfig>(bossId);
            var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
            UpdateBossPortrait(interactorableState);
            UpdateBossRebornCoolDown(true);
            OnSelected(bossId);
System/FindPrecious/WorldBossBreifInfoBehaviour.cs
@@ -59,7 +59,7 @@
            var config = ConfigManager.Instance.GetTemplate<WorldBossConfig>(bossId);
            var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
            DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
            UpdateBossRebornCoolDown(isUnLocked);
            UpdateBossPortrait(interactorableState);
            OnSelected(bossId);
System/RuneTower/RuneTowerWin.cs
@@ -174,10 +174,11 @@
        {
            var towerFloorConfig = ConfigManager.Instance.GetTemplate<RuneTowerFloorConfig>(model.selectedFloor);
            var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(towerFloorConfig.BossId);
            if (npcConfig.Realm > 0)
            if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
            {
                m_BossRealm.gameObject.SetActive(true);
                var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
                var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
                m_BossRealm.SetSprite(realmConfig.Img);
            }
            else
UI/Common/BossLifeBar.cs
@@ -74,15 +74,19 @@
            m_BossName.text = npcConfig.charName;
            m_BossLevel.text = _level.ToString();
            m_BossIcon.SetSprite(npcConfig.HeadPortrait);
            if (npcConfig.Realm > 0)
            if (m_Realm != null)
            {
                m_Realm.gameObject.SetActive(true);
                var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
                m_Realm.SetSprite(realmConfig.Img);
            }
            else
            {
                m_Realm.gameObject.SetActive(false);
                if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
                {
                    m_Realm.gameObject.SetActive(true);
                    var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
                    m_Realm.SetSprite(realmConfig.Img);
                }
                else
                {
                    m_Realm.gameObject.SetActive(false);
                }
            }
            surplusSegments = -1;
UI/HUD/HeadUpName.cs
@@ -80,38 +80,50 @@
        {
            m_PlayerName.text = _name;
            m_HangHint.gameObject.SetActive(_hang);
            SetRealm(_realm);
            SetPlayerRealm(_realm);
            SetTitle(_titleId);
            SetAlliance(_alliance);
            SyncPosition(true);
        }
        public void SetRealm(int _realm)
        public void SetPlayerRealm(int _realm)
        {
            m_Realm.gameObject.SetActive(_realm > 0);
            m_PlayerName.alignment = _realm > 0 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
            if (_realm > 0)
            if (m_Realm)
            {
                var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
                if (realmConfig != null)
                if (_realm > 0)
                {
                    m_Realm.gameObject.SetActive(true);
                    m_PlayerName.alignment = TextAnchor.MiddleLeft;
                    var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
                    m_Realm.SetSprite(realmConfig.Img);
                    SetImageMaterialTexture(realmConfig.Img);
                }
                else
                {
                    m_Realm.gameObject.SetActive(false);
                    m_PlayerName.alignment = TextAnchor.MiddleCenter;
                }
            }
        }
        public void SetFunctionalNpcRealm(int _realm)
        public void SetNpcRealm(int _realm)
        {
            m_Realm.gameObject.SetActive(true);
            m_PlayerName.alignment = TextAnchor.MiddleLeft;
            var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
            if (realmConfig != null)
            if (m_Realm != null)
            {
                m_Realm.SetSprite(realmConfig.Img);
                SetImageMaterialTexture(realmConfig.Img);
                if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
                {
                    m_Realm.gameObject.SetActive(true);
                    m_PlayerName.alignment = TextAnchor.MiddleLeft;
                    var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
                    m_Realm.SetSprite(realmConfig.Img);
                    SetImageMaterialTexture(realmConfig.Img);
                }
                else
                {
                    m_PlayerName.alignment = TextAnchor.MiddleCenter;
                    m_Realm.gameObject.SetActive(false);
                }
            }
        }
@@ -193,7 +205,7 @@
        public void SetNPCName(string _name)
        {
            SetFunctionalNpcRealm(0);
            SetNpcRealm(999);
            m_PlayerName.text = _name;
            SyncPosition(true);
        }
@@ -203,7 +215,7 @@
            var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_id);
            if (config != null)
            {
                SetFunctionalNpcRealm(config.Realm);
                SetNpcRealm(config.ClientRealm);
                m_PlayerName.text = config.charName;
            }
@@ -217,10 +229,11 @@
            findPreciousModel.bossInfoUpdateEvent -= UpdateNpcRebornTime;
            findPreciousModel.bossInfoUpdateEvent += UpdateNpcRebornTime;
            npcId = _npcId;
            var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
            if (config != null)
            {
                SetRealm(config.Realm);
                SetNpcRealm(config.ClientRealm);
                m_PlayerName.text = config.charName;
            }
@@ -279,7 +292,7 @@
            var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
            if (config != null)
            {
                SetRealm(config.Realm);
                SetNpcRealm(config.ClientRealm);
                m_PlayerName.text = StringUtility.Contact(config.charName, Language.Get("HeadUpName_Monster", _level));
                monsterLevel = _level;
                monsterType = (E_MonsterType)config.IsBoss;