diff options
author | smokexyz <sagunkho@hotmail.com> | 2017-03-10 15:44:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-10 15:44:06 +0800 |
commit | 5e681c671856cf84a94673fe9d754feb4a6e7472 (patch) | |
tree | d56c4c473404ba2dc66ad3bc3fbb4b24a03ff343 | |
parent | 137d985f22fc6275e757a31e6dde3badcf155464 (diff) | |
parent | cae53f2a2c729c7c2fdc6a39f12ffed65e57f797 (diff) | |
download | hercules-5e681c671856cf84a94673fe9d754feb4a6e7472.tar.gz hercules-5e681c671856cf84a94673fe9d754feb4a6e7472.tar.bz2 hercules-5e681c671856cf84a94673fe9d754feb4a6e7472.tar.xz hercules-5e681c671856cf84a94673fe9d754feb4a6e7472.zip |
Merge pull request #1509 from 4144/fixwarn
Fix assert in unit_resume_running.
-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 feb11f89e..7d68bef66 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); } |