diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ecommon/init.c | 5 | ||||
-rw-r--r-- | src/emap/init.c | 1 | ||||
-rw-r--r-- | src/emap/skill.c | 14 | ||||
-rw-r--r-- | src/emap/skill.h | 3 | ||||
-rw-r--r-- | src/emap/skill_const.c | 2 | ||||
-rw-r--r-- | src/emap/skill_const.h | 2 | ||||
-rw-r--r-- | src/emap/skill_ground.c | 2 |
7 files changed, 25 insertions, 4 deletions
diff --git a/src/ecommon/init.c b/src/ecommon/init.c index d91792e..f0955e1 100644 --- a/src/ecommon/init.c +++ b/src/ecommon/init.c @@ -45,7 +45,10 @@ void commonClean(void) void common_online(void) { checkVar(MAX_SKILL, 1500); - checkVar(MAX_SKILL_ID, 10037); + checkVar(MAX_SKILL_ID, 20022); checkVar(SC_MAX, 647); checkVar(SI_MAX, 971); + checkVar(OLD_MAX_SKILL_DB, 1478); + checkVar(MAX_EVOL_SKILLS, 22); + checkVar(EVOL_FIRST_SKILL, 20000); } diff --git a/src/emap/init.c b/src/emap/init.c index 280c26e..9d21ab0 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -273,6 +273,7 @@ HPExport void plugin_init (void) addHookPost(mob, read_db_mode_sub, emob_read_db_mode_sub_post); addHookPost(npc, get_viewdata, enpc_get_viewdata_post); addHookPost(skill, check_condition_castend, eskill_check_condition_castend_post); + addHookPost(skill, get_index, eskill_get_index_post); addHookPost(pc, additem, epc_additem_post); addHookPost(pc, isequip, epc_isequip_post); addHookPost(pc, isUseitem, epc_isequip_post); diff --git a/src/emap/skill.c b/src/emap/skill.c index 65f34e1..97bd93e 100644 --- a/src/emap/skill.c +++ b/src/emap/skill.c @@ -24,6 +24,18 @@ #include "plugins/HPMHooking.h" +int eskill_get_index_post(int retVal, + uint16 skill_id) +{ + if (skill_id >= EVOL_FIRST_SKILL && skill_id < EVOL_FIRST_SKILL + MAX_EVOL_SKILLS) + { + // 1478 + skill_id - 20000 + skill_id = OLD_MAX_SKILL_DB + skill_id - EVOL_FIRST_SKILL; + return skill_id; + } + return retVal; +} + int eskill_check_condition_castend_post(int retVal, TBL_PC* sd, uint16 skill_id, @@ -143,7 +155,7 @@ bool eskill_castend_pos2_unknown(struct block_list* src, { switch (*skill_id) { - case EVOL_MASSPROVOKE: + case EVOL_MASS_PROVOKE: return eskill_massprovoke_castend(src, x, y, skill_id, skill_lv, tick, flag); default: ShowWarning("skill_castend_pos2: Unknown skill used:%d\n", *skill_id); diff --git a/src/emap/skill.h b/src/emap/skill.h index db519cb..02c0607 100644 --- a/src/emap/skill.h +++ b/src/emap/skill.h @@ -4,6 +4,9 @@ #ifndef EVOL_MAP_SKILL #define EVOL_MAP_SKILL +int eskill_get_index_post(int retVal, + uint16 skill_id); + int eskill_check_condition_castend_post(int retVal, TBL_PC* sd, uint16 skill_id, diff --git a/src/emap/skill_const.c b/src/emap/skill_const.c index 30e6fde..c5fe22b 100644 --- a/src/emap/skill_const.c +++ b/src/emap/skill_const.c @@ -10,6 +10,6 @@ void eskill_addskill_conststants(void) { script->constdb_comment("Evol skills"); - script->set_constant("EVOL_MASSPROVOKE", EVOL_MASSPROVOKE, false, false); + script->set_constant("EVOL_MASS_PROVOKE", EVOL_MASS_PROVOKE, false, false); script->constdb_comment(NULL); } diff --git a/src/emap/skill_const.h b/src/emap/skill_const.h index 11076e8..762bffb 100644 --- a/src/emap/skill_const.h +++ b/src/emap/skill_const.h @@ -6,7 +6,7 @@ enum { - EVOL_MASSPROVOKE = 10016 + EVOL_MASS_PROVOKE = 20000 }; void eskill_addskill_conststants(void); diff --git a/src/emap/skill_ground.c b/src/emap/skill_ground.c index 7a4ebc2..4422a8d 100644 --- a/src/emap/skill_ground.c +++ b/src/emap/skill_ground.c @@ -64,6 +64,8 @@ bool eskill_massprovoke_castend(struct block_list* src, map->foreachinarea(eskill_massprovoke_sub, src->m, *x - r, *y - r, *x + r, *y + r, BL_MOB, src, dist, &cnt); if (cnt == 0) + { unit->skillcastcancel(src, 1); + } return false; } |