ActivityTeaSProxy.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using ET;
  4. namespace GFGGame
  5. {
  6. public class ActivityTeaSProxy
  7. {
  8. public static async ETTask<bool> ReqGetNPCVisitInfo(int id)
  9. {
  10. var response = (S2C_GetNpcVisits) await MessageHelper.SendToServer(new C2S_GetNpcVisits { ActivityId = id });
  11. if (!(response is { Error: ErrorCode.ERR_Success })) return false;
  12. //MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits;
  13. return true;
  14. }
  15. public static async ETTask<bool> ReqUnLockNPCVisit(int id,int npcid)
  16. {
  17. var response = (S2C_UnlockNpcVisit)await MessageHelper.SendToServer(new C2S_UnlockNpcVisit { ActivityId = id , NpcId = npcid});
  18. if (!(response is { Error: ErrorCode.ERR_Success })) return false;
  19. //MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits;
  20. return true;
  21. }
  22. public static async ETTask<bool> ReqGetNPCVisitReward(int id, int npcid)
  23. {
  24. var response = (S2C_GetNpcVisitRewrd)await MessageHelper.SendToServer(new C2S_GetNpcVisitRewrd { ActivityId = id, NpcId = npcid });
  25. if (!(response is { Error: ErrorCode.ERR_Success })) return false;
  26. // 奖励弹窗
  27. BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.BonusList));
  28. //MiniGameDateManager.Instance.NpcInfoList = response.NpcVisits;
  29. return true;
  30. }
  31. }
  32. }