summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-04-14 08:12:24 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-04-14 08:12:24 +0200
commit452b603ae4812bac490b4591f08a6f08d1571515 (patch)
tree2f02a6380dd5e6d6b6f3fc66d483940f0e7d834a /src/map/unit.c
parent9df5181b9e2cdd2bf549aada4e844d624c5cccc9 (diff)
downloadhercules-452b603ae4812bac490b4591f08a6f08d1571515.tar.gz
hercules-452b603ae4812bac490b4591f08a6f08d1571515.tar.bz2
hercules-452b603ae4812bac490b4591f08a6f08d1571515.tar.xz
hercules-452b603ae4812bac490b4591f08a6f08d1571515.zip
Adjust return value of mob_skill_use() and mobskill_event() according to code style
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c4
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;
}