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