123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using System.Collections.Generic;
- using ET;
- using GFGGame;
- namespace GFGGame
- {
- /**********************************************************七日登录*************************************************/
- public static class ActivitySProxy
- {
- public static async ETTask<bool> ReqSevenDayLoginInfos()
- {
- M2C_GetDailySignInBonusInfos response = null;
- response = (M2C_GetDailySignInBonusInfos)await MessageHelper.SendToServer(new C2M_GetDailySignInBonusInfos());
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- ActivityDataManager.Instance.sevenDayLoginLoginId = response.CuurentBonusId;
- ActivityDataManager.Instance.sevenDayLoginBonusStatus = response.BonusStatus;
- return true;
- }
- }
- return false;
- }
- public static async ETTask<bool> ReqSevenDayLoginRewards(int id)
- {
- M2C_GetDailySinInBonus response = null;
- response = (M2C_GetDailySinInBonus)await MessageHelper.SendToServer(new C2M_GetDailySinInBonus() { BonusId = id });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- ActivityDataManager.Instance.sevenDayLoginBonusStatus = response.BonusStatus;
- int[][] rewards = DailyLoginCfgArray.Instance.GetCfg(response.BonusId).rewardsArr;
- BonusController.TryShowBonusList(rewards);
- return true;
- }
- }
- return false;
- }
- /*************************************************************首冲奖励*****************************************************/
- //领取首冲奖励
- public static async ETTask<bool> ReqFirstChargeBonusRewards()
- {
- M2C_GetDailySinInBonus response = null;
- response = (M2C_GetDailySinInBonus)await MessageHelper.SendToServer(new C2M_GetDailySinInBonus() { });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- ActivityDataManager.Instance.firstChargeBonusStatus = response.BonusStatus;
- BonusController.TryShowBonusList(GlobalCfgArray.globalCfg.firstChargeBonusArr);
- return true;
- }
- }
- return false;
- }
- }
- }
|