Added error reporting for invalid rows in skill db files.
Fixed skill_castnodex_db.txt not being parsed correctly. Fixed a search&replace typo in skill_db.txt. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11728 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
2d71189702
commit
e12b04e850
@ -4,6 +4,9 @@ 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.
|
||||
|
||||
2007/11/14
|
||||
* Fixed skill_castnodex_db.txt not being parsed correctly
|
||||
* Fixed a search&replace typo in skill_db.txt
|
||||
* Added error reporting for invalid rows in skill db files
|
||||
* Added error reporting to buildin_warp when it fails [ultramage]
|
||||
2007/11/13
|
||||
* Fixed homunculus skills having unlimited range instead of being
|
||||
|
@ -123,7 +123,7 @@
|
||||
79,9,8,2,6,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0 ,PR_MAGNUS,Magnus Exorcismus
|
||||
80,9,8,2,3,0x20,1:1:1:1:1:2:2:2:2:2:2,10,3:4:5:6:7:8:9:10:11:12:12,yes,0,0x80,5,magic,0 ,WZ_FIREPILLAR,Fire Pillar
|
||||
81,0,6,4,3,0,3,10,1,yes,0,0,0,magic,5 ,WZ_SIGHTRASHER,Sightrasher
|
||||
,82,9,6,2,3,0,0,10,1,yes,0,0,0,magic,0 ,WZ_FIREIVY,Fire Ivy
|
||||
//82,9,6,2,3,0,0,10,1,yes,0,0,0,magic,0 ,WZ_FIREIVY,Fire Ivy
|
||||
83,9,8,2,3,0,3:3:3:3:3:3:3:3:3:3:14,10,1:1:2:2:3:3:4:4:5:5:15,yes,0,0,0,magic,0 ,WZ_METEOR,Meteor Storm
|
||||
84,9,8,1,4,0,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,2:3:3:4:4:5:5:6:6:7 ,WZ_JUPITEL,Jupitel Thunder
|
||||
85,9,8,2,4,0,0,10,-10,yes,0,0,0,magic,0 ,WZ_VERMILION,Lord of Vermilion
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include "charcommand.h"
|
||||
#include "log.h"
|
||||
#include "irc.h"
|
||||
#include "npc.h"
|
||||
#ifndef TXT_ONLY
|
||||
#include "mail.h"
|
||||
#endif
|
||||
|
@ -10733,7 +10733,8 @@ static bool skill_read_csvdb( const char* directory, const char* filename, int m
|
||||
continue;
|
||||
//TODO: strip trailing // comment
|
||||
//TODO: strip trailing whitespace
|
||||
//TODO: skip empty lines
|
||||
if( line[0] == '\0' || line[0] == '\n' )
|
||||
continue;
|
||||
|
||||
memset(split,0,sizeof(split));
|
||||
columns = skill_split_str(line,split,ARRAYLENGTH(split));
|
||||
@ -10751,8 +10752,14 @@ static bool skill_read_csvdb( const char* directory, const char* filename, int m
|
||||
}
|
||||
|
||||
// parse this row
|
||||
if( parseproc(split, columns, entries) )
|
||||
entries++;
|
||||
if( !parseproc(split, columns, entries) )
|
||||
{
|
||||
ShowError("skill_read_csvdb: Could not process contents of line %d of \"%s\".\n", lines, path);
|
||||
continue; // invalid row contents?
|
||||
}
|
||||
|
||||
// success!
|
||||
entries++;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
@ -11016,9 +11023,8 @@ static bool skill_parse_row_castnodexdb(char* split[], int columns, int current)
|
||||
return false;
|
||||
|
||||
skill_split_atoi(split[1],skill_db[i].castnodex);
|
||||
if( !split[2] ) // optional column
|
||||
return false;
|
||||
skill_split_atoi(split[2],skill_db[i].delaynodex);
|
||||
if( split[2] ) // optional column
|
||||
skill_split_atoi(split[2],skill_db[i].delaynodex);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user