-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathClassJobRole.cs
44 lines (37 loc) · 1.27 KB
/
ClassJobRole.cs
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
using System.ComponentModel;
using Lumina.Excel.Sheets;
namespace Honorific;
public enum ClassJobRole {
None = 0,
Tank = 1,
Healer = 2,
DPS = 3,
[Description("Crafter / Gatherer")]
NonCombat = 4,
[Description("Melee DPS")]
MeleeDPS = 5,
[Description("Ranged Physical DPS")]
RangedPhysicalDPS = 6,
[Description("Ranged Magical DPS")]
RangedMagicalDPS = 7,
Crafter = 8,
Gatherer = 9,
}
public static class ClassJobRoleExtenstion {
public static bool IsRole(this ClassJob job, ClassJobRole role) {
if (job.RowId == 0) return false;
return role switch {
ClassJobRole.None => false,
ClassJobRole.Tank => job.Role == 1,
ClassJobRole.Healer => job.Role == 4,
ClassJobRole.DPS => job.Role is 2 or 3 or 5,
ClassJobRole.NonCombat => job.Role == 0,
ClassJobRole.MeleeDPS => job.Role == 2,
ClassJobRole.RangedPhysicalDPS => job.LimitBreak1.RowId == 4238,
ClassJobRole.RangedMagicalDPS => job.LimitBreak1.RowId == 203 || job.RowId == 36,
ClassJobRole.Crafter => job.RowId is >= 8 and <= 15,
ClassJobRole.Gatherer => job.RowId is 16 or 17 or 18,
_ => false
};
}
}