diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-11-11 02:40:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-01-14 00:10:46 +0300 |
commit | cae53f2a2c729c7c2fdc6a39f12ffed65e57f797 (patch) | |
tree | 654f51e28112ee6ea838f606e9b9571ae4003cf1 /src | |
parent | dbc54eaa7e6091110e6437066b49a7cf8faea2b8 (diff) | |
download | hercules-cae53f2a2c729c7c2fdc6a39f12ffed65e57f797.tar.gz hercules-cae53f2a2c729c7c2fdc6a39f12ffed65e57f797.tar.bz2 hercules-cae53f2a2c729c7c2fdc6a39f12ffed65e57f797.tar.xz hercules-cae53f2a2c729c7c2fdc6a39f12ffed65e57f797.zip |
Fix assert in unit_resume_running.
Fix issue from http://herc.ws/board/topic/13719-map-error-need-help-here/
Diffstat (limited to 'src')
-rw-r--r-- | src/map/unit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 739a369a6..c4f779c8c 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -668,11 +668,12 @@ void unit_run_hit(struct block_list *bl, struct status_change *sc, struct map_se ud->state.running = 0; status_change_end(bl, type, INVALID_TIMER); - if( type == SC_RUN ) { - skill->blown(bl,bl,skill->get_blewcount(TK_RUN,lv),unit->getdir(bl),0); + if (type == SC_RUN) { + if (lv > 0) + skill->blown(bl, bl, skill->get_blewcount(TK_RUN, lv), unit->getdir(bl), 0); clif->fixpos(bl); //Why is a clif->slide (skill->blown) AND a fixpos needed? Ask Aegis. - clif->sc_end(bl,bl->id,AREA,SI_TING); - } else if( sd ) { + clif->sc_end(bl, bl->id, AREA, SI_TING); + } else if (sd) { clif->fixpos(bl); skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, timer->gettick(), SD_LEVEL); } |