|
1
|
|
|
<?php namespace FreedomCore\TrinityCore\Console\Commands; |
|
2
|
|
|
|
|
3
|
|
|
use FreedomCore\TrinityCore\Console\Abstracts\BaseCommand; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* Class Guild |
|
7
|
|
|
* @package FreedomCore\TrinityCore\Console\Commands |
|
8
|
|
|
* @codeCoverageIgnore |
|
9
|
|
|
*/ |
|
10
|
|
|
class Guild extends BaseCommand |
|
11
|
|
|
{ |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* Create new guild |
|
15
|
|
|
* Player MUST be online |
|
16
|
|
|
* @param string $leaderName |
|
17
|
|
|
* @param string $guildName |
|
18
|
|
|
* @return array|string |
|
19
|
|
|
*/ |
|
20
|
|
|
public function create(string $leaderName, string $guildName) |
|
21
|
|
|
{ |
|
22
|
|
|
return $this->executeCommand(__FUNCTION__, [ |
|
23
|
|
|
'leaderName' => $leaderName, |
|
24
|
|
|
'guildName' => $this->inQuotes($guildName) |
|
25
|
|
|
]); |
|
26
|
|
|
} |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* Delete specified guild |
|
30
|
|
|
* @param string $guildName |
|
31
|
|
|
* @return array|string |
|
32
|
|
|
*/ |
|
33
|
|
|
public function delete(string $guildName) |
|
34
|
|
|
{ |
|
35
|
|
|
return $this->executeCommand(__FUNCTION__, ['guildName' => $this->inQuotes($guildName)]); |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* Invite Specified Player To Specified Guild |
|
40
|
|
|
* @param string $playerName |
|
41
|
|
|
* @param string $guildName |
|
42
|
|
|
* @return array|string |
|
43
|
|
|
*/ |
|
44
|
|
|
public function invite(string $playerName, string $guildName) |
|
45
|
|
|
{ |
|
46
|
|
|
return $this->executeCommand(__FUNCTION__, [ |
|
47
|
|
|
'playerName' => $playerName, |
|
48
|
|
|
'guildName' => $this->inQuotes($guildName) |
|
49
|
|
|
]); |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* Rename Guild |
|
54
|
|
|
* @param string $oldName |
|
55
|
|
|
* @param string $newName |
|
56
|
|
|
* @return array|string |
|
57
|
|
|
*/ |
|
58
|
|
|
public function rename(string $oldName, string $newName) |
|
59
|
|
|
{ |
|
60
|
|
|
return $this->executeCommand(__FUNCTION__, [ |
|
61
|
|
|
'oldName' => $this->inQuotes($oldName), |
|
62
|
|
|
'newName' => $this->inQuotes($newName) |
|
63
|
|
|
]); |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* Get Information About Specified Guild |
|
68
|
|
|
* @param string $guildName |
|
69
|
|
|
* @return array|string |
|
70
|
|
|
*/ |
|
71
|
|
|
public function info(string $guildName) |
|
72
|
|
|
{ |
|
73
|
|
|
return $this->executeCommand(__FUNCTION__, [ |
|
74
|
|
|
'guildName' => $this->inQuotes($guildName) |
|
75
|
|
|
]); |
|
76
|
|
|
} |
|
77
|
|
|
} |
|
78
|
|
|
|