develop
kaetemi 4 years ago
parent 47c0c8cc07
commit ff49b89b73

@ -335,32 +335,35 @@ public:
{
++it;
if (it == inputString.end())
{
formatedResult += '$';
--it;
break;
}
switch(*it)
{
case 't': // add text ID
{
formatedResult += paramString;
break;
}
case 'P':
case 'p': // add player name
if (ClientCfg.Local)
{
if (ClientCfg.Local || !UserEntity)
{
if (*it == 'P') formatedResult += "PLAYER";
else formatedResult += "Player";
}
else
{
if(UserEntity)
{
std::string name = UserEntity->getEntityName().toUtf8();
if (*it == 'P') name = toUpper(name);
formatedResult += name;
}
}
break;
//
}
case 's':
case 'b': // add bot name
{
@ -420,12 +423,46 @@ public:
}
formatedResult += botName;
break;
}
case '\'': // 's and 'S -> Potatos Identity and TOMATOES IDENTITY
{
std::string::const_iterator it2 = it;
++it2;
if (it2 == inputString.end())
{
formatedResult += "$'";
}
else
{
it = it2;
if (*it == 's' || *it == 'S')
{
if (formatedResult.size() && (formatedResult[formatedResult.size() - 1] == 's' || formatedResult[formatedResult.size() - 1] == 'S'))
{
formatedResult += "\xE2\x80\x99"; // RIGHT SINGLE QUOTATION MARK
}
else
{
formatedResult += "\xE2\x80\x99"; // RIGHT SINGLE QUOTATION MARK
formatedResult += *it;
}
}
else
{
--it;
formatedResult += "$'";
}
}
break;
}
default:
{
formatedResult += '$';
--it;
break;
}
}
++it;
}
else

Loading…
Cancel
Save