From fc8c78e4a2bcbef5327d1859cd3b7f84dbd651ff Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 18 一月 2019 20:48:01 +0800
Subject: [PATCH] 5923 【前端】【1.5.100】诛仙Boss功能
---
Core/GameEngine/Model/ConfigManager.cs | 1
System/JadeDynastyBoss.meta | 0
System/JadeDynastyBoss/JadeDynastyDamageRankWin.cs | 59 +-
System/Dungeon/DungeonBuyTimesWin.cs | 11
Utility/EnumHelper.cs | 2
System/JadeDynastyBoss/JadeDynastyBossKillRecord.cs | 21 +
System/JadeDynastyBoss/JadeDynastyBossModel.cs.meta | 0
System/Dungeon/DungeonModel.cs | 6
System/JadeDynastyBoss/JadeDynastyDamageRankWin.cs.meta | 12
System/JadeDynastyBoss/JadeDynastyBossBehaviour.cs.meta | 0
System/Dungeon/DungeonRankBehaviour.cs | 1
/dev/null | 121 -----
System/JadeDynastyBoss/JadeDynastyBossBehaviour.cs | 162 +++++++
System/JadeDynastyBoss/JadeDynastyBossWin.cs.meta | 0
Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs | 56 ++
System/FindPrecious/FindPreciousModel.cs | 12
System/FindPrecious/LootPreciousFrameWin.cs | 10
System/JadeDynastyBoss/JadeDynastyBossKillRecord.cs.meta | 12
System/FindPrecious/FindPreciousBossRebornBehaviour.cs | 6
System/MainInterfacePanel/InGamePushContainer.cs | 21
System/WindowBase/ModelCenter.cs | 2
System/JadeDynastyBoss/JadeDynastyBossModel.cs | 354 ++++++++++++++++
Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs.meta | 12
System/JadeDynastyBoss/JadeDynastyBossWin.cs | 331 +++++++++++++++
24 files changed, 1,041 insertions(+), 171 deletions(-)
diff --git a/Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs b/Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs
new file mode 100644
index 0000000..7401ee4
--- /dev/null
+++ b/Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs
@@ -0,0 +1,56 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Friday, January 18, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class JadeDynastyBossConfig : ConfigBase {
+
+ public int NPCID { get ; private set ; }
+ public int LineID { get ; private set ; }
+ public int Time { get ; private set ; }
+ public int RealmLV { get ; private set ; }
+ public int ZhuXianScore { get ; private set ; }
+ public string dropItems { get ; private set; }
+ public string PortraitID { get ; private set; }
+
+ public override string getKey()
+ {
+ return NPCID.ToString();
+ }
+
+ public override void Parse() {
+ try
+ {
+ NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+
+ LineID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+
+ Time=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+
+ RealmLV=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
+
+ ZhuXianScore=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
+
+ dropItems = rawContents[5].Trim();
+
+ PortraitID = rawContents[6].Trim();
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs.meta b/Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs.meta
new file mode 100644
index 0000000..69ebe16
--- /dev/null
+++ b/Core/GameEngine/Model/Config/JadeDynastyBossConfig.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bc9f70989c6d3344aad5bd0dbda7bc2b
+timeCreated: 1547804881
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index 93ea9a6..91e7351 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -225,6 +225,7 @@
AddAsyncTask<FashionDressConfig>();
AddAsyncTask<WeekPartyPointConfig>();
AddAsyncTask<SceneReplaceConfig>();
+ AddAsyncTask<JadeDynastyBossConfig>();
while (!AllCompleted())
{
diff --git a/System/Dungeon/DungeonBuyTimesWin.cs b/System/Dungeon/DungeonBuyTimesWin.cs
index 08656e9..0dddfa8 100644
--- a/System/Dungeon/DungeonBuyTimesWin.cs
+++ b/System/Dungeon/DungeonBuyTimesWin.cs
@@ -188,6 +188,17 @@
return false;
}
}
+ else if (JadeDynastyBossModel.JADEDYNASTY_MAP == model.currentDungeon.mapId)
+ {
+ var _totalTimes = model.GetTotalTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
+ var _enterTimes = model.GetEnterTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
+ var jadeDynastyBossModel = ModelCenter.Instance.GetModel<JadeDynastyBossModel>();
+ if ((_totalTimes - _enterTimes) >= jadeDynastyBossModel.challengeLimitCount)
+ {
+ MessageWin.Inst.ShowFixedTip(Language.Get("DemonJar18"));
+ return false;
+ }
+ }
return true;
}
diff --git a/System/Dungeon/DungeonModel.cs b/System/Dungeon/DungeonModel.cs
index 3adb88f..f37b53c 100644
--- a/System/Dungeon/DungeonModel.cs
+++ b/System/Dungeon/DungeonModel.cs
@@ -840,6 +840,12 @@
WindowCenter.Instance.Open<DemonJarDamageRankWin>();
}
break;
+ //case JadeDynastyBossModel.JADEDYNASTY_MAP:
+ // if (!WindowCenter.Instance.IsOpen<JadeDynastyDamageRankWin>())
+ // {
+ // WindowCenter.Instance.Open<JadeDynastyDamageRankWin>();
+ // }
+ // break;
case TreasureModel.TREASURE_MAPID:
break;
case HeavenBattleModel.HEAVEBATTLE_MAPID:
diff --git a/System/Dungeon/DungeonRankBehaviour.cs b/System/Dungeon/DungeonRankBehaviour.cs
index 7194a65..7b60891 100644
--- a/System/Dungeon/DungeonRankBehaviour.cs
+++ b/System/Dungeon/DungeonRankBehaviour.cs
@@ -39,6 +39,7 @@
switch (currentDugeonId)
{
case 31170:
+ //case JadeDynastyBossModel.JADEDYNASTY_MAP:
case DemonJarModel.DEMONJAR_MAPID:
{
if (model.mission.hurtInfo != null && model.mission.hurtInfo.Length > 0)
diff --git a/System/FindPrecious/FindPreciousBossRebornBehaviour.cs b/System/FindPrecious/FindPreciousBossRebornBehaviour.cs
index ba817ae..a144adf 100644
--- a/System/FindPrecious/FindPreciousBossRebornBehaviour.cs
+++ b/System/FindPrecious/FindPreciousBossRebornBehaviour.cs
@@ -130,7 +130,7 @@
case FindPreciousType.CrossServerBoss:
GotoKillCrossServerBoss(bossId);
break;
- case FindPreciousType.StrangleGodBoss:
+ case FindPreciousType.JadeDynastyBoss:
GotoKillStrangleGodBoss(bossId);
break;
}
@@ -345,8 +345,8 @@
if (mapConfig.MapFBType == (int)MapType.OpenCountry)
{
WindowCenter.Instance.Close<MainInterfaceWin>();
- var strangleGodBossModel = ModelCenter.Instance.GetModel<StrangleGodBossModel>();
- strangleGodBossModel.assginSelectBossId = _bossId;
+ var jadeDynastyBossModel = ModelCenter.Instance.GetModel<JadeDynastyBossModel>();
+ jadeDynastyBossModel.assginSelectBossId = _bossId;
WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 3);
}
else
diff --git a/System/FindPrecious/FindPreciousModel.cs b/System/FindPrecious/FindPreciousModel.cs
index c62ee3d..7b3d22e 100644
--- a/System/FindPrecious/FindPreciousModel.cs
+++ b/System/FindPrecious/FindPreciousModel.cs
@@ -56,7 +56,7 @@
BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
PersonalBossModel personalBossModel { get { return ModelCenter.Instance.GetModel<PersonalBossModel>(); } }
DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } }
- StrangleGodBossModel strangleGodBossModel { get { return ModelCenter.Instance.GetModel<StrangleGodBossModel>(); } }
+ JadeDynastyBossModel jadeDynastyBossModel { get { return ModelCenter.Instance.GetModel<JadeDynastyBossModel>(); } }
public override void Init()
{
@@ -432,11 +432,13 @@
}
if (_redpointId == DemonJarModel.DEMONJAR_REDPOINTID ||
- _redpointId == DogzDungeonModel.DOGZDUNGEON_REDPOINT)
+ _redpointId == DogzDungeonModel.DOGZDUNGEON_REDPOINT ||
+ _redpointId == JadeDynastyBossModel.JADEDYNASTY_REDPOINTID)
{
var demonJarRedpointCount = demonJarModel.redpoint.count;
var dogzDungeonRedpointCount = dogzDungeonModel.redpoint.count;
- var totalCount = demonJarRedpointCount + dogzDungeonRedpointCount;
+ var jadeDynastyBossRedpointCount = jadeDynastyBossModel.redpoint.count;
+ var totalCount = demonJarRedpointCount + dogzDungeonRedpointCount + jadeDynastyBossRedpointCount;
lootPreciousRedpoint.count = totalCount;
lootPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
@@ -473,9 +475,9 @@
{
return FindPreciousType.CrossServerBoss;
}
- else if (strangleGodBossModel.IsStrangleGodBoss(_bossId))
+ else if (jadeDynastyBossModel.IsJadeDynastyBoss(_bossId))
{
- return FindPreciousType.StrangleGodBoss;
+ return FindPreciousType.JadeDynastyBoss;
}
return FindPreciousType.None;
}
diff --git a/System/FindPrecious/LootPreciousFrameWin.cs b/System/FindPrecious/LootPreciousFrameWin.cs
index e9b1012..6bd5388 100644
--- a/System/FindPrecious/LootPreciousFrameWin.cs
+++ b/System/FindPrecious/LootPreciousFrameWin.cs
@@ -17,7 +17,7 @@
[SerializeField] FunctionButton m_DemonJar;
[SerializeField] FunctionButton m_FairyGrabBoss;
[SerializeField] FunctionButton m_DogzDungeon;
- [SerializeField] FunctionButton m_StrangleGodBoss;
+ [SerializeField] FunctionButton m_JadeDynastyBoss;
[SerializeField] Button m_Left;
[SerializeField] Button m_Right;
@@ -33,7 +33,7 @@
m_DemonJar.AddListener(ShowDemonJar);
m_DogzDungeon.AddListener(ShowDogzDungeon);
m_FairyGrabBoss.AddListener(FairyGrabBoss);
- m_StrangleGodBoss.AddListener(StrangleGodBoss);
+ m_JadeDynastyBoss.AddListener(JadeDynastyBoss);
m_Left.AddListener(ShowLastFunction);
m_Right.AddListener(ShowNextFunction);
m_Close.AddListener(CloseClick);
@@ -93,11 +93,11 @@
functionOrder = m_DogzDungeon.order;
}
- private void StrangleGodBoss()
+ private void JadeDynastyBoss()
{
CloseSubWindows();
- WindowCenter.Instance.Open<StrangleGodBossWin>();
- functionOrder = m_StrangleGodBoss.order;
+ WindowCenter.Instance.Open<JadeDynastyBossWin>();
+ functionOrder = m_JadeDynastyBoss.order;
}
private void CloseSubWindows()
diff --git a/System/StrangleGodBoss.meta b/System/JadeDynastyBoss.meta
similarity index 100%
rename from System/StrangleGodBoss.meta
rename to System/JadeDynastyBoss.meta
diff --git a/System/JadeDynastyBoss/JadeDynastyBossBehaviour.cs b/System/JadeDynastyBoss/JadeDynastyBossBehaviour.cs
new file mode 100644
index 0000000..88396c3
--- /dev/null
+++ b/System/JadeDynastyBoss/JadeDynastyBossBehaviour.cs
@@ -0,0 +1,162 @@
+锘縰sing System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+namespace Snxxz.UI
+{
+ public class JadeDynastyBossBehaviour : FindPreciousBossBriefInfoBehaviour
+ {
+ [SerializeField] Transform m_ContainerChallengeable;
+ [SerializeField] Transform m_ContainerUnChanllgeable;
+ [SerializeField] Text m_ChallengeCondition;
+ [SerializeField] Transform m_ContainerAttention;
+ [SerializeField] Text m_Participant;
+
+ JadeDynastyBossModel model
+ {
+ get { return ModelCenter.Instance.GetModel<JadeDynastyBossModel>(); }
+ }
+
+ public int bossNpcId { get; private set; }
+
+ protected override int selectedBossId
+ {
+ get { return model.selectBossId; }
+ set { model.selectBossId = value; }
+ }
+
+ protected override InteractorableState interactorableState
+ {
+ get
+ {
+ var selected = selectedBossId == bossId;
+ var condition = 0;
+ var dieOrLocked = !model.IsBossUnLocked(bossId, out condition) || !findPreciousModel.IsBossAlive(bossId);
+
+ if (!dieOrLocked)
+ {
+ return selected ? InteractorableState.NormalSelected : InteractorableState.NormalUnSelected;
+ }
+ else
+ {
+ return selected ? InteractorableState.DieOrLockedSelected : InteractorableState.DieOrLockedUnSelected;
+ }
+ }
+ set
+ {
+ base.interactorableState = value;
+ }
+ }
+
+ protected override bool isRebornRightNow
+ {
+ get
+ {
+ var condition = 0;
+ return model.IsBossUnLocked(bossId, out condition) && base.isRebornRightNow;
+ }
+ }
+
+ protected override bool isUnLocked
+ {
+ get
+ {
+ var condition = 0;
+ return model.IsBossUnLocked(bossId, out condition);
+ }
+ }
+
+ public override void Display(object _data)
+ {
+ base.Display(_data);
+ bossNpcId = (int)_data;
+
+ DisplayBase();
+ UpdateBossRebornCoolDown(isUnLocked);
+ UpdateBossPortrait(interactorableState);
+ UpdateBossNameLevelFont(interactorableState);
+ DisplayParticipant();
+ DisplayCondition();
+ DisplaySubscrib();
+
+ model.participantRefresh -= DisplayParticipant;
+ model.participantRefresh += DisplayParticipant;
+ model.selectBossRefresh -= SelectBossRefresh;
+ model.selectBossRefresh += SelectBossRefresh;
+ }
+
+ public override void Dispose()
+ {
+ base.Dispose();
+
+ model.participantRefresh -= DisplayParticipant;
+ model.selectBossRefresh -= SelectBossRefresh;
+ }
+
+ protected override void OnSubscribe(int _bossId)
+ {
+ base.OnSubscribe(_bossId);
+ if (bossId != _bossId)
+ {
+ return;
+ }
+
+ DisplaySubscrib();
+ }
+
+ protected override void OnBossInfoUpdate(int _bossId)
+ {
+ base.OnBossInfoUpdate(_bossId);
+ var condition = 0;
+ var unLocked = model.IsBossUnLocked(bossId, out condition);
+ m_Participant.gameObject.SetActive(unLocked && findPreciousModel.IsBossAlive(bossId));
+ }
+
+ public void DisplayBase()
+ {
+ var config = Config.Instance.Get<NPCConfig>(bossNpcId);
+ var jadeDynastyBossConfig = Config.Instance.Get<JadeDynastyBossConfig>(bossNpcId);
+ DrawBossBaseInfo(jadeDynastyBossConfig.PortraitID, config.charName, config.NPCLV, config.ClientRealm);
+ }
+
+ private void DisplaySubscrib()
+ {
+ m_ContainerAttention.gameObject.SetActive(findPreciousModel.IsBossSubscribed(bossId));
+ }
+
+ private void DisplayParticipant()
+ {
+ m_Participant.gameObject.SetActive(isUnLocked && findPreciousModel.IsBossAlive(bossId));
+
+ m_Participant.text = Language.Get("FindPrecious_8", model.GetParticipantCount(bossId));
+ }
+
+ private void DisplayCondition()
+ {
+ m_ContainerUnChanllgeable.gameObject.SetActive(!isUnLocked);
+ m_ContainerChallengeable.gameObject.SetActive(isUnLocked);
+ var condition = 0;
+ m_ChallengeCondition.text = string.Empty;
+ if (!model.IsBossUnLocked(bossId, out condition))
+ {
+ switch (condition)
+ {
+ case 1:
+ break;
+ case 2:
+ break;
+ case 3:
+ break;
+ }
+ }
+ }
+
+ private void SelectBossRefresh(int bossId)
+ {
+ UpdateBossNameLevelFont(interactorableState);
+ }
+ }
+}
+
diff --git a/System/StrangleGodBoss/StrangleGodBossBehaviour.cs.meta b/System/JadeDynastyBoss/JadeDynastyBossBehaviour.cs.meta
similarity index 100%
rename from System/StrangleGodBoss/StrangleGodBossBehaviour.cs.meta
rename to System/JadeDynastyBoss/JadeDynastyBossBehaviour.cs.meta
diff --git a/System/JadeDynastyBoss/JadeDynastyBossKillRecord.cs b/System/JadeDynastyBoss/JadeDynastyBossKillRecord.cs
new file mode 100644
index 0000000..801e903
--- /dev/null
+++ b/System/JadeDynastyBoss/JadeDynastyBossKillRecord.cs
@@ -0,0 +1,21 @@
+锘縰sing System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ public class JadeDynastyBossKillRecord : MonoBehaviour
+ {
+ [SerializeField] Text m_KillTime;
+ [SerializeField] Text m_PlayerName;
+
+ public void Display(DateTime time, string playerName)
+ {
+ m_KillTime.text = time.ToString("hh:mm:ss");
+ m_PlayerName.text = UIHelper.ServerStringTrim(playerName);
+ }
+ }
+}
+
diff --git a/System/JadeDynastyBoss/JadeDynastyBossKillRecord.cs.meta b/System/JadeDynastyBoss/JadeDynastyBossKillRecord.cs.meta
new file mode 100644
index 0000000..e306eb0
--- /dev/null
+++ b/System/JadeDynastyBoss/JadeDynastyBossKillRecord.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ee1187f4529637c48840fb84410ef1f7
+timeCreated: 1547809917
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/JadeDynastyBoss/JadeDynastyBossModel.cs b/System/JadeDynastyBoss/JadeDynastyBossModel.cs
new file mode 100644
index 0000000..3379ecd
--- /dev/null
+++ b/System/JadeDynastyBoss/JadeDynastyBossModel.cs
@@ -0,0 +1,354 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using TableConfig;
+using System;
+
+namespace Snxxz.UI
+{
+ public class JadeDynastyBossModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IAfterPlayerDataInitialize
+ {
+ List<JadeDynastyBossData> jadeDynastyBosses = new List<JadeDynastyBossData>();
+ Dictionary<int, int> jadeDynastyBossParticipantDict = new Dictionary<int, int>();
+ Dictionary<int, List<Item>> dropItemDict = new Dictionary<int, List<Item>>();
+
+ public const int JADEDYNASTY_MAP = 52010;
+ public const int FUNCTIONID = 0;
+ public const int JADEDYNASTY_REDPOINTID = 77003;
+
+ public event Action<int> selectBossRefresh;
+ public event Action participantRefresh;
+
+ public int jadeDynastyScore { get; private set; }
+ public int challengeLimitCount { get; private set; }
+ public int challengeTimes { get; private set; }
+ public int assistLimitCount { get; private set; }
+ public int assistTimes { get; private set; }
+
+ int m_SelectBossId = 0;
+ public int selectBossId
+ {
+ get { return m_SelectBossId; }
+ set
+ {
+ if (m_SelectBossId != value)
+ {
+ m_SelectBossId = value;
+ if (selectBossRefresh != null)
+ {
+ selectBossRefresh(value);
+ }
+ }
+ }
+ }
+
+ public int assginSelectBossId { get; set; }
+
+ public readonly Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, JADEDYNASTY_REDPOINTID);
+
+ MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
+ DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
+ FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
+ public override void Init()
+ {
+ ParseConfig();
+ dungeonModel.dungeonRecordChangeEvent += OnDungeonRecordUpdate;
+ dungeonModel.updateDungeonBuyCnt += OnDungeonBuyCount;
+ FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+ }
+
+ public void OnBeforePlayerDataInitialize()
+ {
+ jadeDynastyScore = 100000000;
+ jadeDynastyBossParticipantDict.Clear();
+ challengeTimes = 0;
+ assistTimes = 0;
+ mapModel.mapLinesUpdateEvent -= MapLinesUpdateEvent;
+ }
+
+ public void OnAfterPlayerDataInitialize()
+ {
+ mapModel.mapLinesUpdateEvent += MapLinesUpdateEvent;
+ }
+
+ public void OnPlayerLoginOk()
+ {
+ UpdateRedpoint();
+ }
+
+ public override void UnInit()
+ {
+ dungeonModel.dungeonRecordChangeEvent -= OnDungeonRecordUpdate;
+ dungeonModel.updateDungeonBuyCnt -= OnDungeonBuyCount;
+ FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
+ }
+
+ void ParseConfig()
+ {
+ {
+ var configs = Config.Instance.GetAllValues<JadeDynastyBossConfig>();
+ foreach (var config in configs)
+ {
+ var dungeonId = dungeonModel.GetDungeonId(JADEDYNASTY_MAP, config.LineID);
+ var dungeonConfig = Config.Instance.Get<DungeonConfig>(dungeonId);
+ jadeDynastyBosses.Add(new JadeDynastyBossData()
+ {
+ bossNpcId = config.NPCID,
+ lineId = config.LineID,
+ challengeCondition = new JadeDynastyBossCondition()
+ {
+ level = dungeonConfig.LVLimitMin,
+ realmLevel = config.RealmLV,
+ score = config.ZhuXianScore,
+ },
+ });
+
+ var itemArray = LitJson.JsonMapper.ToObject<int[][]>(config.dropItems);
+ List<Item> list = new List<Item>();
+ for (int k = 0; k < itemArray.Length; k++)
+ {
+ Item item = new Item()
+ {
+ id = itemArray[k][0],
+ count = itemArray[k][1],
+ bind = itemArray[k][2] == 1,
+ };
+ list.Add(item);
+ }
+ dropItemDict.Add(config.NPCID, list);
+ }
+
+ jadeDynastyBosses.Sort(SortCompare);
+ }
+ }
+
+ public bool IsJadeDynastyBoss(int bossNpcId)
+ {
+ var index = jadeDynastyBosses.FindIndex((x) =>
+ {
+ return x.bossNpcId == bossNpcId;
+ });
+ return index >= 0;
+ }
+
+ public bool IsBossUnLocked(int bossNpcId, out int condition)
+ {
+ condition = 0;
+ var index = jadeDynastyBosses.FindIndex((x) =>
+ {
+ return x.bossNpcId == bossNpcId;
+ });
+ if (index != -1)
+ {
+ var challengeCondition = jadeDynastyBosses[index].challengeCondition;
+ if (PlayerDatas.Instance.baseData.LV < challengeCondition.level)
+ {
+ condition = 1;
+ return false;
+ }
+ if (PlayerDatas.Instance.baseData.realmLevel < challengeCondition.realmLevel)
+ {
+ condition = 2;
+ return false;
+ }
+ if (jadeDynastyScore < challengeCondition.score)
+ {
+ condition = 3;
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public List<int> GetJadeDynastyBosses()
+ {
+ List<int> list = new List<int>();
+ foreach (var boss in jadeDynastyBosses)
+ {
+ list.Add(boss.bossNpcId);
+ }
+ return list;
+ }
+
+ public int GetParticipantCount(int bossId)
+ {
+ if (jadeDynastyBossParticipantDict.ContainsKey(bossId))
+ {
+ return jadeDynastyBossParticipantDict[bossId];
+ }
+ return 0;
+ }
+
+ public int GetLatestUnLockBoss()
+ {
+ if (FuncOpen.Instance.IsFuncOpen(FUNCTIONID))
+ {
+ var latestBossId = jadeDynastyBosses[0].bossNpcId;
+ foreach (var boss in jadeDynastyBosses)
+ {
+ var condition = 0;
+ if (IsBossUnLocked(boss.bossNpcId, out condition))
+ {
+ latestBossId = boss.bossNpcId;
+ }
+ }
+ return latestBossId;
+ }
+ else
+ {
+ return jadeDynastyBosses[0].bossNpcId;
+ }
+ }
+
+ public bool TryGetDropItems(int bossId, out List<Item> dropItems)
+ {
+ return dropItemDict.TryGetValue(bossId, out dropItems);
+ }
+
+ public bool TryEnterDungeon(int bossId,out int error)
+ {
+ var condition = 0;
+ error = 0;
+ if (!IsBossUnLocked(bossId, out condition))
+ {
+ switch (condition)
+ {
+ case 1:
+ error = 1;
+ break;
+ case 2:
+ error = 2;
+ break;
+ case 3:
+ error = 3;
+ break;
+ }
+ return false;
+ }
+
+ var totalTimes = dungeonModel.GetTotalTimes(JADEDYNASTY_MAP);
+ var enterTimes = dungeonModel.GetEnterTimes(JADEDYNASTY_MAP);
+ if (enterTimes >= totalTimes)
+ {
+ error = 4;
+ return false;
+ }
+
+ if (!findPreciousModel.IsBossAlive(bossId))
+ {
+ error = 5;
+ return false;
+ }
+
+ if (CrossServerUtility.IsCrossServer())
+ {
+ error = 6;
+ return false;
+ }
+ return true;
+ }
+
+ public void DisplayErrorTip(int error)
+ {
+
+ }
+
+ private void MapLinesUpdateEvent(int mapId)
+ {
+ if (mapId != JADEDYNASTY_MAP)
+ {
+ return;
+ }
+
+ var lines = mapModel.GetMapLines(JADEDYNASTY_MAP);
+ foreach (var boss in jadeDynastyBosses)
+ {
+ var index = lines.FindIndex((x) =>
+ {
+ return x.lineIndex == boss.lineId;
+ });
+ if (index != -1)
+ {
+ jadeDynastyBossParticipantDict[boss.bossNpcId] = lines[index].playerCount;
+ }
+ else
+ {
+ jadeDynastyBossParticipantDict[boss.bossNpcId] = 0;
+ }
+ }
+
+ if (participantRefresh != null)
+ {
+ participantRefresh();
+ }
+ }
+
+ public static int SortCompare(JadeDynastyBossData lhs, JadeDynastyBossData rhs)
+ {
+ if (lhs.challengeCondition.level != rhs.challengeCondition.level)
+ {
+ return lhs.challengeCondition.level.CompareTo(rhs.challengeCondition.level);
+ }
+ if (lhs.challengeCondition.realmLevel != rhs.challengeCondition.realmLevel)
+ {
+ return lhs.challengeCondition.realmLevel.CompareTo(rhs.challengeCondition.realmLevel);
+ }
+ if (lhs.challengeCondition.score != rhs.challengeCondition.score)
+ {
+ return lhs.challengeCondition.score.CompareTo(rhs.challengeCondition.score);
+ }
+ return 0;
+ }
+
+ private void OnDungeonRecordUpdate(int _dataMapId)
+ {
+ if (JADEDYNASTY_MAP == _dataMapId)
+ {
+ UpdateRedpoint();
+ }
+ }
+
+ private void OnDungeonBuyCount()
+ {
+ UpdateRedpoint();
+ }
+
+ private void OnFuncStateChangeEvent(int id)
+ {
+ if (id == FUNCTIONID)
+ {
+ UpdateRedpoint();
+ }
+ }
+
+ void UpdateRedpoint()
+ {
+ if (FuncOpen.Instance.IsFuncOpen(FUNCTIONID))
+ {
+ var count = dungeonModel.GetTotalTimes(JADEDYNASTY_MAP) - dungeonModel.GetEnterTimes(JADEDYNASTY_MAP);
+ redpoint.count = count;
+ }
+ else
+ {
+ redpoint.count = 0;
+ }
+
+ redpoint.state = redpoint.count > 0 ? RedPointState.Quantity : RedPointState.None;
+ }
+ }
+
+ public struct JadeDynastyBossData
+ {
+ public int bossNpcId;
+ public int lineId;
+ public JadeDynastyBossCondition challengeCondition;
+ }
+
+ public struct JadeDynastyBossCondition
+ {
+ public int level;
+ public int realmLevel;
+ public int score;
+ }
+}
+
diff --git a/System/StrangleGodBoss/StrangleGodBossModel.cs.meta b/System/JadeDynastyBoss/JadeDynastyBossModel.cs.meta
similarity index 100%
rename from System/StrangleGodBoss/StrangleGodBossModel.cs.meta
rename to System/JadeDynastyBoss/JadeDynastyBossModel.cs.meta
diff --git a/System/JadeDynastyBoss/JadeDynastyBossWin.cs b/System/JadeDynastyBoss/JadeDynastyBossWin.cs
new file mode 100644
index 0000000..5baf093
--- /dev/null
+++ b/System/JadeDynastyBoss/JadeDynastyBossWin.cs
@@ -0,0 +1,331 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Thursday, January 17, 2019
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using TableConfig;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+
+ public class JadeDynastyBossWin : Window
+ {
+ [SerializeField] CyclicScroll m_Bosses;
+ [SerializeField] ItemCell[] m_Items;
+ [SerializeField] Text m_ChallengeTimes;
+ [SerializeField] Text m_AssistTimes;
+ [SerializeField] Text m_JadeDynastyScore;
+ [SerializeField] Button m_BuyTimes;
+ [SerializeField] Transform m_SurpassLevel;
+ [SerializeField] ToggleButton m_Subscribe;
+ [SerializeField] Button m_Goto;
+
+ [SerializeField] Transform m_ContainerKillRecord;
+ [SerializeField] Transform m_ContainerNoneRecord;
+ [SerializeField] Transform m_ContainerExistRecord;
+ [SerializeField] JadeDynastyBossKillRecord[] m_KillRecords;
+ [SerializeField] Transform m_ContainerBelongTo;
+ [SerializeField] Text m_BelongToPlayerName;
+ [SerializeField] Text m_BelongToNonePlayer;
+
+ JadeDynastyBossModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyBossModel>(); } }
+ DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
+ FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
+ MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
+
+ float refreshBossStateTime = 0f;
+ #region Built-in
+ protected override void BindController()
+ {
+ }
+
+ protected override void AddListeners()
+ {
+ m_BuyTimes.AddListener(BuyTimes);
+ m_Subscribe.AddListener(SwitchSubscribeBoss);
+ m_Goto.AddListener(GotoKillBoss);
+ }
+
+ protected override void OnPreOpen()
+ {
+ SetDefaultSelectBoss();
+
+ refreshBossStateTime = -1f;
+
+ FindPreciousModel.BossInfo bossInfo;
+ if (findPreciousModel.TryGetBossInfo(model.selectBossId, out bossInfo) && !bossInfo.IsBossAlive())
+ {
+ if (TimeUtility.ServerNow <= bossInfo.refreshTime)
+ {
+ var seconds = (int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds + 1;
+ refreshBossStateTime = Time.realtimeSinceStartup + seconds;
+ }
+ }
+
+ mapModel.RequestQueryMapLineState(JadeDynastyBossModel.JADEDYNASTY_MAP);
+
+ model.assginSelectBossId = 0;
+ }
+
+ protected override void OnActived()
+ {
+ base.OnActived();
+ Display();
+ }
+
+ protected override void OnAfterOpen()
+ {
+ model.selectBossRefresh += SelectBossRefresh;
+ dungeonModel.updateDungeonBuyCnt += ChallengeTimesRefresh;
+ dungeonModel.dungeonRecordChangeEvent += ChallengeTimesRefresh;
+ findPreciousModel.bossSubscribeChangeEvent += DisplaySubscribe;
+ findPreciousModel.bossInfoUpdateEvent += BossInfoUpdateEvent;
+ }
+
+ protected override void OnPreClose()
+ {
+ model.selectBossRefresh -= SelectBossRefresh;
+ dungeonModel.updateDungeonBuyCnt -= ChallengeTimesRefresh;
+ dungeonModel.dungeonRecordChangeEvent -= ChallengeTimesRefresh;
+ findPreciousModel.bossSubscribeChangeEvent -= DisplaySubscribe;
+ findPreciousModel.bossInfoUpdateEvent -= BossInfoUpdateEvent;
+
+ refreshBossStateTime = -1f;
+ }
+
+ protected override void OnAfterClose()
+ {
+ }
+
+ protected override void LateUpdate()
+ {
+ base.LateUpdate();
+ if (refreshBossStateTime > 0)
+ {
+ if (Time.realtimeSinceStartup > refreshBossStateTime)
+ {
+ DisplayKillRecord();
+ DisplayBelongTo();
+ refreshBossStateTime = -1f;
+ }
+ }
+ }
+ #endregion
+
+ public void SetDefaultSelectBoss()
+ {
+ if (model.assginSelectBossId != 0
+ && model.IsJadeDynastyBoss(model.assginSelectBossId))
+ {
+ model.selectBossId = model.assginSelectBossId;
+ }
+ else
+ {
+ model.selectBossId = model.GetLatestUnLockBoss();
+ }
+ }
+
+ public void Display()
+ {
+ DisplayBosses();
+ DisplayChallengeTimes();
+ DisplayDropItems();
+ DisplaySubscribe(model.selectBossId);
+ DisplayKillRecord();
+ DisplayBelongTo();
+ DisplayAssistTimes();
+ DisplayJadeDynastyScore();
+ }
+
+ public void DisplayBosses()
+ {
+ var bosses = model.GetJadeDynastyBosses();
+ m_Bosses.Init(bosses);
+ m_Bosses.MoveToCenter(bosses.IndexOf(model.selectBossId));
+ }
+
+ public void DisplayChallengeTimes()
+ {
+ var totalTimes = dungeonModel.GetTotalTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
+ var enterTimes = dungeonModel.GetEnterTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
+
+ m_ChallengeTimes.text = StringUtility.Contact(totalTimes - enterTimes, "/", model.challengeLimitCount);
+ }
+
+ public void DisplayAssistTimes()
+ {
+ m_AssistTimes.text = StringUtility.Contact(model.assistLimitCount - model.assistTimes, "/", model.assistLimitCount);
+ }
+
+ void DisplayDropItems()
+ {
+ List<Item> dropItems = null;
+ model.TryGetDropItems(model.selectBossId, out dropItems);
+ for (int i = 0; i < m_Items.Length; i++)
+ {
+ m_Items[i].cellBtn.RemoveAllListeners();
+ if (dropItems != null && i < dropItems.Count)
+ {
+ m_Items[i].gameObject.SetActive(true);
+ var item = dropItems[i];
+ ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind ? 1 : 0);
+ m_Items[i].Init(itemCellModel);
+ m_Items[i].cellBtn.AddListener(() =>
+ {
+ ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, item.bind ? 1 : 0);
+ ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
+ });
+ }
+ else
+ {
+ m_Items[i].gameObject.SetActive(false);
+ }
+ }
+
+ var npcDropConfig = Config.Instance.Get<NPCDropItemConfig>(model.selectBossId);
+ m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0
+ && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
+ }
+
+ private void DisplaySubscribe(int _bossId)
+ {
+ m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectBossId);
+ }
+
+ private void DisplayKillRecord()
+ {
+ var alive = findPreciousModel.IsBossAlive(model.selectBossId);
+ m_ContainerKillRecord.gameObject.SetActive(!alive);
+ if (!alive)
+ {
+ var killRecords = findPreciousModel.GetBossKillRecords(model.selectBossId);
+ m_ContainerExistRecord.gameObject.SetActive(killRecords != null && killRecords.Count > 0);
+ m_ContainerNoneRecord.gameObject.SetActive(killRecords == null || killRecords.Count == 0);
+ if (killRecords != null && killRecords.Count > 0)
+ {
+ for (int i = 0; i < m_KillRecords.Length; i++)
+ {
+ if (killRecords != null && i < killRecords.Count)
+ {
+ m_KillRecords[i].gameObject.SetActive(true);
+ m_KillRecords[i].Display(killRecords[i].killTime, killRecords[i].playerName);
+ }
+ else
+ {
+ m_KillRecords[i].gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+ }
+
+ private void DisplayBelongTo()
+ {
+ var alive = findPreciousModel.IsBossAlive(model.selectBossId);
+ m_ContainerBelongTo.gameObject.SetActive(alive);
+ if (alive)
+ {
+ var belongToPlayer = false;
+ m_BelongToNonePlayer.gameObject.SetActive(!belongToPlayer);
+ m_BelongToPlayerName.gameObject.SetActive(belongToPlayer);
+ }
+ }
+
+ private void DisplayJadeDynastyScore()
+ {
+ m_JadeDynastyScore.text = Language.Get("", model.jadeDynastyScore);
+ }
+
+ private void SelectBossRefresh(int bossId)
+ {
+ DisplayDropItems();
+ DisplaySubscribe(model.selectBossId);
+ DisplayKillRecord();
+ DisplayBelongTo();
+
+ FindPreciousModel.BossInfo bossInfo;
+ if (findPreciousModel.TryGetBossInfo(model.selectBossId, out bossInfo) && !bossInfo.IsBossAlive())
+ {
+ if (TimeUtility.ServerNow <= bossInfo.refreshTime)
+ {
+ var seconds = (int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds + 1;
+ refreshBossStateTime = Time.realtimeSinceStartup + seconds;
+ }
+ }
+ }
+
+ private void ChallengeTimesRefresh()
+ {
+ DisplayChallengeTimes();
+ }
+
+ private void ChallengeTimesRefresh(int mapId)
+ {
+ if (JadeDynastyBossModel.JADEDYNASTY_MAP != mapId)
+ {
+ return;
+ }
+ DisplayChallengeTimes();
+ }
+
+ private void BuyTimes()
+ {
+ var totalTimes = dungeonModel.GetTotalTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
+ var enterTimes = dungeonModel.GetEnterTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
+ if ((totalTimes - enterTimes) >= model.challengeLimitCount)
+ {
+ MessageWin.Inst.ShowFixedTip(Language.Get("DemonJar18"));
+ }
+ else
+ {
+ dungeonModel.currentDungeon = new Dungeon(JadeDynastyBossModel.JADEDYNASTY_MAP, 0);
+ WindowCenter.Instance.Open<DungeonBuyTimesWin>();
+ }
+ }
+
+ private void SwitchSubscribeBoss()
+ {
+ if (findPreciousModel.IsBossSubscribed(model.selectBossId))
+ {
+ findPreciousModel.RequestDeSubscribeBoss(model.selectBossId);
+ }
+ else
+ {
+ findPreciousModel.RequestSubscribeBoss(model.selectBossId, false);
+ }
+ }
+
+ private void BossInfoUpdateEvent(int bossId)
+ {
+ if (bossId == model.selectBossId)
+ {
+ DisplayKillRecord();
+ DisplayBelongTo();
+ }
+ }
+
+ private void GotoKillBoss()
+ {
+ var error = 0;
+ if (model.TryEnterDungeon(model.selectBossId, out error))
+ {
+ var config = Config.Instance.Get<JadeDynastyBossConfig>(model.selectBossId);
+ dungeonModel.SingleChallenge(JadeDynastyBossModel.JADEDYNASTY_MAP, config.LineID);
+ }
+ else
+ {
+ model.DisplayErrorTip(error);
+ }
+ }
+ }
+
+}
+
+
+
+
diff --git a/System/StrangleGodBoss/StrangleGodBossWin.cs.meta b/System/JadeDynastyBoss/JadeDynastyBossWin.cs.meta
similarity index 100%
rename from System/StrangleGodBoss/StrangleGodBossWin.cs.meta
rename to System/JadeDynastyBoss/JadeDynastyBossWin.cs.meta
diff --git a/System/StrangleGodBoss/StrangleGodBossWin.cs b/System/JadeDynastyBoss/JadeDynastyDamageRankWin.cs
similarity index 65%
rename from System/StrangleGodBoss/StrangleGodBossWin.cs
rename to System/JadeDynastyBoss/JadeDynastyDamageRankWin.cs
index f83b73a..b57dde9 100644
--- a/System/StrangleGodBoss/StrangleGodBossWin.cs
+++ b/System/JadeDynastyBoss/JadeDynastyDamageRankWin.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: 绗簩涓栫晫
-// [ Date ]: Thursday, January 17, 2019
+// [ Date ]: Friday, January 18, 2019
//--------------------------------------------------------
using System;
@@ -11,35 +11,38 @@
namespace Snxxz.UI {
- public class StrangleGodBossWin : Window
+ public class JadeDynastyDamageRankWin : Window
{
-
- #region Built-in
- protected override void BindController()
- {
- }
-
- protected override void AddListeners()
- {
- }
-
- protected override void OnPreOpen()
- {
- }
-
- protected override void OnAfterOpen()
- {
- }
-
- protected override void OnPreClose()
- {
- }
-
- protected override void OnAfterClose()
- {
- }
+ [SerializeField] DungeonRankBehaviour m_RankBehaviour;
+
+ #region Built-in
+ protected override void BindController()
+ {
+ }
+
+ protected override void AddListeners()
+ {
+ }
+
+ protected override void OnPreOpen()
+ {
+ var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
+ var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
+ m_RankBehaviour.Init(dataMapId);
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ }
+
+ protected override void OnAfterClose()
+ {
+ }
#endregion
-
}
}
diff --git a/System/JadeDynastyBoss/JadeDynastyDamageRankWin.cs.meta b/System/JadeDynastyBoss/JadeDynastyDamageRankWin.cs.meta
new file mode 100644
index 0000000..9994dbe
--- /dev/null
+++ b/System/JadeDynastyBoss/JadeDynastyDamageRankWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 118ee6dbac3babc488ba966899aae754
+timeCreated: 1547814117
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/MainInterfacePanel/InGamePushContainer.cs b/System/MainInterfacePanel/InGamePushContainer.cs
index 99592b8..508f3d4 100644
--- a/System/MainInterfacePanel/InGamePushContainer.cs
+++ b/System/MainInterfacePanel/InGamePushContainer.cs
@@ -35,7 +35,7 @@
DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } }
CrossServerBossModel crossServerBossModel { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } }
- StrangleGodBossModel strangleGodBossModel { get { return ModelCenter.Instance.GetModel<StrangleGodBossModel>(); } }
+ JadeDynastyBossModel jadeDynastyBossModel { get { return ModelCenter.Instance.GetModel<JadeDynastyBossModel>(); } }
VipModel vipModel { get { return ModelCenter.Instance.GetModel<VipModel>(); } }
DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
@@ -270,10 +270,12 @@
show = !GeneralDefine.elderGodNoRebornRemindMaps.Contains(mapId);
break;
case FindPreciousType.DemonJar:
- var totalTimes = dungeonModel.GetTotalTimes(DemonJarModel.DEMONJAR_MAPID);
- var enterTimes = dungeonModel.GetEnterTimes(DemonJarModel.DEMONJAR_MAPID);
- killable = totalTimes > enterTimes;
- show = !GeneralDefine.demonJarNoRebornRemindMaps.Contains(mapId);
+ {
+ var totalTimes = dungeonModel.GetTotalTimes(DemonJarModel.DEMONJAR_MAPID);
+ var enterTimes = dungeonModel.GetEnterTimes(DemonJarModel.DEMONJAR_MAPID);
+ killable = totalTimes > enterTimes;
+ show = !GeneralDefine.demonJarNoRebornRemindMaps.Contains(mapId);
+ }
break;
case FindPreciousType.DogzDungeon:
killable = dogzDungeonModel.wearyValue < GeneralDefine.bossWearyValues[2];
@@ -283,8 +285,13 @@
killable = crossServerBossModel.wearyValue < GeneralDefine.bossWearyValues[2];
show = !GeneralDefine.dogzNoRebornRemindMaps.Contains(mapId);
break;
- case FindPreciousType.StrangleGodBoss:
-
+ case FindPreciousType.JadeDynastyBoss:
+ {
+ var totalTimes = dungeonModel.GetTotalTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
+ var enterTimes = dungeonModel.GetEnterTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
+ killable = totalTimes > enterTimes;
+ show = !GeneralDefine.demonJarNoRebornRemindMaps.Contains(mapId);
+ }
break;
}
diff --git a/System/StrangleGodBoss/StrangleGodBossBehaviour.cs b/System/StrangleGodBoss/StrangleGodBossBehaviour.cs
deleted file mode 100644
index 04bf662..0000000
--- a/System/StrangleGodBoss/StrangleGodBossBehaviour.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-锘縰sing System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-using TableConfig;
-namespace Snxxz.UI
-{
- public class StrangleGodBossBehaviour : ScrollItem
- {
- [SerializeField] AutoSelectCyclicScroll m_Scroller;
- [SerializeField] SmoothMask m_SmoothMask;
- [SerializeField] Text m_BossLevel;
- [SerializeField] Text m_BossName;
- [SerializeField] Image m_BossPortrait;
- [SerializeField] Transform m_ContainerSelect;
- [SerializeField] Transform m_ContainerUnChanllgeable;
- [SerializeField] Text m_ChallengeCondition;
- [SerializeField] Transform m_ContainerChallengeable;
- [SerializeField] Image m_Realm;
- [SerializeField] Transform m_ContainerFighting;
- [SerializeField] Text m_FightPeopleCount;
- [SerializeField] Transform m_ContainerBossDead;
- [SerializeField] Text m_RebornTime;
- [SerializeField] Transform m_ContainerAttention;
- [SerializeField] Button m_Select;
-
- StrangleGodBossModel model
- {
- get { return ModelCenter.Instance.GetModel<StrangleGodBossModel>(); }
- }
-
- public int bossNpcId { get; private set; }
-
- private void Awake()
- {
- m_Select.onClick.AddListener(Select);
- }
-
- public override void Display(object _data)
- {
- base.Display(_data);
- bossNpcId = (int)_data;
-
- DisplayBase();
- }
-
- public override void Dispose()
- {
- base.Dispose();
- }
-
- public void DisplayBase()
- {
- var config = Config.Instance.Get<NPCConfig>(bossNpcId);
- if (config != null)
- {
- m_BossLevel.text = config.NPCLV.ToString();
- m_BossName.text = config.charName;
- m_BossPortrait.SetSprite(config.HeadPortrait);
- }
- }
-
- private void Select()
- {
- if (bossNpcId != 0)
- {
- m_Scroller.TrySelectData(bossNpcId);
- }
- }
- }
-}
-
diff --git a/System/StrangleGodBoss/StrangleGodBossModel.cs b/System/StrangleGodBoss/StrangleGodBossModel.cs
deleted file mode 100644
index 6496be0..0000000
--- a/System/StrangleGodBoss/StrangleGodBossModel.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using TableConfig;
-using System;
-
-namespace Snxxz.UI
-{
- public class StrangleGodBossModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
- {
- List<StrangleGodBossData> strangleGodBosses = new List<StrangleGodBossData>();
-
- public event Action<int> selectBossRefresh;
-
- int m_SelectBossId = 0;
- public int selectBossId
- {
- get { return m_SelectBossId; }
- set
- {
- if (m_SelectBossId != value)
- {
- m_SelectBossId = value;
- if (selectBossRefresh != null)
- {
- selectBossRefresh(value);
- }
- }
- }
- }
-
- public int assginSelectBossId { get; set; }
-
- public override void Init()
- {
- InitFakeData();
- }
-
- public void OnBeforePlayerDataInitialize()
- {
-
- }
-
- public void OnPlayerLoginOk()
- {
-
- }
-
- public override void UnInit()
- {
-
- }
-
- public bool IsStrangleGodBoss(int bossNpcId)
- {
- var index = strangleGodBosses.FindIndex((x) =>
- {
- return x.bossNpcId == bossNpcId;
- });
- return index >= 0;
- }
-
- #region 灞卞鏁版嵁
- void InitFakeData()
- {
- AddFakeData(60203001, 100, 0);
- AddFakeData(60203002, 130, 0);
- AddFakeData(60203003, 150, 0);
- AddFakeData(60203004, 160, 0);
- AddFakeData(60203005, 180, 0);
- AddFakeData(60203006, 190, 0);
- }
-
- void AddFakeData(int bossNpcId, int level, int score)
- {
- var config = Config.Instance.Get<NPCConfig>(bossNpcId);
- strangleGodBosses.Add(new StrangleGodBossData()
- {
- bossNpcId = bossNpcId,
- challengeCondition = new StrangleGodBossCondition()
- {
- level = level,
- realmLevel = config.Realm,
- score = score,
- },
- });
- }
- #endregion
-
- public static int SortCompare(StrangleGodBossData lhs, StrangleGodBossData rhs)
- {
- if (lhs.challengeCondition.level != rhs.challengeCondition.level)
- {
- return lhs.challengeCondition.level.CompareTo(rhs.challengeCondition.level);
- }
- if (lhs.challengeCondition.realmLevel != rhs.challengeCondition.realmLevel)
- {
- return lhs.challengeCondition.realmLevel.CompareTo(rhs.challengeCondition.realmLevel);
- }
- if (lhs.challengeCondition.score != rhs.challengeCondition.score)
- {
- return lhs.challengeCondition.score.CompareTo(rhs.challengeCondition.score);
- }
- return 0;
- }
- }
-
- public struct StrangleGodBossData
- {
- public int bossNpcId;
- public StrangleGodBossCondition challengeCondition;
- }
-
- public struct StrangleGodBossCondition
- {
- public int level;
- public int realmLevel;
- public int score;
- }
-}
-
diff --git a/System/WindowBase/ModelCenter.cs b/System/WindowBase/ModelCenter.cs
index 37532dc..a095a5d 100644
--- a/System/WindowBase/ModelCenter.cs
+++ b/System/WindowBase/ModelCenter.cs
@@ -221,7 +221,7 @@
RegisterModel<CrossServerBossModel>();
RegisterModel<OpenServiceAchievementModel>();
RegisterModel<FashionDressModel>();
- RegisterModel<StrangleGodBossModel>();
+ RegisterModel<JadeDynastyBossModel>();
inited = true;
}
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index 806c918..c849a34 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -1179,7 +1179,7 @@
DemonJar = 4,
DogzDungeon = 5,
CrossServerBoss = 6,
- StrangleGodBoss = 7,
+ JadeDynastyBoss = 7,
None = 99,
}
--
Gitblit v1.8.0