blob: 265fb482b8c8bd1deb17b90242e70fc33c058258 (
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
|
using System;
using UILib;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient
{
internal class XBackFlowLevelUpHandler : DlgHandlerBase
{
protected override string FileName
{
get
{
return "Hall/BfLevelUpHandler";
}
}
private IXUIButton _gotoBtn = null;
private IXUILabel _levelUpLabel = null;
protected override void Init()
{
base.Init();
this._gotoBtn = (base.transform.Find("BtnGo").GetComponent("XUIButton") as IXUIButton);
this._gotoBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGotoLevelUp));
this._levelUpLabel = (base.transform.Find("Label").GetComponent("XUILabel") as IXUILabel);
}
private bool OnGotoLevelUp(IXUIButton button)
{
XTaskDocument specificDocument = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
for (int i = 0; i < specificDocument.TaskRecord.Tasks.Count; i++)
{
XTaskInfo xtaskInfo = specificDocument.TaskRecord.Tasks[i];
TaskTableNew.RowData tableData = xtaskInfo.TableData;
bool flag = tableData.TaskType == 8u;
if (flag)
{
uint id = XSingleton<UiUtility>.singleton.ChooseProfData<uint>(tableData.BeginTaskNPCID, 0u);
XSingleton<XInput>.singleton.LastNpc = XSingleton<XEntityMgr>.singleton.GetNpc(id);
DlgBase<XBackFlowDlg, XBackFlowBehavior>.singleton.SetVisible(false, true);
break;
}
}
return true;
}
public override void RegisterEvent()
{
base.RegisterEvent();
}
protected override void OnShow()
{
base.OnShow();
string @string = XStringDefineProxy.GetString("LevelUpDegreeGift");
this._levelUpLabel.SetText(string.Format(@string, XBackFlowDocument.Doc.GetLevelUpDegree()));
}
protected override void OnHide()
{
base.OnHide();
}
public override void OnUnload()
{
base.OnUnload();
}
}
}
|