public function parseAchievementsByCategory($cID, $ID = null) { if (!$ID) { $ID = $this->getID(); } if (!$ID) { echo "error: No ID Set."; } else { if (!$cID) { echo "No catagory id set."; } else { // Get the source $this->getSource($this->URL['character']['profile'] . $ID . $this->URL['character']['achievement'] . $cID . '/'); // Create a new character object $Achievements = new Achievements(); // Get Achievements $Public = $Achievements->checkIfPublic($this->findAll('area_inner_tc', 20)); if ($Public) { // Get Achievements $Achievements->addCategory($cID); $Achievements->set($this->findAll('achievement_area_body', NULL, 'bt_more', false)); // Append character to array return $Achievements; } else { return false; } // Append character to array $this->Achievements[$cID] = $Achievements; return $Achievements; } } }