@@ -266,6 +266,10 @@ |
||
266 | 266 | } |
267 | 267 | } |
268 | 268 | |
269 | + /** |
|
270 | + * @param integer $techno |
|
271 | + * @param string $level |
|
272 | + */ |
|
269 | 273 | public function updateTechnoBonus(PlayerBonus $playerBonus, $techno, $level) { |
270 | 274 | switch ($techno) { |
271 | 275 | case Technology::GENERATOR_SPEED: $bonusId = PlayerBonus::GENERATOR_SPEED; break; |
@@ -3,21 +3,17 @@ |
||
3 | 3 | namespace Asylamba\Modules\Zeus\Manager; |
4 | 4 | |
5 | 5 | use Asylamba\Classes\Exception\ErrorException; |
6 | - |
|
7 | 6 | use Asylamba\Classes\Container\StackList; |
8 | - |
|
9 | 7 | use Asylamba\Modules\Zeus\Model\Player; |
10 | 8 | use Asylamba\Modules\Zeus\Model\PlayerBonus; |
11 | 9 | use Asylamba\Modules\Promethee\Model\Technology; |
12 | 10 | use Asylamba\Modules\Demeter\Model\Law\Law; |
13 | 11 | use Asylamba\Modules\Demeter\Resource\LawResources; |
14 | - |
|
15 | 12 | use Asylamba\Modules\Demeter\Manager\Law\LawManager; |
16 | 13 | use Asylamba\Modules\Demeter\Manager\ColorManager; |
17 | 14 | use Asylamba\Modules\Promethee\Manager\TechnologyManager; |
18 | 15 | use Asylamba\Modules\Promethee\Helper\TechnologyHelper; |
19 | 16 | use Asylamba\Classes\Library\Session\SessionWrapper; |
20 | - |
|
21 | 17 | use Asylamba\Modules\Demeter\Resource\ColorResource; |
22 | 18 | |
23 | 19 | class PlayerBonusManager |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Asylamba\Modules\Zeus\Repository; |
4 | 4 | |
5 | 5 | use Asylamba\Classes\Entity\AbstractRepository; |
6 | - |
|
7 | 6 | use Asylamba\Modules\Zeus\Model\Player; |
8 | 7 | |
9 | 8 | class PlayerRepository extends AbstractRepository { |
@@ -14,7 +14,6 @@ |
||
14 | 14 | |
15 | 15 | /** |
16 | 16 | * @param FileLocatorInterface $locator |
17 | - * @param string $format |
|
18 | 17 | */ |
19 | 18 | public function __construct(FileLocatorInterface $locator) { |
20 | 19 | $this->locator = $locator; |
@@ -23,9 +23,7 @@ discard block |
||
23 | 23 | use Asylamba\Modules\Demeter\Manager\ColorManager; |
24 | 24 | use Asylamba\Modules\Hermes\Manager\NotificationManager; |
25 | 25 | use Asylamba\Classes\Container\ArrayList; |
26 | - |
|
27 | 26 | use Asylamba\Classes\Worker\EventDispatcher; |
28 | - |
|
29 | 27 | use Asylamba\Modules\Athena\Model\OrbitalBase; |
30 | 28 | use Asylamba\Modules\Gaia\Model\Place; |
31 | 29 | use Asylamba\Modules\Ares\Model\Report; |
@@ -34,9 +32,7 @@ discard block |
||
34 | 32 | use Asylamba\Modules\Ares\Model\Commander; |
35 | 33 | use Asylamba\Modules\Gaia\Resource\SquadronResource; |
36 | 34 | use Asylamba\Modules\Demeter\Model\Color; |
37 | - |
|
38 | 35 | use Asylamba\Classes\Scheduler\RealTimeActionScheduler; |
39 | - |
|
40 | 36 | use Asylamba\Modules\Gaia\Event\PlaceOwnerChangeEvent; |
41 | 37 | |
42 | 38 | class CommanderManager |
@@ -349,6 +349,10 @@ discard block |
||
349 | 349 | $this->entityManager->commit(); |
350 | 350 | } |
351 | 351 | |
352 | + /** |
|
353 | + * @param integer $rStartPlace |
|
354 | + * @param double $duration |
|
355 | + */ |
|
352 | 356 | public function move(Commander $commander, $rDestinationPlace, $rStartPlace, $travelType, $travelLength, $duration) { |
353 | 357 | $commander->rDestinationPlace = $rDestinationPlace; |
354 | 358 | $commander->rStartPlace = $rStartPlace; |
@@ -376,6 +380,9 @@ discard block |
||
376 | 380 | return TRUE; |
377 | 381 | } |
378 | 382 | |
383 | + /** |
|
384 | + * @param boolean $isWinner |
|
385 | + */ |
|
379 | 386 | public function resultOfFight(Commander $commander, $isWinner, $enemyCommander) { |
380 | 387 | if ($isWinner == TRUE) { |
381 | 388 | $this->setEarnedExperience($commander, $enemyCommander); |
@@ -919,6 +926,12 @@ discard block |
||
919 | 926 | # HELPER |
920 | 927 | |
921 | 928 | # comeBack |
929 | + |
|
930 | + /** |
|
931 | + * @param Commander $commander |
|
932 | + * @param Place $commanderPlace |
|
933 | + * @param PlayerBonus $playerBonus |
|
934 | + */ |
|
922 | 935 | public function comeBack(Place $place, $commander, $commanderPlace, $playerBonus) { |
923 | 936 | $length = Game::getDistance($place->getXSystem(), $commanderPlace->getXSystem(), $place->getYSystem(), $commanderPlace->getYSystem()); |
924 | 937 | $duration = Game::getTimeToTravel($commanderPlace, $place, $playerBonus->bonus); |
@@ -928,6 +941,10 @@ discard block |
||
928 | 941 | $this->move($commander, $commander->rBase, $place->id, Commander::BACK, $length, $duration); |
929 | 942 | } |
930 | 943 | |
944 | + /** |
|
945 | + * @param Commander $commander |
|
946 | + * @param PlayerBonus $playerBonus |
|
947 | + */ |
|
931 | 948 | private function lootAnEmptyPlace(Place $place, $commander, $playerBonus) { |
932 | 949 | $bonus = $playerBonus->bonus->get(PlayerBonus::SHIP_CONTAINER); |
933 | 950 | |
@@ -943,6 +960,11 @@ discard block |
||
943 | 960 | LiveReport::$resources = $resourcesLooted; |
944 | 961 | } |
945 | 962 | |
963 | + /** |
|
964 | + * @param Commander $commander |
|
965 | + * @param PlayerBonus $playerBonus |
|
966 | + * @param OrbitalBase $placeBase |
|
967 | + */ |
|
946 | 968 | private function lootAPlayerPlace($commander, $playerBonus, $placeBase) { |
947 | 969 | $bonus = $playerBonus->bonus->get(PlayerBonus::SHIP_CONTAINER); |
948 | 970 | |
@@ -962,6 +984,11 @@ discard block |
||
962 | 984 | } |
963 | 985 | } |
964 | 986 | |
987 | + /** |
|
988 | + * @param Commander $commander |
|
989 | + * @param \Asylamba\Modules\Zeus\Model\Player $player |
|
990 | + * @param \Asylamba\Modules\Zeus\Model\Player $enemyPlayer |
|
991 | + */ |
|
965 | 992 | private function startFight(Place $place, $commander, $player, $enemyCommander = NULL, $enemyPlayer = NULL, $pvp = FALSE) { |
966 | 993 | if ($pvp == TRUE) { |
967 | 994 | $commander->setArmy(); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | } |
350 | 350 | |
351 | 351 | /** |
352 | - * @return float |
|
352 | + * @return integer |
|
353 | 353 | */ |
354 | 354 | public function getXSystem() |
355 | 355 | { |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | } |
369 | 369 | |
370 | 370 | /** |
371 | - * @return float |
|
371 | + * @return integer |
|
372 | 372 | */ |
373 | 373 | public function getYSystem() |
374 | 374 | { |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | } |
559 | 559 | |
560 | 560 | /** |
561 | - * @return int |
|
561 | + * @return string |
|
562 | 562 | */ |
563 | 563 | public function getPoints() |
564 | 564 | { |
@@ -14,7 +14,6 @@ discard block |
||
14 | 14 | use Asylamba\Classes\Library\Utils; |
15 | 15 | use Asylamba\Classes\Entity\EntityManager; |
16 | 16 | use Asylamba\Classes\Library\Session\SessionWrapper; |
17 | - |
|
18 | 17 | use Asylamba\Modules\Zeus\Model\Player; |
19 | 18 | use Asylamba\Modules\Zeus\Model\PlayerBonus; |
20 | 19 | use Asylamba\Modules\Promethee\Model\Technology; |
@@ -22,7 +21,6 @@ discard block |
||
22 | 21 | use Asylamba\Modules\Hermes\Model\Notification; |
23 | 22 | use Asylamba\Modules\Ares\Model\Commander; |
24 | 23 | use Asylamba\Modules\Athena\Model\Transaction; |
25 | - |
|
26 | 24 | use Asylamba\Modules\Demeter\Manager\ColorManager; |
27 | 25 | use Asylamba\Modules\Ares\Manager\CommanderManager; |
28 | 26 | use Asylamba\Modules\Gaia\Manager\GalaxyColorManager; |
@@ -36,10 +34,8 @@ discard block |
||
36 | 34 | use Asylamba\Modules\Promethee\Manager\TechnologyManager; |
37 | 35 | use Asylamba\Modules\Athena\Resource\ShipResource; |
38 | 36 | use Asylamba\Modules\Demeter\Model\Color; |
39 | - |
|
40 | 37 | use Asylamba\Classes\Library\Game; |
41 | 38 | use Asylamba\Classes\Container\ArrayList; |
42 | - |
|
43 | 39 | use Asylamba\Classes\Exception\ErrorException; |
44 | 40 | |
45 | 41 | class PlayerManager { |
@@ -348,6 +348,9 @@ discard block |
||
348 | 348 | $this->entityManager->flush($player); |
349 | 349 | } |
350 | 350 | |
351 | + /** |
|
352 | + * @param Player $playerId |
|
353 | + */ |
|
351 | 354 | public function kill($playerId) { |
352 | 355 | $player = $this->get($playerId); |
353 | 356 | |
@@ -526,6 +529,10 @@ discard block |
||
526 | 529 | $this->entityManager->commit(); |
527 | 530 | } |
528 | 531 | |
532 | + /** |
|
533 | + * @param PlayerBonus $playerBonus |
|
534 | + * @param \Asylamba\Classes\Worker\ManagerSession $rsmSession |
|
535 | + */ |
|
529 | 536 | public function uCredit(Player $player, $playerBases, $playerBonus, $commanders, $rsmSession, &$factions, $transactions) { |
530 | 537 | |
531 | 538 | $popTax = 0; $nationTax = 0; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
140 | - * @return bool |
|
140 | + * @return integer |
|
141 | 141 | */ |
142 | 142 | public function getAlive() |
143 | 143 | { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
159 | - * @return bool |
|
159 | + * @return integer |
|
160 | 160 | */ |
161 | 161 | public function getIsWinner() |
162 | 162 | { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
197 | - * @return array |
|
197 | + * @return integer |
|
198 | 198 | */ |
199 | 199 | public function getPlayers() |
200 | 200 | { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | |
226 | 226 | //Kern je connais pas le type non plus, je suppose que c'est un tableau d'int avec les id |
227 | 227 | /** |
228 | - * @return array |
|
228 | + * @return integer |
|
229 | 229 | */ |
230 | 230 | public function getActivePlayers() |
231 | 231 | { |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | } |
283 | 283 | |
284 | 284 | /** |
285 | - * @return array |
|
285 | + * @return integer |
|
286 | 286 | */ |
287 | 287 | public function getSectors() |
288 | 288 | { |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | } |
321 | 321 | |
322 | 322 | /** |
323 | - * @return bool |
|
323 | + * @return integer |
|
324 | 324 | */ |
325 | 325 | public function getIsClosed() |
326 | 326 | { |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | } |
340 | 340 | |
341 | 341 | /** |
342 | - * @return string |
|
342 | + * @return integer |
|
343 | 343 | */ |
344 | 344 | public function getDescription() |
345 | 345 | { |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | } |
701 | 701 | |
702 | 702 | /** |
703 | - * @return int |
|
703 | + * @return string |
|
704 | 704 | */ |
705 | 705 | public function getCampaignDesc() |
706 | 706 | { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | /** |
27 | 27 | * @param AbstractLogger $logger |
28 | - * @param Session $session |
|
28 | + * @param SessionWrapper $session |
|
29 | 29 | * @param Database $database |
30 | 30 | */ |
31 | 31 | public function __construct(AbstractLogger $logger, SessionWrapper $session, Database $database) |
@@ -78,6 +78,7 @@ discard block |
||
78 | 78 | * @param string $trace |
79 | 79 | * @param string $level |
80 | 80 | * @param int $flashbagLevel |
81 | + * @param string $redirect |
|
81 | 82 | */ |
82 | 83 | public function process($event, $message, $file, $line, $trace, $level, $flashbagLevel, $redirect = null) |
83 | 84 | { |
@@ -5,14 +5,11 @@ |
||
5 | 5 | use Asylamba\Classes\Logger\AbstractLogger; |
6 | 6 | use Asylamba\Classes\Library\Session\SessionWrapper; |
7 | 7 | use Asylamba\Classes\Library\Flashbag; |
8 | - |
|
9 | 8 | use Asylamba\Classes\Library\Http\Request; |
10 | 9 | use Asylamba\Classes\Library\Http\Response; |
11 | - |
|
12 | 10 | use Asylamba\Classes\Event\ExceptionEvent; |
13 | 11 | use Asylamba\Classes\Event\ErrorEvent; |
14 | 12 | use Asylamba\Classes\Exception\FormException; |
15 | - |
|
16 | 13 | use Asylamba\Classes\Database\Database; |
17 | 14 | |
18 | 15 | class ExceptionListener { |
@@ -76,6 +76,9 @@ |
||
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param string $currentHour |
|
81 | + */ |
|
79 | 82 | protected function executeDaily($currentHour) |
80 | 83 | { |
81 | 84 | if (($currentDay = date('d')) === $this->lastExecutedDay || ($currentHour < $this->dailyScriptHour)) { |