Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/questsystem/effects/AddQuest.cc

    r9667 r11071  
    9090        {
    9191            Quest* quest = QuestManager::getInstance().findQuest(this->getQuestId());
    92             if(quest == NULL || !quest->start(player))
     92            if(quest == nullptr || !quest->start(player))
    9393               return false;
    9494        }
  • code/trunk/src/modules/questsystem/effects/AddQuest.h

    r9667 r11071  
    6262        virtual ~AddQuest();
    6363
    64         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddQuest object through XML.
     64        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a AddQuest object through XML.
    6565
    66         virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     66        virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    6767
    6868    };
  • code/trunk/src/modules/questsystem/effects/AddQuestHint.cc

    r9667 r11071  
    113113        {
    114114            QuestHint* hint = QuestManager::getInstance().findHint(this->hintId_);
    115             if(hint == NULL || !hint->setActive(player))
     115            if(hint == nullptr || !hint->setActive(player))
    116116                return false;
    117117        }
  • code/trunk/src/modules/questsystem/effects/AddQuestHint.h

    r9667 r11071  
    6464            virtual ~AddQuestHint();
    6565
    66             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddQuestHint object through XML.
     66            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a AddQuestHint object through XML.
    6767
    68             virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     68            virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    6969
    7070        private:
  • code/trunk/src/modules/questsystem/effects/AddReward.cc

    r9667 r11071  
    8484    {
    8585        int i = index;
    86         for (std::list<Rewardable*>::const_iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward)
     86        for (Rewardable* reward : this->rewards_)
    8787        {
    8888            if(i == 0)
    89                return *reward;
     89               return reward;
    9090            i--;
    9191        }
    92         return NULL;
     92        return nullptr;
    9393    }
    9494
     
    106106
    107107        bool temp = true;
    108         for ( std::list<Rewardable*>::iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward )
    109             temp = temp && (*reward)->reward(player);
     108        for (Rewardable* reward : this->rewards_)
     109            temp = temp && reward->reward(player);
    110110
    111111        orxout(verbose, context::quests) << "Rewardable successfully added to player." << player << " ." << endl;
  • code/trunk/src/modules/questsystem/effects/AddReward.h

    r9667 r11071  
    6868            virtual ~AddReward();
    6969
    70             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddReward object through XML.
     70            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a AddReward object through XML.
    7171
    72             virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     72            virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    7373
    7474        private:
  • code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h

    r9667 r11071  
    5959            virtual ~ChangeQuestStatus();
    6060
    61             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a ChangeQuestStatus object through XML.
     61            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a ChangeQuestStatus object through XML.
    6262
    6363            virtual bool invoke(PlayerInfo* player) = 0; //!< Invokes the QuestEffect.
  • code/trunk/src/modules/questsystem/effects/CompleteQuest.cc

    r9667 r11071  
    9292        {
    9393            quest = QuestManager::getInstance().findQuest(this->getQuestId());
    94             if(quest == NULL || !quest->complete(player))
     94            if(quest == nullptr || !quest->complete(player))
    9595               return false;
    9696        }
  • code/trunk/src/modules/questsystem/effects/CompleteQuest.h

    r9667 r11071  
    6262            virtual ~CompleteQuest();
    6363
    64             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a CompleteQuest object through XML.
     64            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a CompleteQuest object through XML.
    6565
    66             virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     66            virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    6767
    6868    };
  • code/trunk/src/modules/questsystem/effects/FailQuest.cc

    r9667 r11071  
    9191        {
    9292            quest = QuestManager::getInstance().findQuest(this->getQuestId());
    93             if(quest == NULL || !quest->fail(player))
     93            if(quest == nullptr || !quest->fail(player))
    9494               return false;
    9595        }
  • code/trunk/src/modules/questsystem/effects/FailQuest.h

    r9667 r11071  
    6262            virtual ~FailQuest();
    6363
    64             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a FailQuest object through XML.
     64            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a FailQuest object through XML.
    6565
    66             virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     66            virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    6767
    6868    };
Note: See TracChangeset for help on using the changeset viewer.