From 1a3098212d90ec1fc3e5bb324c445272b34c012b Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期四, 20 九月 2018 21:22:24 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Treasure/TreasureSoulModel.cs | 36 +++++++++++++++++++++++++++++-------
1 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/System/Treasure/TreasureSoulModel.cs b/System/Treasure/TreasureSoulModel.cs
index 0b6bace..9ad7298 100644
--- a/System/Treasure/TreasureSoulModel.cs
+++ b/System/Treasure/TreasureSoulModel.cs
@@ -8,6 +8,10 @@
{
public class TreasureSoulModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
{
+ public const int TREASURE_SOUL_ID = 115;
+ Redpoint treasureSoulRedpoint = new Redpoint(1, TREASURE_SOUL_ID);
+ Redpoint treasureSoulNewGotRedpoint = new Redpoint(TREASURE_SOUL_ID, 115100);
+
Dictionary<int, TreasureSpecialData> treasureSoulDict = new Dictionary<int, TreasureSpecialData>();
List<int> treasureSouls = new List<int>();
public Dictionary<int, int> signAddProperty = new Dictionary<int, int>();
@@ -32,6 +36,8 @@
public int gotoSoul { get; set; }
+ public int newGotSoul { get; set; }
+
public bool serverInited { get; private set; }
PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
@@ -41,6 +47,7 @@
{
packModel.RefreshItemCountAct += RefreshItemCountAct;
PlayerStrengthengDatas.RefreshEquipUpgradLvAct += RefreshEquipSTRLv;
+ FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
ParseConfig();
}
@@ -54,6 +61,7 @@
special.itemGet = false;
special.active = false;
}
+ treasureSoulNewGotRedpoint.state = RedPointState.None;
}
public void OnPlayerLoginOk()
@@ -66,6 +74,7 @@
{
packModel.RefreshItemCountAct -= RefreshItemCountAct;
PlayerStrengthengDatas.RefreshEquipUpgradLvAct -= RefreshEquipSTRLv;
+ FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
}
void ParseConfig()
@@ -88,6 +97,11 @@
{
signAddProperty.Add(int.Parse(_key), int.Parse(jsonData[_key].ToString()));
}
+ }
+
+ public void SetViewTreasureNewGot()
+ {
+ treasureSoulNewGotRedpoint.state = RedPointState.None;
}
public List<int> GetTreasureSouls()
@@ -152,6 +166,14 @@
}
}
+ private void OnFuncStateChangeEvent(int func)
+ {
+ if (func == 126)
+ {
+ UpdateRedpoints();
+ }
+ }
+
public void UpdateTreasurePrivilege(HA353_tagMCMWPrivilegeDataInfo package)
{
for (int i = 0; i < package.Count; i++)
@@ -164,12 +186,12 @@
}
bool beforeActived = special.active;
special.active = _data.State == 1;
- //if (!beforeActived && special.active && serverInited && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
- // && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>() && !NewBieCenter.Instance.inGuiding)
- //{
- // TreasureSoulActiveWin.treasureSoulId = (int)_data.PriID;
- // WindowCenter.Instance.Open<TreasureSoulActiveWin>();
- //}
+ if (!beforeActived && special.active && serverInited
+ && !WindowCenter.Instance.CheckOpen<TreasureSoulWin>())
+ {
+ treasureSoulNewGotRedpoint.state = RedPointState.Simple;
+ newGotSoul = (int)_data.PriID;
+ }
if ((TreasurePrivilege)_data.PriID == TreasurePrivilege.StrengthenAdd)
{
if (treasureSoulEvent != null)
@@ -363,7 +385,7 @@
totalProgress = configs[configs.Count - 1].countNeed;
}
- redpoint = new Redpoint(TreasureModel.TREASURE_SOUL_ID, TreasureModel.TREASURE_SOUL_ID * 100 + (int)type);
+ redpoint = new Redpoint(TreasureSoulModel.TREASURE_SOUL_ID, TreasureSoulModel.TREASURE_SOUL_ID * 100 + (int)type);
switch (_type)
{
case TreasurePrivilege.DemonJarAtk:
--
Gitblit v1.8.0