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 /src/map | |
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>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/skill.c | 16 |
1 files changed, 9 insertions, 7 deletions
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; } |