
function DayEventConfigFunc()
	local FestivalTab={
	}
	--------------节日助手模块按钮出现的节日tabl 以后新加节目助手需要手动更新下这个表。--------------------------------
	if (GetLocale() == "zhCN") then
		FestivalTab ={"春节","情人节"};
		MOD_DAYEVENT_TITLE = {"节日助手", "jierizhushou"}
		DAYEVENT_ENABLE_TEXT = "开启节日助手"
		DAYEVENT_ENABLE_TEXT_TOOTIP="根据当前节日提供不同的增强内容，方便玩家更好的寻找NPC、完成任务及成就。"
		DAYEVENT_ENABLE_DELAY_TEXT = "|cff00c0c0<节日助手>|r 你已经关闭节日助手模块，该设置将在下次插件载入时生效。";
	elseif (GetLocale() == "zhTW") then
		FestivalTab ={"春節","情人節"};
		MOD_DAYEVENT_TITLE = {"節日助手", "jierizhushou"}
		DAYEVENT_ENABLE_TEXT = "開啟節日助手"
		DAYEVENT_ENABLE_TEXT_TOOTIP= "根據當前節日提供不同的增強內容，方便玩家更好的尋找NPC、完成任務及成就"
		DAYEVENT_ENABLE_DELAY_TEXT =  "|cff00c0c0<節日助手>|r 你已經關閉節日助手模組，該設置將在下次外掛程式載入時生效。";
	else
		MOD_DAYEVENT_TITLE = "Trade Helper"
		DAYEVENT_ENABLE_TEXT = "Enable Trade Helper"
		DAYEVENT_ENABLE_DELAY_TEXT = "|cff00c0c0<Trade Helper>|r Trade Helper has been disabled. This setting will be available next time.";
	end
	local NewInfoStrName=[[
	情人节开始啦！
	]]
	local NewInfoStr1=[[
	大脚原创节日增强，本次更新情人节相关内容，提供各主城小匹德菲特位置；为部落玩家修正友好地谈话任务NPC位置；为任务提供快捷成就查询；快捷显示爱情花簇成就所需的指定属性玩家，并支持头像按钮快速点击使用花瓣……更多内容，详见本期更新新闻！

	所在位置：
	【节日助手】-【开启节日助手】
	]]

	function BF_CheckFestival(m_FestivalTab)
		local m_Newtime = date("*t");
		local year = m_Newtime.year;
		local month = m_Newtime.month;
		local day = m_Newtime.day;
		local Bhave =false;
		CalendarSetAbsMonth(month, year);
		local numEvents = CalendarGetNumDayEvents(0, day)		-- arg1:0表示当前月；-1：前一个月；1：下一个月
		if ( numEvents <= 0 ) then
			return;
		end
		for i = 1, numEvents do
			local title, hour, minute, calendarType, sequenceType, eventType, texture,modStatus, inviteStatus, invitedBy, difficulty, inviteType,sequenceIndex, numSequenceDays, difficultyName = CalendarGetDayEvent(0, day, i);
			for k,v in pairs (m_FestivalTab)do
				if title == v then
					Bhave =true;
					break;
				end
			end
		end
		return Bhave;
	end

	if  IsConfigurableAddOn("FestivalHelper") and BF_CheckFestival(FestivalTab) then
		ModManagement_RegisterMod(
			"FestivalHelper",
			"Interface\\AddOns\\BigFoot\\Media\\FestivalHelper.tga",
			MOD_DAYEVENT_TITLE,
			"",
			nil,
			nil,
			{[5]=true}
		);

		ModManagement_RegisterCheckBox(
			"FestivalHelper",
			DAYEVENT_ENABLE_TEXT,
			DAYEVENT_ENABLE_TEXT_TOOTIP,
			"EnableFestivalHelper",
			1,
			function (__arg)
				if (__arg == 1) then
					if (not BigFoot_IsAddOnLoaded("FestivalHelper")) then
						BigFoot_LoadAddOn("FestivalHelper");
					end
				elseif (BigFoot_IsAddOnLoaded("FestivalHelper")) then
					BigFoot_RequestReloadUI(function() BigFoot_Print(DAYEVENT_ENABLE_DELAY_TEXT); end);
				end
			end,
			nil,
			function (__arg)
				if (__arg == 1) then
					if (not BigFoot_IsAddOnLoaded("FestivalHelper")) then
						BigFoot_LoadAddOn("FestivalHelper");
					end
				elseif (BigFoot_IsAddOnLoaded("FestivalHelper")) then
					BigFoot_RequestReloadUI(function() BigFoot_Print(DAYEVENT_ENABLE_DELAY_TEXT); end);
				end
				BF_NewAddOnsPromotion("zhCN",317,NewInfoStrName,NewInfoStr1,"FestivalHelper","EnableFestivalHelper")
			end
		);
	end
end

BigFoot_AddCollector(DayEventConfigFunc)
