yyl
2026-03-26 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7
Main/System/Login/ServerListParser.cs
@@ -1,7 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using UnityEngine;
using System.Threading;
using LitJson;
public class ServerListParser : SingletonMonobehaviour<ServerListParser>
@@ -15,11 +15,14 @@
    public void PushCommonServerListRawData(string content)
    {
        hasCommonResult = false;
        ThreadPool.QueueUserWorkItem((object aaa) =>
        {
            serverInfoCommon = JsonMapper.ToObject<ServerInfoCommon>(content);
            hasCommonResult = true;
        });
        ParseCommonServerListAsync(content).Forget();
    }
    private async UniTaskVoid ParseCommonServerListAsync(string content)
    {
        await UniTask.Yield();
        serverInfoCommon = JsonMapper.ToObject<ServerInfoCommon>(content);
        hasCommonResult = true;
    }
    public void PushPlayerServerListRawData(string content)
@@ -32,12 +35,15 @@
        if (RankArr["player"]["group_list"].Count == 0)
            return;
        ThreadPool.QueueUserWorkItem((object aaa) =>
        {
            serverInfoPlayer = JsonMapper.ToObject<ServerInfoPlayer>(content);
            hasPlayerResult = true;
            SetIsInWhiteList();
        });
        ParsePlayerServerListAsync(content).Forget();
    }
    private async UniTaskVoid ParsePlayerServerListAsync(string content)
    {
        await UniTask.Yield();
        serverInfoPlayer = JsonMapper.ToObject<ServerInfoPlayer>(content);
        hasPlayerResult = true;
        SetIsInWhiteList();
    }
    public void ReportCommonResult()