From 77dbedae0086df4dd4811c58b17f54b0a8ae1300 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 5 Mar 2012 11:59:00 +0100 Subject: [PATCH] Changed: #1433 Merge changes from patch 1.13 --- .../src/entities_game_service/admin.cpp | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) 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)) {