| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using cfg.GfgCfg;
- using ET;
- namespace GFGGame
- {
- public class ClothingSyntheticSProxy
- {
- public static async ETTask<bool> ClothtingSynthetic(int itemId)
- {
- var response =
- (M2C_ClothingSynthetic)await MessageHelper.SendToServer(new C2M_ClothingSynthetic()
- { ItemId = itemId });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- GetSuitItemController.TryShow(itemId);
- return true;
- }
- }
- return true;
- }
- public static async ETTask<bool> CardSynthetic(int itemId)
- {
- var response =
- (M2C_CardSynthetic)await MessageHelper.SendToServer(new C2M_CardSynthetic() { ItemId = itemId });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.RewardList));
- return true;
- }
- }
- return true;
- }
- public static async ETTask<int> GetCardSyntheticCount(int cardId)
- {
- var response =
- (M2C_GetCardSyntheticNum)await MessageHelper.SendToServer(new C2M_GetCardSyntheticNum()
- { ItemId = cardId });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- return response.Num;
- }
- }
- return -1;
- }
- //领取套装集齐奖励
- public static async ETTask<bool> GetSuitGetReward(int suitId)
- {
- var response =
- (M2C_BringTogetherReward)await MessageHelper.SendToServer(new C2M_GetBringTogetherReward()
- { SuitId = suitId });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- DressUpMenuSuitDataManager.SetSuitSyntheticRewardStatus(suitId);
- SuitCfg item = CommonDataManager.Tables.TblSuitCfg.GetOrDefault(suitId);
- ViewManager.Show<LuckyBoxNewCardView>(item.SuitCollectreward[0].Count);
- //BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.RewardList));
- return true;
- }
- }
- return true;
- }
- }
- public class NoticeSuitGetRewardChange : AMHandler<M2C_PushBringTogetherRewardState>
- {
- protected override async ETTask Run(Session session, M2C_PushBringTogetherRewardState message)
- {
- if (DressUpMenuSuitDataManager._suitSyntheticRewardStatus.ContainsKey(message.SuitId))
- {
- DressUpMenuSuitDataManager._suitSyntheticRewardStatus[message.SuitId] =
- message.BringTogetherRewardStatus;
- }
- else
- {
- DressUpMenuSuitDataManager._suitSyntheticRewardStatus.Add(message.SuitId,
- message.BringTogetherRewardStatus);
- }
- await ETTask.CompletedTask;
- }
- }
- }
|