Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.