示例#1
0
 /**
  * @param PvpGame $game
  * @param int $id
  * @param null $loc
  */
 public function __construct($game, $id, $loc = null)
 {
     if (!$game instanceof PvpGame) {
         $this->badConstruct($game);
         return;
     }
     $this->game = $game;
     $this->kid = $id;
     parent::__construct($game->getMain(), $loc, "Kit {$id}");
 }
 /**
  * @param PvpGame $game
  * @param Location $loc
  * @param string $columnName
  */
 public function __construct($game, $loc, $columnName = "")
 {
     if (!$game instanceof PvpGame) {
         $this->badConstruct($game);
         return;
     }
     $this->game = $game;
     $this->column = $columnName;
     $this->max = Settings::kitpvp_maxLevel($this->column);
     parent::__construct($game->getMain(), $loc, "Upgrade {$columnName}");
 }
示例#3
0
 /**
  * @param Location $loc
  * @param PvpGame $game
  */
 public function __construct($loc, $game)
 {
     if (!$loc instanceof Location or !$game instanceof PvpGame) {
         $this->badConstruct($loc);
         return;
     }
     $this->game = $game;
     $this->setDataFlag(self::DATA_FLAGS, self::DATA_FLAG_ACTION, true);
     parent::__construct($game->getMain(), $loc, " Upgrade\nYour bow");
     $this->getInventory()->setItem(0, new Bow());
     $this->getInventory()->setHeldItemSlot(0);
 }