engine/conversion/source/QuestDumper.cpp
// Get the creature's quest.
Get the creature's quest.
Get the creature ' s quest .
string QuestDumper::get_quests() const
{
  ostringstream ss;
  if (creature->get_is_player())
  {
    Game& game = Game::instance();
    Quests& quests = game.get_quests_ref();
    QuestMap in_progress_quests = quests.get_in_progress_quests();
    ss << String::centre(StringTable::get(ScreenTitleTextKeys::SCREEN_TITLE_QUEST_LIST), num_cols) << endl << endl;
    int num_in_progress = 0;
    for (const auto& pair : in_progress_quests)
    {
      Quest quest = pair.second;
      dump_quest(ss, quest);
      num_in_progress++;
    }
    if (num_in_progress == 0)
    {
      ss << String::centre("-", num_cols);
    }
    ss << endl << endl;
    QuestMap completed_quests = quests.get_completed_quests();
    ss << String::centre(StringTable::get(ScreenTitleTextKeys::SCREEN_TITLE_COMPLETED_QUEST_LIST), num_cols) << endl << endl;
    int num_completed = 0;
    for (const auto& pair : completed_quests)
    {
      Quest quest = pair.second;
      dump_quest(ss, quest);
      num_completed++;
    }
    if (num_completed == 0)
    {
      ss << String::centre("-", num_cols);
    }
  }
  return ss.str();
}
string QuestDumper :: get_quests ( ) const { ostringstream ss ; if ( creature -> get_is_player ( ) ) { Game & game = Game :: instance ( ) ; Quests & quests = game . get_quests_ref ( ) ; QuestMap in_progress_quests = quests . get_in_progress_quests ( ) ; ss << String :: centre ( StringTable :: get ( ScreenTitleTextKeys :: SCREEN_TITLE_QUEST_LIST ) , num_cols ) << endl << endl ; int num_in_progress = 0 ; for ( const auto & pair : in_progress_quests ) { Quest quest = pair . second ; dump_quest ( ss , quest ) ; num_in_progress ++ ; } if ( num_in_progress == 0 ) { ss << String :: centre ( " " , num_cols ) ; } ss << endl << endl ; QuestMap completed_quests = quests . get_completed_quests ( ) ; ss << String :: centre ( StringTable :: get ( ScreenTitleTextKeys :: SCREEN_TITLE_COMPLETED_QUEST_LIST ) , num_cols ) << endl << endl ; int num_completed = 0 ; for ( const auto & pair : completed_quests ) { Quest quest = pair . second ; dump_quest ( ss , quest ) ; num_completed ++ ; } if ( num_completed == 0 ) { ss << String :: centre ( " " , num_cols ) ; } } return ss . str ( ) ; }
Get the creature's quest.
Get the creature ' s quest .