diff options
author | Haru <haru@dotalux.com> | 2020-05-03 22:52:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-03 22:52:02 +0200 |
commit | 24f518fa590066e6a303cfacccbe7c748b6dbdae (patch) | |
tree | 475b5ca6cfeb08a7d3ec55669b01787794eae22b /src/map/unit.c | |
parent | 090d276f4b329b37afdb1a370fbad15d6903f22a (diff) | |
parent | e8d6a43de1ad1efe19f7091ce62b0ea52aaf3617 (diff) | |
download | hercules-24f518fa590066e6a303cfacccbe7c748b6dbdae.tar.gz hercules-24f518fa590066e6a303cfacccbe7c748b6dbdae.tar.bz2 hercules-24f518fa590066e6a303cfacccbe7c748b6dbdae.tar.xz hercules-24f518fa590066e6a303cfacccbe7c748b6dbdae.zip |
Merge pull request #2691 from Kenpachi2k13/mob_skill_db
Extend and clean up monster skill DB code
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index d484056f9..19f09f83c 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -436,7 +436,7 @@ static int unit_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) // Walk skills are triggered regardless of target due to the idle-walk mob state. // But avoid triggering on stop-walk calls. if (tid != INVALID_TIMER && (ud->walk_count % WALK_SKILL_INTERVAL) == 0 - && map->list[bl->m].users > 0 && mob->skill_use(md, tick, -1) == 1) { + && map->list[bl->m].users > 0 && mob->skill_use(md, tick, -1) == 0) { // Walk skills are supposed to be used while walking if (!(ud->skill_id == NPC_SELFDESTRUCTION && ud->skilltimer != INVALID_TIMER) && md->state.skillstate != MSS_WALK) { @@ -2345,7 +2345,7 @@ static int unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) if(md) { //First attack is always a normal attack if(md->state.skillstate == MSS_ANGRY || md->state.skillstate == MSS_BERSERK) { - if (mob->skill_use(md,tick,-1)) { + if (mob->skill_use(md, tick, -1) == 0) { map->freeblock_unlock(); return 1; } |