コード例 #1
0
        /// <summary>
        /// 从服务器获取角色数据
        /// </summary>
        /// <param name="serverId"></param>
        /// <param name="roleId"></param>
        /// <returns></returns>
        public KuaFuRoleData GetKuaFuRoleDataFromServer(int serverId, int roleId)
        {
            KuaFuRoleData  kuaFuRoleData = null;
            ITianTiService kuaFuService  = GetKuaFuService();

            if (null != kuaFuService)
            {
                try
                {
                    kuaFuRoleData = (KuaFuRoleData)kuaFuService.GetKuaFuRoleData(serverId, roleId);
                    UpdateRoleData(kuaFuRoleData); //更新
                }
                catch (System.Exception ex)
                {
                    kuaFuRoleData = null;
                }
            }

            return(kuaFuRoleData);
        }