diff options
author | panikon <panikon@zoho.com> | 2014-07-05 13:18:51 -0300 |
---|---|---|
committer | panikon <panikon@zoho.com> | 2014-07-05 13:18:51 -0300 |
commit | 3d87a990181fb8e6654ba18c6821106e87c88141 (patch) | |
tree | 48303f67cdf05bab6a777e047860901425a8b0b1 /src/map/unit.c | |
parent | 91057aae931adf43580f4bc19d2f84b3157c819e (diff) | |
download | hercules-3d87a990181fb8e6654ba18c6821106e87c88141.tar.gz hercules-3d87a990181fb8e6654ba18c6821106e87c88141.tar.bz2 hercules-3d87a990181fb8e6654ba18c6821106e87c88141.tar.xz hercules-3d87a990181fb8e6654ba18c6821106e87c88141.zip |
Corrected HT_POWER behaviour, combo and type of skill, and fixed TK-combos walking delay (issue: 8241 http://hercules.ws/board/tracker/issue-8241-cant-move-during-certain-combos/)
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 95feb2a1d..83a98de8c 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -380,8 +380,12 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) unit->set_target(ud, 0); sc = status->get_sc(bl); - if (sc && (sc->data[SC_CONFUSION] || sc->data[SC__CHAOS])) //Randomize the target position - map->random_dir(bl, &ud->to_x, &ud->to_y); + if( sc ) { + if( sc->data[SC_CONFUSION] || sc->data[SC__CHAOS] ) //Randomize the target position + map->random_dir(bl, &ud->to_x, &ud->to_y); + if( sc->data[SC_COMBOATTACK] ) + status_change_end(bl, SC_COMBOATTACK, INVALID_TIMER); + } if(ud->walktimer != INVALID_TIMER) { // When you come to the center of the grid because the change of destination while you're walking right now @@ -1103,7 +1107,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui ) { if (sc->data[SC_COMBOATTACK]->val2) target_id = sc->data[SC_COMBOATTACK]->val2; - else + else if( skill->get_inf(skill_id) != 1 ) // Only non-targetable skills should use auto target target_id = ud->target; if( skill->get_inf(skill_id)&INF_SELF_SKILL && skill->get_nk(skill_id)&NK_NO_DAMAGE )// exploit fix |