Fix issue with getTargetNames who are lowerized

feature/prepare-cross-merge
Nuno 4 years ago committed by kaetemi
parent e0c4bcf4e0
commit bad68017b8
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -55,7 +55,7 @@ CAIAliasTranslator::CAIAliasTranslator()
{ {
_KeepNames = false; _KeepNames = false;
} }
// get the loaded primitives // get the loaded primitives
const CPrimitivesParser::TPrimitivesList & primsList = CPrimitivesParser::getInstance().getPrimitives(); const CPrimitivesParser::TPrimitivesList & primsList = CPrimitivesParser::getInstance().getPrimitives();
nlinfo("loading bot names and mission names"); nlinfo("loading bot names and mission names");
@ -86,7 +86,7 @@ CAIAliasTranslator::~CAIAliasTranslator()
_AIGroupNamesToIds.clear(); _AIGroupNamesToIds.clear();
_HashTableAiId.clear(); _HashTableAiId.clear();
_HashTableEntityId.clear(); _HashTableEntityId.clear();
}// CAIAliasTranslator destructor }// CAIAliasTranslator destructor
//----------------------------------------------- //-----------------------------------------------
@ -95,7 +95,7 @@ CAIAliasTranslator::~CAIAliasTranslator()
void CAIAliasTranslator::buildBotTree(const NLLIGO::IPrimitive* prim) void CAIAliasTranslator::buildBotTree(const NLLIGO::IPrimitive* prim)
{ {
// look for bot nodes in the primitives // look for bot nodes in the primitives
std::string value,name,aiClass; std::string value, name, realName, aiClass;
if (prim->getPropertyByName("class",aiClass) ) if (prim->getPropertyByName("class",aiClass) )
{ {
if ( !nlstricmp(aiClass.c_str(),"npc_bot") ||!nlstricmp(aiClass.c_str(),"group_fauna") ||!nlstricmp(aiClass.c_str(),"npc_group") ) if ( !nlstricmp(aiClass.c_str(),"npc_bot") ||!nlstricmp(aiClass.c_str(),"group_fauna") ||!nlstricmp(aiClass.c_str(),"npc_group") )
@ -117,6 +117,7 @@ void CAIAliasTranslator::buildBotTree(const NLLIGO::IPrimitive* prim)
nlwarning("<CAIAliasTranslator buildBotTree> errors : name='%s' alias='%s' in '%s'",name.c_str(),value.c_str(), buildPrimPath(prim).c_str()); nlwarning("<CAIAliasTranslator buildBotTree> errors : name='%s' alias='%s' in '%s'",name.c_str(),value.c_str(), buildPrimPath(prim).c_str());
} }
realName = name;
NLMISC::strlwr(name); NLMISC::strlwr(name);
//remove AI name parameters //remove AI name parameters
string::size_type trash = name.find('$'); string::size_type trash = name.find('$');
@ -128,7 +129,7 @@ void CAIAliasTranslator::buildBotTree(const NLLIGO::IPrimitive* prim)
{ {
if ( !nlstricmp(aiClass.c_str(),"npc_bot") ) if ( !nlstricmp(aiClass.c_str(),"npc_bot") )
{ {
_BotIdsToNames.insert( make_pair(id,name) ); _BotIdsToNames.insert( make_pair(id,realName) );
_BotNamesToIds.insert( make_pair(name,id) ); _BotNamesToIds.insert( make_pair(name,id) );
} }
else else
@ -169,7 +170,7 @@ void CAIAliasTranslator::buildBotTree(const NLLIGO::IPrimitive* prim)
} }
} }
//this is not a mission node, so lookup recursively in the children //this is not a mission node, so lookup recursively in the children
for (uint i=0;i<prim->getNumChildren();++i) for (uint i=0;i<prim->getNumChildren();++i)
{ {
const IPrimitive *child; const IPrimitive *child;
if ( prim->getChild(child,i) ) if ( prim->getChild(child,i) )
@ -211,11 +212,11 @@ void CAIAliasTranslator::buildMissionTree(const NLLIGO::IPrimitive* prim)
{ {
nlwarning("<CAIAliasTranslator buildMissionTree> The name %s is already assigned, we overwrite it",name.c_str()); nlwarning("<CAIAliasTranslator buildMissionTree> The name %s is already assigned, we overwrite it",name.c_str());
} }
} }
} }
//this is not a mission node, so lookup recursively in the children //this is not a mission node, so lookup recursively in the children
for (uint i=0;i<prim->getNumChildren();++i) for (uint i=0;i<prim->getNumChildren();++i)
{ {
const IPrimitive *child; const IPrimitive *child;
if ( prim->getChild(child,i) ) if ( prim->getChild(child,i) )
@ -224,16 +225,16 @@ void CAIAliasTranslator::buildMissionTree(const NLLIGO::IPrimitive* prim)
}// CAIAliasTranslator buildMissionTree }// CAIAliasTranslator buildMissionTree
void CAIAliasTranslator::sendAliasToIOS() const void CAIAliasTranslator::sendAliasToIOS() const
{ {
NLNET::CMessage msg("UPDATE_AIALIAS"); NLNET::CMessage msg("UPDATE_AIALIAS");
enum {Set=0, Add = 1, Delete=2 }; enum {Set=0, Add = 1, Delete=2 };
uint32 subcommand = static_cast<uint32>(Set); uint32 subcommand = static_cast<uint32>(Set);
msg.serial( subcommand ); msg.serial( subcommand );
typedef CHashMap< uint, std::string > TContainer; typedef CHashMap< uint, std::string > TContainer;
TContainer::const_iterator first(_BotIdsToNames.begin()); TContainer::const_iterator first(_BotIdsToNames.begin());
TContainer::const_iterator last(_BotIdsToNames.end()); TContainer::const_iterator last(_BotIdsToNames.end());
uint32 size = static_cast<uint32>(_BotIdsToNames.size()); uint32 size = static_cast<uint32>(_BotIdsToNames.size());
msg.serial(size); msg.serial(size);
for (; first != last; ++first) for (; first != last; ++first)
@ -250,7 +251,7 @@ TAIAlias CAIAliasTranslator::getAIAlias(const NLMISC::CEntityId & entityId) cons
{ {
typedef CHashMap< NLMISC::CEntityId, TAIAlias,NLMISC::CEntityIdHashMapTraits> TContainer; typedef CHashMap< NLMISC::CEntityId, TAIAlias,NLMISC::CEntityIdHashMapTraits> TContainer;
TContainer::const_iterator it(_HashTableEntityId.find(entityId)); TContainer::const_iterator it(_HashTableEntityId.find(entityId));
if( it != _HashTableEntityId.end() ) if( it != _HashTableEntityId.end() )
return (*it).second; return (*it).second;
return Invalid; return Invalid;

@ -54,7 +54,7 @@ public:
/// remove an association /// remove an association
inline void removeAssociation(NLMISC::CEntityId& entityId); inline void removeAssociation(NLMISC::CEntityId& entityId);
/** /**
* Get a bot entityId * Get a bot entityId
* \param aiid : the AI id of the bot * \param aiid : the AI id of the bot
@ -65,7 +65,7 @@ public:
/** /**
* Get a bot AIId * Get a bot AIId
* \param entityId: the entityId of the searched bot * \param entityId: the entityId of the searched bot
* \return he AI id of the bot * \return he AI id of the bot
*/ */
TAIAlias getAIAlias(const NLMISC::CEntityId & entityId) const; TAIAlias getAIAlias(const NLMISC::CEntityId & entityId) const;
@ -107,7 +107,7 @@ public:
* WARNING : SLOW : use it only for commands / stats ( iteration through a hash_map ) * WARNING : SLOW : use it only for commands / stats ( iteration through a hash_map )
*/ */
inline const std::string &getMissionNameFromUniqueId(TAIAlias alias) const; inline const std::string &getMissionNameFromUniqueId(TAIAlias alias) const;
/** /**
* Get an AI groupalias from its name * Get an AI groupalias from its name
* \param botName : name of the group * \param botName : name of the group
@ -117,7 +117,7 @@ public:
/** /**
* Send alias, and eid to ios via mirror. * Send alias, and eid to ios via mirror.
*/ */
void sendAliasToIOS() const ; void sendAliasToIOS() const ;
@ -135,7 +135,7 @@ private:
* \param prim : the primitive to be parsed * \param prim : the primitive to be parsed
*/ */
void buildMissionTree(const NLLIGO::IPrimitive* prim); void buildMissionTree(const NLLIGO::IPrimitive* prim);
/// Constructor (private because it is a singleton) /// Constructor (private because it is a singleton)
CAIAliasTranslator(); CAIAliasTranslator();
@ -148,7 +148,7 @@ private:
/// hash table using AI id as keys /// hash table using AI id as keys
CHashMap< uint, NLMISC::CEntityId > _HashTableAiId; CHashMap< uint, NLMISC::CEntityId > _HashTableAiId;
CHashMap< NLMISC::CEntityId, TAIAlias,NLMISC::CEntityIdHashMapTraits> _HashTableEntityId; CHashMap< NLMISC::CEntityId, TAIAlias,NLMISC::CEntityIdHashMapTraits> _HashTableEntityId;
/// map linking bot names to ids /// map linking bot names to ids
CHashMultiMap< std::string, TAIAlias > _BotNamesToIds; CHashMultiMap< std::string, TAIAlias > _BotNamesToIds;
/// map linking bot ids to names /// map linking bot ids to names
@ -188,7 +188,7 @@ inline void CAIAliasTranslator::removeNPCAlias(TAIAlias alias)
std::string lwr = NLMISC::strlwr((*it).second); std::string lwr = NLMISC::strlwr((*it).second);
std::pair< CHashMultiMap< std::string, TAIAlias>::const_iterator, CHashMultiMap< std::string, TAIAlias>::const_iterator > result = _BotNamesToIds.equal_range(lwr); std::pair< CHashMultiMap< std::string, TAIAlias>::const_iterator, CHashMultiMap< std::string, TAIAlias>::const_iterator > result = _BotNamesToIds.equal_range(lwr);
CHashMultiMap< std::string, TAIAlias>::const_iterator it2 = result.first; CHashMultiMap< std::string, TAIAlias>::const_iterator it2 = result.first;
while ( it2 != result.second ) while ( it2 != result.second )
{ {
if ((*it2).second == alias) if ((*it2).second == alias)
@ -202,17 +202,17 @@ inline void CAIAliasTranslator::removeNPCAlias(TAIAlias alias)
inline void CAIAliasTranslator::removeName(const std::string &name) inline void CAIAliasTranslator::removeName(const std::string &name)
{ {
std::string lwr = NLMISC::strlwr(name); std::string lwr = NLMISC::strlwr(name);
std::pair< CHashMultiMap< std::string, TAIAlias>::const_iterator, CHashMultiMap< std::string, TAIAlias>::const_iterator > result = _BotNamesToIds.equal_range(lwr); std::pair< CHashMultiMap< std::string, TAIAlias>::const_iterator, CHashMultiMap< std::string, TAIAlias>::const_iterator > result = _BotNamesToIds.equal_range(lwr);
CHashMultiMap< std::string, TAIAlias>::const_iterator it2 = result.first; CHashMultiMap< std::string, TAIAlias>::const_iterator it2 = result.first;
while ( it2 != result.second ) while ( it2 != result.second )
{ {
CHashMap< uint,std::string >::const_iterator it = _BotIdsToNames.find((*it2).second); CHashMap< uint,std::string >::const_iterator it = _BotIdsToNames.find((*it2).second);
if ( it != _BotIdsToNames.end() ) if ( it != _BotIdsToNames.end() )
_BotIdsToNames.erase(it); _BotIdsToNames.erase(it);
if ((*it2).first == lwr) if ((*it2).first == lwr)
it2 = _BotNamesToIds.erase(it2); it2 = _BotNamesToIds.erase(it2);
else else
@ -325,7 +325,7 @@ inline void CAIAliasTranslator::updateAssociation(TAIAlias aiid, const NLMISC::C
_HashTableAiId.insert( std::make_pair( (uint)aiid,entityId ) ); _HashTableAiId.insert( std::make_pair( (uint)aiid,entityId ) );
_HashTableEntityId.insert( std::make_pair( entityId,aiid ) ); _HashTableEntityId.insert( std::make_pair( entityId,aiid ) );
}// CAIAliasTranslator updateAssociation }// CAIAliasTranslator updateAssociation
//----------------------------------------------- //-----------------------------------------------
@ -359,7 +359,7 @@ inline const NLMISC::CEntityId& CAIAliasTranslator::getEntityId(TAIAlias aiid) c
if( it != _HashTableAiId.end() ) if( it != _HashTableAiId.end() )
return (*it).second; return (*it).second;
#ifndef FINAL_VERSION #ifndef FINAL_VERSION
nlerror( "Illegal call to getEntityId on entity with no alias" ); // see nlerror( "Illegal call to getEntityId on entity with no alias" ); // see
#endif #endif
return NLMISC::CEntityId::Unknown; return NLMISC::CEntityId::Unknown;
}// CAIAliasTranslator getEntityId }// CAIAliasTranslator getEntityId

@ -91,7 +91,7 @@ class CMissionStepKillFauna : public IMissionStepTemplate
return false; return false;
} }
missionData.ChatParams.push_back( make_pair(args[0],STRING_MANAGER::creature_model) ); missionData.ChatParams.push_back( make_pair(args[0],STRING_MANAGER::creature_model) );
subStep.Dynamic = ""; subStep.Dynamic = "";
subStep.Sheet = CSheetId( args[0] + ".creature"); subStep.Sheet = CSheetId( args[0] + ".creature");
if ( subStep.Sheet == CSheetId::Unknown ) if ( subStep.Sheet == CSheetId::Unknown )
@ -140,7 +140,7 @@ class CMissionStepKillFauna : public IMissionStepTemplate
{ {
vector<string> params = _User->getCustomMissionParams(_SubSteps[subStepIndex].Dynamic); vector<string> params = _User->getCustomMissionParams(_SubSteps[subStepIndex].Dynamic);
status = _User->getCustomMissionParams(_SubSteps[subStepIndex].Dynamic+"_STATUS"); status = _User->getCustomMissionParams(_SubSteps[subStepIndex].Dynamic+"_STATUS");
if (params.size() < 2) if (params.size() < 2)
{ {
@ -175,7 +175,7 @@ class CMissionStepKillFauna : public IMissionStepTemplate
} }
//// ////
} }
if ( !c ) if ( !c )
{ {
LOGMISSIONSTEPERROR("kill_fauna : invalid creature " + toString(event.TargetEntity.getIndex())); LOGMISSIONSTEPERROR("kill_fauna : invalid creature " + toString(event.TargetEntity.getIndex()));
@ -183,7 +183,7 @@ class CMissionStepKillFauna : public IMissionStepTemplate
} }
else if ( faunaSheet == c->getType() ) else if ( faunaSheet == c->getType() )
{ {
if ( _Place != 0xFFFF ) if ( _Place != 0xFFFF )
{ {
float gooDistance; float gooDistance;
@ -214,7 +214,7 @@ class CMissionStepKillFauna : public IMissionStepTemplate
LOGMISSIONSTEPSUCCESS("kill_fauna"); LOGMISSIONSTEPSUCCESS("kill_fauna");
return 1; return 1;
} }
for ( uint i = 0; i < places.size(); i++ ) for ( uint i = 0; i < places.size(); i++ )
{ {
if ( places[i] && places[i]->getId() == _Place ) if ( places[i] && places[i]->getId() == _Place )
@ -283,7 +283,7 @@ class CMissionStepKillFauna : public IMissionStepTemplate
CSheetId faunaSheet = CSheetId::Unknown; CSheetId faunaSheet = CSheetId::Unknown;
uint32 quantity = 1; uint32 quantity = 1;
for ( uint i = 0; i < subStepStates.size(); i++ ) for ( uint i = 0; i < subStepStates.size(); i++ )
{ {
if( subStepStates[i] != 0 ) if( subStepStates[i] != 0 )
@ -295,17 +295,17 @@ class CMissionStepKillFauna : public IMissionStepTemplate
} }
else else
{ {
//// Dynamic Mission Args //// Dynamic Mission Args
vector<string> params = _User->getCustomMissionParams(_SubSteps[i].Dynamic); vector<string> params = _User->getCustomMissionParams(_SubSteps[i].Dynamic);
vector<string> status = _User->getCustomMissionParams(_SubSteps[i].Dynamic+"_STATUS"); vector<string> status = _User->getCustomMissionParams(_SubSteps[i].Dynamic+"_STATUS");
if (params.size() > 1) if (params.size() > 1)
faunaSheet = CSheetId(params[1]); faunaSheet = CSheetId(params[1]);
if (params.size() > 2) if (params.size() > 2)
NLMISC::fromString(params[2], quantity); NLMISC::fromString(params[2], quantity);
if (status.size() > 0) // Use saved step quantity if (status.size() > 0) // Use saved step quantity
NLMISC::fromString(status[0], quantity); NLMISC::fromString(status[0], quantity);
@ -322,14 +322,14 @@ class CMissionStepKillFauna : public IMissionStepTemplate
} }
//// ////
} }
if (faunaSheet != CSheetId::Unknown) if (faunaSheet != CSheetId::Unknown)
{ {
nbSubSteps++; nbSubSteps++;
retParams.push_back(STRING_MANAGER::TParam()); retParams.push_back(STRING_MANAGER::TParam());
retParams.back().Type = STRING_MANAGER::creature_model; retParams.back().Type = STRING_MANAGER::creature_model;
retParams.back().SheetId = faunaSheet; retParams.back().SheetId = faunaSheet;
retParams.push_back(STRING_MANAGER::TParam()); retParams.push_back(STRING_MANAGER::TParam());
retParams.back().Type = STRING_MANAGER::integer; retParams.back().Type = STRING_MANAGER::integer;
retParams.back().Int = quantity; retParams.back().Int = quantity;
@ -478,7 +478,7 @@ class CMissionStepKillRace : public IMissionStepTemplate
} }
return 0; return 0;
} }
void getInitState( std::vector<uint32>& ret ) void getInitState( std::vector<uint32>& ret )
{ {
ret.clear(); ret.clear();
@ -504,7 +504,7 @@ class CMissionStepKillRace : public IMissionStepTemplate
retParams.push_back(STRING_MANAGER::TParam()); retParams.push_back(STRING_MANAGER::TParam());
retParams.back().Type = STRING_MANAGER::race; retParams.back().Type = STRING_MANAGER::race;
retParams.back().Enum = (uint)_SubSteps[i].Race; retParams.back().Enum = (uint)_SubSteps[i].Race;
retParams.push_back(STRING_MANAGER::TParam()); retParams.push_back(STRING_MANAGER::TParam());
retParams.back().Type = STRING_MANAGER::integer; retParams.back().Type = STRING_MANAGER::integer;
retParams.back().Int = subStepStates[i]; retParams.back().Int = subStepStates[i];
@ -529,7 +529,7 @@ class CMissionStepKillRace : public IMissionStepTemplate
else else
textPtr = &stepText; textPtr = &stepText;
} }
std::vector< CSubStep > _SubSteps; std::vector< CSubStep > _SubSteps;
uint16 _Place; uint16 _Place;
@ -567,9 +567,9 @@ class CMissionStepKillNpc : public IMissionStepTemplate
//// Dynamic Mission Args : #dynamic# //// Dynamic Mission Args : #dynamic#
if (trim(subs[i]) == "#dynamic#") { if (trim(subs[i]) == "#dynamic#") {
subStep.Dynamic = missionData.Name; subStep.Dynamic = missionData.Name;
} }
//// ////
else else
{ {
subStep.Alias = CAIAliasTranslator::Invalid; subStep.Alias = CAIAliasTranslator::Invalid;
if ( !CMissionParser::parseBotName(subs[i],subStep.Alias,missionData) ) if ( !CMissionParser::parseBotName(subs[i],subStep.Alias,missionData) )
@ -613,7 +613,7 @@ class CMissionStepKillNpc : public IMissionStepTemplate
} }
else else
{ {
//// Dynamic Mission Args //// Dynamic Mission Args
vector<string> params = user->getCustomMissionParams(_SubSteps[subStepIndex].Dynamic); vector<string> params = user->getCustomMissionParams(_SubSteps[subStepIndex].Dynamic);
if (params.size() < 2) { if (params.size() < 2) {
LOGMISSIONSTEPERROR("kill_npc : invalid dynamic npc"); LOGMISSIONSTEPERROR("kill_npc : invalid dynamic npc");
@ -623,9 +623,9 @@ class CMissionStepKillNpc : public IMissionStepTemplate
{ {
webAppUrl = params[0]; webAppUrl = params[0];
string name; string name;
CAIAliasTranslator::getInstance()->getNPCNameFromAlias(c->getAlias(), name); CAIAliasTranslator::getInstance()->getNPCNameFromAlias(c->getAlias(), name);
if ( name == params[1] ) if ( NLMISC::strlwr(name) == NLMISC::strlwr(params[1]) )
{ {
user->validateDynamicMissionStep(webAppUrl); user->validateDynamicMissionStep(webAppUrl);
LOGMISSIONSTEPSUCCESS("kill_npc"); LOGMISSIONSTEPSUCCESS("kill_npc");
@ -638,7 +638,7 @@ class CMissionStepKillNpc : public IMissionStepTemplate
} }
return 0; return 0;
} }
void getInitState( std::vector<uint32>& ret ) void getInitState( std::vector<uint32>& ret )
{ {
ret.clear(); ret.clear();
@ -693,7 +693,7 @@ class CMissionStepKillNpc : public IMissionStepTemplate
} }
} }
} }
// We don't define getInvolvedBot() here, because 1) we don't want an icon on bots to kill, // We don't define getInvolvedBot() here, because 1) we don't want an icon on bots to kill,
// and 2) at the moment only one bot can be returned // and 2) at the moment only one bot can be returned
@ -711,7 +711,7 @@ class CMissionStepKillGroup : public IMissionStepTemplate
{ {
TAIAlias Alias; TAIAlias Alias;
}; };
virtual bool buildStep( uint32 line, const std::vector< std::string > & script, CMissionGlobalParsingData & globalData, CMissionSpecificParsingData & missionData ) virtual bool buildStep( uint32 line, const std::vector< std::string > & script, CMissionGlobalParsingData & globalData, CMissionSpecificParsingData & missionData )
{ {
_SourceLine = line; _SourceLine = line;
@ -724,7 +724,7 @@ class CMissionStepKillGroup : public IMissionStepTemplate
std::vector< std::string > subs; std::vector< std::string > subs;
NLMISC::splitString( script[1],";", subs ); NLMISC::splitString( script[1],";", subs );
if ( subs.size() != 1 ) if ( subs.size() != 1 )
{ {
MISLOGSYNTAXERROR("<group_name>"); MISLOGSYNTAXERROR("<group_name>");
@ -732,7 +732,7 @@ class CMissionStepKillGroup : public IMissionStepTemplate
} }
_SubSteps.reserve(1); _SubSteps.reserve(1);
{ {
CMissionParser::removeBlanks( subs[0] ); CMissionParser::removeBlanks( subs[0] );
std::vector< TAIAlias > aliases; std::vector< TAIAlias > aliases;
@ -769,7 +769,7 @@ class CMissionStepKillGroup : public IMissionStepTemplate
} }
return 0; return 0;
} }
void getInitState( std::vector<uint32>& ret ) void getInitState( std::vector<uint32>& ret )
{ {
ret.clear(); ret.clear();
@ -779,7 +779,7 @@ class CMissionStepKillGroup : public IMissionStepTemplate
ret[i] = 1; ret[i] = 1;
} }
} }
virtual void getTextParams( uint & nbSubSteps, const std::string* & textPtr,TVectorParamCheck& retParams, const std::vector<uint32>& subStepStates) virtual void getTextParams( uint & nbSubSteps, const std::string* & textPtr,TVectorParamCheck& retParams, const std::vector<uint32>& subStepStates)
{ {
/// overloaded text in script /// overloaded text in script
@ -798,7 +798,7 @@ class CMissionStepKillGroup : public IMissionStepTemplate
{ {
return true; return true;
} }
std::vector< CSubStep > _SubSteps; std::vector< CSubStep > _SubSteps;
std::string Target; std::string Target;
@ -820,7 +820,7 @@ class CMissionStepKillFaction : public IMissionStepTemplate
MISLOGSYNTAXERROR("<faction> <quantity> [: <place>]"); MISLOGSYNTAXERROR("<faction> <quantity> [: <place>]");
return false; return false;
} }
std::vector< std::string > args; std::vector< std::string > args;
CMissionParser::tokenizeString( script[1]," \t", args ); CMissionParser::tokenizeString( script[1]," \t", args );
if ( args.size() != 2 ) if ( args.size() != 2 )
@ -921,7 +921,7 @@ class CMissionStepKillFaction : public IMissionStepTemplate
retParams.push_back(STRING_MANAGER::TParam(STRING_MANAGER::faction)); retParams.push_back(STRING_MANAGER::TParam(STRING_MANAGER::faction));
retParams.back().Enum = _Faction; retParams.back().Enum = _Faction;
retParams.push_back(STRING_MANAGER::TParam(STRING_MANAGER::integer, sint32(_Quantity))); retParams.push_back(STRING_MANAGER::TParam(STRING_MANAGER::integer, sint32(_Quantity)));
if ( _Place != 0xFFFF ) if ( _Place != 0xFFFF )
{ {
STRING_MANAGER::TParam param; STRING_MANAGER::TParam param;
@ -940,7 +940,7 @@ class CMissionStepKillFaction : public IMissionStepTemplate
} }
else else
textPtr = &stepText; textPtr = &stepText;
} }
/// Faction as defined in CStaticFame /// Faction as defined in CStaticFame
@ -1072,7 +1072,7 @@ class CMissionStepKillByName : public IMissionStepTemplate
} }
return 0; return 0;
} }
void getInitState( std::vector<uint32>& ret ) void getInitState( std::vector<uint32>& ret )
{ {
ret.clear(); ret.clear();
@ -1208,7 +1208,7 @@ class CMissionStepKillPlayer : public IMissionStepTemplate
else else
{ {
sint32 victimFame = CFameInterface::getInstance().getFameIndexed(victim->getId(), _SubSteps[subStepIndex].Clan); sint32 victimFame = CFameInterface::getInstance().getFameIndexed(victim->getId(), _SubSteps[subStepIndex].Clan);
if ( (victimFame > _SubSteps[subStepIndex].MinLevel) && if ( (victimFame > _SubSteps[subStepIndex].MinLevel) &&
(victimFame < _SubSteps[subStepIndex].MaxLevel) ) (victimFame < _SubSteps[subStepIndex].MaxLevel) )
{ {
if ( _Place != 0xFFFF ) if ( _Place != 0xFFFF )
@ -1250,7 +1250,7 @@ class CMissionStepKillPlayer : public IMissionStepTemplate
} }
return 0; return 0;
} }
void getInitState( std::vector<uint32>& ret ) void getInitState( std::vector<uint32>& ret )
{ {
@ -1281,7 +1281,7 @@ class CMissionStepKillPlayer : public IMissionStepTemplate
retParams.push_back(STRING_MANAGER::TParam()); retParams.push_back(STRING_MANAGER::TParam());
retParams.back().Type = STRING_MANAGER::faction; retParams.back().Type = STRING_MANAGER::faction;
retParams.back().Enum = _SubSteps[i].Clan; retParams.back().Enum = _SubSteps[i].Clan;
retParams.push_back(STRING_MANAGER::TParam()); retParams.push_back(STRING_MANAGER::TParam());
retParams.back().Type = STRING_MANAGER::integer; retParams.back().Type = STRING_MANAGER::integer;
retParams.back().Int = _SubSteps[i].MinLevel; retParams.back().Int = _SubSteps[i].MinLevel;

Loading…
Cancel
Save