private void GE_LOGIN_MSG(GameEvent ge, EventParameter parameter) { roleInfoList.Clear(); MsgData_sLogin data = parameter.msgParameter as MsgData_sLogin; //Debug.LogError("GE_LOGIN_MSG: ResultCode : " + data.ResultCode + " guid:" + data.GUID + " mAccountGuid:" + data.AccountGUID + " serverid:" + data.ServerID); if (0 == data.ResultCode || -1 == data.ResultCode) { accountId = data.Account.BytesToString(); accountIDBytes = data.Account; serverTime = data.ServerTime; forbiddenTime = data.ForbbidenTime; guid = data.GUID; serverId = (int)data.ServerID; exts = data.Exts.BytesToString(); mAccountGuid = data.AccountGUID; long ctime = UiUtil.ConvertDateTimeToUnix(System.DateTime.Now) / 1000; UiUtil.CSTimeOffset = data.ServerTime - ctime; SDKMgr.Instance.SetExtUpData(1); #if UNITY_EDITOR LogMgr.Log("Time Server:{0} Client:{1} Gap:{2}", data.ServerTime, ctime, UiUtil.CSTimeOffset); #endif } }
private void GE_LOGIN_MSG(SG.GameEvent ge, SG.EventParameter parameter) { MsgData_sLogin data = parameter.msgParameter as MsgData_sLogin; if (0 == data.ResultCode || -1 == data.ResultCode) { SGSDK.instance.SetUseInfo(SG.Account.Instance.AccountId, ""); } }