1234567891011121314151617181920212223242526 |
- using ET;
- namespace GFGGame
- {
- public class LuckyBoxSProxy
- {
- //抽奖
- public static async ETTask<bool> ReqGetBonus(int luckyBoxId, int times)
- {
- M2C_DrawLuckyBox response = null;
- response = (M2C_DrawLuckyBox)await MessageHelper.SendToServer(new C2M_DrawLuckyBox() { LuckyBoxId = luckyBoxId, Times = times });
- if (response != null)
- {
- if (response.Error == ErrorCode.ERR_Success)
- {
- LuckyBoxDataManager.Instance.times = response.Times;
- LuckyBoxDataManager.Instance.luckyBoxId = response.LuckyBoxId;
- LuckyBoxDataManager.Instance.RewardList = ItemUtil.CreateItemDataList(response.bonusList);
- return true;
- }
- }
- return false;
- }
- }
- }
|