public IEnumerator DownloadNotice() { WWW d = new WWW(SystemConfig.GetCfgInfoUrl(SystemConfig.NOTICE_URL_KEY)); Mogo.Util.LoggerHelper.Debug(SystemConfig.GetCfgInfoUrl(SystemConfig.NOTICE_URL_KEY)); yield return(d); noticeXml = d.text; Mogo.Util.LoggerHelper.Debug(d.text); #if UNITY_IPHONE //use native md5 interface string md5 = IOSUtils.FormatMD5(IOSUtils.CreateMD5(d.bytes)); #else string md5 = Utils.FormatMD5(Utils.CreateMD5(d.bytes)); #endif Mogo.Util.LoggerHelper.Debug("md5:" + md5); if (SystemConfig.Instance.noticeMd5 == md5 && SystemConfig.Instance.Passport == SystemConfig.Instance.PassportSeenNotice) { yield break; } SystemConfig.Instance.noticeMd5 = md5; SystemConfig.Instance.PassportSeenNotice = SystemConfig.Instance.Passport; SystemConfig.SaveConfig(); if (DownloadFinished != null && !MogoWorld.BeginLogin)//如果开始登录了就不打开公告板 { DownloadFinished(); } IsDownloadFinished = true; }
public Byte[] Encode(Byte[] bytes) { LoggerHelper.Debug("CheckDefMD5 Encode"); Push(VUInt16.Instance.Encode(MSGIDType.LOGINAPP_CHECK)); #if UNITY_IPHONE string str = IOSUtils.FormatMD5(bytes); #else var str = Mogo.Util.Utils.FormatMD5(bytes); #endif LoggerHelper.Debug("String MD5: " + str); Push(VString.Instance.Encode(str)); Byte[] result = new Byte[m_unLen]; Buffer.BlockCopy(m_szBuff, 0, result, 0, m_unLen); EndPluto(result); return(result); }
public IEnumerator DownloadNotice() { string url = SystemConfig.GetCfgInfoUrl(SystemConfig.NOTICE_URL_KEY); if (url == string.Empty) { url = "http://192.168.20.107/mogo/notice.xml"; } WWW d = new WWW(url); //Debug.Log("DownloadNotice() url="+url); yield return(d); noticeXml = d.text; //Debug.Log(d.text); #if UNITY_IPHONE //use native md5 interface string md5 = IOSUtils.FormatMD5(IOSUtils.CreateMD5(d.bytes)); #else string md5 = Utils.FormatMD5(Utils.CreateMD5(d.bytes)); #endif //Debug.Log("md5:" + md5); if (SystemConfig.Instance.noticeMd5 == md5 && SystemConfig.Instance.Passport == SystemConfig.Instance.PassportSeenNotice) { yield break; } SystemConfig.Instance.noticeMd5 = md5; SystemConfig.Instance.PassportSeenNotice = SystemConfig.Instance.Passport; SystemConfig.SaveConfig(); if (DownloadFinished != null && !MogoWorld.BeginLogin)//如果开始登录了就不打开公告板 { DownloadFinished(); } IsDownloadFinished = true; }