Exemplo n.º 1
0
        public bool CanEnterKuaFuMap(KuaFuServerLoginData kuaFuServerLoginData)
        {
            //从中心查询副本信息
            KuaFuMapRoleData kuaFuMapRoleData = YongZheZhanChangClient.getInstance().GetKuaFuMapRoleData(kuaFuServerLoginData.RoleId);

            if (kuaFuMapRoleData == null || kuaFuMapRoleData.KuaFuServerId != ClientInfo.ServerId || kuaFuMapRoleData.KuaFuMapCode != kuaFuServerLoginData.GameId)
            {
                LogManager.WriteLog(LogTypes.Error, string.Format("{0}不具有进入跨服地图{1}的资格", kuaFuServerLoginData.RoleId, kuaFuServerLoginData.GameId));
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        public bool CanEnterKuaFuMap(KuaFuServerLoginData kuaFuServerLoginData)
        {
            SceneUIClasses sceneType = Global.GetMapSceneType((int)kuaFuServerLoginData.GameId);
            bool           result;

            if (SceneUIClasses.ChongShengMap == sceneType)
            {
                result = true;
            }
            else
            {
                KuaFuMapRoleData kuaFuMapRoleData = YongZheZhanChangClient.getInstance().GetKuaFuMapRoleData(kuaFuServerLoginData.RoleId);
                if (kuaFuMapRoleData == null || kuaFuMapRoleData.KuaFuServerId != GameManager.ServerId || (long)kuaFuMapRoleData.KuaFuMapCode != kuaFuServerLoginData.GameId)
                {
                    LogManager.WriteLog(LogTypes.Error, string.Format("{0}不具有进入跨服地图{1}的资格", kuaFuServerLoginData.RoleId, kuaFuServerLoginData.GameId), null, true);
                    result = false;
                }
                else
                {
                    result = true;
                }
            }
            return(result);
        }