mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Changed: Don't need to use CSString
--HG-- branch : develop
This commit is contained in:
parent
f17bd720b1
commit
c3a6610f36
1 changed files with 26 additions and 18 deletions
|
@ -1002,30 +1002,38 @@ IPrimitive* CServerAnimationModule::getAction(CObject* action, const std::string
|
||||||
|
|
||||||
if(param.splitLines(result) )
|
if(param.splitLines(result) )
|
||||||
{
|
{
|
||||||
if (result.size() == 0)
|
std::vector<std::string> res;
|
||||||
{
|
|
||||||
nlwarning("ERROR: npc_say but no parameters !!! %d in session ", scenarioId.asInt());
|
|
||||||
}
|
|
||||||
|
|
||||||
if(result.size()>=1)
|
if (result.empty())
|
||||||
{
|
{
|
||||||
NLMISC::CSString name(result[0]);
|
nlwarning("ERROR: npc_say but no parameters !!! %u in session ", scenarioId.asInt());
|
||||||
if(name.find(":",0)!=string::npos)
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
res.resize(result.size());
|
||||||
|
|
||||||
|
if (result.size() >= 1)
|
||||||
{
|
{
|
||||||
result[0] = prefix+result[0];
|
std::string name(result[0]);
|
||||||
|
|
||||||
|
if (name.find(":", 0) != string::npos)
|
||||||
|
{
|
||||||
|
res[0] = prefix + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.size() >= 2)
|
||||||
|
{
|
||||||
|
res[1] = toString("DSS_%u %s", scenarioId.asInt(), result[1].c_str());
|
||||||
|
|
||||||
|
for (uint32 i = 2, len = result.size(); i<len; ++i)
|
||||||
|
{
|
||||||
|
res[i] = prefix + result[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(result.size()>=2)
|
pAction->addPropertyByName("parameters", new CPropertyStringArray(res));
|
||||||
result[1] = "DSS_"+toString(scenarioId)+" "+result[1].c_str();
|
|
||||||
if(result.size()>=3)
|
|
||||||
{
|
|
||||||
for(uint32 i=2;i<result.size();++i)
|
|
||||||
{
|
|
||||||
result[i] = prefix + result[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pAction->addPropertyByName("parameters", new CPropertyStringArray( (std::vector<std::string> &)result ));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue