Jelajahi Sumber

- Small change in pc_additem that could be fixing the current bug with it.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6660 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 tahun lalu
induk
melakukan
1f864cfee8
2 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/pc.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/05/19
+	* Small change in pc_additem that could be fixing the current bug with new
+	  items not getting added. [Skotlex]
 	* Fixed loginlog definition in main.sql, thanks to Tempesta [Skotlex]
 	* Likely fixed the mob-skill random picking behaviour causing infinite
 	  loops sometimes. [Skotlex]

+ 1 - 1
src/map/pc.c

@@ -2423,7 +2423,7 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
 		// clear equips field first, just in case
 		if (item_data->equip)
 			item_data->equip = 0;
-		memcpy(&sd->status.inventory[i], item_data, sizeof(item_data));
+		memcpy(&sd->status.inventory[i], item_data, sizeof(sd->status.inventory[0]));
 		sd->status.inventory[i].amount = amount;
 		sd->inventory_data[i] = data;
 		clif_additem(sd,i,amount,0);