/** * Get a list of the completed achievements by the guild * @param String $sort Define what the list should be sorted by: id|name * @param String $sortFlag Can be asc|desc */ public function getCompletedQuests($sort = FALSE, $sortFlag = 'asc') { $wowhead = new WowHead(); $quests = $this->characterData['quests']; for ($i = 0; $i < count($quests); $i++) { // Build the new array to return $quest[$i]['id'] = $quests[$i]; $quest[$i]['url'] = $GLOBALS['wowarmory']['urls']['quest'] . "=" . $quests[$i]; // Get name of achievement $questdata = new Quest($this->region, $quests[$i]); $quest[$i]['name'] = $questdata->getTitle(); #$quest[$i]['url'] .= "&who=".$this->name."&when=".$achievement[$i]['timestamp']; } if ($sort) { return $this->sortAchievements($quest, $sort, $sortFlag); } return $quest; }