|
|
@ -3940,30 +3940,30 @@ int CLuaIHMRyzom::displayChatMessage(CLuaState &ls)
|
|
|
|
if (ls.type(2) == LUA_TSTRING)
|
|
|
|
if (ls.type(2) == LUA_TSTRING)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::string input = toLower(ls.toString(2));
|
|
|
|
std::string input = toLower(ls.toString(2));
|
|
|
|
std::unordered_map<std::string, std::string> sParam;
|
|
|
|
if (input == "around")
|
|
|
|
// input should match chat_group_filter sParam
|
|
|
|
{
|
|
|
|
sParam.insert(make_pair(string("around"), string(dbPath+":SAY")));
|
|
|
|
prop.readRGBA(std::string(dbPath + ":SAY").c_str(), " ");
|
|
|
|
sParam.insert(make_pair(string("region"), string(dbPath+":REGION")));
|
|
|
|
ci.AroundMe.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
sParam.insert(make_pair(string("guild"), string(dbPath+":CLADE")));
|
|
|
|
}
|
|
|
|
sParam.insert(make_pair(string("team"), string(dbPath+":GROUP")));
|
|
|
|
else if (input == "region")
|
|
|
|
sParam.insert(make_pair(string("universe"), string(dbPath+":UNIVERSE_NEW")));
|
|
|
|
{
|
|
|
|
for (const auto& db : sParam)
|
|
|
|
prop.readRGBA(std::string(dbPath + ":REGION").c_str(), " ");
|
|
|
|
{
|
|
|
|
ci.Region.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
if (db.first.c_str() == input)
|
|
|
|
}
|
|
|
|
{
|
|
|
|
else if (input == "universe")
|
|
|
|
prop.readRGBA(db.second.c_str(), " ");
|
|
|
|
{
|
|
|
|
if (input == "around")
|
|
|
|
prop.readRGBA(std::string(dbPath + ":UNIVERSE_NEW").c_str(), " ");
|
|
|
|
ci.AroundMe.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
ci.Universe.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
if (input == "region")
|
|
|
|
}
|
|
|
|
ci.Region.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
else if (input == "guild")
|
|
|
|
if (input == "universe")
|
|
|
|
{
|
|
|
|
ci.Universe.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
prop.readRGBA(std::string(dbPath + ":CLADE").c_str(), " ");
|
|
|
|
if (input == "guild")
|
|
|
|
ci.Guild.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
ci.Guild.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
}
|
|
|
|
if (input == "team")
|
|
|
|
else if (input == "team")
|
|
|
|
ci.Team.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
prop.readRGBA(std::string(dbPath + ":GROUP").c_str(), " ");
|
|
|
|
}
|
|
|
|
ci.Team.displayMessage(ucstring(msg), prop.getRGBA());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ls.type(2) == LUA_TNUMBER)
|
|
|
|
if (ls.type(2) == LUA_TNUMBER)
|
|
|
|