Browse Source

Corrected guild bound item retrieval deletion
* Corrected a SQL statement deleting all guild bound items in the inventory table for offline characters.
Thanks to @Canoe!

aleos89 7 years ago
parent
commit
4c62f581a8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/char/int_storage.c

+ 1 - 1
src/char/int_storage.c

@@ -393,7 +393,7 @@ bool mapif_parse_itembound_retrieve(int fd)
 
 
 	// Delete bound items from player's inventory
 	// Delete bound items from player's inventory
 	StringBuf_Clear(&buf);
 	StringBuf_Clear(&buf);
-	StringBuf_Printf(&buf, "DELETE FROM `%s` WHERE `bound` = %d",schema_config.inventory_db, BOUND_GUILD);
+	StringBuf_Printf(&buf, "DELETE FROM `%s` WHERE `char_id` = %d AND `bound` = %d",schema_config.inventory_db, char_id, BOUND_GUILD);
 	if( SQL_ERROR == SqlStmt_PrepareStr(stmt, StringBuf_Value(&buf)) ||
 	if( SQL_ERROR == SqlStmt_PrepareStr(stmt, StringBuf_Value(&buf)) ||
 		SQL_ERROR == SqlStmt_Execute(stmt) )
 		SQL_ERROR == SqlStmt_Execute(stmt) )
 	{
 	{