items = [ self::WARRIOR => 'Warrior', self::PALADIN => 'Paladin', self::HUNTER => 'Hunter', self::ROGUE => 'Rogue', self::PRIEST => 'Priest', self::SHAMAN => 'Shaman', self::MAGE => 'Mage', self::WARLOCK => 'Warlock', self::DRUID => 'Druid' ]; } else { parent::__construct($items); } } /** * Filter classes by race. */ public function race($race) : self { switch($race) { case Races::HUMAN : return $this->only(self::WARRIOR, self::PALADIN, self::ROGUE, self::PRIEST, self::MAGE, self::WARLOCK); case Races::DWARF : return $this->only(self::WARRIOR, self::HUNTER, self::PALADIN, self::ROGUE, self::PRIEST); case Races::GNOME : return $this->only(self::WARRIOR, self::ROGUE, self::MAGE, self::WARLOCK); case Races::NIGHTELF : return $this->only(self::WARRIOR, self::HUNTER, self::ROGUE, self::PRIEST, self::DRUID); case Races::DRAENEI : return $this->only(self::WARRIOR, self::HUNTER, self::PALADIN, self::SHAMAN, self::PRIEST, self::MAGE); case Races::ORC : return $this->only(self::WARRIOR, self::HUNTER, self::ROGUE, self::SHAMAN, self::WARLOCK); case Races::TROLL : return $this->only(self::WARRIOR, self::HUNTER, self::ROGUE, self::PRIEST, self::SHAMAN, self::MAGE); case Races::TAUREN : return $this->only(self::WARRIOR, self::HUNTER, self::SHAMAN, self::DRUID); case Races::UNDEAD : return $this->only(self::WARRIOR, self::ROGUE, self::PRIEST, self::MAGE, self::WARLOCK); case Races::BLOODELF : return $this->only(self::PALADIN, self::HUNTER, self::ROGUE, self::PRIEST, self::MAGE, self::WARLOCK); } return $this; } }