ActivityFYJYProxy.cs 654 B

12345678910111213141516171819202122
  1. using ET;
  2. using System.Collections;
  3. using UnityEngine;
  4. namespace GFGGame
  5. {
  6. public class ActivityFYJYProxy
  7. {
  8. public static async ETTask<bool> ReqGetActivityGameInfos()
  9. {
  10. int activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ActivityType.AfternoonLeisure);
  11. if (activityId <= 0)
  12. return false;
  13. var response = (S2C_GetActivityGameInfos)await MessageHelper.SendToServer(new C2S_GetActivityGameInfos { ActivityId = activityId });
  14. if (!(response is { Error: ErrorCode.ERR_Success })) return false;
  15. return true;
  16. }
  17. }
  18. }