Changeset 11071 for code/trunk/src/modules/questsystem/effects
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/questsystem/effects/AddQuest.cc
r9667 r11071 90 90 { 91 91 Quest* quest = QuestManager::getInstance().findQuest(this->getQuestId()); 92 if(quest == NULL|| !quest->start(player))92 if(quest == nullptr || !quest->start(player)) 93 93 return false; 94 94 } -
code/trunk/src/modules/questsystem/effects/AddQuest.h
r9667 r11071 62 62 virtual ~AddQuest(); 63 63 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. 65 65 66 virtual bool invoke(PlayerInfo* player) ; //!< Invokes the QuestEffect.66 virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect. 67 67 68 68 }; -
code/trunk/src/modules/questsystem/effects/AddQuestHint.cc
r9667 r11071 113 113 { 114 114 QuestHint* hint = QuestManager::getInstance().findHint(this->hintId_); 115 if(hint == NULL|| !hint->setActive(player))115 if(hint == nullptr || !hint->setActive(player)) 116 116 return false; 117 117 } -
code/trunk/src/modules/questsystem/effects/AddQuestHint.h
r9667 r11071 64 64 virtual ~AddQuestHint(); 65 65 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. 67 67 68 virtual bool invoke(PlayerInfo* player) ; //!< Invokes the QuestEffect.68 virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect. 69 69 70 70 private: -
code/trunk/src/modules/questsystem/effects/AddReward.cc
r9667 r11071 84 84 { 85 85 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_) 87 87 { 88 88 if(i == 0) 89 return *reward;89 return reward; 90 90 i--; 91 91 } 92 return NULL;92 return nullptr; 93 93 } 94 94 … … 106 106 107 107 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); 110 110 111 111 orxout(verbose, context::quests) << "Rewardable successfully added to player." << player << " ." << endl; -
code/trunk/src/modules/questsystem/effects/AddReward.h
r9667 r11071 68 68 virtual ~AddReward(); 69 69 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. 71 71 72 virtual bool invoke(PlayerInfo* player) ; //!< Invokes the QuestEffect.72 virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect. 73 73 74 74 private: -
code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h
r9667 r11071 59 59 virtual ~ChangeQuestStatus(); 60 60 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. 62 62 63 63 virtual bool invoke(PlayerInfo* player) = 0; //!< Invokes the QuestEffect. -
code/trunk/src/modules/questsystem/effects/CompleteQuest.cc
r9667 r11071 92 92 { 93 93 quest = QuestManager::getInstance().findQuest(this->getQuestId()); 94 if(quest == NULL|| !quest->complete(player))94 if(quest == nullptr || !quest->complete(player)) 95 95 return false; 96 96 } -
code/trunk/src/modules/questsystem/effects/CompleteQuest.h
r9667 r11071 62 62 virtual ~CompleteQuest(); 63 63 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. 65 65 66 virtual bool invoke(PlayerInfo* player) ; //!< Invokes the QuestEffect.66 virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect. 67 67 68 68 }; -
code/trunk/src/modules/questsystem/effects/FailQuest.cc
r9667 r11071 91 91 { 92 92 quest = QuestManager::getInstance().findQuest(this->getQuestId()); 93 if(quest == NULL|| !quest->fail(player))93 if(quest == nullptr || !quest->fail(player)) 94 94 return false; 95 95 } -
code/trunk/src/modules/questsystem/effects/FailQuest.h
r9667 r11071 62 62 virtual ~FailQuest(); 63 63 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. 65 65 66 virtual bool invoke(PlayerInfo* player) ; //!< Invokes the QuestEffect.66 virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect. 67 67 68 68 };
Note: See TracChangeset
for help on using the changeset viewer.