Changed the skill_db.txt skill names in comments into actual columns, now the server reads these instead of a hardcoded array (see topic:170438).

Corrected skill db loading code which was using a totally wrong column count in sevreal cases (or didn't do any checks at all).
Cleaned up skill db lookup code
 * added some well-behaved functions to replace macros (skill_get_index)
 * used skill_get_index() to replace often occuring blocks of code that did the skill_id -> skilldb_index calculation in-line

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11657 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage 2007-11-05 08:59:19 +00:00
parent ac61217898
commit f7d4427c1a
4 changed files with 832 additions and 1467 deletions

View File

@ -3,6 +3,15 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2007/11/05
* Cleaned up skill db lookup code
- added some well-behaved functions to replace macros (skill_get_index)
- used skill_get_index() to replace often occuring blocks of code
that did the skill_id -> skilldb_index calculation in-line
* Corrected skill db loading code which was using a totally wrong
column count in sevreal cases (or didn't do any checks at all)
* Changed the skill_db.txt skill names in comments into actual columns,
now the server reads these instead of a hardcoded array [ultramage]
2007/11/04 2007/11/04
* Implemented official drop rate estimation [Playtester] * Implemented official drop rate estimation [Playtester]
- estimation is rounded on 2 positions after decimal point - estimation is rounded on 2 positions after decimal point

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -61,8 +61,8 @@
// スキルデ?タベ?ス // スキルデ?タベ?ス
struct s_skill_db { struct s_skill_db {
char *name; char name[20];
char *desc; char desc[40];
int range[MAX_SKILL_LEVEL],hit,inf,element[MAX_SKILL_LEVEL],nk,splash[MAX_SKILL_LEVEL],max; int range[MAX_SKILL_LEVEL],hit,inf,element[MAX_SKILL_LEVEL],nk,splash[MAX_SKILL_LEVEL],max;
int num[MAX_SKILL_LEVEL]; int num[MAX_SKILL_LEVEL];
int cast[MAX_SKILL_LEVEL],walkdelay[MAX_SKILL_LEVEL],delay[MAX_SKILL_LEVEL]; int cast[MAX_SKILL_LEVEL],walkdelay[MAX_SKILL_LEVEL],delay[MAX_SKILL_LEVEL];