using System; using System.Collections.Generic; using ET; namespace GFGGame { public class ActivityTeaSProxy { public static async ETTask ReqGetNPCVisitInfo(int id) { var response = (S2C_GetNpcVisits) await MessageHelper.SendToServer(new C2S_GetNpcVisits { ActivityId = id }); if (!(response is { Error: ErrorCode.ERR_Success })) return false; //MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits; return true; } public static async ETTask ReqUnLockNPCVisit(int id,int npcid) { var response = (S2C_UnlockNpcVisit)await MessageHelper.SendToServer(new C2S_UnlockNpcVisit { ActivityId = id , NpcId = npcid}); if (!(response is { Error: ErrorCode.ERR_Success })) return false; //MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits; return true; } public static async ETTask ReqGetNPCVisitReward(int id, int npcid) { var response = (S2C_GetNpcVisitRewrd)await MessageHelper.SendToServer(new C2S_GetNpcVisitRewrd { ActivityId = id, NpcId = npcid }); if (!(response is { Error: ErrorCode.ERR_Success })) return false; // 奖励弹窗 BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.BonusList)); //MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits; return true; } } }