From cc5dac1925b4b2dcf6cac03eff123d53cf77238f Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期二, 08 一月 2019 21:00:59 +0800
Subject: [PATCH] 5767 【前端】【1.5】新增8-14天活动功能(制作成7日运营活动的模板)
---
System/OpenServerActivity/OpenServiceAchievementModel.cs | 61 ++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 1 deletions(-)
diff --git a/System/OpenServerActivity/OpenServiceAchievementModel.cs b/System/OpenServerActivity/OpenServiceAchievementModel.cs
index 201f1e5..91c5c78 100644
--- a/System/OpenServerActivity/OpenServiceAchievementModel.cs
+++ b/System/OpenServerActivity/OpenServiceAchievementModel.cs
@@ -71,7 +71,7 @@
set { _SelectedNow = value; }
}
- private int _DayNow=0;
+ private int _DayNow = 0;
public int DayNow//褰撳墠澶�
{
get { return _DayNow; }
@@ -124,6 +124,7 @@
WeekPartyDayInfoDic.Add((int)DayInfo.DayIndex, WeekPartyDayInfo);
}
}
+ GetDayNow();//鑾峰彇褰撳墠澶╂暟
if (WeekPartyDayInfoUpdate != null)
{
WeekPartyDayInfoUpdate();
@@ -217,6 +218,64 @@
{
WeekPartyUpdate();
}
+
+ }
+ public int GetRewardNumber(int Day, int ID)//鑾峰彇棰嗗娆℃暟
+ {
+ int Num = -1;
+ if (WeekPartyDayInfoDic.ContainsKey(Day))
+ {
+ var WeekPartyDay = WeekPartyDayInfoDic[Day];
+
+ for (int i = 0; i < WeekPartyDay.ActionType.Length; i++)
+ {
+ var ActionType = WeekPartyDay.ActionType[i];
+ if (ID == ActionType.TemplateID)
+ {
+ Num = ActionType.GotTimes;
+ }
+ }
+ }
+ return Num;
+ }
+ public int GetCarryOutNum(int Day, int ID)//鑾峰彇宸插畬鎴愭鏁�
+ {
+ int Num = -1;
+ if (WeekPartyDayInfoDic.ContainsKey(Day))
+ {
+ var WeekPartyDay = WeekPartyDayInfoDic[Day];
+
+ for (int i = 0; i < WeekPartyDay.ActionType.Length; i++)
+ {
+ var ActionType = WeekPartyDay.ActionType[i];
+ if (ID == ActionType.TemplateID)
+ {
+ Num = ActionType.CurTimes;
+ }
+ }
+ }
+ return Num;
+ }
+
+ public int GetPoint(int day)//鑾峰彇鏌愪竴澶╃殑绉垎
+ {
+ int Point = 0;
+ if (WeekPartyDayInfoDic.ContainsKey(day))
+ {
+ Point = WeekPartyDayInfoDic[day].Point;
+ }
+ return Point;
+ }
+
+ public void GetDayNow()//鑾峰彇娲诲姩绗嚑澶�
+ {
+ int Day = 0;
+ var time = TimeDayBeginAndOver[0];
+ DateTime time1 = new DateTime(time.Year, time.Month, time.Day);
+ DateTime time2 = new DateTime(TimeUtility.ServerNow.Year, TimeUtility.ServerNow.Month, TimeUtility.ServerNow.Day);
+ TimeSpan ts = time2.Subtract(time1);
+ Day = (int)ts.TotalDays;
+ DayNow = Day;
}
}
--
Gitblit v1.8.0