public function __construct($type, $limit = 5, $page = 0, $worldId = 0, $vocation = '') { $this->highscoreConfig = Website::getWebsiteConfig(); parent::__construct(); $this->skillType = $type; $this->setLimit($limit); $this->setOffset($page * $limit); $this->worldId = $worldId; $this->vocation = $vocation; switch ($type) { case self::SKILL_FIST: case self::SKILL_CLUB: case self::SKILL_SWORD: case self::SKILL_AXE: case self::SKILL_DISTANCE: case self::SKILL_SHIELD: case self::SKILL_FISHING: $this->loadSkill(); break; case self::SKILL__MAGLEVEL: $this->loadMagic(); break; case self::SKILL__LEVEL: $this->loadLevel(); break; default: new Error_Critic('', __METHOD__ . '(), unknown type: ' . htmlspecialchars($type)); break; } }
public function __construct($player_id = 0) { parent::__construct('Item'); if ($player_id != 0) { $this->setFilter(new SQL_Filter(new SQL_Field('player_id', 'player_items'), SQL_Filter::EQUAL, $player_id)); $this->setPlayerId($player_id); } }