Jelajahi Sumber

- Fixed a logic error that was likely the cause of pet loot drops not working.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6412 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 tahun lalu
induk
melakukan
42fae8721c
2 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 2 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/pet.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/04/30
+	* Fixed a logic error that was likely the cause of pet loot drops not
+	  working. [Skotlex]
 	* If someone is expulsed from a guild while the guild storage is open, it
 	  will be auto-closed now. [Skotlex]
 	* Modified battle_consume_ammo to prevent consuming multiple arrows on

+ 2 - 2
src/map/pet.c

@@ -1120,14 +1120,14 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
 				ditem = ers_alloc(item_drop_ers, struct item_drop);
 				memcpy(&ditem->item_data, it, sizeof(struct item));
 				ditem->next = dlist->item;
-				dlist->item = ditem->next;
+				dlist->item = ditem;
 			}
 		}
 		else {
 			ditem = ers_alloc(item_drop_ers, struct item_drop);
 			memcpy(&ditem->item_data, it, sizeof(struct item));
 			ditem->next = dlist->item;
-			dlist->item = ditem->next;
+			dlist->item = ditem;
 		}
 	}
 	//The smart thing to do is use pd->loot->max (thanks for pointing it out, Shinomori)