forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArmorType.cs
More file actions
46 lines (41 loc) · 1.39 KB
/
Copy pathArmorType.cs
File metadata and controls
46 lines (41 loc) · 1.39 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
using System.Collections.Generic;
using L2dotNET.DataContracts.Shared.Enums;
namespace L2dotNET.Enums
{
public class ArmorType : ItemType
{
public ArmorTypeId Id { get; set; }
private readonly string _name;
public static readonly ArmorType None = new ArmorType(ArmorTypeId.None, "NONE");
public static readonly ArmorType Light = new ArmorType(ArmorTypeId.Light, "LIGHT");
public static readonly ArmorType Heavy = new ArmorType(ArmorTypeId.Heavy, "HEAVY");
public static readonly ArmorType Magic = new ArmorType(ArmorTypeId.Magic, "MAGIC");
public static readonly ArmorType Pet = new ArmorType(ArmorTypeId.Pet, "PET");
public static readonly ArmorType Shield = new ArmorType(ArmorTypeId.Shield, "SHIELD");
private ArmorType(ArmorTypeId id, string name)
{
_name = name;
Id = id;
}
public static IEnumerable<ArmorType> Values
{
get
{
yield return None;
yield return Light;
yield return Heavy;
yield return Magic;
yield return Pet;
yield return Shield;
}
}
public int GetMask()
{
return 1 << ((int)Id + 16);
}
public override string ToString()
{
return _name;
}
}
}