1
|
|
|
<?php namespace FreedomCore\TrinityCore\Character\Models; |
2
|
|
|
|
3
|
|
|
use FreedomCore\TrinityCore\Character\Models\CharacterBaseModel; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class Character |
7
|
|
|
* |
8
|
|
|
* @package FreedomCore\TrinityCore\Character\Models |
9
|
|
|
* @property int $guid Global Unique Identifier |
10
|
|
|
* @property int $account Account Identifier |
11
|
|
|
* @property string $name |
12
|
|
|
* @property int $slot |
13
|
|
|
* @property int $race |
14
|
|
|
* @property int $class |
15
|
|
|
* @property int $gender |
16
|
|
|
* @property int $level |
17
|
|
|
* @property int $xp |
18
|
|
|
* @property int $money |
19
|
|
|
* @property int $skin |
20
|
|
|
* @property int $face |
21
|
|
|
* @property int $hairStyle |
22
|
|
|
* @property int $hairColor |
23
|
|
|
* @property int $facialStyle |
24
|
|
|
* @property int $customDisplay1 |
25
|
|
|
* @property int $customDisplay2 |
26
|
|
|
* @property int $customDisplay3 |
27
|
|
|
* @property int $bankSlots |
28
|
|
|
* @property int $restState |
29
|
|
|
* @property int $playerFlags |
30
|
|
|
* @property int $playerFlagsEx |
31
|
|
|
* @property float $position_x |
32
|
|
|
* @property float $position_y |
33
|
|
|
* @property float $position_z |
34
|
|
|
* @property int $map Map Identifier |
35
|
|
|
* @property int $instance_id |
36
|
|
|
* @property int $dungeonDifficulty |
37
|
|
|
* @property int $raidDifficulty |
38
|
|
|
* @property int $legacyRaidDifficulty |
39
|
|
|
* @property float $orientation |
40
|
|
|
* @property string $taximask |
41
|
|
|
* @property int $online |
42
|
|
|
* @property int $cinematic |
43
|
|
|
* @property int $totaltime |
44
|
|
|
* @property int $leveltime |
45
|
|
|
* @property int $logout_time |
46
|
|
|
* @property int $is_logout_resting |
47
|
|
|
* @property float $rest_bonus |
48
|
|
|
* @property int $resettalents_cost |
49
|
|
|
* @property int $resettalents_time |
50
|
|
|
* @property int $primarySpecialization |
51
|
|
|
* @property float $trans_x |
52
|
|
|
* @property float $trans_y |
53
|
|
|
* @property float $trans_z |
54
|
|
|
* @property float $trans_o |
55
|
|
|
* @property int $transguid |
56
|
|
|
* @property int $extra_flags |
57
|
|
|
* @property int $stable_slots |
58
|
|
|
* @property int $at_login |
59
|
|
|
* @property int $zone |
60
|
|
|
* @property int $death_expire_time |
61
|
|
|
* @property string|null $taxi_path |
62
|
|
|
* @property int $totalKills |
63
|
|
|
* @property int $todayKills |
64
|
|
|
* @property int $yesterdayKills |
65
|
|
|
* @property int $chosenTitle |
66
|
|
|
* @property int $watchedFaction |
67
|
|
|
* @property int $drunk |
68
|
|
|
* @property int $health |
69
|
|
|
* @property int $power1 |
70
|
|
|
* @property int $power2 |
71
|
|
|
* @property int $power3 |
72
|
|
|
* @property int $power4 |
73
|
|
|
* @property int $power5 |
74
|
|
|
* @property int $power6 |
75
|
|
|
* @property int $latency |
76
|
|
|
* @property int $activeTalentGroup |
77
|
|
|
* @property int $lootSpecId |
78
|
|
|
* @property string|null $exploredZones |
79
|
|
|
* @property string|null $equipmentCache |
80
|
|
|
* @property string|null $knownTitles |
81
|
|
|
* @property int $actionBars |
82
|
|
|
* @property int $grantableLevels |
83
|
|
|
* @property int $deleteInfos_Account |
84
|
|
|
* @property string|null $deleteInfos_Name |
85
|
|
|
* @property int $deleteDate |
86
|
|
|
* @property int $honor |
87
|
|
|
* @property int $honorLevel |
88
|
|
|
* @property int $prestigeLevel |
89
|
|
|
* @property int $honorRestState |
90
|
|
|
* @property float $honorRestBonus |
91
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\FreedomCore\TrinityCore\Character\Models\CharacterGarrisonFollower[] $garrisonFollowers |
92
|
|
|
* @property-read mixed $guild |
93
|
|
|
* @property-read array $player_versus_player_stats |
94
|
|
|
* @property-read array $position |
95
|
|
|
* @property-read \FreedomCore\TrinityCore\Character\Models\GuildMember $guildMember |
96
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\FreedomCore\TrinityCore\Character\Models\CharacterInventory[] $inventory |
97
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\FreedomCore\TrinityCore\Character\Models\CharacterSkill[] $skills |
98
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\CharacterBaseModel incrementID() |
99
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereAccount($value) |
100
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereActionBars($value) |
101
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereActiveTalentGroup($value) |
102
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereAtLogin($value) |
103
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereBankSlots($value) |
104
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereChosenTitle($value) |
105
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereCinematic($value) |
106
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereClass($value) |
107
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereCustomDisplay1($value) |
108
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereCustomDisplay2($value) |
109
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereCustomDisplay3($value) |
110
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereDeathExpireTime($value) |
111
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereDeleteDate($value) |
112
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereDeleteInfosAccount($value) |
113
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereDeleteInfosName($value) |
114
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereDrunk($value) |
115
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereDungeonDifficulty($value) |
116
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereEquipmentCache($value) |
117
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereExploredZones($value) |
118
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereExtraFlags($value) |
119
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereFace($value) |
120
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereFacialStyle($value) |
121
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereGender($value) |
122
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereGrantableLevels($value) |
123
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereGuid($value) |
124
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereHairColor($value) |
125
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereHairStyle($value) |
126
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereHealth($value) |
127
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereHonor($value) |
128
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereHonorLevel($value) |
129
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereHonorRestBonus($value) |
130
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereHonorRestState($value) |
131
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereInstanceId($value) |
132
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereIsLogoutResting($value) |
133
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereKnownTitles($value) |
134
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereLatency($value) |
135
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereLegacyRaidDifficulty($value) |
136
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereLevel($value) |
137
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereLeveltime($value) |
138
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereLogoutTime($value) |
139
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereLootSpecId($value) |
140
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereMap($value) |
141
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereMoney($value) |
142
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereName($value) |
143
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereOnline($value) |
144
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereOrientation($value) |
145
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePlayerFlags($value) |
146
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePlayerFlagsEx($value) |
147
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePositionX($value) |
148
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePositionY($value) |
149
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePositionZ($value) |
150
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePower1($value) |
151
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePower2($value) |
152
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePower3($value) |
153
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePower4($value) |
154
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePower5($value) |
155
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePower6($value) |
156
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePrestigeLevel($value) |
157
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character wherePrimarySpecialization($value) |
158
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereRace($value) |
159
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereRaidDifficulty($value) |
160
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereResettalentsCost($value) |
161
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereResettalentsTime($value) |
162
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereRestBonus($value) |
163
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereRestState($value) |
164
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereSkin($value) |
165
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereSlot($value) |
166
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereStableSlots($value) |
167
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTaxiPath($value) |
168
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTaximask($value) |
169
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTodayKills($value) |
170
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTotalKills($value) |
171
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTotaltime($value) |
172
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTransO($value) |
173
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTransX($value) |
174
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTransY($value) |
175
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTransZ($value) |
176
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereTransguid($value) |
177
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereWatchedFaction($value) |
178
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereXp($value) |
179
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereYesterdayKills($value) |
180
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\Character whereZone($value) |
181
|
|
|
* @mixin \Eloquent |
182
|
|
|
*/ |
183
|
|
|
class Character extends CharacterBaseModel |
184
|
|
|
{ |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* @inheritdoc |
188
|
|
|
* @var string |
189
|
|
|
*/ |
190
|
|
|
protected $primaryKey = 'guid'; |
191
|
|
|
/** |
192
|
|
|
* @inheritdoc |
193
|
|
|
* @var bool |
194
|
|
|
*/ |
195
|
|
|
public $incrementing = true; |
196
|
|
|
/** |
197
|
|
|
* @inheritdoc |
198
|
|
|
* @var bool |
199
|
|
|
*/ |
200
|
|
|
public $timestamps = false; |
201
|
|
|
/** |
202
|
|
|
* @inheritdoc |
203
|
|
|
* @var array |
204
|
|
|
*/ |
205
|
|
|
protected $casts = [ |
206
|
|
|
'guid' => 'int', |
207
|
|
|
'account' => 'int', |
208
|
|
|
'slot' => 'int', |
209
|
|
|
'race' => 'int', |
210
|
|
|
'class' => 'int', |
211
|
|
|
'gender' => 'int', |
212
|
|
|
'level' => 'int', |
213
|
|
|
'xp' => 'int', |
214
|
|
|
'money' => 'int', |
215
|
|
|
'skin' => 'int', |
216
|
|
|
'face' => 'int', |
217
|
|
|
'hairStyle' => 'int', |
218
|
|
|
'hairColor' => 'int', |
219
|
|
|
'facialStyle' => 'int', |
220
|
|
|
'customDisplay1' => 'int', |
221
|
|
|
'customDisplay2' => 'int', |
222
|
|
|
'customDisplay3' => 'int', |
223
|
|
|
'bankSlots' => 'int', |
224
|
|
|
'restState' => 'int', |
225
|
|
|
'playerFlags' => 'int', |
226
|
|
|
'playerFlagsEx' => 'int', |
227
|
|
|
'position_x' => 'float', |
228
|
|
|
'position_y' => 'float', |
229
|
|
|
'position_z' => 'float', |
230
|
|
|
'map' => 'int', |
231
|
|
|
'instance_id' => 'int', |
232
|
|
|
'dungeonDifficulty' => 'int', |
233
|
|
|
'raidDifficulty' => 'int', |
234
|
|
|
'legacyRaidDifficulty' => 'int', |
235
|
|
|
'orientation' => 'float', |
236
|
|
|
'online' => 'int', |
237
|
|
|
'cinematic' => 'int', |
238
|
|
|
'totaltime' => 'int', |
239
|
|
|
'leveltime' => 'int', |
240
|
|
|
'logout_time' => 'int', |
241
|
|
|
'is_logout_resting' => 'int', |
242
|
|
|
'rest_bonus' => 'float', |
243
|
|
|
'resettalents_cost' => 'int', |
244
|
|
|
'resettalents_time' => 'int', |
245
|
|
|
'primarySpecialization' => 'int', |
246
|
|
|
'trans_x' => 'float', |
247
|
|
|
'trans_y' => 'float', |
248
|
|
|
'trans_z' => 'float', |
249
|
|
|
'trans_o' => 'float', |
250
|
|
|
'transguid' => 'int', |
251
|
|
|
'extra_flags' => 'int', |
252
|
|
|
'stable_slots' => 'int', |
253
|
|
|
'at_login' => 'int', |
254
|
|
|
'zone' => 'int', |
255
|
|
|
'death_expire_time' => 'int', |
256
|
|
|
'totalKills' => 'int', |
257
|
|
|
'todayKills' => 'int', |
258
|
|
|
'yesterdayKills' => 'int', |
259
|
|
|
'chosenTitle' => 'int', |
260
|
|
|
'watchedFaction' => 'int', |
261
|
|
|
'drunk' => 'int', |
262
|
|
|
'health' => 'int', |
263
|
|
|
'power1' => 'int', |
264
|
|
|
'power2' => 'int', |
265
|
|
|
'power3' => 'int', |
266
|
|
|
'power4' => 'int', |
267
|
|
|
'power5' => 'int', |
268
|
|
|
'power6' => 'int', |
269
|
|
|
'latency' => 'int', |
270
|
|
|
'activeTalentGroup' => 'int', |
271
|
|
|
'lootSpecId' => 'int', |
272
|
|
|
'actionBars' => 'int', |
273
|
|
|
'grantableLevels' => 'int', |
274
|
|
|
'deleteInfos_Account' => 'int', |
275
|
|
|
'deleteDate' => 'int', |
276
|
|
|
'honor' => 'int', |
277
|
|
|
'honorLevel' => 'int', |
278
|
|
|
'prestigeLevel' => 'int', |
279
|
|
|
'honorRestState' => 'int', |
280
|
|
|
'honorRestBonus' => 'float' |
281
|
|
|
]; |
282
|
|
|
/** |
283
|
|
|
* @inheritdoc |
284
|
|
|
* @var array |
285
|
|
|
*/ |
286
|
|
|
protected $fillable = [ |
287
|
|
|
'account', |
288
|
|
|
'name', |
289
|
|
|
'slot', |
290
|
|
|
'race', |
291
|
|
|
'class', |
292
|
|
|
'gender', |
293
|
|
|
'level', |
294
|
|
|
'xp', |
295
|
|
|
'money', |
296
|
|
|
'skin', |
297
|
|
|
'face', |
298
|
|
|
'hairStyle', |
299
|
|
|
'hairColor', |
300
|
|
|
'facialStyle', |
301
|
|
|
'customDisplay1', |
302
|
|
|
'customDisplay2', |
303
|
|
|
'customDisplay3', |
304
|
|
|
'bankSlots', |
305
|
|
|
'restState', |
306
|
|
|
'playerFlags', |
307
|
|
|
'playerFlagsEx', |
308
|
|
|
'position_x', |
309
|
|
|
'position_y', |
310
|
|
|
'position_z', |
311
|
|
|
'map', |
312
|
|
|
'instance_id', |
313
|
|
|
'dungeonDifficulty', |
314
|
|
|
'raidDifficulty', |
315
|
|
|
'legacyRaidDifficulty', |
316
|
|
|
'orientation', |
317
|
|
|
'taximask', |
318
|
|
|
'online', |
319
|
|
|
'cinematic', |
320
|
|
|
'totaltime', |
321
|
|
|
'leveltime', |
322
|
|
|
'logout_time', |
323
|
|
|
'is_logout_resting', |
324
|
|
|
'rest_bonus', |
325
|
|
|
'resettalents_cost', |
326
|
|
|
'resettalents_time', |
327
|
|
|
'primarySpecialization', |
328
|
|
|
'trans_x', |
329
|
|
|
'trans_y', |
330
|
|
|
'trans_z', |
331
|
|
|
'trans_o', |
332
|
|
|
'transguid', |
333
|
|
|
'extra_flags', |
334
|
|
|
'stable_slots', |
335
|
|
|
'at_login', |
336
|
|
|
'zone', |
337
|
|
|
'death_expire_time', |
338
|
|
|
'taxi_path', |
339
|
|
|
'totalKills', |
340
|
|
|
'todayKills', |
341
|
|
|
'yesterdayKills', |
342
|
|
|
'chosenTitle', |
343
|
|
|
'watchedFaction', |
344
|
|
|
'drunk', |
345
|
|
|
'health', |
346
|
|
|
'power1', |
347
|
|
|
'power2', |
348
|
|
|
'power3', |
349
|
|
|
'power4', |
350
|
|
|
'power5', |
351
|
|
|
'power6', |
352
|
|
|
'latency', |
353
|
|
|
'activeTalentGroup', |
354
|
|
|
'lootSpecId', |
355
|
|
|
'exploredZones', |
356
|
|
|
'equipmentCache', |
357
|
|
|
'knownTitles', |
358
|
|
|
'actionBars', |
359
|
|
|
'grantableLevels', |
360
|
|
|
'deleteInfos_Account', |
361
|
|
|
'deleteInfos_Name', |
362
|
|
|
'deleteDate', |
363
|
|
|
'honor', |
364
|
|
|
'honorLevel', |
365
|
|
|
'prestigeLevel', |
366
|
|
|
'honorRestState', |
367
|
|
|
'honorRestBonus' |
368
|
|
|
]; |
369
|
|
|
|
370
|
|
|
/** |
371
|
|
|
* Characters Garrison Followers |
372
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany |
373
|
|
|
*/ |
374
|
|
|
public function garrisonFollowers() |
375
|
|
|
{ |
376
|
|
|
return $this->hasMany(CharacterGarrisonFollower::class, 'guid'); |
377
|
|
|
} |
378
|
|
|
|
379
|
|
|
/** |
380
|
|
|
* Character is a guild member of which guild |
381
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
382
|
|
|
*/ |
383
|
|
|
public function guildMember() |
384
|
|
|
{ |
385
|
|
|
return $this->belongsTo(GuildMember::class, 'guid'); |
386
|
|
|
} |
387
|
|
|
|
388
|
|
|
/** |
389
|
|
|
* Get guild to which character belongs to |
390
|
|
|
* @usage $character->guild |
391
|
|
|
* @return mixed |
392
|
|
|
*/ |
393
|
|
|
public function getGuildAttribute() |
394
|
|
|
{ |
395
|
|
|
return $this->guildMember->guild; |
396
|
|
|
} |
397
|
|
|
|
398
|
|
|
/** |
399
|
|
|
* Get character position |
400
|
|
|
* @return array |
401
|
|
|
*/ |
402
|
|
|
public function getPositionAttribute() : array |
403
|
|
|
{ |
404
|
|
|
return [ |
405
|
|
|
'zone' => $this->zone, |
406
|
|
|
'x' => $this->trans_x, |
407
|
|
|
'y' => $this->trans_y, |
408
|
|
|
'z' => $this->trans_z, |
409
|
|
|
'o' => $this->trans_o, |
410
|
|
|
]; |
411
|
|
|
} |
412
|
|
|
|
413
|
|
|
/** |
414
|
|
|
* Get PvP Stats for the character |
415
|
|
|
* @return array |
416
|
|
|
*/ |
417
|
|
|
public function getPlayerVersusPlayerStatsAttribute() : array |
418
|
|
|
{ |
419
|
|
|
return [ |
420
|
|
|
'honor' => [ |
421
|
|
|
'amount' => $this->honor, |
422
|
|
|
'level' => $this->honorLevel, |
423
|
|
|
'rest_state' => $this->honorRestState, |
424
|
|
|
'rest_bonus' => $this->honorRestBonus |
425
|
|
|
], |
426
|
|
|
'prestige' => [ |
427
|
|
|
'level' => $this->prestigeLevel |
428
|
|
|
], |
429
|
|
|
'kills' => [ |
430
|
|
|
'total' => $this->totalKills, |
431
|
|
|
'today' => $this->todayKills, |
432
|
|
|
] |
433
|
|
|
]; |
434
|
|
|
} |
435
|
|
|
|
436
|
|
|
/** |
437
|
|
|
* Get Inventory of a Character |
438
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany |
439
|
|
|
*/ |
440
|
|
|
public function inventory() |
441
|
|
|
{ |
442
|
|
|
return $this->hasMany(CharacterInventory::class, 'guid'); |
443
|
|
|
} |
444
|
|
|
|
445
|
|
|
/** |
446
|
|
|
* Get character skills |
447
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany |
448
|
|
|
*/ |
449
|
|
|
public function skills() |
450
|
|
|
{ |
451
|
|
|
return $this->hasMany(CharacterSkill::class, 'guid'); |
452
|
|
|
} |
453
|
|
|
} |
454
|
|
|
|