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/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 e8c07f837..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)
diff --git a/code/ryzom/client/src/item_group_manager.cpp b/code/ryzom/client/src/item_group_manager.cpp
index 12486666a..90b8424a6 100644
--- a/code/ryzom/client/src/item_group_manager.cpp
+++ b/code/ryzom/client/src/item_group_manager.cpp
@@ -492,8 +492,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;
@@ -537,7 +539,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);
}
@@ -607,7 +612,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/tools/translation/work/wk.uxt b/code/ryzom/tools/translation/work/wk.uxt
index 6cbaa34d0..25a4f8476 100644
--- a/code/ryzom/tools/translation/work/wk.uxt
+++ b/code/ryzom/tools/translation/work/wk.uxt
@@ -13536,3 +13536,8 @@ cmdListGroupLine [* %name, with %size items inside.]
//interface
uimGroup [Groups]
+//Macro edition
+uiMacroItemGroupEquip [Equip an item group]
+uiMacroItemGroupName [Item group name]
+uiMacroItemGroupMove [Move an item group]
+uiMacroItemGroupDestination [Item group destination]