Hi there,
i would like to add this to hercules. Unfortunetly there so much error appear. Please helpme
@item patch
could anyone make fix for this?
i would like to add this to hercules. Unfortunetly there so much error appear. Please helpme
@item patch
Code:
Index: atcommand.c===================================================================--- atcommand.c (revision 14843)+++ atcommand.c (working copy)@@ -1576,6 +1576,7 @@{ char item_name[100]; int number = 0, item_id, flag;+ int itemid, level; //To Check the item_deny from sql [Vengence] struct item item_tmp; struct item_data *item_data; int get_count, i;@@ -1602,6 +1603,27 @@ } item_id = item_data->nameid;+ //To Check the item_deny from sql [Vengence]+ if(SQL_ERROR == Sql_Query(mmysql_handle, "SELECT * FROM `item_deny` WHERE `itemid` = '%d'",item_id))+ {+ Sql_ShowDebug(mmysql_handle);+ }+ else+ {+ while( SQL_SUCCESS == Sql_NextRow(mmysql_handle) )+ {+ char *data;+ Sql_GetData(mmysql_handle, 0, &data, NULL);+ itemid = atoi(data);+ Sql_GetData(mmysql_handle, 1, &data, NULL);+ level = atoi(data);+ }+ }+ if (item_id == itemid && pc_isGM(sd) < level) {+ clif_displaymessage(sd->fd, "You are restricted from creating this item.");+ return -1;+ }+ get_count = number; //Check if it's stackable. if (!itemdb_isstackable2(item_data))
Last edited by a moderator: