using System; using System.Collections.Generic; using UILib; using XMainClient.UI.UICommon; using XUtliPoolLib; namespace XMainClient.UI { internal class XGuildHuntDramaOperate : XDramaOperate { private XDramaOperateParam _param; public override void ShowNpc(XNpc npc) { base.ShowNpc(npc); this._param = XDataPool.GetData(); this._param.Npc = npc; this._param.Text = XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("GuildGrowthHuntText")); this._param.AppendButton(XStringDefineProxy.GetString("GuildGrowthHuntOK"), new ButtonClickEventHandler(this.ToDoSomething), 0UL); this._param.AppendButton(XStringDefineProxy.GetString("GuildGrowthHuntRefuse"), new ButtonClickEventHandler(this.CloseUI), 0UL); base._FireEvent(this._param); } private bool ToDoSomething(IXUIButton button) { bool flag = DlgBase.singleton.IsVisible(); if (flag) { DlgBase.singleton.SetVisible(false, true); } XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument(XExpeditionDocument.uuID); List expeditionList = specificDocument.GetExpeditionList(TeamLevelType.TeamLevelGuildHunt); XTeamDocument specificDocument2 = XDocuments.GetSpecificDocument(XTeamDocument.uuID); bool flag2 = expeditionList.Count > 0; if (flag2) { specificDocument2.SetAndMatch(expeditionList[0].DNExpeditionID); } return true; } private bool CloseUI(IXUIButton button) { bool flag = DlgBase.singleton.IsVisible(); if (flag) { DlgBase.singleton.SetVisible(false, true); } return true; } } }