Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2009, 1:18:36 PM (14 years ago)
Author:
rgrieder
Message:

Found some non empty new lines.

Location:
code/branches/presentation2/src/modules/questsystem
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/modules/questsystem/AddQuestHint.cc

    r5781 r6387  
    7171
    7272        XMLPortParam(AddQuestHint, "hintId", setHintId, getHintId, xmlelement, mode);
    73        
     73
    7474        COUT(3) << "New AddQuestHint, with target QuestHint {" << this->getHintId() << "}, created." << std::endl;
    7575    }
     
    9090            return false;
    9191        }
    92        
     92
    9393        this->hintId_ = id;
    9494        return true;
  • code/branches/presentation2/src/modules/questsystem/AddReward.cc

    r5781 r6387  
    6767
    6868        XMLPortObject(AddReward, Rewardable, "", addRewardable, getRewardables, xmlelement, mode);
    69        
     69
    7070        COUT(3) << "New AddReward, with " << this->rewards_.size() << " Rewardables created." << std::endl;
    7171    }
     
    104104    {
    105105        COUT(3) << "AddReward on player: " << player << " ." << std::endl;
    106        
     106
    107107        bool check = true;
    108108        for ( std::list<Rewardable*>::iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward )
     
    110110            check = check && (*reward)->reward(player);
    111111        }
    112        
     112
    113113        COUT(3) << "Rewardable successfully added to player." << player << " ." << std::endl;
    114114
  • code/branches/presentation2/src/modules/questsystem/ChangeQuestStatus.cc

    r5781 r6387  
    8383            return false;
    8484        }
    85        
     85
    8686        this->questId_ = id;
    8787        return true;
  • code/branches/presentation2/src/modules/questsystem/CompleteQuest.cc

    r5781 r6387  
    2626 *
    2727 */
    28  
     28
    2929/**
    3030    @file
     
    6767    {
    6868        SUPER(CompleteQuest, XMLPort, xmlelement, mode);
    69        
     69
    7070        COUT(3) << "New CompleteQuest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;
    7171    }
  • code/branches/presentation2/src/modules/questsystem/FailQuest.cc

    r5781 r6387  
    2626 *
    2727 */
    28  
     28
    2929/**
    3030    @file
     
    6767    {
    6868        SUPER(FailQuest, XMLPort, xmlelement, mode);
    69        
     69
    7070        COUT(3) << "New FailQUest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;
    7171    }
     
    103103            return false;
    104104        }
    105        
     105
    106106        COUT(3) << "Quest {" << quest->getId() << "} failed by player: " << player << " ." << std::endl;
    107107        return true;
  • code/branches/presentation2/src/modules/questsystem/GlobalQuest.cc

    r5781 r6387  
    2626 *
    2727 */
    28  
     28
    2929/**
    3030    @file
     
    5959
    6060    }
    61    
     61
    6262    /**
    6363    @brief
     
    6767    {
    6868        SUPER(GlobalQuest, XMLPort, xmlelement, mode);
    69        
     69
    7070        XMLPortObject(GlobalQuest, QuestEffect, "reward-effects", addRewardEffect, getRewardEffects, xmlelement, mode);
    7171
    7272        COUT(3) << "New GlobalQuest {" << this->getId() << "} created." << std::endl;
    7373    }
    74    
     74
    7575    /**
    7676    @brief
     
    8989            return false;
    9090        }
    91        
     91
    9292        Quest::fail(player);
    93    
     93
    9494    //! Iterate through all players possessing this Quest.
    9595    for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
     
    118118            return false;
    119119        }
    120        
     120
    121121        //! Iterate through all players possessing the Quest.
    122122        for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
     
    124124            QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
    125125        }
    126    
     126
    127127        Quest::complete(player);
    128    
     128
    129129        QuestEffect::invokeEffects(player, this->rewards_); //!< Invoke reward QuestEffects on the player completing the Quest.
    130130        return true;
     
    230230            this->players_.insert(player); //!< Add the player to the set.
    231231        }
    232        
     232
    233233        this->status_ = status; //!< Set the status, which is global, remember...?
    234234        return true;
    235235    }
    236    
     236
    237237    /**
    238238    @brief
     
    256256        return true;
    257257    }
    258    
     258
    259259    /**
    260260    @brief
  • code/branches/presentation2/src/modules/questsystem/LocalQuest.cc

    r5781 r6387  
    8787            return false;
    8888        }
    89        
     89
    9090        Quest::fail(player);
    91        
     91
    9292        QuestEffect::invokeEffects(player, this->getFailEffectList()); //!< Invoke the failEffects.
    9393        return true;
     
    110110            return false;
    111111        }
    112        
     112
    113113        Quest::complete(player);
    114        
     114
    115115        QuestEffect::invokeEffects(player, this->getCompleteEffectList()); //!< Invoke the complete QuestEffects.
    116116        return true;
     
    188188            return it->second;
    189189        }
    190        
     190
    191191        return QuestStatus::Inactive; //!< If the player is not yet in the map, that means the status of the quest form him is 'inactive'.
    192192    }
     
    209209            return false;
    210210        }
    211        
     211
    212212        this->playerStatus_[player] = status;
    213213        return true;
  • code/branches/presentation2/src/modules/questsystem/Quest.cc

    r5781 r6387  
    2626 *
    2727 */
    28  
     28
    2929/**
    3030    @file
     
    204204    {
    205205        int i = index;
    206        
     206
    207207        //! Iterate through all subquests.
    208208        for (std::list<Quest*>::const_iterator subQuest = this->subQuests_.begin(); subQuest != this->subQuests_.end(); ++subQuest)
     
    214214            i--;
    215215        }
    216        
     216
    217217        return NULL; //!< If the index is greater than the number of elements in the list.
    218218    }
     
    229229    {
    230230        int i = index;
    231        
     231
    232232        //! Iterate through all QuestHints.
    233233        for (std::list<QuestHint*>::const_iterator hint = this->hints_.begin(); hint != this->hints_.end(); ++hint)
     
    253253    {
    254254        int i = index;
    255        
     255
    256256        //! Iterate through all fail QuestEffects.
    257257        for (std::list<QuestEffect*>::const_iterator effect = this->failEffects_.begin(); effect != this->failEffects_.end(); ++effect)
     
    277277    {
    278278        int i = index;
    279        
     279
    280280        //! Iterate through all complete QuestEffects.
    281281        for (std::list<QuestEffect*>::const_iterator effect = this->completeEffects_.begin(); effect != this->completeEffects_.end(); ++effect)
     
    350350        return this->getStatus(player) == QuestStatus::Completed;
    351351    }
    352    
     352
    353353    /**
    354354    @brief
     
    363363        QuestListener::advertiseStatusChange(this->listeners_, "fail"); //!< Tells the QuestListeners, that the status has changed to failed.
    364364        this->setStatus(player, QuestStatus::Failed);
    365        
     365
    366366        COUT(4) << "Quest {" << this->getId() << "} is failed for player: " << player << " ." <<std::endl;
    367        
     367
    368368        this->getDescription()->sendFailQuestNotification();
    369369        return true;
    370370    }
    371    
     371
    372372    /**
    373373    @brief
     
    382382        QuestListener::advertiseStatusChange(this->listeners_, "complete"); //!< Tells the QuestListeners, that the status has changed to completed.
    383383        this->setStatus(player, QuestStatus::Completed);
    384        
     384
    385385        COUT(4) << "Quest {" << this->getId() << "} is completed for player: " << player << " ." <<std::endl;
    386        
     386
    387387        this->getDescription()->sendCompleteQuestNotification();
    388388        return true;
     
    404404            return false;
    405405        }
    406        
     406
    407407        COUT(4) << "Quest {" << this->getId() << "} is started for player: " << player << " ." <<std::endl;
    408        
     408
    409409        QuestListener::advertiseStatusChange(this->listeners_, "start"); //!< Tells the QuestListeners, that the status has changed to active.
    410        
     410
    411411        this->setStatus(player, QuestStatus::Active);
    412        
     412
    413413        this->getDescription()->sendAddQuestNotification();
    414414        return true;
    415415    }
    416    
     416
    417417    /**
    418418    @brief
     
    430430            return false;
    431431        }
    432        
     432
    433433        this->listeners_.push_back(listener);
    434434        return true;
  • code/branches/presentation2/src/modules/questsystem/QuestDescription.cc

    r5781 r6387  
    5050    {
    5151        RegisterObject(QuestDescription);
    52        
     52
    5353        this->title_ = "";
    5454        this->description_ = "";
     
    7979        COUT(3) << "New QuestDescription with title '" << this->getTitle() << "' created." << std::endl;
    8080    }
    81    
     81
    8282    /**
    8383    @brief
     
    124124            return false;
    125125        }
    126        
     126
    127127        QuestNotification* notification = new QuestNotification(message);
    128128        notification->send();
  • code/branches/presentation2/src/modules/questsystem/QuestEffect.cc

    r5781 r6387  
    6969    {
    7070        bool check = true;
    71        
     71
    7272        COUT(4) << "Invoking QuestEffects on player: " << player << " ."  << std::endl;
    7373
  • code/branches/presentation2/src/modules/questsystem/QuestGUI.cc

    r5929 r6387  
    7777        }
    7878        this->windows_.clear();
    79        
     79
    8080        if(this->root_ != NULL)
    8181            this->root_->destroy();
     
    104104
    105105        this->clear(); //!< Clear the GUI.
    106        
     106
    107107        int depth = 0;
    108108        int index = 0;
     
    235235
    236236        this->nodes_.insert(std::pair<CEGUI::Window*, QuestGUINode*>(node->getWindow(),node)); //!< Insert the node and its window in the nodes_ map.
    237        
     237
    238238        index++;
    239239
  • code/branches/presentation2/src/modules/questsystem/QuestGUI.h

    r5781 r6387  
    5656
    5757        public:
    58        
     58
    5959            QuestGUI(PlayerInfo* player);
    6060            virtual ~QuestGUI();
     
    8686            inline PlayerInfo* getPlayer(void)
    8787                { return this->player_; }
    88    
     88
    8989        private:
    90            
     90
    9191            int createNode(QuestGUINode* parent, QuestItem* item, int depth, int index); //!< Recursive method to create Nodes for all Quests an Hints the given Quest is a parent to.
    9292
  • code/branches/presentation2/src/modules/questsystem/QuestGUINode.cc

    r5781 r6387  
    119119    void QuestGUINode::toggleVisibility(void)
    120120    {
    121        
     121
    122122    }
    123123
     
    209209                offset += height;
    210210            }
    211            
     211
    212212            //! Create title pane for the description.
    213213            stream.str("");
     
    282282    {
    283283        COUT(3) << "Open QuestItem..." << std::endl;
    284        
     284
    285285        //CEGUI::Window* window = this->gui_->getRootWindow();
    286286        CEGUI::Window* window = this->gui_->getWindowManager()->getWindow("orxonox/QuestGUI/Background");
     
    344344        //! Set the height to the window.
    345345        window->setHeight(CEGUI::UDim(0, height));
    346        
     346
    347347        //Debug
    348348        const CEGUI::Rect newArea = getStaticTextArea(window);
     
    368368    {
    369369        Quest* quest = dynamic_cast<Quest*>(this->item_);
    370        
     370
    371371        this->window_ = this->gui_->getWindow();
    372372        std::ostringstream stream;
     
    377377        }
    378378        stream << this->index_;
    379        
     379
    380380        this->window_->rename(stream.str());
    381381        this->window_->setText(this->item_->getDescription()->getTitle());
  • code/branches/presentation2/src/modules/questsystem/QuestGUINode.h

    r5781 r6387  
    4444
    4545        public:
    46    
     46
    4747            QuestGUINode(void);
    4848            QuestGUINode(QuestGUI* gui, QuestGUINode* parent, QuestItem* item, int depth, int index);
    4949            virtual ~QuestGUINode(void);
    50    
     50
    5151            void toggleVisibility(void);
    5252
  • code/branches/presentation2/src/modules/questsystem/QuestHint.cc

    r5781 r6387  
    2626 *
    2727 */
    28  
     28
    2929/**
    3030    @file
     
    7171
    7272        QuestManager::getInstance().registerHint(this); //!< Registers the QuestHint with the QuestManager.
    73        
     73
    7474        COUT(3) << "New QuestHint {" << this->getId() << "} created." << std::endl;
    7575    }
     
    100100            return it->second;
    101101        }
    102        
     102
    103103        return QuestStatus::Inactive;
    104104    }
     
    119119            {
    120120                this->playerStatus_[player] = QuestHintStatus::Active;
    121                
     121
    122122                this->getDescription()->sendAddHintNotification();
    123123                return true;
     
    129129            }
    130130        }
    131        
     131
    132132        COUT(2) << "A hint of a non-active quest was trying to get activated." << std::endl;
    133133        return false;
  • code/branches/presentation2/src/modules/questsystem/QuestItem.cc

    r5781 r6387  
    2626 *
    2727 */
    28  
     28
    2929/**
    3030    @file
     
    8686            return;
    8787        }
    88        
     88
    8989        this->id_ = id;
    9090    }
  • code/branches/presentation2/src/modules/questsystem/QuestListener.cc

    r5781 r6387  
    5050    {
    5151        RegisterObject(QuestListener);
    52        
     52
    5353        this->mode_ = QuestListenerMode::All;
    5454        this->quest_ = NULL;
    5555    }
    56    
     56
    5757    /**
    5858    @brief
     
    6262    {
    6363    }
    64    
     64
    6565    /**
    6666    @brief
     
    7575
    7676        this->quest_->addListener(this); //!< Adds the QuestListener to the Quests list of listeners.
    77        
     77
    7878        COUT(3) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << std::endl;
    7979    }
    80    
     80
    8181    /**
    8282    @brief
     
    9898        }
    9999    }
    100    
     100
    101101    /**
    102102    @brief
     
    110110    {
    111111        this->quest_ = QuestManager::getInstance().findQuest(id); //!< Find the Quest corresponding to the given questId.
    112        
     112
    113113        if(this->quest_ == NULL) //!< If there is no such Quest.
    114114        {
     
    116116            return false;
    117117        }
    118        
     118
    119119        return true;
    120120    }
    121    
     121
    122122    /**
    123123    @brief
     
    152152        return false;
    153153        }
    154        
     154
    155155        return true;
    156156    }
    157    
     157
    158158    /**
    159159    @brief
  • code/branches/presentation2/src/modules/questsystem/QuestNotification.cc

    r5781 r6387  
    3838        this->initialize();
    3939    }
    40    
     40
    4141    QuestNotification::QuestNotification(const std::string & message) : Notification(message)
    4242    {
    4343        this->initialize();
    4444    }
    45    
     45
    4646    QuestNotification::~QuestNotification()
    4747    {
    48        
     48
    4949    }
    5050
  • code/branches/presentation2/src/modules/questsystem/notifications/Notification.cc

    r5781 r6387  
    4949        this->initialize();
    5050    }
    51    
     51
    5252    /**
    5353    @brief
     
    6060        this->message_ = message;
    6161    }
    62    
     62
    6363    /**
    6464    @brief
     
    6868    {
    6969    }
    70    
     70
    7171    /**
    7272    @brief
     
    7979        this->sent_ = false;
    8080    }
    81    
     81
    8282    /**
    8383    @brief
     
    9090        return this->send(NotificationManager::NONE);
    9191    }
    92    
     92
    9393    /**
    9494    @brief
     
    106106            return false;
    107107        this->sent_ = true;
    108        
     108
    109109        COUT(3) << "Notification \"" << this->getMessage() << "\" sent." << std::endl;
    110        
     110
    111111        return true;
    112112    }
    113    
     113
    114114    /**
    115115    @brief
Note: See TracChangeset for help on using the changeset viewer.