Copied the 89 uncopied AI*SimulationUtility/extension files defining the AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using LitJson;
|
|
|
|
namespace Wizard;
|
|
|
|
public class ChatInfo
|
|
{
|
|
public GatheringMatchedRoom GatheringMatchedRoom;
|
|
|
|
public List<ChatMessageInfo> MessageList { get; private set; }
|
|
|
|
public List<ChatMessageInfo> VisibleMessageList { get; private set; }
|
|
|
|
public bool IsIncludeInvisibleMessage { get; private set; }
|
|
|
|
public int WaitInterval { get; private set; }
|
|
|
|
public ChatInfo(JsonData json)
|
|
{
|
|
initialize();
|
|
ParseJsonData(json);
|
|
}
|
|
|
|
private void initialize()
|
|
{
|
|
MessageList = new List<ChatMessageInfo>();
|
|
WaitInterval = 0;
|
|
GatheringMatchedRoom = null;
|
|
}
|
|
|
|
private void ParseJsonData(JsonData json)
|
|
{
|
|
List<ChatUserInfo> list = new List<ChatUserInfo>();
|
|
JsonData jsonData = json["users"];
|
|
for (int i = 0; i < jsonData.Count; i++)
|
|
{
|
|
list.Add(new ChatUserInfo(jsonData[i]));
|
|
}
|
|
JsonData jsonData2 = json["chat_message"];
|
|
for (int j = 0; j < jsonData2.Count; j++)
|
|
{
|
|
ChatMessageInfo chatMessageInfo = new ChatMessageInfo(jsonData2[j], list);
|
|
if (chatMessageInfo.UserInfo != null && (chatMessageInfo.MessageType != ChatMessageInfo.eMessageType.ROOM_MATCH || chatMessageInfo.RoomData == null || chatMessageInfo.UserInfo.ViewerId != PlayerStaticData.UserViewerID))
|
|
{
|
|
MessageList.Add(new ChatMessageInfo(jsonData2[j], list));
|
|
}
|
|
}
|
|
VisibleMessageList = MessageList.Where((ChatMessageInfo message) => message.IsVisibleMessage).ToList();
|
|
IsIncludeInvisibleMessage = MessageList.Any((ChatMessageInfo message) => !message.IsVisibleMessage);
|
|
WaitInterval = json["wait_interval"].ToInt();
|
|
if (json.Keys.Contains("matched_room_id"))
|
|
{
|
|
GatheringMatchedRoom = new GatheringMatchedRoom(json["matched_room_id"].ToString());
|
|
}
|
|
}
|
|
}
|