blob: 51e79afa3c1554086bdf6c8ff83ed274c9b1cc43 (
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
165
166
|
using System;
using XMainClient.Utility;
using XUtliPoolLib;
namespace XMainClient
{
internal abstract class XItem : XDataBase
{
public ItemType Type
{
get
{
return (ItemType)this.type;
}
}
public uint Prof
{
get
{
return XBagDocument.GetItemProf(this.itemID);
}
}
public IXItemDescription Description
{
get
{
return XItem.GetItemDescription(this.Type, this.itemID);
}
}
public virtual bool bHasPPT
{
get
{
return false;
}
}
public virtual bool Treasure
{
get
{
return false;
}
}
public virtual AttrType Atype
{
get
{
return AttrType.None;
}
}
public ulong uid;
public uint type;
public int itemID;
public int itemCount;
public bool bBinding;
public uint smeltDegreeNum;
public ItemList.RowData itemConf;
public double blocking;
public uint bexpirationTime;
private static XEquipDescription s_EquipDescription = new XEquipDescription();
private static XEmblemDescription s_EmblemDescription = new XEmblemDescription();
private static XJadeDescription s_JadeDescription = new XJadeDescription();
private static XFashionDescription s_FashionDescription = new XFashionDescription();
private static XFashionHairDescription s_FashionHairDescription = new XFashionHairDescription();
private static XNormalDescription s_NormalDescription = new XNormalDescription();
private static XartifactDescription s_ArtifactDescription = new XartifactDescription();
public override void Init()
{
base.Init();
this.uid = 0UL;
this.type = 0u;
this.itemID = 0;
this.itemCount = 0;
this.smeltDegreeNum = 0u;
this.bBinding = false;
this.itemConf = null;
}
public virtual uint GetPPT(XAttributes attributes = null)
{
return 0u;
}
public virtual string ToPPTString(XAttributes attributes = null)
{
return string.Empty;
}
public static bool IsVirtualItem(int itemID)
{
return itemID < XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.VIRTUAL_ITEM_MAX);
}
public static IXItemDescription GetItemDescription(ItemType type, int itemid = 0)
{
switch (type)
{
case ItemType.EQUIP:
return XItem.s_EquipDescription;
case ItemType.PECK:
case ItemType.VIRTUAL_ITEM:
case ItemType.MATERAIL:
break;
case ItemType.FASHION:
return XItem.SelectFashionDescription(itemid);
case ItemType.EMBLEM:
return XItem.s_EmblemDescription;
case ItemType.JADE:
return XItem.s_JadeDescription;
default:
if (type == ItemType.ARTIFACT)
{
return XItem.s_ArtifactDescription;
}
break;
}
return XItem.s_NormalDescription;
}
private static IXItemDescription SelectFashionDescription(int itemid)
{
bool flag = itemid == 0;
IXItemDescription result;
if (flag)
{
result = XItem.s_FashionDescription;
}
else
{
FashionList.RowData fashionConf = XBagDocument.GetFashionConf(itemid);
bool flag2 = fashionConf == null || XFastEnumIntEqualityComparer<FashionPosition>.ToInt(FashionPosition.Hair) != (int)fashionConf.EquipPos;
if (flag2)
{
result = XItem.s_FashionDescription;
}
else
{
result = XItem.s_FashionHairDescription;
}
}
return result;
}
}
}
|