using LitJson;

namespace Wizard;

public class InviteGetListTask : BaseTask
{
	public class InviteGetListTaskParam : BaseParam
	{
	}

	public InviteGetListTask()
	{
		base.type = ApiType.Type.InviteGetList;
	}

	public void SetParameter()
	{
		InviteGetListTaskParam inviteGetListTaskParam = new InviteGetListTaskParam();
		base.Params = inviteGetListTaskParam;
	}

	protected override int Parse()
	{
		int num = base.Parse();
		if (num != 1)
		{
			return num;
		}
		Data.FriendInfo.Initialize();
		JsonData jsonData = base.ResponseData["data"];
		for (int i = 0; i < jsonData.Count; i++)
		{
			UserFriend item = new UserFriend(jsonData[i]);
			Data.FriendInfo.data.friendList.Add(item);
		}
		Data.FriendInfo.servertime = base.ResponseData["data_headers"]["servertime"].ToInt();
		return num;
	}
}
