diff --git a/code/nel/tools/3d/textures_tool/main.cpp b/code/nel/tools/3d/textures_tool/main.cpp
index 592df935f..cccb62bee 100644
--- a/code/nel/tools/3d/textures_tool/main.cpp
+++ b/code/nel/tools/3d/textures_tool/main.cpp
@@ -180,8 +180,8 @@ int main(int argc, char **argv)
for (uint j = 0; j < size; ++j)
{
- // TODO: find what computation do
-// *(pRGBA++)-> = color;
+ pRGBA->modulateFromColorRGBOnly(*pRGBA, color);
+ ++pRGBA;
}
NLMISC::COFile out;
diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml b/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml
index 8696de32a..d628a6996 100644
--- a/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml
+++ b/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml
@@ -220,6 +220,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/macros.xml b/code/ryzom/client/data/gamedev/interfaces_v3/macros.xml
index 5dc1142bf..8c2eb9f82 100644
--- a/code/ryzom/client/data/gamedev/interfaces_v3/macros.xml
+++ b/code/ryzom/client/data/gamedev/interfaces_v3/macros.xml
@@ -200,7 +200,7 @@
-
+
diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp
index 978cc144a..8ba5f769f 100644
--- a/code/ryzom/client/src/commands.cpp
+++ b/code/ryzom/client/src/commands.cpp
@@ -233,14 +233,20 @@ NLMISC_COMMAND(equipGroup, "equip group ", "name")
if(CItemGroupManager::getInstance()->equipGroup(args[0]))
{
ucstring msg = CI18N::get("cmdEquipGroupSuccess");
- strFindReplace(msg, "%name", args[0]);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(args[0]);
+ strFindReplace(msg, "%name", nameUC);
pIM->displaySystemInfo(msg);
return true;
}
else
{
ucstring msg = CI18N::get("cmdEquipGroupError");
- strFindReplace(msg, "%name", args[0]);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(args[0]);
+ strFindReplace(msg, "%name", nameUC);
pIM->displaySystemInfo(msg);
return false;
}
@@ -261,7 +267,10 @@ NLMISC_COMMAND(moveGroup, "move group to ", "name dst")
if(CItemGroupManager::getInstance()->moveGroup(args[0], INVENTORIES::toInventory(args[1])))
{
ucstring msg = CI18N::get("cmdMoveGroupSuccess");
- strFindReplace(msg, "%name", args[0]);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(args[0]);
+ strFindReplace(msg, "%name", nameUC);
strFindReplace(msg, "%inventory", args[1]);
pIM->displaySystemInfo(msg);
return true;
@@ -269,7 +278,10 @@ NLMISC_COMMAND(moveGroup, "move group to ", "name dst")
else
{
ucstring msg = CI18N::get("cmdMoveGroupError");
- strFindReplace(msg, "%name", args[0]);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(args[0]);
+ strFindReplace(msg, "%name", nameUC);
strFindReplace(msg, "%inventory", args[1]);
pIM->displaySystemInfo(msg);
return false;
@@ -297,14 +309,20 @@ NLMISC_COMMAND(createGroup, "create group [true](create a for ev
msg = CI18N::get("cmdCreateGroupSuccess2");
else
msg = CI18N::get("cmdCreateGroupSuccess1");
- strFindReplace(msg, "%name", args[0]);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(args[0]);
+ strFindReplace(msg, "%name", nameUC);
pIM->displaySystemInfo(msg);
return true;
}
else
{
ucstring msg = CI18N::get("cmdCreateGroupError");
- strFindReplace(msg, "%name", args[0]);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(args[0]);
+ strFindReplace(msg, "%name", nameUC);
pIM->displaySystemInfo(msg);
return false;
}
@@ -325,14 +343,20 @@ NLMISC_COMMAND(deleteGroup, "delete group ", "name")
if(CItemGroupManager::getInstance()->deleteGroup(args[0]))
{
ucstring msg = CI18N::get("cmdDeleteGroupSuccess");
- strFindReplace(msg, "%name", args[0]);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(args[0]);
+ strFindReplace(msg, "%name", nameUC);
pIM->displaySystemInfo(msg);
return true;
}
else
{
ucstring msg = CI18N::get("cmdDeleteGroupError");
- strFindReplace(msg, "%name", args[0]);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(args[0]);
+ strFindReplace(msg, "%name", nameUC);
pIM->displaySystemInfo(msg);
return false;
}
diff --git a/code/ryzom/client/src/interface_v3/action_handler_item.cpp b/code/ryzom/client/src/interface_v3/action_handler_item.cpp
index 371316882..d15ae130c 100644
--- a/code/ryzom/client/src/interface_v3/action_handler_item.cpp
+++ b/code/ryzom/client/src/interface_v3/action_handler_item.cpp
@@ -2041,7 +2041,10 @@ class CHandlerItemMenuCheck : public IActionHandler
{
std::string name = groupNames[i];
std::string ahParams = "name=" + name;
- pGroupMenu->addLine(ucstring(name), "", "", name);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(name);
+ pGroupMenu->addLine(nameUC, "", "", name);
CGroupSubMenu* pNewSubMenu = new CGroupSubMenu(CViewBase::TCtorParam());
pGroupMenu->setSubMenu(pGroupMenu->getNumLine()-1, pNewSubMenu);
if(pNewSubMenu)
@@ -2322,14 +2325,8 @@ REGISTER_ACTION_HANDLER( CHandlerRingXpCatalyserStopUse, "ring_xp_catalyser_stop
// item groups
class CHandlerItemGroupMove : public IActionHandler
{
- void execute (CCtrlBase *caller, const std::string &sParams)
+ void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
{
- CDBCtrlSheet* pCS = dynamic_cast(caller);
- if(!pCS)
- {
- nlinfo("Wrong cast");
- return;
- }
std::string destination = getParam(sParams, "destination");
std::string name = getParam(sParams, "name");
if(name.empty())
@@ -2347,14 +2344,8 @@ REGISTER_ACTION_HANDLER(CHandlerItemGroupMove, "item_group_move");
// ***************************************************************************
class CHandlerItemGroupEquip : public IActionHandler
{
- void execute (CCtrlBase *caller, const std::string & sParams)
+ void execute (CCtrlBase * /* pCaller */, const std::string & sParams)
{
- CDBCtrlSheet* pCS = dynamic_cast(caller);
- if(!pCS)
- {
- nlinfo("Wrong cast");
- return;
- }
std::string name = getParam(sParams, "name");
if(name.empty())
{
diff --git a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp
index 5195d0b51..e21872018 100644
--- a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp
+++ b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp
@@ -187,8 +187,8 @@ static inline bool isUrlTag(const ucstring &s, ucstring::size_type index, ucstri
if (isUrl && i > 0 && !markdown)
{
// '}' is in the list because of color tags, ie "@{FFFF}http://..."
- const ucchar chars[] = {' ', '"', '\'', '(', '[', '}'};
- isUrl = std::find(std::begin(chars), std::end(chars), s[i - 1]) != std::end(chars);
+ const vector chars {' ', '"', '\'', '(', '[', '}'};
+ isUrl = std::find(chars.begin(), chars.end(), s[i - 1]) != chars.end();
}
return isUrl;
}
diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp
index 6088a3e52..b9cadad5c 100644
--- a/code/ryzom/client/src/interface_v3/music_player.cpp
+++ b/code/ryzom/client/src/interface_v3/music_player.cpp
@@ -353,6 +353,11 @@ public:
continue;
}
+ if (!CFile::fileExists(filenames[i])) {
+ nlwarning("Ignore non-existing file '%s'", filenames[i].c_str());
+ continue;
+ }
+
CMusicPlayer::CSongs song;
song.Filename = filenames[i];
SoundMngr->getMixer()->getSongTitle(filenames[i], song.Title, song.Length);
diff --git a/code/ryzom/client/src/item_group_manager.cpp b/code/ryzom/client/src/item_group_manager.cpp
index 14ea4aceb..6584060ff 100644
--- a/code/ryzom/client/src/item_group_manager.cpp
+++ b/code/ryzom/client/src/item_group_manager.cpp
@@ -13,6 +13,9 @@
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
+
+#include "stdpch.h"
+
#include "item_group_manager.h"
#include "interface_v3/inventory_manager.h"
#include "nel/gui/widget_manager.h"
@@ -473,7 +476,8 @@ bool CItemGroupManager::equipGroup(std::string name, bool pullBefore)
}
// For some reason, there is no (visual) invalidation (server still blocks any action), force one
// Unfortunately, there is no clean way to do this, so we'll simulate one
- fakeInvalidActions((NLMISC::TGameCycle)maxEquipTime);
+ if(maxEquipTime > 0)
+ fakeInvalidActions((NLMISC::TGameCycle)maxEquipTime);
return true;
}
@@ -489,8 +493,10 @@ bool CItemGroupManager::createGroup(std::string name, bool removeUnequiped)
{
SLOT_EQUIPMENT::TSlotEquipment slot = (SLOT_EQUIPMENT::TSlotEquipment)i;
//Instead of doing two separate for, just be a bit tricky for hand equipment
- if(slot == SLOT_EQUIPMENT::HANDR || slot == SLOT_EQUIPMENT::HANDL)
- pCS = CInventoryManager::getInstance()->getHandSheet((uint32)(slot - SLOT_EQUIPMENT::HANDL));
+ if(slot == SLOT_EQUIPMENT::HANDR)
+ pCS = CInventoryManager::getInstance()->getHandSheet(0);
+ else if(slot == SLOT_EQUIPMENT::HANDL)
+ pCS = CInventoryManager::getInstance()->getHandSheet(1);
else
pCS = CInventoryManager::getInstance()->getEquipSheet(i);
if(!pCS) continue;
@@ -534,7 +540,10 @@ void CItemGroupManager::listGroup()
{
CItemGroup group = _Groups[i];
ucstring msg = NLMISC::CI18N::get("cmdListGroupLine");
- NLMISC::strFindReplace(msg, "%name", group.name);
+ //Use ucstring because group name can contain accentued characters (and stuff like that)
+ ucstring nameUC;
+ nameUC.fromUtf8(group.name);
+ NLMISC::strFindReplace(msg, "%name", nameUC);
NLMISC::strFindReplace(msg, "%size", NLMISC::toString(group.Items.size()));
pIM->displaySystemInfo(msg);
}
@@ -604,7 +613,14 @@ std::vector CItemGroupManager::matchingItems(CItemGroup *group,
SLOT_EQUIPMENT::TSlotEquipment slot;
if(group->contains(pCS, slot))
{
- out.push_back(CInventoryItem(pCS, inventory, i, slot));
+ //Sometimes, index in the list differ from the index in DB, and we need the index in DB, not the one from the list
+ std::string dbPath = pCS->getSheet();
+ std::size_t found = dbPath.find_last_of(":");
+ std::string indexS = dbPath.substr(found+1);
+ uint32 index;
+ NLMISC::fromString(indexS, index);
+ if(i != index) nldebug("Index from list is %d, where index from DB is %d", i, index);
+ out.push_back(CInventoryItem(pCS, inventory, index, slot));
}
}
diff --git a/code/ryzom/server/src/logger_service/log_query.h b/code/ryzom/server/src/logger_service/log_query.h
index 5c2d6d460..bb0e99315 100644
--- a/code/ryzom/server/src/logger_service/log_query.h
+++ b/code/ryzom/server/src/logger_service/log_query.h
@@ -22,6 +22,7 @@
#include
#include
+#include
#include "nel/misc/common.h"
@@ -61,7 +62,7 @@ struct TTimeSlice
uint32 EndDate;
};
-const TTimeSlice FullTimeSlice = {0, ~0};
+const TTimeSlice FullTimeSlice = {0, std::numeric_limits::max()};
/// Defile the complete selected time line
typedef std::vector TTimeLine;