diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs | 52 |
1 files changed, 52 insertions, 0 deletions
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<XDramaOperateParam>.GetData();
+ this._param.Npc = npc;
+ this._param.Text = XSingleton<UiUtility>.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<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ List<ExpeditionTable.RowData> expeditionList = specificDocument.GetExpeditionList(TeamLevelType.TeamLevelGuildHunt);
+ XTeamDocument specificDocument2 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool flag2 = expeditionList.Count > 0;
+ if (flag2)
+ {
+ specificDocument2.SetAndMatch(expeditionList[0].DNExpeditionID);
+ }
+ return true;
+ }
+
+ private bool CloseUI(IXUIButton button)
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ return true;
+ }
+ }
+}
|