/** * @param UserInterface $user * @param $charId * @return string[] */ protected function validation(UserInterface $user, $charId) { $errorList = []; if (!($character = $this->characterService->getCharacter4UserCharacterId($user, $charId))) { $errorList[] = 'Thats not your character!'; } if (!$errorList && $this->gameDataService->isCharacterOnline($character)) { $errorList[] = 'Please logout your character!'; } if (!$errorList && $this->gameDataService->getInventorySlot($character, 8)) { $errorList[] = 'Its not allowed with job-items!'; } return $errorList; }
/** * @param int $limit * * @return Paginator|\GameBackend\Entity\SRO\Shard\Character[] */ public function getTopThievesEntityData($limit = 10) { $topThieves = $this->gameDataService->getTopJobCharacter(2); return $topThieves->setMaxResults($limit)->getQuery()->getResult(); }