summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-03-21 14:52:58 +0100
committerGitHub <noreply@github.com>2020-03-21 14:52:58 +0100
commit1f0ecaacdc13d99abeae8e6cb0536546d3f0f1a6 (patch)
tree12743f47df226f847d10659ff001167cc9e2da63
parented5d2d7222401f17f9c8ded96ff0e86aba8e88d6 (diff)
parente6936d2db256d0feffc858f88ce170b2b766eddd (diff)
downloadhercules-1f0ecaacdc13d99abeae8e6cb0536546d3f0f1a6.tar.gz
hercules-1f0ecaacdc13d99abeae8e6cb0536546d3f0f1a6.tar.bz2
hercules-1f0ecaacdc13d99abeae8e6cb0536546d3f0f1a6.tar.xz
hercules-1f0ecaacdc13d99abeae8e6cb0536546d3f0f1a6.zip
Merge pull request #2664 from Kenpachi2k13/looter_fix
Fix mobs get stuck when trying to loot
-rw-r--r--src/map/unit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index dd644d8d1..a879a125f 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -728,10 +728,13 @@ static int unit_walktobl(struct block_list *bl, struct block_list *tbl, int rang
if(!unit->can_move(bl))
return 0;
- if (unit->walk_toxy_sub(bl) == 0 && (flag & 2) != 0) {
- set_mobstate(bl);
+ if (unit->walk_toxy_sub(bl) == 0) {
+ if ((flag & 2) != 0)
+ set_mobstate(bl);
+
return 1;
}
+
return 0;
}