Exemplo n.º 1
0
 public function displayMembers($with_distance = false, $with_levels = false)
 {
     if ($this->getMemberCount() === 0) {
         return 'This party is empty! (should not see me)';
     }
     $b = chr(2);
     $back = '';
     foreach ($this->members as $player) {
         $player instanceof SR_Player;
         $dist = $with_distance ? sprintf('(%.01fm)', $this->distance[$player->getID()]) : '';
         $level = $with_levels ? Shadowfunc::displayLevel($player) : '';
         $rmod = $player->isOptionEnabled(SR_Player::RUNNING_MODE) ? '[RM]' : '';
         $pbot = $player->isOptionEnabled(SR_Player::PLAYER_BOT) ? '[BOT]' : '';
         $race = '[' . Shadowfunc::translateVariable($player, '_' . $player->getRace()) . ']';
         $back .= sprintf(', %s-%s%s%s%s%s%s', $b . $player->getEnum() . $b, $player->getName(), $dist, $level, $pbot, $rmod, $race);
     }
     return substr($back, 2);
 }