| 123456789101112131415161718192021222324 | 
							- using ET;
 
- namespace GFGGame
 
- {
 
-     public class ItemExchangeSProxy
 
-     {
 
-         public static async ETTask<bool> ItemExchange(int buyId, int buyCount)
 
-         {
 
-             M2C_ItemExchange response = null;
 
-             response = (M2C_ItemExchange)await MessageHelper.SendToServer(new C2M_ItemExchange() { ItemId = buyId, times = buyCount });
 
-             if (response != null)
 
-             {
 
-                 if (response.Error == ErrorCode.ERR_Success)
 
-                 {
 
-                     ItemDataManager.InitItemExchange(response.ItemId, response.times);
 
-                     EventAgent.DispatchEvent(ConstMessage.SHOP_BUY);
 
-                     return true;
 
-                 }
 
-             }
 
-             return false;
 
-         }
 
-     }
 
- }
 
 
  |