Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 16, 2011, 2:15:39 PM (14 years ago)
Author:
dafrick
Message:

New implementation of QuestGUI. Should be much more usable now, however there still remain some adjustments to be made.

Location:
code/branches/tutoriallevel/src/modules/questsystem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutoriallevel/src/modules/questsystem/QuestManager.cc

    r7552 r7830  
    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++)
     
    349355    /**
    350356    @brief
     357        Get the parent-quest of the input Quest for the input player.
     358    @param quest
     359        The Quest to get the parent-quest of.
     360    @param player
     361        The player.
     362    */
     363    Quest* QuestManager::getParentQuest(Quest* quest)
     364    {
     365        return quest->getParentQuest();
     366    }
     367
     368    /**
     369    @brief
    351370        Get the QuestDescription of the input Quest.
    352371    @param item
     
    375394    /**
    376395    @brief
     396        Get the id of the input Quest.
     397    @param item
     398        The Quest to get the id of.
     399    @return
     400        Returns the id of the input Quest.
     401    */
     402    const std::string QuestManager::getId(Quest* item) const
     403    {
     404        return item->getId();
     405    }
     406
     407    /**
     408    @brief
     409        Get the id of the input QuestHint.
     410    @param item
     411        The QuestHint to get the id of.
     412    @return
     413        Returns the id of the input QuestHint.
     414    */
     415    const std::string QuestManager::getId(QuestHint* item) const
     416    {
     417        return item->getId();
     418    }
     419
     420    /**
     421    @brief
    377422        Retrieve the player for a certain GUI.
    378423    @param guiName
  • code/branches/tutoriallevel/src/modules/questsystem/QuestManager.h

    r7552 r7830  
    8181            QuestHint* getHints(Quest* quest, orxonox::PlayerInfo* player, int index); //!< Get the index-th QuestHint of the input Quest for the input player.
    8282
    83             QuestDescription* getDescription(Quest* item);
    84             QuestDescription* getDescription(QuestHint* item);
     83            Quest* getParentQuest(Quest* quest); //!< Get the parent-quest of the input Quest.
     84
     85            QuestDescription* getDescription(Quest* item); //!< Get the QuestDescription of the input Quest.
     86            QuestDescription* getDescription(QuestHint* item); //!< Get the QuestDescription of the input QuestHint.
     87
     88            const std::string getId(Quest* item) const; //!< Get the id of the input Quest.
     89            const std::string getId(QuestHint* item) const; //!< Get the id of the input QuestHint.
    8590            // tolua_end
    8691
Note: See TracChangeset for help on using the changeset viewer.