forked from LeagueSharp/LeagueSharp.Common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMasteryData.cs
109 lines (93 loc) · 3.03 KB
/
MasteryData.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
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
#region LICENSE
/*
Copyright 2014 - 2015 LeagueSharp
MasteryData.cs is part of LeagueSharp.Common.Data.
LeagueSharp.Common is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LeagueSharp.Common is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LeagueSharp.Common. If not, see <http:www.gnu.org/licenses/>.
*/
#endregion
#region
using System.Linq;
#endregion
namespace LeagueSharp.Common.Data
{
public static class MasteryData
{
public static Mastery FindMastery(this Obj_AI_Hero @hero, MasteryPage page, int id)
{
var mastery = @hero.Masteries.FirstOrDefault(m => m.Page == page && m.Id == id);
return mastery;
}
public static Mastery GetMastery(this Obj_AI_Hero hero, Ferocity ferocity)
{
return FindMastery(hero, MasteryPage.Ferocity, (int)ferocity);
}
public static Mastery GetMastery(this Obj_AI_Hero hero, Cunning cunning)
{
return FindMastery(hero, MasteryPage.Cunning, (int)cunning);
}
public static Mastery GetMastery(this Obj_AI_Hero hero, Resolve resolve)
{
return FindMastery(hero, MasteryPage.Resolve, (int)resolve);
}
public static bool IsActive(this Mastery mastery)
{
return mastery.Points >= 1;
}
public enum Ferocity
{
Fury = 65,
Sorcery = 68,
DoubleEdgedSword = 81,
Vampirism = 97,
NaturalTalent = 100,
Feast = 82,
BountyHunter = 113,
Oppresor = 114,
BatteringBlows = 129,
PiercingThoughts = 132,
WarlordsBloodlust = 145,
FervorofBattle = 146,
DeathFireTouch = 137
}
public enum Cunning
{
Wanderer = 65,
Savagery = 66,
RunicAffinity = 81,
SecretStash = 82,
Meditation = 98,
Merciless = 97,
Bandit = 114,
DangerousGame = 115,
Precision = 129,
Intelligence = 130,
StormraidersSurge = 145,
ThunderlordsDecree = 146,
WindspeakerBlessing = 147
}
public enum Resolve
{
Recovery = 65,
Unyielding = 66,
Explorer = 81,
ToughSkin = 82,
RunicArmor = 97,
VeteransScar = 98,
Insight = 113,
Swiftness = 129,
LegendaryGuardian = 130,
GraspoftheUndying = 145,
StrengthoftheAges = 146,
BondofStones = 147
}
}
}