diff --git a/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp b/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp index 05e558927..3f2491677 100644 --- a/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp +++ b/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp @@ -151,7 +151,7 @@ void logMissionActionLaunch(uint32 line, CMission *m, const string &ActionNameAn { if (!VerboseMissions) return; string sTmp = "sline:" + toString(line) + " "; - + std::vector entities; m->getEntities( entities ); for ( uint i = 0; i < entities.size(); i++) @@ -159,15 +159,15 @@ void logMissionActionLaunch(uint32 line, CMission *m, const string &ActionNameAn CCharacter *pChar = PlayerManager.getChar(entities[i]); sTmp += "user:" + pChar->getId().toString() + " "; } - + TAIAlias alias = m->getTemplateId(); sTmp += "miss:" + CPrimitivesParser::aliasToString(alias); CMissionTemplate *templ = CMissionManager::getInstance()->getTemplate( alias ); if (templ != NULL) sTmp += ",'" + templ->getMissionName() + "' "; - + sTmp += "EXEC " + ActionNameAndParams; - + MISDBG("%s", sTmp.c_str()); } #define LOGMISSIONACTION(xxxx) logMissionActionLaunch(_SourceLine, instance, xxxx) @@ -255,7 +255,7 @@ static bool evaluateSDBExpr(const std::string &sdbExpr, double &res, bool ignore } if (i == sdbExpr.size() || varName.empty()) return false; - + if (!CStatDB::getInstance()->valueGet(varName, varValue)) { if (!ignoreUnknownVar) @@ -301,7 +301,7 @@ protected: { return CMissionParser::solveTextsParams( _SourceLine, _Params, missionData ); } - + string _Text; TVectorParamCheck _Params; }; @@ -355,7 +355,7 @@ class CMissionActionBotChat :public CMissionActionText // get speaking bot if ( !CMissionParser::parseBotName(script[2],_Bot,missionData) ) return false; - + return CMissionParser::parseParamText(line, script[3], _Text, _Params ); } @@ -378,7 +378,7 @@ class CMissionActionBotChat :public CMissionActionText std::vector entities; instance->getEntities( entities ); TVectorParamCheck params = _Params; - + CMissionParser::solveBotNames(params,CAIAliasTranslator::getInstance()->getEntityId(instance->getGiver())); // 2 different loop : avoid multi test on chat type @@ -401,7 +401,7 @@ class CMissionActionBotChat :public CMissionActionText } } }; - + TAIAlias _Bot; CChatGroup::TGroupType _ChatMode; @@ -444,7 +444,7 @@ protected: } return true; } - + void launch(CMission* instance, std::list< CMissionEvent * > & eventList) { LOGMISSIONACTION("popup_msg"); @@ -514,16 +514,16 @@ class CMissionActionSetDesc : public IMissionAction return false; return true; } - + void launch(CMission* instance, std::list< CMissionEvent * > & eventList) { LOGMISSIONACTION("set_desc"); instance->overrideDesc( _DescIndex ); }; - + // index of this description in the template uint32 _DescIndex; - + MISSION_ACTION_GETNEWPTR(CMissionActionSetDesc) }; MISSION_REGISTER_ACTION(CMissionActionSetDesc,"set_desc"); @@ -574,7 +574,7 @@ class CMissionActionRecvItem : public IMissionAction ret = false; } missionData.ChatParams.push_back( make_pair( args[0], STRING_MANAGER::item ) ); - + _Quality = 1; if ( args.size() == 3 ) { @@ -606,7 +606,7 @@ class CMissionActionRecvItem : public IMissionAction } } - + if ( _Quantity == 0 ) { MISLOGERROR("quantity = 0"); @@ -940,12 +940,12 @@ class CMissionActionRecvNamedItem : public IMissionAction MISLOGERROR("bad named item format"); return false; } - + // read quantity _Quantity = 1; if ( args.size() >= 2) NLMISC::fromString(args[1], _Quantity); - + // read group _Group = false; if ( script.size() == 3 ) @@ -1179,12 +1179,12 @@ public: vector args; CMissionParser::tokenizeString( script[1]," \t",args ); - + // read the quantity, or 1 by default _Quantity = 1; if ( args.size() >= 2) NLMISC::fromString(args[1], _Quantity); - + // If the name of the item macthes one of the special defined mission items for this mission uint i = 0; for (; i < missionData.Items.size(); i++ ) @@ -1201,7 +1201,7 @@ public: break; } } - + // If no special mission item found, get a sheetid/quality if ( i == missionData.Items.size() ) { @@ -1214,7 +1214,7 @@ public: ret = false; } missionData.ChatParams.push_back( make_pair( args[0], STRING_MANAGER::item ) ); - + // read the minimum quality to destroy (1 if not specified) _Quality = 1; if ( args.size() == 3 ) @@ -1227,7 +1227,7 @@ public: } } } - + // Bad quantity? if ( _Quantity == 0 ) { @@ -1243,10 +1243,10 @@ public: uint16 _Quality; uint16 _Quantity; }; - + /// we destroy the item of the user in its inventory // ----------------------------------------------------------------------------- -class CMissionActionDestroyItem : +class CMissionActionDestroyItem : public IMissionAction, private CMissionBaseItemSelector { @@ -1382,7 +1382,7 @@ MISSION_REGISTER_ACTION(CMissionActionDestroyItem,"destroy_item"); /// We test if the user has the requested item in its inventory // ---------------------------------------------------------------------------- -class CMissionActionCondJumpIfItemInInv : +class CMissionActionCondJumpIfItemInInv : public CMissionActionJump, private CMissionBaseItemSelector { @@ -1395,10 +1395,10 @@ public: MISLOGSYNTAXERROR(" [] []: