@@ -7718,14 +7718,22 @@ ACMD(iteminfo)
7718
7718
clif -> message (fd , atcmd_output );
7719
7719
count = MAX_SEARCH ;
7720
7720
}
7721
+ StringBuf buf ;
7722
+ StrBuf -> Init (& buf );
7721
7723
for (i = 0 ; i < count ; i ++ ) {
7722
7724
struct item_data * item_data = item_array [i ];
7723
7725
if (item_data != NULL ) {
7724
- snprintf (atcmd_output , sizeof (atcmd_output ), msg_fd (fd , MSGTBL_ITEMINFO_DETAILS ), // Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s
7725
- item_data -> name , item_data -> jname , item_data -> slot , item_data -> nameid ,
7726
+
7727
+ struct item link_item = { 0 };
7728
+ link_item .nameid = item_data -> nameid ;
7729
+ clif -> format_itemlink (& buf , & link_item );
7730
+
7731
+ snprintf (atcmd_output , sizeof (atcmd_output ), msg_fd (fd , MSGTBL_ITEMINFO_DETAILS ), // Item: '%s'/'%s' (%d) Type: %s | Extra Effect: %s
7732
+ item_data -> name , StrBuf -> Value (& buf ), item_data -> nameid ,
7726
7733
itemdb -> typename (item_data -> type ),
7727
7734
(item_data -> script == NULL ) ? msg_fd (fd , MSGTBL_ITEMINFO_NONE ) : msg_fd (fd , MSGTBL_ITEMINFO_WITH_SCRIPT ) // None / With script
7728
7735
);
7736
+ StrBuf -> Clear (& buf );
7729
7737
clif -> message (fd , atcmd_output );
7730
7738
7731
7739
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
@@ -7742,6 +7750,7 @@ ACMD(iteminfo)
7742
7750
clif -> message (fd , atcmd_output );
7743
7751
}
7744
7752
}
7753
+ StrBuf -> Destroy (& buf );
7745
7754
return true;
7746
7755
}
7747
7756
0 commit comments