summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2015-01-11 01:51:34 +0100
committerHaruna <haru@dotalux.com>2015-01-11 01:51:34 +0100
commita00224b44b7b3380a08bb28618d1d98f40173619 (patch)
treeb7f6b409e3138d7dbb45b50c2d8e97719e9bb7a3 /src/map/unit.c
parente62020c7113ed1602babd902d15ca655c822fe8f (diff)
parentd51196ba94491780a7d70c07db119812b20a5f23 (diff)
downloadhercules-a00224b44b7b3380a08bb28618d1d98f40173619.tar.gz
hercules-a00224b44b7b3380a08bb28618d1d98f40173619.tar.bz2
hercules-a00224b44b7b3380a08bb28618d1d98f40173619.tar.xz
hercules-a00224b44b7b3380a08bb28618d1d98f40173619.zip
Merge pull request #434 from csnv/minfixes
INF2_NOLP update. BL direction fixes. Combo minimum time increased.
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index deb061f78..7f41f4709 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1599,6 +1599,8 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
ud->skill_lv = skill_lv;
if( casttime > 0 ) {
+ if (src->id != target->id) // self-targeted skills shouldn't show different direction
+ unit->setdir(src, map->calc_dir(src, target->x, target->y));
ud->skilltimer = timer->add( tick+casttime, skill->castend_id, src->id, 0 );
if( sd && (pc->checkskill(sd,SA_FREECAST) > 0 || skill_id == LG_EXEEDBREAK) )
status_calc_bl(&sd->bl, SCB_SPEED);
@@ -1742,6 +1744,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui
// in official this is triggered even if no cast time.
clif->skillcasting(src, src->id, 0, skill_x, skill_y, skill_id, skill->get_ele(skill_id, skill_lv), casttime);
if( casttime > 0 ) {
+ unit->setdir(src, map->calc_dir(src, skill_x, skill_y));
ud->skilltimer = timer->add( tick+casttime, skill->castend_pos, src->id, 0 );
if( (sd && pc->checkskill(sd,SA_FREECAST) > 0) || skill_id == LG_EXEEDBREAK)
status_calc_bl(&sd->bl, SCB_SPEED);
@@ -2170,6 +2173,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) {
}
if(ud->state.attack_continue) {
+ unit->setdir(src, map->calc_dir(src, target->x, target->y));
if( src->type == BL_PC && battle_config.idletime_criteria & BCIDLE_ATTACK )
((TBL_PC*)src)->idletime = sockt->last_tick;
ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0);