コード例 #1
0
ファイル: mission_step_queue.cpp プロジェクト: AzyxWare/ryzom
//----------------------------------------------------------------------------
void CMissionStepQueueStart::getTextParams( uint & nbSubSteps,const std::string* & textPtr,TVectorParamCheck& retParams, const std::vector<uint32>& subStepStates)
{
	// get estimated remaining time
	uint32 days, hours, minutes, seconds;
	getDHMS(uint32(Timer*(_HasPlayerInCriticalZone?1+_NbOnlineWaiters:_NbOnlineWaiters)*CTickEventHandler::getGameTimeStep()),
		days, hours, minutes, seconds);
	
	static const std::string stepText = "MISSION_QUEUE_WAIT";
	textPtr = &stepText;
	nlassert( subStepStates.size() == 1);
	retParams.push_back(STRING_MANAGER::TParam());
	retParams.back().Type = STRING_MANAGER::integer;
	retParams.back().Int = _NbWaiters;
	
	retParams.push_back(STRING_MANAGER::TParam());
	retParams.back().Type = STRING_MANAGER::integer;
	retParams.back().Int = _NbOnlineWaiters;

	retParams.push_back(STRING_MANAGER::TParam());
	retParams.back().Type = STRING_MANAGER::integer;
	retParams.back().Int = days;

	retParams.push_back(STRING_MANAGER::TParam());
	retParams.back().Type = STRING_MANAGER::integer;
	retParams.back().Int = hours;

	retParams.push_back(STRING_MANAGER::TParam());
	retParams.back().Type = STRING_MANAGER::integer;
	retParams.back().Int = minutes;
}
コード例 #2
0
ファイル: mission_step_kill.cpp プロジェクト: mixxit/solinia
	virtual void getTextParams( uint & nbSubSteps,const std::string* & textPtr,TVectorParamCheck& retParams, const std::vector<uint32>& subStepStates)
	{
		static const std::string stepText = "MIS_KILL_FACTION";
		static const std::string stepTextLoc = "MIS_KILL_FACTION_LOC";
		nlassert( subStepStates.size() == 1);

		nbSubSteps = 1;
		retParams.push_back(STRING_MANAGER::TParam(STRING_MANAGER::faction));
		retParams.back().Enum = _Faction;
		retParams.push_back(STRING_MANAGER::TParam(STRING_MANAGER::integer, sint32(_Quantity)));
				
		if ( _Place != 0xFFFF )
		{
			STRING_MANAGER::TParam param;
			param.Type = STRING_MANAGER::place;
			CPlace * place = CZoneManager::getInstance().getPlaceFromId(_Place);
			if ( !place )
			{
				MISLOG("sline:%u ERROR : kill_faction : invalid place %u", _SourceLine, _Place);
			}
			else
			{
				param.Identifier = place->getName();
				retParams.push_back(param);
			}
			textPtr = &stepTextLoc;
		}
		else
			textPtr = &stepText;
		
	}
コード例 #3
0
ファイル: mission_step_kill.cpp プロジェクト: mixxit/solinia
	virtual void getTextParams( uint & nbSubSteps, const std::string* & textPtr,TVectorParamCheck& retParams, const std::vector<uint32>& subStepStates)
	{
		static const std::string stepText = "MIS_KILL_NPC_";
		textPtr = &stepText;
		nlassert( _SubSteps.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::bot;
				if ( _SubSteps[i].Alias != CAIAliasTranslator::Invalid )
					retParams.back().Int = _SubSteps[i].Alias;
				else
					retParams.back().Identifier = "giver";
			}
		}
	}
コード例 #4
0
ファイル: mission_step_kill.cpp プロジェクト: mixxit/solinia
	virtual void getTextParams( uint & nbSubSteps, const std::string* & textPtr,TVectorParamCheck& retParams, const std::vector<uint32>& subStepStates)
	{
		/// overloaded text in script

		static const std::string stepText = "MIS_KILL_GROUP";
		textPtr = &stepText;
		retParams.push_back(STRING_MANAGER::TParam(STRING_MANAGER::bot_name));
		retParams.back().Type = STRING_MANAGER::bot_name;
		retParams.back().Identifier = Target;

	}
コード例 #5
0
ファイル: mission_step_kill.cpp プロジェクト: mixxit/solinia
	virtual void getTextParams( uint & nbSubSteps, const std::string* & textPtr,TVectorParamCheck& retParams, const std::vector<uint32>& subStepStates)
	{
		static const std::string stepText = "MIS_KILL_RACE_";
		static const std::string stepTextLoc = "MIS_KILL_RACE_LOC_";

		nlassert( _SubSteps.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::race;
				retParams.back().Enum = (uint)_SubSteps[i].Race;
			
				retParams.push_back(STRING_MANAGER::TParam());
				retParams.back().Type = STRING_MANAGER::integer;
				retParams.back().Int = subStepStates[i];
			}
		}
		if ( _Place != 0xFFFF )
		{
			STRING_MANAGER::TParam param;
			param.Type = STRING_MANAGER::place;
			CPlace * place = CZoneManager::getInstance().getPlaceFromId(_Place);
			if ( !place )
			{
				MISLOG("sline:%u ERROR : kill_race : Invalid place %u", _SourceLine, _Place);
			}
			else
			{
				param.Identifier = place->getName();
				retParams.push_back(param);
			}
			textPtr = &stepTextLoc;
		}
		else
			textPtr = &stepText;
	}