123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- using System.Collections.Generic;
- namespace GFGGame
- {
- public class ActivityDataManager : SingletonBase<ActivityDataManager>
- {
- public void Clear()
- {
- luckyBoxActBonusState.Clear();
- }
- /**********************************************************活动*************************************************/
- /// <summary>
- /// 获取指定类型活动当前开启的活动id
- /// </summary>
- /// <returns></returns>
- public int GetCurOpenActiveByType(int type)
- {
- List<ActivityOpenCfg> activityOpenCfgs = ActivityOpenCfgArray.Instance.GetCfgsBytype(type);
- for (int i = 0; i < activityOpenCfgs.Count; i++)
- {
- if (TimeUtil.IsBeforeCurTime(activityOpenCfgs[i].openTime) && TimeUtil.IsLaterCurTime(activityOpenCfgs[i].endTime))
- {
- return activityOpenCfgs[i].id;
- }
- }
- return 0;
- }
- /**********************************************************限时累充*************************************************/
- /// <summary>
- /// 当前限时累充活动id
- /// </summary>
- /// <value></value>
- public int actLimitChargeId { get; set; }
- /**********************************************************限时抽奖活动*********************************************/
- /// <summary>
- /// 当前抽奖活动id
- /// </summary>
- /// <value></value>
- public int actLuckyBoxId { get; set; }
- /// <summary>
- /// 抽奖总次数
- /// </summary>
- /// <value></value>
- public long allPlayTimes { get; set; }
- /// <summary>
- /// 限时抽奖必掉次数
- /// </summary>
- /// <value></value>
- public int lastDrawCount { get; set; }
- /// <summary>
- /// </summary>
- /// <typeparam name="int">奖励key,这里对应抽奖次数</typeparam>
- /// <typeparam name="int">值由ConstBonusStatus定义</typeparam>
- /// <returns></returns>
- public Dictionary<int, int> luckyBoxActBonusState = new Dictionary<int, int>();
- /**********************************************************每日登录*************************************************/
- private int _sevenDayLoginLoginId = 1;
- /// <summary>
- /// 七日登录 当日奖励id
- /// </summary>
- /// <value></value>
- public int sevenDayLoginLoginId
- {
- get { return _sevenDayLoginLoginId; }
- set { _sevenDayLoginLoginId = value; }
- }
- private int _sevenDayLoginBonusStatus = 0;
- /// <summary>
- /// 七日登录 当前奖励状态
- /// </summary>
- /// <value></value>
- public int sevenDayLoginBonusStatus
- {
- get { return _sevenDayLoginBonusStatus; }
- set { _sevenDayLoginBonusStatus = value; }
- }
- /******************************************************************************************************************/
- private int _firstChargeBonusStatus = 0;
- /// <summary>
- /// 首冲奖励 当前奖励状态,ConstBonusStatus 0不可领,1可领,2已领
- /// </summary>
- /// <value></value>
- public int firstChargeBonusStatus
- {
- get
- {
- var status = GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.FirstRechargeBonusStatus);
- if (status == ConstBonusStatus.GOT)
- {
- return ConstBonusStatus.GOT;
- }
- if (GameGlobal.myNumericComponent.GetAsLong(ET.NumericType.RechargeTotal) > 0)
- {
- return ConstBonusStatus.CAN_GET;
- }
- return ConstBonusStatus.CAN_NOT_GET;
- }
- }
- }
- }
|