Selaa lähdekoodia

- Small change in the random item reading function, may fix @itemdbreload messing up random item searches.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5630 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 vuotta sitten
vanhempi
commit
0ada26b85f
2 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 2 0
      Changelog-Trunk.txt
  2. 2 0
      src/map/itemdb.c

+ 2 - 0
Changelog-Trunk.txt

@@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/03/16
+	* Small change in the random item reading function, may fix @itemdbreload
+	  messing up random item searches. [Skotlex]
 	* Restricted GS_BULLSEYE to only be used on demi-human or brute monster targets [MasterOfMuppets]
 2006/03/15
 	* mob_chat_sub fix. Added buildin_pcblockmove. [Lance]

+ 2 - 0
src/map/itemdb.c

@@ -407,6 +407,8 @@ static int itemdb_read_randomitem(void)
 		char *fn=(char *) data[i].filename;
 
 		*pdefault = 0;
+		*pc = 0; //zero the count in case we are reloading. [Skotlex]
+		
 		sprintf(line, "%s/%s", db_path, fn);
 		if( (fp=fopen(line,"r"))==NULL ){
 			ShowError("can't read %s\n",line);