namespace Wizard.Lottery;

public class LotteryReceiveDoubleChanceTask : BaseTask
{
	public class LotteryReceiveDoubleChanceTaskParam : BaseParam
	{
		public int campaign_id;

		public int mission_id;
	}

	public LotteryRewardData Result { get; private set; }

	public LotteryReceiveDoubleChanceTask()
	{
		base.type = ApiType.Type.LotteryReceiveDoubleChance;
	}

	public void SetParameter(int campaignId, int missionId)
	{
		LotteryReceiveDoubleChanceTaskParam lotteryReceiveDoubleChanceTaskParam = new LotteryReceiveDoubleChanceTaskParam();
		lotteryReceiveDoubleChanceTaskParam.campaign_id = campaignId;
		lotteryReceiveDoubleChanceTaskParam.mission_id = missionId;
		base.Params = lotteryReceiveDoubleChanceTaskParam;
	}

	protected override int Parse()
	{
		int num = base.Parse();
		if (num != 1)
		{
			return num;
		}
		Result = new LotteryRewardData(base.ResponseData["data"]["lottery_reward"]);
		return num;
	}
}
