Exemplo n.º 1
0
 function onPlayerSetLocalAlly($login, array $params = array())
 {
     $allies = $this->allyService->getAll($login);
     $maxAlliesCount = $this->matchMaker->getPlayersPerMatch() / $this->matchMaker->getNumberOfTeam() - 1;
     if (count($allies) < $maxAlliesCount) {
         $this->allyService->set($login, $params['allyLogin']);
     }
 }