blob: 37d15a8accb783b3cb1e02dc6988f76dc21575f9 (
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
|
using System;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient.UI
{
internal class XDramaOperate
{
protected XDramaDocument dramaDoc;
public XDramaOperate()
{
this.dramaDoc = XDocuments.GetSpecificDocument<XDramaDocument>(XDramaDocument.uuID);
}
protected void _FireEvent(XDramaOperateParam param)
{
DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetupOperate(param);
param.Recycle();
}
protected string _GetRandomNpcText(XNpc npc)
{
bool flag = npc == null;
string result;
if (flag)
{
result = null;
}
else
{
string[] content = (npc.Attributes as XNpcAttributes).Content;
bool flag2 = content != null && content.Length != 0;
if (flag2)
{
result = content[XSingleton<XCommon>.singleton.RandomInt(content.Length)];
}
else
{
result = string.Empty;
}
}
return result;
}
public virtual void ShowNpc(XNpc npc)
{
DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(true, true);
}
}
}
|