From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/TooltipButtonOperateForge.cs | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/TooltipButtonOperateForge.cs (limited to 'Client/Assets/Scripts/XMainClient/TooltipButtonOperateForge.cs') diff --git a/Client/Assets/Scripts/XMainClient/TooltipButtonOperateForge.cs b/Client/Assets/Scripts/XMainClient/TooltipButtonOperateForge.cs new file mode 100644 index 00000000..a24afc50 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/TooltipButtonOperateForge.cs @@ -0,0 +1,31 @@ +using System; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class TooltipButtonOperateForge : TooltipButtonOperateBase + { + public override string GetButtonText() + { + return XStringDefineProxy.GetString("Forge"); + } + + public override bool HasRedPoint(XItem item) + { + return false; + } + + public override bool IsButtonVisible(XItem item) + { + EquipList.RowData equipConf = XBagDocument.GetEquipConf(item.itemID); + bool flag = equipConf == null; + return !flag && (XSingleton.singleton.IsSystemOpened(XSysDefine.XSys_Item_Forge) && XForgeDocument.ForgeAttrMgr.IsHadThisEquip(item.itemID)) && equipConf.CanForge == 1; + } + + public override void OnButtonClick(ulong mainUID, ulong compareUID) + { + base.OnButtonClick(mainUID, compareUID); + XForgeDocument.Doc.SelectEquip(mainUID); + } + } +} -- cgit v1.1-26-g67d0