blob: 087911258082b9bbf38da1ece2ba6960af4fc6b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
using System;
using KKSG;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient
{
internal class EquipUpgradeDocument : XDocComponent
{
public override uint ID
{
get
{
return EquipUpgradeDocument.uuID;
}
}
public static EquipUpgradeDocument Doc
{
get
{
return XSingleton<XGame>.singleton.Doc.GetXComponent(EquipUpgradeDocument.uuID) as EquipUpgradeDocument;
}
}
public EquipUpgradeHandler Handler { get; set; }
public ulong SelectUid
{
get
{
return this.m_selectUid;
}
}
public new static readonly uint uuID = XSingleton<XCommon>.singleton.XHash("EquipUpgradeDocument");
public static XTableAsyncLoader AsyncLoader = new XTableAsyncLoader();
private ulong m_selectUid = 0UL;
public static void Execute(OnLoadedCallback callback = null)
{
EquipUpgradeDocument.AsyncLoader.Execute(callback);
}
public static void OnTableLoaded()
{
}
public override void OnAttachToHost(XObject host)
{
base.OnAttachToHost(host);
}
protected override void EventSubscribe()
{
base.EventSubscribe();
}
protected override void OnReconnected(XReconnectedEventArgs arg)
{
}
public override void OnDetachFromHost()
{
base.OnDetachFromHost();
}
public void SelectEquip(ulong uid)
{
XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(uid);
bool flag = itemByUID == null;
if (!flag)
{
this.m_selectUid = uid;
bool flag2 = !DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible();
if (!flag2)
{
bool flag3 = this.Handler != null && this.Handler.IsVisible();
if (flag3)
{
this.Handler.ShowUI();
}
else
{
DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.ShowRightPopView(DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipUpgradeHandler);
}
bool flag4 = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
if (flag4)
{
DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SelectEquip(uid);
}
}
}
}
public void ReqUpgrade()
{
RpcC2G_UpgradeEquip rpcC2G_UpgradeEquip = new RpcC2G_UpgradeEquip();
rpcC2G_UpgradeEquip.oArg.uid = this.m_selectUid;
XSingleton<XClientNetwork>.singleton.Send(rpcC2G_UpgradeEquip);
}
public void OnUpgradeBack(UpgradeEquipRes oRes)
{
bool flag = oRes == null;
if (flag)
{
XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_FAILED, "fece00");
}
else
{
bool flag2 = oRes.errorcode > ErrorCode.ERR_SUCCESS;
if (flag2)
{
XSingleton<UiUtility>.singleton.ShowSystemTip(oRes.errorcode, "fece00");
}
else
{
bool flag3 = this.Handler != null && this.Handler.IsVisible();
if (flag3)
{
this.Handler.SetVisible(false);
}
}
}
}
}
}
|