From 0cc26a91b41ec583ae7f480d9ecdfd06a0cb5a04 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 17 九月 2018 16:07:35 +0800
Subject: [PATCH] 3607 【前端】VIP投资移至精彩活动
---
System/OpenServerActivity/OpenServerActivityWin.cs | 11 +++++
System/Vip/VipInvest/VipInvestModel.cs | 57 +++++++++++++++++++++++-----
System/Vip/VipRechargeWin.cs | 27 -------------
3 files changed, 57 insertions(+), 38 deletions(-)
diff --git a/System/OpenServerActivity/OpenServerActivityWin.cs b/System/OpenServerActivity/OpenServerActivityWin.cs
index 323130a..939d0b6 100644
--- a/System/OpenServerActivity/OpenServerActivityWin.cs
+++ b/System/OpenServerActivity/OpenServerActivityWin.cs
@@ -458,6 +458,16 @@
WindowCenter.Instance.Open<FairyJadeInvestmentWin>();
}
break;
+ case 11:
+ if (windowState == WindowState.Opened)
+ {
+ WindowCenter.Instance.OpenWithoutAnimation<VipInvestWin>();
+ }
+ else
+ {
+ WindowCenter.Instance.Open<VipInvestWin>();
+ }
+ break;
}
}
@@ -491,6 +501,7 @@
WindowCenter.Instance.CloseImmediately<OpenServerGiftWin>();
WindowCenter.Instance.CloseImmediately<LimitedTimePackageWin>();
WindowCenter.Instance.CloseImmediately<FairyJadeInvestmentWin>();
+ WindowCenter.Instance.CloseImmediately<VipInvestWin>();
}
private int Compare(int x, int y)
diff --git a/System/Vip/VipInvest/VipInvestModel.cs b/System/Vip/VipInvest/VipInvestModel.cs
index 16dfe9d..21c8e53 100644
--- a/System/Vip/VipInvest/VipInvestModel.cs
+++ b/System/Vip/VipInvest/VipInvestModel.cs
@@ -5,7 +5,7 @@
namespace Snxxz.UI
{
- public class VipInvestModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
+ public class VipInvestModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity
{
private Dictionary<string, Dictionary<string, List<InvestReward>>> vipInvestDict = new Dictionary<string, Dictionary<string, List<InvestReward>>>();
private Dictionary<int, List<InvestConfig>> investCycleDict = new Dictionary<int, List<InvestConfig>>(); //姣忓懆鏈熸暟鎹�
@@ -13,6 +13,39 @@
private Dictionary<int, int[]> investGoldDict = new Dictionary<int, int[]>();
private Dictionary<int, int> investMaxDayDict = new Dictionary<int, int>();
public int NeedVipLv { get; private set; }
+
+ public bool IsOpen
+ {
+ get
+ {
+ return FuncOpen.Instance.IsFuncOpen(120);
+ }
+ }
+
+ public bool priorityOpen
+ {
+ get
+ {
+ if (redPointStre1.state == RedPointState.None)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ }
+
+ public bool IsAdvance
+ {
+ get
+ {
+ return false;
+ }
+ }
+
private bool IsOkBool = false;
public bool IsRedpoint = false;
@@ -26,6 +59,7 @@
vipInvestLvlimitDict.Clear();
investGoldDict.Clear();
investMaxDayDict.Clear();
+ OpenServerActivityCenter.Instance.Register(11, this);
var InvestRedPoint = Config.Instance.Get<FuncConfigConfig>("InvestRedPoint");
DisplayLevel = int.Parse(InvestRedPoint.Numerical1);
DisplayDays = int.Parse(InvestRedPoint.Numerical3);
@@ -205,6 +239,7 @@
#region 澶勭悊鏈嶅姟绔殑鏁版嵁
private Dictionary<int, ServerInvestInfo> serverInvestDict = new Dictionary<int, ServerInvestInfo>();
public event Action<int> RefreshInvestAct;
+ public event Action<int> onStateUpate;
public void SetServerInvestInfo(HA337_tagMCGoldInvestInfo info)
{
@@ -374,12 +409,12 @@
ServerInvestInfo InvestInfo;
int cycle = 0;
private List<InvestConfig> configlist;
- private const int Redpoint_key1 = 3501;
- public Redpoint redPointStre1 = new Redpoint(MainRedDot.RedPoint_VipDot, Redpoint_key1);//Vip 鎶曡祫绾㈢偣
- private const int Redpoint_key1_Week1 = 350101;
- private const int Redpoint_key1_Week2 = 350102;
- private const int Redpoint_key1_Week3 = 350103;
- private const int Redpoint_key1_Week4 = 350104;
+ private const int Redpoint_key1 = 20911;
+ public Redpoint redPointStre1 = new Redpoint(209, Redpoint_key1);//Vip 鎶曡祫绾㈢偣
+ private const int Redpoint_key1_Week1 = 2091101;
+ private const int Redpoint_key1_Week2 = 2091102;
+ private const int Redpoint_key1_Week3 = 2091103;
+ private const int Redpoint_key1_Week4 = 2091104;
public Redpoint redPointStre1_v1 = new Redpoint(Redpoint_key1, Redpoint_key1_Week1);
public Redpoint redPointStre1_v2 = new Redpoint(Redpoint_key1, Redpoint_key1_Week2);
public Redpoint redPointStre1_v3 = new Redpoint(Redpoint_key1, Redpoint_key1_Week3);
@@ -413,16 +448,16 @@
switch (cycle)
{
case 1:
- redPointStre1_v1.state = RedPointState.Simple;
+ redPointStre1_v1.state = RedPointState.GetReward;
break;
case 2:
- redPointStre1_v2.state = RedPointState.Simple;
+ redPointStre1_v2.state = RedPointState.GetReward;
break;
case 3:
- redPointStre1_v3.state = RedPointState.Simple;
+ redPointStre1_v3.state = RedPointState.GetReward;
break;
case 4:
- redPointStre1_v4.state = RedPointState.Simple;
+ redPointStre1_v4.state = RedPointState.GetReward;
break;
default:
break;
diff --git a/System/Vip/VipRechargeWin.cs b/System/Vip/VipRechargeWin.cs
index 0b919ba..44cfd14 100644
--- a/System/Vip/VipRechargeWin.cs
+++ b/System/Vip/VipRechargeWin.cs
@@ -19,7 +19,6 @@
[SerializeField] Button closeBtn;
[SerializeField] FunctionButton vipPayTitleBtn;
[SerializeField] FunctionButton vipTitleBtn;
- [SerializeField] FunctionButton vipInvestTitleBtn;
[SerializeField] FunctionButtonGroup buttonGroup;
private VipModel m_Model;
@@ -49,7 +48,6 @@
closeBtn.onClick.AddListener(OnClose);
vipPayTitleBtn.onClick.AddListener(OnVipPay);
vipTitleBtn.onClick.AddListener(OnVip);
- vipInvestTitleBtn.onClick.AddListener(OnVipInvest);
}
public void OnVipPay()
{
@@ -80,23 +78,6 @@
presentWinType = VipModel.VipWinType.Vip;
functionOrder = 1;
}
-
- private void OnVipInvest()
- {
- CloseChildWin();
- if (windowState == WindowState.Opened)
- {
- WindowCenter.Instance.OpenWithoutAnimation<VipInvestWin>();
- }
- else
- {
- ;
- WindowCenter.Instance.Open<VipInvestWin>();
- }
- presentWinType = VipModel.VipWinType.VipInverst;
- functionOrder = 2;
- }
-
protected override void OnPreOpen()
{
CloseChildWin();
@@ -153,10 +134,6 @@
{
WindowCenter.Instance.CloseImmediately<VipWin>();
}
- if (WindowCenter.Instance.CheckOpen<VipInvestWin>())
- {
- WindowCenter.Instance.CloseImmediately<VipInvestWin>();
- }
if (WindowCenter.Instance.CheckOpen<RechargeWin>())
{
WindowCenter.Instance.CloseImmediately<RechargeWin>();
@@ -178,10 +155,6 @@
case VipModel.VipWinType.Vip:
vipTitleBtn.state = TitleBtnState.Click;
OnVip();
- break;
- case VipModel.VipWinType.VipInverst:
- vipInvestTitleBtn.state = TitleBtnState.Click;
- OnVipInvest();
break;
}
}
--
Gitblit v1.8.0