@@ -59,6 +59,10 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param string|boolean $date1 |
|
| 64 | + * @param string $date2 |
|
| 65 | + */ |
|
| 62 | 66 | public static function intervalDates($date1, $date2, $precision = 'h') { |
| 63 | 67 | # give each full hours between two dates |
| 64 | 68 | $dates = []; |
@@ -136,6 +140,9 @@ discard block |
||
| 136 | 140 | return date('Y-m-d H:i:s', $timestamp); |
| 137 | 141 | } |
| 138 | 142 | |
| 143 | + /** |
|
| 144 | + * @param integer $nbr |
|
| 145 | + */ |
|
| 139 | 146 | public static function generateString($nbr) { |
| 140 | 147 | $password = ''; |
| 141 | 148 | for ($i = 0; $i < $nbr; $i++) { |
@@ -19,12 +19,20 @@ discard block |
||
| 19 | 19 | const TEMPLATE_INACTIVE_PLAYER = 51; |
| 20 | 20 | const TEMPLATE_SPONSORSHIP = 52; |
| 21 | 21 | |
| 22 | + /** |
|
| 23 | + * @param string $path |
|
| 24 | + * @param integer $server |
|
| 25 | + * @param string $key |
|
| 26 | + */ |
|
| 22 | 27 | public function __construct($path, $server, $key) { |
| 23 | 28 | $this->path = $path; |
| 24 | 29 | $this->server = $server; |
| 25 | 30 | $this->key = $key; |
| 26 | 31 | } |
| 27 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $api |
|
| 35 | + */ |
|
| 28 | 36 | private function query($api, $args) { |
| 29 | 37 | $targ = ''; |
| 30 | 38 | $ch = curl_init(); |
@@ -84,6 +92,9 @@ discard block |
||
| 84 | 92 | } |
| 85 | 93 | } |
| 86 | 94 | |
| 95 | + /** |
|
| 96 | + * @param integer $serverId |
|
| 97 | + */ |
|
| 87 | 98 | public function playerIsDead($bindkey, $serverId) { |
| 88 | 99 | if ($this->query('playerisdead', array('bindkey' => $bindkey, 'serverid' => $serverId))) { |
| 89 | 100 | if ($this->data['statement'] == 'success') { |
@@ -7,12 +7,9 @@ |
||
| 7 | 7 | use Asylamba\Classes\Container\Cookie; |
| 8 | 8 | use Asylamba\Classes\Container\History; |
| 9 | 9 | use Asylamba\Classes\Container\Session; |
| 10 | - |
|
| 11 | 10 | use Asylamba\Classes\Library\Benchmark; |
| 12 | 11 | use Asylamba\Classes\Library\Bug; |
| 13 | - |
|
| 14 | 12 | use Asylamba\Classes\Database\Database; |
| 15 | - |
|
| 16 | 13 | use Asylamba\Modules\Gaia\Manager\GalaxyColorManager; |
| 17 | 14 | |
| 18 | 15 | abstract class CTR { |
@@ -16,7 +16,6 @@ |
||
| 16 | 16 | use Asylamba\Classes\Worker\Manager; |
| 17 | 17 | use Asylamba\Classes\Library\Utils; |
| 18 | 18 | use Asylamba\Classes\Database\Database; |
| 19 | - |
|
| 20 | 19 | use Asylamba\Modules\Ares\Model\Commander; |
| 21 | 20 | |
| 22 | 21 | class CommanderManager extends Manager { |
@@ -14,7 +14,6 @@ |
||
| 14 | 14 | |
| 15 | 15 | use Asylamba\Classes\Library\Utils; |
| 16 | 16 | use Asylamba\Classes\Worker\Manager; |
| 17 | - |
|
| 18 | 17 | use Asylamba\Classes\Database\Database; |
| 19 | 18 | use Asylamba\Modules\Ares\Model\Report; |
| 20 | 19 | |
@@ -294,6 +294,9 @@ |
||
| 294 | 294 | $this->newSession(FALSE); |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | + /** |
|
| 298 | + * @param Report $newReport |
|
| 299 | + */ |
|
| 297 | 300 | public function add($newReport) { |
| 298 | 301 | $db = Database::getInstance(); |
| 299 | 302 | |
@@ -14,9 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | use Asylamba\Classes\Worker\Manager; |
| 16 | 16 | use Asylamba\Classes\Library\Utils; |
| 17 | - |
|
| 18 | 17 | use Asylamba\Classes\Database\Database; |
| 19 | - |
|
| 20 | 18 | use Asylamba\Modules\Ares\Model\Report; |
| 21 | 19 | |
| 22 | 20 | class ReportManager extends Manager { |
@@ -199,6 +199,9 @@ |
||
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | + /** |
|
| 203 | + * @param integer $i |
|
| 204 | + */ |
|
| 202 | 205 | public function getSquadron($i) { |
| 203 | 206 | $this->setArmy(); |
| 204 | 207 | if (!empty($this->army[$i])) { |
@@ -13,14 +13,11 @@ |
||
| 13 | 13 | namespace Asylamba\Modules\Ares\Model; |
| 14 | 14 | |
| 15 | 15 | use Asylamba\Modules\Athena\Resource\ShipResource; |
| 16 | - |
|
| 17 | 16 | use Asylamba\Classes\Library\Utils; |
| 18 | 17 | use Asylamba\Classes\Container\ArrayList; |
| 19 | - |
|
| 20 | 18 | use Asylamba\Classes\Worker\CTR; |
| 21 | 19 | use Asylamba\Classes\Worker\ASM; |
| 22 | 20 | use Asylamba\Classes\Worker\CTC; |
| 23 | - |
|
| 24 | 21 | use Asylamba\Modules\Zeus\Model\PlayerBonus; |
| 25 | 22 | use Asylamba\Modules\Ares\FightController; |
| 26 | 23 | |
@@ -29,6 +29,9 @@ discard block |
||
| 29 | 29 | public $pev = 0; |
| 30 | 30 | public $isAttacker; |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param integer $nbrName |
|
| 34 | + */ |
|
| 32 | 35 | public function __construct($nbrName, $isAttacker) { |
| 33 | 36 | $this->nbrName = $nbrName; |
| 34 | 37 | $this->isAttacker = $isAttacker; |
@@ -106,6 +109,10 @@ discard block |
||
| 106 | 109 | return $aleaNbr; |
| 107 | 110 | } |
| 108 | 111 | |
| 112 | + /** |
|
| 113 | + * @param integer $key |
|
| 114 | + * @param integer $i |
|
| 115 | + */ |
|
| 109 | 116 | protected function attack($key, $i, $enemySquadron) { |
| 110 | 117 | $damages = ceil(log(($this->attack[$i] / $enemySquadron->getShip($key)->getDefense()) + 1) * 4 * $this->attack[$i]); |
| 111 | 118 | $enemySquadron->getShip($key)->receiveDamages($damages, $enemySquadron, $key); |
@@ -128,6 +135,9 @@ discard block |
||
| 128 | 135 | } |
| 129 | 136 | } |
| 130 | 137 | |
| 138 | + /** |
|
| 139 | + * @param integer $id |
|
| 140 | + */ |
|
| 131 | 141 | public function affectId ($id) { |
| 132 | 142 | $this->id = $id + 1; |
| 133 | 143 | } |
@@ -77,6 +77,10 @@ |
||
| 77 | 77 | |
| 78 | 78 | public function setRelId($id) { $this->relId = $id; } |
| 79 | 79 | |
| 80 | + /** |
|
| 81 | + * @param integer $position |
|
| 82 | + * @param integer $rCommander |
|
| 83 | + */ |
|
| 80 | 84 | public function __construct($vector, $id, $lineCoord, $position, $rCommander, $isAttacker = NULL) { |
| 81 | 85 | for($i = 0; $i < 12; $i++) { |
| 82 | 86 | $this->arrayOfShips[] = $vector[$i]; |
@@ -13,7 +13,6 @@ |
||
| 13 | 13 | namespace Asylamba\Modules\Ares\Model; |
| 14 | 14 | |
| 15 | 15 | use Asylamba\Modules\Ares\FightController; |
| 16 | - |
|
| 17 | 16 | use Asylamba\Modules\Ares\Model\LiveReport; |
| 18 | 17 | use Asylamba\Modules\Ares\Model\Ship; |
| 19 | 18 | |