Changeset 8706 for code/trunk/src/modules/questsystem/QuestManager.cc
- Timestamp:
- Jun 14, 2011, 8:53:28 PM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/questsystem/QuestManager.cc
r8079 r8706 274 274 int QuestManager::getNumSubQuests(Quest* quest, PlayerInfo* player) 275 275 { 276 if(quest == NULL) 277 return this->getNumRootQuests(player); 278 276 279 std::list<Quest*> quests = quest->getSubQuestList(); 277 280 int numQuests = 0; … … 296 299 Quest* QuestManager::getSubQuest(Quest* quest, PlayerInfo* player, int index) 297 300 { 301 if(quest == NULL) 302 return this->getRootQuest(player, index); 303 298 304 std::list<Quest*> quests = quest->getSubQuestList(); 299 305 for(std::list<Quest*>::iterator it = quests.begin(); it != quests.end(); it++) … … 312 318 @param player 313 319 The player. 314 @return Returns the number of QuestHints of the input Quest for the input player. 320 @return 321 Returns the number of QuestHints of the input Quest for the input player. 315 322 */ 316 323 int QuestManager::getNumHints(Quest* quest, PlayerInfo* player) … … 335 342 @param index 336 343 The index of the QuestHint. 344 @return 345 Returns a pointer to the index-th QuestHint of the input Quest for the input player. 337 346 */ 338 347 QuestHint* QuestManager::getHints(Quest* quest, PlayerInfo* player, int index) … … 345 354 } 346 355 return NULL; 356 } 357 358 /** 359 @brief 360 Get the parent-quest of the input Quest. 361 @param quest 362 The Quest to get the parent-quest of. 363 @return 364 Returns a pointer to the parent-quest of the input Quest. 365 */ 366 Quest* QuestManager::getParentQuest(Quest* quest) 367 { 368 return quest->getParentQuest(); 347 369 } 348 370 … … 375 397 /** 376 398 @brief 399 Get the id of the input Quest. 400 @param item 401 The Quest to get the id of. 402 @return 403 Returns the id of the input Quest. 404 */ 405 const std::string QuestManager::getId(Quest* item) const 406 { 407 return item->getId(); 408 } 409 410 /** 411 @brief 412 Get the id of the input QuestHint. 413 @param item 414 The QuestHint to get the id of. 415 @return 416 Returns the id of the input QuestHint. 417 */ 418 const std::string QuestManager::getId(QuestHint* item) const 419 { 420 return item->getId(); 421 } 422 423 /** 424 @brief 377 425 Retrieve the player for a certain GUI. 378 426 @param guiName
Note: See TracChangeset
for help on using the changeset viewer.