1 | <?php namespace FreedomCore\TrinityCore\Support\Classes; |
||
12 | class Profession |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * ID of the profession |
||
17 | * @var int |
||
18 | */ |
||
19 | protected $professionID = 0; |
||
20 | |||
21 | /** |
||
22 | * Skill level of the profession |
||
23 | * @var int |
||
24 | */ |
||
25 | protected $professionLevel = 0; |
||
26 | |||
27 | /** |
||
28 | * Min ID for the SkillLine DB2 file to extract professions |
||
29 | * @var int |
||
30 | */ |
||
31 | protected $minID = 129; |
||
32 | |||
33 | /** |
||
34 | * Max ID for the SkillLine DB2 file to extract professions |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $maxID = 773; |
||
38 | |||
39 | /** |
||
40 | * Array of available professions |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $professions = []; |
||
44 | |||
45 | /** |
||
46 | * Character professions collection |
||
47 | * @var \Illuminate\Support\Collection |
||
48 | */ |
||
49 | protected $characterProfessions = []; |
||
50 | |||
51 | /** |
||
52 | * Profession constructor. |
||
53 | * @param int $profession |
||
54 | * @param int $level |
||
55 | */ |
||
56 | public function __construct(int $profession = 0, int $level = 0) |
||
61 | |||
62 | /** |
||
63 | * Set profession id |
||
64 | * @param int $profession |
||
65 | * @return Profession |
||
66 | */ |
||
67 | public function setProfessionID(int $profession) : Profession |
||
72 | |||
73 | /** |
||
74 | * Set profession level |
||
75 | * @param int $level |
||
76 | * @return Profession |
||
77 | */ |
||
78 | public function setProfessionLevel(int $level) : Profession |
||
83 | |||
84 | /** |
||
85 | * Get profession id |
||
86 | * @return int |
||
87 | */ |
||
88 | public function getProfessionID() : int |
||
92 | |||
93 | /** |
||
94 | * Get profession level |
||
95 | * @return int |
||
96 | */ |
||
97 | public function getProfessionLevel() : int |
||
101 | |||
102 | /** |
||
103 | * Load professions from SkillLine |
||
104 | * @param DB2Reader $reader |
||
105 | * @return Profession |
||
106 | * @throws \Exception |
||
107 | */ |
||
108 | public function loadProfessions(DB2Reader $reader) : Profession |
||
121 | |||
122 | /** |
||
123 | * Load character professions |
||
124 | * @param Character $character |
||
125 | */ |
||
126 | public function loadCharacterProfessions(Character $character) |
||
141 | |||
142 | /** |
||
143 | * Get list of available professions |
||
144 | * @return array |
||
145 | */ |
||
146 | public function getAvailableProfessions() : array |
||
150 | |||
151 | /** |
||
152 | * Get character professions |
||
153 | * @return \Illuminate\Support\Collection |
||
154 | */ |
||
155 | public function getCharacterProfessions() : Collection |
||
159 | } |
||
160 |