using ET; using System; namespace GFGGame { public static class MessageHelper { public static async ETTask SendToServer(IRequest request, bool showError = true) { IResponse response = null; Session session = GameGlobal.zoneScene.GetComponent().GateSession; try { response = await session.Call(request); if (showError) { if (response.Error != ErrorCode.ERR_Success) { ErrorCodeController.Handler(response.Error); } } return response; } catch (Exception e) { Log.Warning(e.ToString()); return null; } } } }