Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2011, 5:10:01 PM (13 years ago)
Author:
dafrick
Message:

Merging tutoriallevel3 branch into presentation branch.

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/modules/questsystem/QuestManager.cc

    r8079 r8637  
    274274    int QuestManager::getNumSubQuests(Quest* quest, PlayerInfo* player)
    275275    {
     276        if(quest == NULL)
     277            return this->getNumRootQuests(player);
     278
    276279        std::list<Quest*> quests = quest->getSubQuestList();
    277280        int numQuests = 0;
     
    296299    Quest* QuestManager::getSubQuest(Quest* quest, PlayerInfo* player, int index)
    297300    {
     301        if(quest == NULL)
     302            return this->getRootQuest(player, index);
     303
    298304        std::list<Quest*> quests = quest->getSubQuestList();
    299305        for(std::list<Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
     
    312318    @param player
    313319        The player.
    314     @return Returns the number of QuestHints of the input Quest for the input player.
     320    @return
     321        Returns the number of QuestHints of the input Quest for the input player.
    315322    */
    316323    int QuestManager::getNumHints(Quest* quest, PlayerInfo* player)
     
    335342    @param index
    336343        The index of the QuestHint.
     344    @return
     345        Returns a pointer to the index-th QuestHint of the input Quest for the input player.
    337346    */
    338347    QuestHint* QuestManager::getHints(Quest* quest, PlayerInfo* player, int index)
     
    345354        }
    346355        return NULL;
     356    }
     357
     358    /**
     359    @brief
     360        Get the parent-quest of the input Quest.
     361    @param quest
     362        The Quest to get the parent-quest of.
     363    @return
     364        Returns a pointer to the parent-quest of the input Quest.
     365    */
     366    Quest* QuestManager::getParentQuest(Quest* quest)
     367    {
     368        return quest->getParentQuest();
    347369    }
    348370
     
    375397    /**
    376398    @brief
     399        Get the id of the input Quest.
     400    @param item
     401        The Quest to get the id of.
     402    @return
     403        Returns the id of the input Quest.
     404    */
     405    const std::string QuestManager::getId(Quest* item) const
     406    {
     407        return item->getId();
     408    }
     409
     410    /**
     411    @brief
     412        Get the id of the input QuestHint.
     413    @param item
     414        The QuestHint to get the id of.
     415    @return
     416        Returns the id of the input QuestHint.
     417    */
     418    const std::string QuestManager::getId(QuestHint* item) const
     419    {
     420        return item->getId();
     421    }
     422
     423    /**
     424    @brief
    377425        Retrieve the player for a certain GUI.
    378426    @param guiName
Note: See TracChangeset for help on using the changeset viewer.