forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeaponType.cs
More file actions
82 lines (74 loc) · 3.15 KB
/
Copy pathWeaponType.cs
File metadata and controls
82 lines (74 loc) · 3.15 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
using System.Collections.Generic;
using L2dotNET.DataContracts.Shared.Enums;
namespace L2dotNET.Enums
{
public class WeaponType : ItemType
{
public WeaponTypeId Id { get; set; }
private readonly string _name;
public static readonly WeaponType None = new WeaponType(WeaponTypeId.None, "None");
public static readonly WeaponType Sword = new WeaponType(WeaponTypeId.Sword, "Sword");
public static readonly WeaponType Blunt = new WeaponType(WeaponTypeId.Blunt, "Blunt");
public static readonly WeaponType Dagger = new WeaponType(WeaponTypeId.Dagger, "Dagger");
public static readonly WeaponType Bow = new WeaponType(WeaponTypeId.Bow, "Bow");
public static readonly WeaponType Pole = new WeaponType(WeaponTypeId.Pole, "Pole");
public static readonly WeaponType Etc = new WeaponType(WeaponTypeId.Etc, "Etc");
public static readonly WeaponType Fist = new WeaponType(WeaponTypeId.Fist, "Fist");
public static readonly WeaponType Dual = new WeaponType(WeaponTypeId.Dual, "DualSword");
public static readonly WeaponType DualFist = new WeaponType(WeaponTypeId.Dualfist, "DualFist");
public static readonly WeaponType BigSword = new WeaponType(WeaponTypeId.Bigsword, "BigSword");
public static readonly WeaponType Pet = new WeaponType(WeaponTypeId.Pet, "Pet");
public static readonly WeaponType Rod = new WeaponType(WeaponTypeId.Fishingrod, "Rod");
public static readonly WeaponType BigBlunt = new WeaponType(WeaponTypeId.Bigblunt, "BigBlunt");
private static readonly Dictionary<WeaponTypeId, int> masks = new Dictionary<WeaponTypeId, int>
{
{WeaponTypeId.None, 40},
{WeaponTypeId.Sword, 40},
{WeaponTypeId.Blunt, 40},
{WeaponTypeId.Dagger, 40},
{WeaponTypeId.Bow, 500},
{WeaponTypeId.Pole, 66},
{WeaponTypeId.Etc, 40},
{WeaponTypeId.Fist, 40},
{WeaponTypeId.Dual, 40},
{WeaponTypeId.Dualfist, 40},
{WeaponTypeId.Bigsword, 40},
{WeaponTypeId.Fishingrod, 40},
{WeaponTypeId.Bigblunt, 40},
{WeaponTypeId.Pet, 40}
};
private WeaponType(WeaponTypeId id, string name)
{
Id = id;
_name = name;
}
public static IEnumerable<WeaponType> Values
{
get
{
yield return None;
yield return Sword;
yield return Blunt;
yield return Dagger;
yield return Bow;
yield return Pole;
yield return Etc;
yield return Fist;
yield return Dual;
yield return DualFist;
yield return BigSword;
yield return Pet;
yield return Rod;
yield return BigBlunt;
}
}
public override string ToString()
{
return _name;
}
public int GetMask()
{
return 1 << masks[Id];
}
}
}