forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItemSetTemplate.cs
More file actions
127 lines (99 loc) · 2.54 KB
/
Copy pathItemSetTemplate.cs
File metadata and controls
127 lines (99 loc) · 2.54 KB
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
using System.Collections.Generic;
using L2dotNET.Models.Player;
using NLog;
namespace L2dotNET.Tables
{
public class ItemSetTemplate
{
private static readonly Logger Log = LogManager.GetCurrentClassLogger();
public int ArmorId;
public List<int> Legs;
public void AddLeg(int p)
{
if (Legs == null)
Legs = new List<int>();
Legs.Add(p);
}
public List<int> Gloves;
public void AddGloves(int p)
{
if (Gloves == null)
Gloves = new List<int>();
Gloves.Add(p);
}
public List<int> Boots;
public void AddBoot(int p)
{
if (Boots == null)
Boots = new List<int>();
Boots.Add(p);
}
public List<int> Helms;
public void AddHelm(int p)
{
if (Helms == null)
Helms = new List<int>();
Helms.Add(p);
}
public List<int> Shields;
public void AddShield(int p)
{
if (Shields == null)
Shields = new List<int>();
Shields.Add(p);
}
public int Set1Id,
Set1Lvl;
public void Set1(int p, int p2)
{
Set1Id = p;
Set1Lvl = p2;
}
public int Set2Id,
Set2Lvl;
public void Set2(int p, int p2)
{
Set2Id = p;
Set2Lvl = p2;
}
public int Set3Id,
Set3Lvl;
public void Set3(int p, int p2)
{
Set3Id = p;
Set3Lvl = p2;
}
public void Validate(L2Player owner) { }
private byte Count()
{
byte s = 1;
if (Legs != null)
s++;
if (Helms != null)
s++;
if (Gloves != null)
s++;
if (Boots != null)
s++;
return s;
}
public List<int> GetAllSetIds()
{
List<int> list = new List<int>
{
ArmorId
};
if (Legs != null)
list.AddRange(Legs);
if (Helms != null)
list.AddRange(Helms);
if (Gloves != null)
list.AddRange(Gloves);
if (Boots != null)
list.AddRange(Boots);
if (Shields != null)
list.AddRange(Shields);
return list;
}
}
}