ShopSProxy.cs 660 B

12345678910111213141516171819202122
  1. using ET;
  2. namespace GFGGame
  3. {
  4. public class ShopSProxy
  5. {
  6. public static async ETTask<bool> ShopBuy(int shopType, int buyId, int buyCount)
  7. {
  8. M2C_ShopBuy response = null;
  9. response = (M2C_ShopBuy)await MessageHelper.SendToServer(new C2M_ShopBuy() { ShopType = shopType, BuyId = buyId, BuyCount = buyCount });
  10. if (response != null)
  11. {
  12. if (response.Error == ErrorCode.ERR_Success)
  13. {
  14. // EventAgent.DispatchEvent(ConstMessage.SHOP_BUY);
  15. return true;
  16. }
  17. }
  18. return false;
  19. }
  20. }
  21. }