summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-06 00:02:50 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-06 00:02:50 +0000
commit91fa13f861e8b73f048375a237a4a7cbf33e3370 (patch)
tree7a1798ce9eb74c607f3f489a5f5e4538e1bad13f /src/map
parent8ac081660afbb0bb829a50acecc405730ce7c96f (diff)
downloadhercules-91fa13f861e8b73f048375a237a4a7cbf33e3370.tar.gz
hercules-91fa13f861e8b73f048375a237a4a7cbf33e3370.tar.bz2
hercules-91fa13f861e8b73f048375a237a4a7cbf33e3370.tar.xz
hercules-91fa13f861e8b73f048375a237a4a7cbf33e3370.zip
- Modified the item_db and added view_types to ammo: 1 arrows, 2 dagger (venom knife), 3 bullets, 4 shells, 5 grenades, 6 shurikens, 7 kunais.
- Fixed parsing of job_db1.txt due to the MAX_WEAPON_TYPE change. - Updated skill_require_db to specify the ammo types required for GS/NJ skills (as best as I could understand them) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5916 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/status.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index f287c5c20..0c6d6d6fb 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5864,28 +5864,34 @@ int status_readdb(void) {
ShowError("can't read %s\n", path);
return 1;
}
+ i = 0;
while(fgets(line, sizeof(line)-1, fp)){
- char *split[MAX_WEAPON_TYPE + 6];
+ char *split[MAX_WEAPON_TYPE + 5];
+ i++;
if(line[0]=='/' && line[1]=='/')
continue;
- for(j=0,p=line;j< (MAX_WEAPON_TYPE + 6) && p;j++){ //not 22 anymore [blackhole89]
+ for(j=0,p=line;j<(MAX_WEAPON_TYPE + 5) && p;j++){ //not 22 anymore [blackhole89]
split[j]=p;
p=strchr(p,',');
if(p) *p++=0;
}
- if(j < MAX_WEAPON_TYPE + 6) //Weapon #.MAX_WEAPON_TYPE is constantly not load. Fix to that: replace < with <= [blackhole89]
+ if(j < MAX_WEAPON_TYPE + 5)
+ { //Weapon #.MAX_WEAPON_TYPE is constantly not load. Fix to that: replace < with <= [blackhole89]
+ ShowDebug("%s: Not enough columns at line %d\n", i, j);
continue;
+ }
if(atoi(split[0])>=MAX_PC_CLASS)
continue;
+
max_weight_base[atoi(split[0])]=atoi(split[1]);
hp_coefficient[atoi(split[0])]=atoi(split[2]);
hp_coefficient2[atoi(split[0])]=atoi(split[3]);
sp_coefficient[atoi(split[0])]=atoi(split[4]);
- for(j=0;j<=MAX_WEAPON_TYPE;j++)
+ for(j=0;j<MAX_WEAPON_TYPE;j++)
aspd_base[atoi(split[0])][j]=atoi(split[j+5]);
}
fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","job_db1.txt");
+ ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
sprintf(path, "%s/job_db2.txt", db_path);