Beispiel #1
0
        /// <summary>
        /// 根据组策略校验request.url的crc值。
        /// 文件不存在或者校验失败返回false
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        public static bool CheckUriCrc(CRequest req)
        {
            bool check = ManifestManager.CheckReqCrc(req); //CheckLocalFileCrc(req.url, out crc);

            if (!check)
            {
                var re = UriGroup.CheckAndSetNextUriGroup(req); //CUtils.SetRequestUri(req, 1);
#if HUGULA_LOADER_DEBUG
                HugulaDebug.FilterLogFormat(req.key, "<color=#ffff00>CrcCheck.CheckUriCrc Req(assetname={0},url={1}) CheckFileCrc=false,SetNextUri={2}</color>", req.assetName, req.url, re);
#endif
                return(re);
            }

            return(true);
        }
Beispiel #2
0
        /// <summary>
        /// 根据组策略校验request.url的crc值。
        /// 文件不存在或者校验失败返回false
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        public static bool CheckUriCrc(CRequest req)
        {
            uint crc   = 0;
            bool check = CheckLocalFileCrc(req.url, out crc);

            if (!check)
            {
                var re = UriGroup.CheckAndSetNextUriGroup(req); //CUtils.SetRequestUri(req, 1);
#if HUGULA_LOADER_DEBUG
                Debug.LogFormat("<color=#ff0000>CrcCheck.CheckUriCrc Req(assetname={0},url={1}) crc={2},CheckFileCrc=false,SetNextUri={3}</color>", req.assetName, req.url, crc, re);
#endif
                return(re);
            }

            return(true);
        }