| 1234567891011121314151617181920212223242526272829303132 | using ET;using System;namespace GFGGame{    public static class MessageHelper    {        public static async ETTask<IResponse> SendToServer(IRequest request, bool showError = true)        {            IResponse response = null;            Session session = GameGlobal.zoneScene.GetComponent<SessionComponent>().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;            }        }    }}
 |