blob: 06fe10c1db64f8ca96aa5a9f52a8f2176f904c9d (
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
using System;
using KKSG;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient
{
internal class ArtifactRecastDocument : XDocComponent
{
public override uint ID
{
get
{
return ArtifactRecastDocument.uuID;
}
}
public static ArtifactRecastDocument Doc
{
get
{
return XSingleton<XGame>.singleton.Doc.GetXComponent(ArtifactRecastDocument.uuID) as ArtifactRecastDocument;
}
}
public ulong SelectUid
{
get
{
return this.m_selectUid;
}
}
public ulong LastSelectUid
{
get
{
return this.m_lastSelectUid;
}
}
public new static readonly uint uuID = XSingleton<XCommon>.singleton.XHash("ArtifactRecastDocument");
public static XTableAsyncLoader AsyncLoader = new XTableAsyncLoader();
private ulong m_selectUid = 0UL;
private ulong m_lastSelectUid = 0UL;
public ArtifactRecastHandler Handler;
public static void Execute(OnLoadedCallback callback = null)
{
ArtifactRecastDocument.AsyncLoader.Execute(callback);
}
public override void OnAttachToHost(XObject host)
{
base.OnAttachToHost(host);
}
protected override void EventSubscribe()
{
base.EventSubscribe();
}
public override void OnDetachFromHost()
{
base.OnDetachFromHost();
}
protected override void OnReconnected(XReconnectedEventArgs arg)
{
bool flag = this.m_selectUid > 0UL;
if (flag)
{
XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_selectUid);
bool flag2 = itemByUID == null;
if (flag2)
{
this.m_selectUid = 0UL;
}
}
this.RefreshUi();
}
public override void OnEnterSceneFinally()
{
base.OnEnterSceneFinally();
}
public void RefreshUi()
{
bool flag = this.Handler != null && this.Handler.IsVisible();
if (flag)
{
this.Handler.RefreshUi();
}
ArtifactDeityStoveDocument.Doc.RefreshUi();
}
public bool IsSelectUid(ulong uid)
{
return this.m_selectUid == uid;
}
public void ResetSelectUid(bool isRefeshUi)
{
this.m_selectUid = 0UL;
if (isRefeshUi)
{
this.RefreshUi();
}
}
public void AddItem(ulong uid)
{
bool flag = this.m_selectUid > 0UL;
if (flag)
{
XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FuseRepleaseSuc"), "fece00");
}
this.m_selectUid = uid;
this.RefreshUi();
}
public void TakeOut(ulong uid)
{
this.m_selectUid = 0UL;
this.RefreshUi();
}
public void ReqRecast()
{
this.m_lastSelectUid = this.m_selectUid;
RpcC2G_ArtifactDeityStoveOp rpcC2G_ArtifactDeityStoveOp = new RpcC2G_ArtifactDeityStoveOp();
rpcC2G_ArtifactDeityStoveOp.oArg.type = ArtifactDeityStoveOpType.ArtifactDeityStove_Recast;
rpcC2G_ArtifactDeityStoveOp.oArg.uid1 = this.m_selectUid;
XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ArtifactDeityStoveOp);
}
public void OnReqRecastBack(ArtifactDeityStoveOpRes oRes)
{
bool flag = oRes.errorcode > ErrorCode.ERR_SUCCESS;
if (flag)
{
XSingleton<UiUtility>.singleton.ShowSystemTip(oRes.errorcode, "fece00");
}
else
{
XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("RecastSuccess"), "fece00");
this.ResetSelectUid(true);
}
}
public void ResetSetting()
{
DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.ForceSetTipsValue(XTempTipDefine.OD_RECAST_CONFIRM, false);
XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
specificDocument.SetValue(XOptionsDefine.OD_NO_RECAST_CONFIRM, 0, true);
}
}
}
|