From 91fa13f861e8b73f048375a237a4a7cbf33e3370 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 6 Apr 2006 00:02:50 +0000 Subject: - 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 --- src/map/status.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') 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