Core/GameEngine/Model/Config/NPCConfig.cs
@@ -1,6 +1,6 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, August 02, 2018 // [ Date ]: Monday, August 20, 2018 //-------------------------------------------------------- using UnityEngine; @@ -68,6 +68,7 @@ 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() { @@ -195,6 +196,8 @@ 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) { 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); 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,6 +92,8 @@ if (m_Realm != null) { if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm)) { m_Realm.gameObject.SetActive(true); var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm); if (realmConfig != null) @@ -99,6 +101,11 @@ m_Realm.SetSprite(realmConfig.Img); } } else { m_Realm.gameObject.SetActive(false); } } } private void Awake() 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,16 +74,20 @@ m_BossName.text = npcConfig.charName; m_BossLevel.text = _level.ToString(); m_BossIcon.SetSprite(npcConfig.HeadPortrait); if (npcConfig.Realm > 0) if (m_Realm != null) { if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm)) { m_Realm.gameObject.SetActive(true); var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm); var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm); m_Realm.SetSprite(realmConfig.Img); } else { m_Realm.gameObject.SetActive(false); } } surplusSegments = -1; totalSegments = npcConfig.LifeBarCount; 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 (m_Realm) { if (_realm > 0) { var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm); if (realmConfig != null) { m_Realm.SetSprite(realmConfig.Img); SetImageMaterialTexture(realmConfig.Img); } } } public void SetFunctionalNpcRealm(int _realm) { m_Realm.gameObject.SetActive(true); m_PlayerName.alignment = TextAnchor.MiddleLeft; var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm); if (realmConfig != null) { m_Realm.SetSprite(realmConfig.Img); SetImageMaterialTexture(realmConfig.Img); } else { m_Realm.gameObject.SetActive(false); m_PlayerName.alignment = TextAnchor.MiddleCenter; } } } public void SetNpcRealm(int _realm) { if (m_Realm != null) { 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;