--势力场景
--晚宴起始任务

--脚本号
x105004_g_scriptId=105004

x105004_g_MinLevel=25


--事件交互入口
function x105004_OnDefaultEvent(scene, selfId, targetId)
	BeginEvent(scene)
	AddText(scene,"[43596b]勢力中儲備足夠的食材後，就能在每日20：30準時開辦晚宴！[-]")
	
	-- AddNumText(scene,x105004_g_scriptId,"捐獻食材",-1,0)
	AddNumText(scene,x105004_g_scriptId,"參加晚宴",-1,1)
	AddNumText(scene,x105004_g_scriptId,"晚宴說明",-1,2)

	EndEvent(scene)
	DispatchEventList(scene,selfId,targetId,true)
end

--事件列表选中一项
function x105004_OnEventRequest(scene, selfId, targetId, eventId, index)
	if index==0 then
		OpenGuildDinnerUI(scene,selfId)
	elseif index==1 then
		if GetLevel(scene,selfId) >= x105004_g_MinLevel then
			GuildDinnerEnroll(scene,selfId,targetId)
		else
			--等级不足
			SendServerTips(scene,selfId,"#{31007}")
		end	
	elseif index==2 then
		BeginEvent(scene)
		AddText(scene,"晚宴說明：\n1. 势力成员通过上缴晚宴食材可存储势力食材，食材储备一定数量后每日即可开启晚宴\n2. 势力晚宴开始后与势力晚宴管理确认参加后即可获得目标任务\n3. 晚宴开启15分钟后会有大厨出现，付出星玉的玩家可为势力全员添加高级食物\n4. 势力晚宴结束后将会清除势力储备的所有食材")
		
		-- AddNumText(scene,x105004_g_scriptId,"捐獻食材",-1,0)
		AddNumText(scene,x105004_g_scriptId,"參加晚宴",-1,1)
		AddNumText(scene,x105004_g_scriptId,"晚宴說明",-1,2)
		EndEvent(scene)
		DispatchEventList(scene,selfId,targetId,true)
	end
end

function x105004_OnTriggerEvent(scene, selfId, targetId, stringInfo, index)
end