From 27d920c495e7861e69ad8120f33565577317a410 Mon Sep 17 00:00:00 2001 From: Fabien_HENON Date: Mon, 25 Jul 2011 14:09:13 +0200 Subject: [PATCH] Changed: #1304: Message concerning the number of times a mission needs to be completed --- .../mission_manager/mission_step_misc.cpp | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_misc.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_misc.cpp index 2078c6c6a..dc0be33d5 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_misc.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_misc.cpp @@ -1203,7 +1203,26 @@ class CMissionStepDoMissions : public IMissionStepTemplate virtual void getTextParams( uint & nbSubSteps,const std::string* & textPtr,TVectorParamCheck& retParams, const std::vector& subStepStates) { - static const std::string stepText = "ERROR_UNSPECIFIED_MISSION_TEXT"; + /*static const std::string stepText = "ERROR_UNSPECIFIED_MISSION_TEXT"; + textPtr = &stepText;*/ + + // Because we can specify the number of times we want a mission to be completed, we specify the parameters + static const std::string stepText = "MIS_DO_MISSION_"; + nlassert( _Missions.size() == subStepStates.size() ); + for ( uint i = 0; i < subStepStates.size(); i++ ) + { + if( subStepStates[i] != 0 ) + { + nbSubSteps++; + retParams.push_back(STRING_MANAGER::TParam()); + retParams.back().Type = STRING_MANAGER::integer; + retParams.back().Int = subStepStates[i]; + + retParams.push_back(STRING_MANAGER::TParam()); + retParams.back().Type = STRING_MANAGER::literal; + retParams.back().Literal = _Missions[i].Mission; + } + } textPtr = &stepText; } bool checkTextConsistency()