Fix bitbucket/ryzomcore/#340, #341,#342

feature/streamed-package
kaetemi 5 years ago
parent dc1bd19f61
commit 4c74d13931

@ -286,7 +286,7 @@ void CItemInfoCache::debugItemInfoCache() const
{ {
nlinfo("ItemInfoCache: %d entries", _ItemInfoCacheMap.size()); nlinfo("ItemInfoCache: %d entries", _ItemInfoCacheMap.size());
uint count = 0; uint count = 0;
for (auto it = _ItemInfoCacheMap.begin(); it != _ItemInfoCacheMap.end(); ++it) for (TItemInfoCacheMap::const_iterator it = _ItemInfoCacheMap.begin(); it != _ItemInfoCacheMap.end(); ++it)
{ {
uint32 serial = (it->first >> 32) & 0xFFFFFFFF; uint32 serial = (it->first >> 32) & 0xFFFFFFFF;
uint32 created = it->first & 0xFFFFFFFF; uint32 created = it->first & 0xFFFFFFFF;

@ -4240,30 +4240,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")));
sParam.insert(make_pair(string("region"), string(dbPath+":REGION")));
sParam.insert(make_pair(string("guild"), string(dbPath+":CLADE")));
sParam.insert(make_pair(string("team"), string(dbPath+":GROUP")));
sParam.insert(make_pair(string("universe"), string(dbPath+":UNIVERSE_NEW")));
for (const auto& db : sParam)
{ {
if (db.first.c_str() == input) prop.readRGBA(std::string(dbPath + ":SAY").c_str(), " ");
{ ci.AroundMe.displayMessage(ucstring(msg), prop.getRGBA());
prop.readRGBA(db.second.c_str(), " "); }
if (input == "around") else if (input == "region")
ci.AroundMe.displayMessage(ucstring(msg), prop.getRGBA()); {
if (input == "region") prop.readRGBA(std::string(dbPath + ":REGION").c_str(), " ");
ci.Region.displayMessage(ucstring(msg), prop.getRGBA()); ci.Region.displayMessage(ucstring(msg), prop.getRGBA());
if (input == "universe") }
ci.Universe.displayMessage(ucstring(msg), prop.getRGBA()); else if (input == "universe")
if (input == "guild") {
ci.Guild.displayMessage(ucstring(msg), prop.getRGBA()); prop.readRGBA(std::string(dbPath + ":UNIVERSE_NEW").c_str(), " ");
if (input == "team") ci.Universe.displayMessage(ucstring(msg), prop.getRGBA());
ci.Team.displayMessage(ucstring(msg), prop.getRGBA()); }
break; else if (input == "guild")
} {
prop.readRGBA(std::string(dbPath + ":CLADE").c_str(), " ");
ci.Guild.displayMessage(ucstring(msg), prop.getRGBA());
}
else if (input == "team")
{
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)

@ -3108,9 +3108,9 @@ void CUserEntity::rollDice(sint16 min, sint16 max, bool local)
sint16 roll = min + (sint16)dice->rand(max-min); sint16 roll = min + (sint16)dice->rand(max-min);
ucstring msg = CI18N::get("msgRollDiceLocal"); ucstring msg = CI18N::get("msgRollDiceLocal");
strFindReplace(msg, "%min", std::to_string(min)); strFindReplace(msg, "%min", toString(min));
strFindReplace(msg, "%max", std::to_string(max)); strFindReplace(msg, "%max", toString(max));
strFindReplace(msg, "%roll", std::to_string(roll)); strFindReplace(msg, "%roll", toString(roll));
CInterfaceManager *pIM= CInterfaceManager::getInstance(); CInterfaceManager *pIM= CInterfaceManager::getInstance();

Loading…
Cancel
Save