LuckyBoxSProxy.cs 712 B

12345678910111213141516171819202122232425
  1. using ET;
  2. namespace GFGGame
  3. {
  4. public class LuckyBoxSProxy
  5. {
  6. //抽奖
  7. public static async ETTask<bool> ReqGetBonus(int luckyBoxId, int times)
  8. {
  9. M2C_DrawLuckyBox response = null;
  10. response = (M2C_DrawLuckyBox)await MessageHelper.SendToServer(new C2M_DrawLuckyBox() { LuckyBoxId = luckyBoxId, Times = times });
  11. if (response != null)
  12. {
  13. if (response.Error == ErrorCode.ERR_Success)
  14. {
  15. LuckyBoxDataManager.Instance.RewardList = ItemUtil.CreateItemDataList(response.bonusList);
  16. return true;
  17. }
  18. }
  19. return false;
  20. }
  21. }
  22. }