diff options
author | shennetsind <ind@henn.et> | 2013-05-06 19:04:30 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-06 19:04:30 -0300 |
commit | d95d6891713747e058b2cedf7e5811a6918f71d4 (patch) | |
tree | 7896ca5837126d4b099833306e93c485a399dcbf | |
parent | 8cc9012eb7e064677d2c9fa74fe1d1a09f90b581 (diff) | |
download | hercules-d95d6891713747e058b2cedf7e5811a6918f71d4.tar.gz hercules-d95d6891713747e058b2cedf7e5811a6918f71d4.tar.bz2 hercules-d95d6891713747e058b2cedf7e5811a6918f71d4.tar.xz hercules-d95d6891713747e058b2cedf7e5811a6918f71d4.zip |
Fixed support for 5k skill ids
Thanks to malufett :3
Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r-- | src/common/mmo.h | 2 | ||||
-rw-r--r-- | src/map/skill.c | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h index 7bbcd65cd..257a3b42d 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -79,7 +79,7 @@ #define MAX_ZENY 1000000000 #define MAX_FAME 1000000000 #define MAX_CART 100 -#define MAX_SKILL 1460 +#define MAX_SKILL 1477 #define MAX_SKILL_ID 10015 //[Ind/Hercules] max used skill id #define GLOBAL_REG_NUM 256 // max permanent character variables per char #define ACCOUNT_REG_NUM 64 // max permanent local account variables per account diff --git a/src/map/skill.c b/src/map/skill.c index a1a8d84bc..d29861f4c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -156,14 +156,16 @@ int skill_get_index( uint16 skill_id ) { skill_id = HM_SKILLRANGEMIN + skill_id - HM_SKILLBASE; //[Ind/Hercules] GO GO GO LESS! - http://hercules.ws/board/topic/512-skill-id-processing-overhaul/ else if( skill_id > 1019 && skill_id < 8001 ) { - if( skill_id < 2057 ) // 1020 - 2000 are empty + if( skill_id < 2058 ) // 1020 - 2000 are empty skill_id = 1020 + skill_id - 2001; - else if( skill_id < 2549 ) // 2057 - 2200 are empty - skill_id = (1020+57) + skill_id - 2201; + else if( skill_id < 2549 ) // 2058 - 2200 are empty + skill_id = (1020+56) + skill_id - 2201; else if ( skill_id < 3036 ) // 2549 - 3000 are empty - skill_id = (1020+57+348) + skill_id - 3001; - else if ( skill_id < 5019 ) //3036 - 5000 are empty - skill_id = (1020+57+348+1966) + skill_id - 5001; + skill_id = (1020+56+348) + skill_id - 3001; + else if ( skill_id < 5019 ) // 3036 - 5000 are empty + skill_id = (1020+56+348+35) + skill_id - 5001; + else + ShowWarning("skill_get_index: skill id '%d' is not being handled!\n",skill_id); } // validate result @@ -17412,7 +17414,7 @@ bool skill_parse_row_skilldb(char* split[], int columns, int current) { safestrncpy(skill_db[idx].name, trim(split[15]), sizeof(skill_db[idx].name)); safestrncpy(skill_db[idx].desc, trim(split[16]), sizeof(skill_db[idx].desc)); strdb_iput(skilldb_name2id, skill_db[idx].name, skill_id); - + return true; } |