namespace Wizard;

public class InviteAcceptTask : BaseTask
{
	public class InviteAcceptTaskParam : BaseParam
	{
		public int friend_viewer_id;
	}

	public InviteAcceptTask()
	{
		base.type = ApiType.Type.InviteAccept;
	}

	public void SetParameter(int friendViewerId)
	{
		InviteAcceptTaskParam inviteAcceptTaskParam = new InviteAcceptTaskParam();
		inviteAcceptTaskParam.friend_viewer_id = friendViewerId;
		base.Params = inviteAcceptTaskParam;
	}

	protected override int Parse()
	{
		int num = base.Parse();
		if (num != 1)
		{
			return num;
		}
		Data.InviteFriendBattle.RoomId = base.ResponseData["data"]["room_id"].ToString();
		Data.InviteFriendBattle.BattleParameterInstance = BattleParameter.JsonToBattleParameter(base.ResponseData["data"]);
		return num;
	}
}
