From fc714208ff3a320c3bb52bddd5ea3d91f647a206 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 16 四月 2019 15:18:21 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/HazyRegion/HazyRegionIncidentPanel.cs | 4
System/HazyRegion/HazyAdventureHintWin.cs | 2
System/HazyRegion/HazyRegionIncidentBehaviour.cs | 27 +++
Fight/Actor/Skill/AttackHandler.cs | 14 +
System/HazyRegion/HazyDemonKingVictoryWin.cs | 7
System/HazyRegion/HazyGrassDungeonWin.cs | 9
System/HazyRegion/HazyDemonKingPlayerBehaviour.cs | 9
Fight/Actor/HeroBehaviour.cs | 35 ++--
Fight/Stage/Dungeon/DungeonStage.cs | 2
System/HazyRegion/HazyRegionEntrancePanel.cs | 2
System/HazyRegion/HazyRegionModel.cs | 4
System/HazyRegion/HazyDemonKingModel.cs | 5
Fight/Actor/AI/AI_Npc_198.cs | 1
System/HazyRegion/ClientHazyGrassStage.cs | 308 ++++++++++++++++++++++----------------
14 files changed, 266 insertions(+), 163 deletions(-)
diff --git a/Fight/Actor/AI/AI_Npc_198.cs b/Fight/Actor/AI/AI_Npc_198.cs
index 31cacd4..7d0b036 100644
--- a/Fight/Actor/AI/AI_Npc_198.cs
+++ b/Fight/Actor/AI/AI_Npc_198.cs
@@ -62,6 +62,7 @@
var _nextForawrd = Random.rotation * m_Owner.Forward;
var _randomDis = Random.Range(0, m_Owner.NpcConfig.Sight * .5f);
m_Dest = m_Owner.BornPos + _nextForawrd * _randomDis;
+ GActor.TryGetValidPos(m_Dest, ref m_Dest);
m_RunAwayStep = 1;
break;
case 1:
diff --git a/Fight/Actor/HeroBehaviour.cs b/Fight/Actor/HeroBehaviour.cs
index f11491e..69ee938 100644
--- a/Fight/Actor/HeroBehaviour.cs
+++ b/Fight/Actor/HeroBehaviour.cs
@@ -887,24 +887,27 @@
if (_target.ActorInfo.RealHp <= _hurtValue)
{
- _target.KillerServerInstID = m_Hero.ServerInstID;
- _target.ActorInfo.serverDie = true;
- GAMgr.Instance.ServerDie(_target.ServerInstID);
- GAMgr.Instance.DoDelayDie(_target);
+ if (_clientNpc.NpcConfig.AIType != 198)
+ {
+ _target.KillerServerInstID = m_Hero.ServerInstID;
+ _target.ActorInfo.serverDie = true;
+ GAMgr.Instance.ServerDie(_target.ServerInstID);
+ GAMgr.Instance.DoDelayDie(_target);
- if (m_Hero.LockTarget == _target)
- {
- m_Hero.LockTarget = null;
- }
- if (m_Hero.SelectTarget == _target)
- {
- m_Hero.SelectTarget = null;
- }
+ if (m_Hero.LockTarget == _target)
+ {
+ m_Hero.LockTarget = null;
+ }
+ if (m_Hero.SelectTarget == _target)
+ {
+ m_Hero.SelectTarget = null;
+ }
- if (_clientNpc != null
- && _clientNpc.belongEventID != -1)
- {
- ClientSceneManager.Instance.NpcDead(_clientNpc.belongEventID, _clientNpc, _clientNpc.NpcConfig.NPCID);
+ if (_clientNpc != null
+ && _clientNpc.belongEventID != -1)
+ {
+ ClientSceneManager.Instance.NpcDead(_clientNpc.belongEventID, _clientNpc, _clientNpc.NpcConfig.NPCID);
+ }
}
// 鍓嶆湡鎴樻枟鍙彂閫佺煶澶翠汉鐨�
//if (1000 == _target.NpcConfig.NPCID)
diff --git a/Fight/Actor/Skill/AttackHandler.cs b/Fight/Actor/Skill/AttackHandler.cs
index 826f7a1..92219af 100644
--- a/Fight/Actor/Skill/AttackHandler.cs
+++ b/Fight/Actor/Skill/AttackHandler.cs
@@ -195,6 +195,8 @@
}
else
{
+ bool _doReduceHp = true;
+
if (attacker is GA_NpcClientFightNorm)
{
if (target.ActorInfo.RealHp <= (target.ActorInfo.RealMaxHp * .5f))
@@ -202,8 +204,18 @@
hurtValue = 0;
}
}
+ else if (target is GA_NpcClientFightNorm)
+ {
+ if ((target as GA_NpcClientFightNorm).NpcConfig.AIType == 198)
+ {
+ _doReduceHp = false;
+ }
+ }
- target.ActorInfo.ReduceHp((uint)hurtValue);
+ if (_doReduceHp)
+ {
+ target.ActorInfo.ReduceHp((uint)hurtValue);
+ }
if (target.ServerInstID == PlayerDatas.Instance.baseData.PlayerID)
{
diff --git a/Fight/Stage/Dungeon/DungeonStage.cs b/Fight/Stage/Dungeon/DungeonStage.cs
index 7f0a8e2..ff4a707 100644
--- a/Fight/Stage/Dungeon/DungeonStage.cs
+++ b/Fight/Stage/Dungeon/DungeonStage.cs
@@ -228,6 +228,8 @@
case 31140:
case JadeDynastyBossModel.JADEDYNASTY_MAP:
case HazyDemonKingModel.Client_MapID:
+ case HazyDemonKingModel.DEMONKINGMAPID1:
+ case HazyDemonKingModel.DEMONKINGMAPID2:
WindowCenter.Instance.Open<DungeonPickUpItemCoolDownWin>();
break;
case FairyLeagueModel.FAIRY_LEAGUE_DUNGEON:
diff --git a/System/HazyRegion/ClientHazyGrassStage.cs b/System/HazyRegion/ClientHazyGrassStage.cs
index 1c56035..c675610 100644
--- a/System/HazyRegion/ClientHazyGrassStage.cs
+++ b/System/HazyRegion/ClientHazyGrassStage.cs
@@ -1,166 +1,218 @@
-锘縰sing System;
+锘縰sing Snxxz.UI;
+using System;
using System.Collections;
using System.Collections.Generic;
-using UnityEngine;
-namespace Snxxz.UI
+using UnityEngine;
+public class ClientHazyGrassStage : DungeonStage
{
- public class ClientHazyGrassStage : DungeonStage
+ static readonly Vector3 PlayerBornPosition1 = new Vector3(17.25f, 5.12f, 3.70f);
+ static readonly Vector3 PlayerBornPosition2 = new Vector3(17.25f, 5.12f, 3.70f);
+
+ static List<HazyMapNpcScriptableObject.NpcInfo> s_NpcInfos = new List<HazyMapNpcScriptableObject.NpcInfo>();
+ static Dictionary<Vector3, GA_NpcClientCollect> s_CollectNpcs = new Dictionary<Vector3, GA_NpcClientCollect>();
+ static Dictionary<uint, Vector3> s_Sid2NpcPos = new Dictionary<uint, Vector3>();
+ static Dictionary<uint, int> s_Sid2NpcIds = new Dictionary<uint, int>();
+ static List<GA_NpcClientFightNorm> s_ClientFightNpcs = new List<GA_NpcClientFightNorm>();
+
+ static int grassRefreshCount = 0;
+
+ bool mapLoadFinish = false;
+ bool initedFightNpc = false;
+
+ HazyRegionIncidentType incidentType;
+
+ HazyGrassModel model { get { return ModelCenter.Instance.GetModel<HazyGrassModel>(); } }
+ HazyRegionModel hazyRegionModel { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
+
+ public override void Initialize()
{
- static readonly Vector3 PlayerBornPosition = new Vector3(17.25f, 5.12f, 3.70f);
+ base.Initialize();
- static List<HazyMapNpcScriptableObject.NpcInfo> s_NpcInfos = new List<HazyMapNpcScriptableObject.NpcInfo>();
- static Dictionary<Vector3, GA_NpcClientCollect> s_CollectNpcs = new Dictionary<Vector3, GA_NpcClientCollect>();
- static Dictionary<uint, Vector3> s_Sid2NpcPos = new Dictionary<uint, Vector3>();
- static Dictionary<uint, int> s_Sid2NpcIds = new Dictionary<uint, int>();
+ s_NpcInfos.Clear();
+ s_Sid2NpcIds.Clear();
+ s_Sid2NpcPos.Clear();
- static int grassRefreshCount = 0;
+ mapLoadFinish = false;
+ initedFightNpc = false;
- bool mapLoadFinish = false;
+ grassRefreshCount = 0;
- HazyGrassModel model { get { return ModelCenter.Instance.GetModel<HazyGrassModel>(); } }
-
- public override void Initialize()
+ var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
+ if (config != null)
{
- base.Initialize();
-
- s_NpcInfos.Clear();
- s_Sid2NpcIds.Clear();
- s_Sid2NpcPos.Clear();
-
- mapLoadFinish = false;
-
- grassRefreshCount = 0;
-
- UnloadAllNpc();
-
- GA_NpcClientCollect.OnCollectFinished += OnCollectFinished;
+ incidentType = (HazyRegionIncidentType)config.incidentType;
}
- protected override void OnStageLoadFinish()
+ UnloadAllNpc();
+
+ GA_NpcClientCollect.OnCollectFinished += OnCollectFinished;
+ }
+
+ protected override void OnStageLoadFinish()
+ {
+ base.OnStageLoadFinish();
+
+ mapLoadFinish = true;
+ model.RefreshGrassBornTime(TimeUtility.ServerNow);
+
+ InitialPlayer();
+ InitializeNpc();
+
+ initedFightNpc = true;
+ }
+
+ protected override void OnUpdate()
+ {
+ base.OnUpdate();
+
+ if (mapLoadFinish)
{
- base.OnStageLoadFinish();
-
- mapLoadFinish = true;
- model.RefreshGrassBornTime(TimeUtility.ServerNow);
-
- InitialPlayer();
- InitializeNpc();
- }
-
- protected override void OnUpdate()
- {
- base.OnUpdate();
-
- if (mapLoadFinish)
+ var used = Mathf.Max(0, (int)(TimeUtility.ServerNow - model.grassBornTime).TotalSeconds);
+ var count = used / model.grassRefreshSeconds;
+ if (count != grassRefreshCount)
{
- var used = Mathf.Max(0, (int)(TimeUtility.ServerNow - model.grassBornTime).TotalSeconds);
- var count = used / model.grassRefreshSeconds;
- if (count != grassRefreshCount)
- {
- RebornCollectedNpc();
- grassRefreshCount = count;
- }
- }
- }
-
- public override void UnInitialize()
- {
- base.UnInitialize();
-
- UnloadAllNpc();
-
- GA_NpcClientCollect.OnCollectFinished -= OnCollectFinished;
- }
-
- private void OnCollectFinished(uint _sid)
- {
- if (s_Sid2NpcIds.ContainsKey(_sid))
- {
- var npcId = s_Sid2NpcIds[_sid];
- Debug.Log("閲囬泦浜哊pc:--" + npcId);
- }
-
- if (s_Sid2NpcPos.ContainsKey(_sid))
- {
- var pos = s_Sid2NpcPos[_sid];
- if (s_CollectNpcs.ContainsKey(pos))
- {
- s_CollectNpcs.Remove(pos);
- }
- }
- }
-
- void InitializeNpc()
- {
- s_NpcInfos.Clear();
-
- var config = ScriptableObjectLoader.LoadSoHazyMapNpc(ClientDungeonStageUtility.clientMapId);
- var npcInfos = config.GetAllNpcInfos();
- if (npcInfos != null)
- {
- s_NpcInfos.AddRange(npcInfos);
RebornCollectedNpc();
+ grassRefreshCount = count;
}
}
+ }
- void InitialPlayer()
+ public override void UnInitialize()
+ {
+ base.UnInitialize();
+
+ UnloadAllNpc();
+
+ GA_NpcClientCollect.OnCollectFinished -= OnCollectFinished;
+ }
+
+ private void OnCollectFinished(uint _sid)
+ {
+ if (s_Sid2NpcIds.ContainsKey(_sid))
{
- var hero = PlayerDatas.Instance.hero;
- hero.Pos = PlayerBornPosition;
- CameraController.Instance.Apply();
+ var npcId = s_Sid2NpcIds[_sid];
+ Debug.Log("閲囬泦浜哊pc:--" + npcId);
}
- void RebornCollectedNpc()
+ if (s_Sid2NpcPos.ContainsKey(_sid))
{
- foreach (var npcInfo in s_NpcInfos)
+ var pos = s_Sid2NpcPos[_sid];
+ if (s_CollectNpcs.ContainsKey(pos))
{
- switch (npcInfo.npcType)
- {
- case E_NpcType.Collect:
- GA_NpcClientCollect _npc = null;
- if (!s_CollectNpcs.TryGetValue(npcInfo.position, out _npc)
- || _npc == null || _npc.ActorInfo.serverDie)
+ s_CollectNpcs.Remove(pos);
+ }
+ }
+ }
+
+ void InitializeNpc()
+ {
+ s_NpcInfos.Clear();
+
+ var config = ScriptableObjectLoader.LoadSoHazyMapNpc(ClientDungeonStageUtility.clientMapId);
+ var npcInfos = config.GetAllNpcInfos();
+ if (npcInfos != null)
+ {
+ s_NpcInfos.AddRange(npcInfos);
+ RebornCollectedNpc();
+ }
+ }
+
+ void InitialPlayer()
+ {
+ var hero = PlayerDatas.Instance.hero;
+ if (incidentType == HazyRegionIncidentType.ReikiGrass)
+ {
+ hero.Pos = PlayerBornPosition1;
+ }
+ else if (incidentType == HazyRegionIncidentType.FairyGrass)
+ {
+ hero.Pos = PlayerBornPosition2;
+ }
+ CameraController.Instance.Apply();
+ }
+
+ void RebornCollectedNpc()
+ {
+ foreach (var npcInfo in s_NpcInfos)
+ {
+ switch (npcInfo.npcType)
+ {
+ case E_NpcType.Collect:
+ GA_NpcClientCollect _npc = null;
+ if (!s_CollectNpcs.TryGetValue(npcInfo.position, out _npc)
+ || _npc == null || _npc.ActorInfo.serverDie)
+ {
+ _npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientCollect>((uint)npcInfo.npcId,
+ E_ActorGroup.FuncNpc);
+ if (_npc != null)
{
- _npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientCollect>((uint)npcInfo.npcId,
- E_ActorGroup.FuncNpc);
- if (_npc != null)
- {
- _npc.Pos = npcInfo.position;
- s_CollectNpcs[npcInfo.position] = _npc;
+ _npc.Pos = npcInfo.position;
+ s_CollectNpcs[npcInfo.position] = _npc;
- s_Sid2NpcIds[_npc.ServerInstID] = npcInfo.npcId;
- s_Sid2NpcPos[_npc.ServerInstID] = npcInfo.position;
- }
+ s_Sid2NpcIds[_npc.ServerInstID] = npcInfo.npcId;
+ s_Sid2NpcPos[_npc.ServerInstID] = npcInfo.position;
}
- break;
- }
+ }
+ break;
+ case E_NpcType.Fight:
+ if (!initedFightNpc)
+ {
+ var fightNpc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>((uint)npcInfo.npcId,
+ E_ActorGroup.Enemy);
+ if (fightNpc != null)
+ {
+ fightNpc.Pos = npcInfo.position;
+ fightNpc.OnAttacked -= OnAttackNpc;
+ fightNpc.OnAttacked += OnAttackNpc;
+ }
+ s_ClientFightNpcs.Add(fightNpc);
+ }
+ break;
+ }
+ }
+ }
+
+ private void OnAttackNpc()
+ {
+ Debug.Log("鏀诲嚮浜嗗疂绠辨��");
+ }
+
+ void UnloadAllNpc()
+ {
+ foreach (var _npc in s_CollectNpcs.Values)
+ {
+ if (_npc != null)
+ {
+ _npc.KillerServerInstID = PlayerDatas.Instance.PlayerId;
+ _npc.ActorInfo.serverDie = true;
+ GAMgr.Instance.ServerDie(_npc.ServerInstID);
+ GAMgr.Instance.Release(_npc);
}
}
- void UnloadAllNpc()
+ foreach (var _npc in s_ClientFightNpcs)
{
- foreach (var _npc in s_CollectNpcs.Values)
+ if (_npc != null)
{
- if (_npc != null)
- {
- _npc.KillerServerInstID = PlayerDatas.Instance.PlayerId;
- _npc.ActorInfo.serverDie = true;
- GAMgr.Instance.ServerDie(_npc.ServerInstID);
- GAMgr.Instance.Release(_npc);
- }
+ _npc.OnAttacked -= OnAttackNpc;
+ _npc.ActorInfo.serverDie = true;
+ GAMgr.Instance.ServerDie(_npc.ServerInstID);
+ GAMgr.Instance.Release(_npc);
}
- s_CollectNpcs.Clear();
}
+
+ s_ClientFightNpcs.Clear();
+ s_CollectNpcs.Clear();
+ }
#if UNITY_EDITOR
- private void OnGUI()
+ private void OnGUI()
+ {
+ if (GUILayout.Button("Exit"))
{
- if (GUILayout.Button("Exit"))
- {
- model.RequestExitClientDungeon();
- }
+ model.RequestExitClientDungeon();
}
-#endif
}
-}
+#endif
+}
diff --git a/System/HazyRegion/HazyAdventureHintWin.cs b/System/HazyRegion/HazyAdventureHintWin.cs
index 917afef..c7a6dae 100644
--- a/System/HazyRegion/HazyAdventureHintWin.cs
+++ b/System/HazyRegion/HazyAdventureHintWin.cs
@@ -55,7 +55,7 @@
if (config != null)
{
var npcConfig = NPCConfig.Get(config.npcId);
- m_AdventureName.text = string.Format("涓巤0}瀵硅瘽锛�", npcConfig.charName);
+ m_AdventureName.text = Language.Get("AdventureDialogue", npcConfig.charName);
}
HazyRegionModel.Incident incident;
diff --git a/System/HazyRegion/HazyDemonKingModel.cs b/System/HazyRegion/HazyDemonKingModel.cs
index 9da9ceb..943474d 100644
--- a/System/HazyRegion/HazyDemonKingModel.cs
+++ b/System/HazyRegion/HazyDemonKingModel.cs
@@ -14,6 +14,9 @@
public const int Client_MapID = 2000;
+ public const int DEMONKINGMAPID1 = 22030;
+ public const int DEMONKINGMAPID2 = 32030;
+
public event Action onPlayerInfoRefresh;
HazyRegionModel hazyRegionModel { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
@@ -159,7 +162,7 @@
var configs = HazyRegionConfig.GetValues();
foreach (var config in configs)
{
- if (config.incidentType == (int)HazyRegionIncidentType.Boss
+ if (config.incidentType == (int)HazyRegionIncidentType.DemonKing
&& config.dungeonId == mapId)
{
return true;
diff --git a/System/HazyRegion/HazyDemonKingPlayerBehaviour.cs b/System/HazyRegion/HazyDemonKingPlayerBehaviour.cs
index fb3825d..fd460fa 100644
--- a/System/HazyRegion/HazyDemonKingPlayerBehaviour.cs
+++ b/System/HazyRegion/HazyDemonKingPlayerBehaviour.cs
@@ -102,18 +102,15 @@
switch (atkState)
{
case 0:
- m_FightSign.SetSprite("HazyFightState_Red");
- m_AtkState.text = "鎴樻枟涓�";
+ m_AtkState.text = Language.Get("DemonKingFightState_0");
m_AtkState.color = UIHelper.GetUIColor(TextColType.Red, true);
break;
case 1:
- m_FightSign.SetSprite("HazyFightState_White");
- m_AtkState.text = "鍙嶅嚮";
+ m_AtkState.text = Language.Get("DemonKingFightState_1");
m_AtkState.color = UIHelper.GetUIColor(TextColType.Red, true);
break;
case 2:
- m_FightSign.SetSprite("HazyFightState_White");
- m_AtkState.text = "鏀诲嚮";
+ m_AtkState.text = Language.Get("DemonKingFightState_2");
m_AtkState.color = UIHelper.GetUIColor(TextColType.NavyBrown, true);
break;
}
diff --git a/System/HazyRegion/HazyDemonKingVictoryWin.cs b/System/HazyRegion/HazyDemonKingVictoryWin.cs
index 093c3a2..7dc3579 100644
--- a/System/HazyRegion/HazyDemonKingVictoryWin.cs
+++ b/System/HazyRegion/HazyDemonKingVictoryWin.cs
@@ -19,6 +19,8 @@
[SerializeField] ScrollRect m_RewardsScroll;
[SerializeField] Text m_ExitTimer;
[SerializeField] HorizontalLayoutGroup m_RewardLayout;
+ [SerializeField] Transform m_ContainerFirst;
+ [SerializeField] Transform m_ContainerOther;
[SerializeField] ButtonEx m_Exit;
List<DemonJarRewardBehaviour> m_Items = new List<DemonJarRewardBehaviour>();
@@ -101,6 +103,11 @@
timer = 0f;
m_ExitTimer.text = Language.Get("DungeonVictoryWin_Btn_Exit_1", Mathf.Clamp((int)seconds, 0, int.MaxValue));
m_ExitTimer.gameObject.SetActive(true);
+
+ bool isFirst = model.dungeonResult.ownerID == PlayerDatas.Instance.PlayerId;
+ m_ContainerFirst.gameObject.SetActive(isFirst);
+ m_ContainerOther.gameObject.SetActive(!isFirst);
+
m_ContainerPoivt.gameObject.SetActive(true);
DisplayRewards();
diff --git a/System/HazyRegion/HazyGrassDungeonWin.cs b/System/HazyRegion/HazyGrassDungeonWin.cs
index f57fe7c..b038997 100644
--- a/System/HazyRegion/HazyGrassDungeonWin.cs
+++ b/System/HazyRegion/HazyGrassDungeonWin.cs
@@ -20,6 +20,9 @@
[SerializeField] Text m_BasicGrassRefreshTime;
[SerializeField] Text m_FairyGrassRefreshTime;
+ [SerializeField] Transform m_ContainerCollectSucc;
+ [SerializeField] Text m_GainRemind;
+
DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
HazyRegionModel hazyRegionModel { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
HazyGrassModel hazyGrassModel { get { return ModelCenter.Instance.GetModel<HazyGrassModel>(); } }
@@ -34,6 +37,8 @@
protected override void OnPreOpen()
{
+ m_ContainerCollectSucc.gameObject.SetActive(false);
+
Display();
GlobalTimeEvent.Instance.secondEvent += PerSecond;
@@ -83,8 +88,8 @@
{
var used = Mathf.Max(0, (int)(TimeUtility.ServerNow - hazyGrassModel.grassBornTime).TotalSeconds);
var refreshSeconds = hazyGrassModel.grassRefreshSeconds - used % hazyGrassModel.grassRefreshSeconds;
- m_BasicGrassRefreshTime.text = string.Format("鍩虹鑽変笡{0}鍚庡埛鏂�", TimeUtility.SecondsToMS(refreshSeconds));
- m_FairyGrassRefreshTime.text = string.Format("鐏佃崏涓泏0}鍚庡埛鏂�", TimeUtility.SecondsToMS(refreshSeconds));
+ m_BasicGrassRefreshTime.text = Language.Get("HazyBasicGrassRefresh", TimeUtility.SecondsToMS(refreshSeconds));
+ m_FairyGrassRefreshTime.text = Language.Get("HazyFairyGrassRefresh", TimeUtility.SecondsToMS(refreshSeconds));
}
}
diff --git a/System/HazyRegion/HazyRegionEntrancePanel.cs b/System/HazyRegion/HazyRegionEntrancePanel.cs
index 9b51283..030fad5 100644
--- a/System/HazyRegion/HazyRegionEntrancePanel.cs
+++ b/System/HazyRegion/HazyRegionEntrancePanel.cs
@@ -68,7 +68,7 @@
hourMinute.minuteBegin.ToString("D2"), hourMinute.hourEnd.ToString("D2"),
hourMinute.minuteEnd.ToString("D2"));
timeLabel = UIHelper.AppendColor(TextColType.Green, timeLabel);
- m_OpenTime.text = string.Format("姣忔棩{0}鍙繘琛屽璁�", timeLabel);
+ m_OpenTime.text = Language.Get("HazyRegionEntranceTime", timeLabel);
}
}
}
diff --git a/System/HazyRegion/HazyRegionIncidentBehaviour.cs b/System/HazyRegion/HazyRegionIncidentBehaviour.cs
index f23c4d5..245fefd 100644
--- a/System/HazyRegion/HazyRegionIncidentBehaviour.cs
+++ b/System/HazyRegion/HazyRegionIncidentBehaviour.cs
@@ -69,7 +69,7 @@
void DisplayBase()
{
var config = HazyRegionConfig.Get(incidentId);
- m_DepletionPoint.text = string.Format("娑堣�椾綋鍔涳細 ", config.point);
+ m_DepletionPoint.text = Language.Get("HazyRegionPoint", config.point);
m_IncidentTitle.text = config.name;
m_Icon.SetSprite(config.PortraitID);
m_Icon.SetNativeSize();
@@ -99,13 +99,34 @@
void DisplayBoss()
{
- m_ContainerBoss.gameObject.SetActive(incidentType == HazyRegionIncidentType.Boss);
+ m_ContainerBoss.gameObject.SetActive(incidentType == HazyRegionIncidentType.DemonKing);
var config = HazyRegionConfig.Get(incidentId);
- if (incidentType == HazyRegionIncidentType.Boss)
+ if (incidentType == HazyRegionIncidentType.DemonKing)
{
var npcConfig = NPCConfig.Get(config.npcId);
m_BossName.text = npcConfig.charName;
}
+
+ DisplayBossState();
+ }
+
+ void DisplayBossState()
+ {
+ if (incidentType == HazyRegionIncidentType.DemonKing)
+ {
+ if (model.InFakeHazyRegion)
+ {
+ var fighting = ClientDungeonStageUtility.isClientDungeon;
+ m_PlayerCount.gameObject.SetActive(true);
+ m_RebornTime.gameObject.SetActive(false);
+ m_PlayerCount.text = Language.Get("HazyDemonKingPlayerCount", fighting ? 1 : 0);
+ }
+ else
+ {
+ m_PlayerCount.gameObject.SetActive(false);
+ m_RebornTime.gameObject.SetActive(false);
+ }
+ }
}
void DisplayState()
diff --git a/System/HazyRegion/HazyRegionIncidentPanel.cs b/System/HazyRegion/HazyRegionIncidentPanel.cs
index 3762198..d6f37bc 100644
--- a/System/HazyRegion/HazyRegionIncidentPanel.cs
+++ b/System/HazyRegion/HazyRegionIncidentPanel.cs
@@ -124,7 +124,7 @@
switch (state)
{
case 1:
- ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get(""), (bool isOk) =>
+ ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("HazyRegionBackRemind_1"), (bool isOk) =>
{
if (isOk)
{
@@ -133,7 +133,7 @@
});
break;
case 2:
- ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get(""), (bool isOk) =>
+ ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("HazyRegionBackRemind_2"), (bool isOk) =>
{
if (isOk)
{
diff --git a/System/HazyRegion/HazyRegionModel.cs b/System/HazyRegion/HazyRegionModel.cs
index 4fa82fd..32139dd 100644
--- a/System/HazyRegion/HazyRegionModel.cs
+++ b/System/HazyRegion/HazyRegionModel.cs
@@ -360,7 +360,7 @@
}
}
break;
- case HazyRegionIncidentType.Boss:
+ case HazyRegionIncidentType.DemonKing:
if (InFakeHazyRegion)
{
hazyDemonKingModel.RequestEnterClientDungeon();
@@ -517,7 +517,7 @@
Adventure,
Precious,
FairyGrass,
- Boss,
+ DemonKing,
ReikiGrass,
}
}
--
Gitblit v1.8.0