From 7add4a1728717d51fbd9d2aebaadd6893b5ad01c Mon Sep 17 00:00:00 2001 From: Venseer Date: Tue, 29 Oct 2024 19:09:45 -0300 Subject: [PATCH] Improved atCommand(iteminfo) --- src/map/atcommand.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index e3fc633d86f..e629f58082f 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -7720,11 +7720,19 @@ ACMD(iteminfo) for (i = 0; i < count; i++) { struct item_data *item_data = item_array[i]; if (item_data != NULL) { + + struct item link_item = { 0 }; + link_item.nameid = item_data->nameid; + StringBuf buf; + StrBuf->Init(&buf); + clif->format_itemlink(&buf, &link_item); + snprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, MSGTBL_ITEMINFO_DETAILS), // Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s - item_data->name, item_data->jname, item_data->slot, item_data->nameid, + item_data->name, StrBuf->Value(&buf), item_data->nameid, itemdb->typename(item_data->type), (item_data->script == NULL) ? msg_fd(fd, MSGTBL_ITEMINFO_NONE) : msg_fd(fd, MSGTBL_ITEMINFO_WITH_SCRIPT) // None / With script ); + StrBuf->Destroy(&buf); clif->message(fd, atcmd_output); snprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, MSGTBL_ITEMINFO_NPC_DETAILS), item_data->value_buy, item_data->value_sell, item_data->weight / 10.); // NPC Buy:%dz, Sell:%dz | Weight: %.1f