|
@@ -70,14 +70,7 @@ namespace GFGGame
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
|
- /// 七天签到
|
|
|
|
- /// </summary>
|
|
|
|
- /// <returns></returns>
|
|
|
|
- public bool GetDailyLoginRed()
|
|
|
|
- {
|
|
|
|
- return ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.CAN_GET;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 有邮件未读或未领奖励
|
|
/// 有邮件未读或未领奖励
|
|
@@ -434,25 +427,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- /// <summary>
|
|
|
|
- /// 限时累充可领奖励红点
|
|
|
|
- /// </summary>
|
|
|
|
- /// <returns></returns>
|
|
|
|
- public bool GetLimiteChargeRewardRed()
|
|
|
|
- {
|
|
|
|
- if (ActivityDataManager.Instance.actLimitChargeId == 0) return false;
|
|
|
|
- ActivityInfo _activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
|
|
|
|
- if (_activityInfo == null) return false;
|
|
|
|
- List<ActivityRechargeCfg> _rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(ActivityDataManager.Instance.actLimitChargeId);
|
|
|
|
- for (int i = 0; i < _rechargeCfgs.Count; i++)
|
|
|
|
- {
|
|
|
|
- if (_activityInfo.CountValue >= _rechargeCfgs[i].value && _activityInfo.GetRewards.IndexOf(_rechargeCfgs[i].id) < 0)
|
|
|
|
- {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 限时抽奖活动奖励
|
|
/// 限时抽奖活动奖励
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -556,6 +531,77 @@ namespace GFGGame
|
|
//
|
|
//
|
|
// return false;
|
|
// return false;
|
|
// }
|
|
// }
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 福利大厅
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public bool GetDailyWelfareRed()
|
|
|
|
+ {
|
|
|
|
+ return GetLimiteChargeRewardRed() || GetSevenDayLoginRed() || DailySignRed() || DailySupplyRed();
|
|
|
|
+ }
|
|
|
|
+ /// <summary>
|
|
|
|
+ ///福利大厅-限时累充可领奖励红点
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public bool GetLimiteChargeRewardRed()
|
|
|
|
+ {
|
|
|
|
+ if (ActivityDataManager.Instance.actLimitChargeId == 0) return false;
|
|
|
|
+ ActivityInfo _activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
|
|
|
|
+ if (_activityInfo == null) return false;
|
|
|
|
+ List<ActivityRechargeCfg> _rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(ActivityDataManager.Instance.actLimitChargeId);
|
|
|
|
+ for (int i = 0; i < _rechargeCfgs.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ if (_activityInfo.CountValue >= _rechargeCfgs[i].value && _activityInfo.GetRewards.IndexOf(_rechargeCfgs[i].id) < 0)
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 福利大厅-七天登录
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public bool GetSevenDayLoginRed()
|
|
|
|
+ {
|
|
|
|
+ return ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.CAN_GET;
|
|
|
|
+ }
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 福利大厅-每日签到
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public bool DailySignRed()
|
|
|
|
+ {
|
|
|
|
+ int _signCount = MathHelper.CountOnes(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay));
|
|
|
|
+ List<DailySignCfg> signCfgs = DailySignCfgArray.Instance.GetCfgsBymonth(TimeUtil.GetCurMonth());
|
|
|
|
+ for (int i = 0; i < signCfgs.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ bool isGot = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignReward), signCfgs[i].day);
|
|
|
|
+ if (_signCount >= signCfgs[i].day && !isGot) return true;
|
|
|
|
+ }
|
|
|
|
+ return !MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay), TimeUtil.GetCurDay());
|
|
|
|
+ }
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 福利大厅-每日补给
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public bool DailySupplyRed()
|
|
|
|
+ {
|
|
|
|
+ for (int i = 0; i < DailySupplyCfgArray.Instance.dataArray.Length; i++)
|
|
|
|
+ {
|
|
|
|
+ DailySupplyCfg supplyCfg = DailySupplyCfgArray.Instance.dataArray[i];
|
|
|
|
+ long openTime = TimeUtil.GetCurDayTime(TimeUtil.GetDateTime(supplyCfg.openTime).ToString("HH:mm:ss"));
|
|
|
|
+ long endTime = TimeUtil.GetCurDayTime(TimeUtil.GetDateTime(supplyCfg.endTime).ToString("HH:mm:ss"));
|
|
|
|
+
|
|
|
|
+ bool isGet = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.DailySupplyReward), supplyCfg.id);
|
|
|
|
|
|
|
|
+ long curTime = TimeHelper.ServerNow();
|
|
|
|
+ if (!isGet && curTime > openTime && curTime < endTime)
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|