forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHairStyle.cs
More file actions
47 lines (41 loc) · 1.76 KB
/
Copy pathHairStyle.cs
File metadata and controls
47 lines (41 loc) · 1.76 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
using System.Collections.Generic;
using System.Linq;
using L2dotNET.DataContracts.Shared.Enums;
using L2dotNET.Utility;
namespace L2dotNET.Enums
{
public class HairStyle
{
public HairStyleId Id { get; }
public Gender[] Sex { get; }
private HairStyle(HairStyleId classId, Gender[] sex)
{
Id = classId;
Sex = sex;
}
public static IEnumerable<HairStyle> Values
{
get
{
yield return TypeA;
yield return TypeB;
yield return TypeC;
yield return TypeD;
yield return TypeE;
yield return TypeF;
yield return TypeG;
}
}
public static readonly HairStyle TypeA = new HairStyle(HairStyleId.TypeA, new[] { Gender.Male, Gender.Female });
public static readonly HairStyle TypeB = new HairStyle(HairStyleId.TypeB, new[] { Gender.Male, Gender.Female });
public static readonly HairStyle TypeC = new HairStyle(HairStyleId.TypeC, new[] { Gender.Male, Gender.Female });
public static readonly HairStyle TypeD = new HairStyle(HairStyleId.TypeD, new[] { Gender.Male, Gender.Female });
public static readonly HairStyle TypeE = new HairStyle(HairStyleId.TypeE, new[] { Gender.Male, Gender.Female });
public static readonly HairStyle TypeF = new HairStyle(HairStyleId.TypeF, new[] { Gender.Female });
public static readonly HairStyle TypeG = new HairStyle(HairStyleId.TypeG, new[] { Gender.Female });
public override string ToString()
{
return $"Id: {(int)Id}, Type: {Id.GetDescription()}, Genders: {string.Join(", ", Sex.Select(select => select.GetDescription()).ToArray())}";
}
}
}