From 7da5f5b780af330ecda645f5538e0917bd9eeb01 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期三, 26 九月 2018 19:37:20 +0800
Subject: [PATCH] Merge branch 'master' into 1871天赋功能
---
System/DogzDungeon/DogzDungeonModel.cs | 44 ++++++++++++++++++++++++++------------------
1 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/System/DogzDungeon/DogzDungeonModel.cs b/System/DogzDungeon/DogzDungeonModel.cs
index 987270f..78325c4 100644
--- a/System/DogzDungeon/DogzDungeonModel.cs
+++ b/System/DogzDungeon/DogzDungeonModel.cs
@@ -6,10 +6,10 @@
namespace Snxxz.UI
{
- public class DogzDungeonModel : Model
+ public class DogzDungeonModel : Model, IPlayerLoginOk
{
- public const int DOGZDUNGEON_REDPOINT = 76009;
+ public const int DOGZDUNGEON_REDPOINT = 77002;
public const int DATA_MAPID = 21110;
int m_SelectedBoss = 0;
@@ -36,6 +36,7 @@
if (m_WearyValue != value)
{
m_WearyValue = value;
+ UpdateRedpoint();
if (bossWearyValueChangeEvent != null)
{
bossWearyValueChangeEvent();
@@ -75,7 +76,7 @@
Dictionary<int, DogzDungeonBossData> bosses = new Dictionary<int, DogzDungeonBossData>();
public DogzDungeonBox dogzDungeonBox = new DogzDungeonBox();
public DogzDungeonElite dogzDungeonElite = new DogzDungeonElite();
- Redpoint redpoint = new Redpoint(DOGZDUNGEON_REDPOINT);
+ public Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, DOGZDUNGEON_REDPOINT);
FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
@@ -114,9 +115,9 @@
public int GetRecommendNpc()
{
- if (bigBoxCollectCount < 2) //鏈柌鍔�
+ if (bigBoxCollectCount < GeneralConfig.Instance.dogzBoxLimit)
{
- return bigBoxNpcId;//澶у疂绠眓pc id
+ return bigBoxNpcId;
}
if (wearyValue < GeneralConfig.Instance.bossWearyValues[2])
@@ -125,21 +126,17 @@
for (int i = sortedBossIds.Count - 1; i >= 0; i--)
{
var bossId = sortedBossIds[i];
- var dogzConfig = Config.Instance.Get<DogzDungeonConfig>(bossId);
- if (dogzConfig.MonsterType == 3 || dogzConfig.MonsterType == 4)
+ var npcConfig = Config.Instance.Get<NPCConfig>(bossId);
+ if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV)
{
- var npcConfig = Config.Instance.Get<NPCConfig>(bossId);
- if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV)
- {
- return bossId;
- }
+ return bossId;
}
}
return sortedBossIds[0];
}
- return bigBoxNpcId;//澶у疂绠� npcid
+ return eliteMonsters[0];
}
public int GetRecommendKillElite()
@@ -296,7 +293,7 @@
dogzDungeonElite.UpdateEliteRefreshTime(eliteRefreshSecond);
}
- if (WindowCenter.Instance.CheckOpen("DogzDungeonWin"))
+ if (WindowCenter.Instance.IsOpen("DogzDungeonWin"))
{
if (containBox)
{
@@ -308,6 +305,19 @@
RequestEliteSurplusInfo();
}
}
+ }
+
+ public void OnPlayerLoginOk()
+ {
+ UpdateRedpoint();
+ }
+
+ private void UpdateRedpoint()
+ {
+ var wearyValueLimit = GeneralConfig.Instance.bossWearyValues[2];
+ redpoint.count = wearyValueLimit - wearyValue;
+
+ redpoint.state = redpoint.count > 0 ? RedPointState.Quantity : RedPointState.None;
}
private void ParseConfig()
@@ -335,6 +345,7 @@
sortedBossIds.Sort(DogzDungeonBossData.LevelCompare);
}
+
}
public class DogzDungeonBox
@@ -354,7 +365,6 @@
public void UpdateBoxRefreshTime(int _seconds)
{
refreshTime = DateTime.Now + new TimeSpan(_seconds * TimeSpan.TicksPerSecond);
- DebugEx.Log("瀹濈鍒锋柊鏃堕棿:" + refreshTime);
if (refreshTimeEvent != null)
{
refreshTimeEvent();
@@ -391,7 +401,6 @@
{
refreshTimeEvent();
}
- DebugEx.Log("绮捐嫳鍒锋柊鏃堕棿:" + refreshTime);
}
public int GetAliveElite()
@@ -413,8 +422,7 @@
public int id { get; private set; }
public bool isUnLocked {
get {
- var config = Config.Instance.Get<NPCConfig>(id);
- return PlayerDatas.Instance.baseData.LV >= config.NPCLV;
+ return true;
}
}
--
Gitblit v1.8.0