/** * @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); }
public function __toString() { return parent::__toString() . "#{$this->kid}"; }