diff --git a/code/ryzom/server/src/entities_game_service/admin.cpp b/code/ryzom/server/src/entities_game_service/admin.cpp index 801b6dd22..44a48d3be 100644 --- a/code/ryzom/server/src/entities_game_service/admin.cpp +++ b/code/ryzom/server/src/entities_game_service/admin.cpp @@ -4720,9 +4720,6 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " createItem(quality, quantity, sheetId); + CGameItemPtr new_item; + string sheet = command_args[1]; + + if ( sheet.find(".sitem") == string::npos ) // try named item + { + new_item = CNamedItems::getInstance().createNamedItem(command_args[1], quantity); + if (new_item == NULL) + return true; + } + else + { + const CSheetId sheetId(sheet); + if (sheetId == CSheetId::Unknown) + return true; + new_item = c->createItem(quality, quantity, sheetId); + } if (!c->addItemToInventory(inventory, new_item)) {