* Fixed pet database reading displaying wrong amount of read entries per file (bugreport:4797).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14746 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ai4rei
2011-03-15 18:48:05 +00:00
parent 9f7d93be5a
commit dd28b6b2b1
2 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
Date Added
2011/03/15
* Fixed pet database reading displaying wrong amount of read entries per file (bugreport:4797). [Ai4rei]
* Fixed canceling item appraisal window (Magnifier and Identify) would prevent players from using any follow up skills (bugreport:4809, since r14545). [Ai4rei]
* Fixed monsters getting warped when stepping on an NPC warp when at least one of the bits of setting 'mob_warp' was set (bugreport:4766, since r12757). [Ai4rei]
2011/03/14

View File

@@ -1220,7 +1220,7 @@ int read_petdb()
for( i = 0; i < ARRAYLENGTH(filename); i++ )
{
char line[1024];
int lines;
int lines, entries;
sprintf(line, "%s/%s", db_path, filename[i]);
fp=fopen(line,"r");
@@ -1231,7 +1231,7 @@ int read_petdb()
continue;
}
lines = 0;
lines = entries = 0;
while( fgets(line, sizeof(line), fp) && j < MAX_PET_DB )
{
char *str[22], *p;
@@ -1326,12 +1326,13 @@ int read_petdb()
pet_db[j].equip_script = parse_script(str[21], filename[i], lines, 0);
j++;
entries++;
}
if( j >= MAX_PET_DB )
ShowWarning("read_petdb: Reached max number of pets [%d]. Remaining pets were not read.\n ", MAX_PET_DB);
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' pets in '"CL_WHITE"%s"CL_RESET"'.\n",j,filename[i]);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' pets in '"CL_WHITE"%s"CL_RESET"'.\n", entries, filename[i]);
}
return 0;
}