|
@@ -5,21 +5,44 @@ using GFGGame;
|
|
|
|
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
|
|
+ /**********************************************************每日登录*************************************************/
|
|
public static class ActivitySProxy
|
|
public static class ActivitySProxy
|
|
{
|
|
{
|
|
- public static async ETTask<bool> ClothingDecompose(List<int> itemIds, List<int> itemNums)
|
|
|
|
|
|
+ public static async ETTask<bool> ReqDailyLoginInfos()
|
|
{
|
|
{
|
|
- M2C_ClothingDecompose response = null;
|
|
|
|
- response = (M2C_ClothingDecompose)await MessageHelper.SendToServer(new C2M_ClothingDecompose() { itemIds = itemIds, itemNums = itemNums });
|
|
|
|
|
|
+ M2C_GetDailySignInBonusInfos response = null;
|
|
|
|
+ response = (M2C_GetDailySignInBonusInfos)await MessageHelper.SendToServer(new C2M_GetDailySignInBonusInfos());
|
|
if (response != null)
|
|
if (response != null)
|
|
{
|
|
{
|
|
if (response.Error == ErrorCode.ERR_Success)
|
|
if (response.Error == ErrorCode.ERR_Success)
|
|
{
|
|
{
|
|
- BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.bonusList));
|
|
|
|
|
|
+ ActivityDataManager.Instance.dailyLoginId = response.CuurentBonusId;
|
|
|
|
+ ActivityDataManager.Instance.bonusStatus = response.BonusStatus;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ public static async ETTask<bool> ReqGetDailyLoginRewards(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.bonusStatus = response.BonusStatus;
|
|
|
|
+ int[][] rewards = DailyLoginCfgArray.Instance.GetCfg(response.BonusId).rewardsArr;
|
|
|
|
+
|
|
|
|
+ BonusController.TryShowBonusList(rewards);
|
|
|
|
+
|
|
|
|
+
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ /******************************************************************************************************************/
|
|
|
|
+
|
|
}
|
|
}
|