From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/UI/XGuildHuntDramaOperate.cs | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs new file mode 100644 index 00000000..da2efedf --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs @@ -0,0 +1,52 @@ +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; + } + } +} -- cgit v1.1-26-g67d0