summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-27 22:14:18 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-27 22:14:18 +0000
commitcbe4b008af7c80ed1c9de9250d6b69592c78e5e8 (patch)
tree8b28647d30085763bf7c115b4e7d6fe8d91cfb6b /src/map/mob.c
parent9c7fb1a026d2d46c1ebc1eb7f5459dd648841706 (diff)
downloadhercules-cbe4b008af7c80ed1c9de9250d6b69592c78e5e8.tar.gz
hercules-cbe4b008af7c80ed1c9de9250d6b69592c78e5e8.tar.bz2
hercules-cbe4b008af7c80ed1c9de9250d6b69592c78e5e8.tar.xz
hercules-cbe4b008af7c80ed1c9de9250d6b69592c78e5e8.zip
Added support for actually disabling the idle_no_autoloot config setting (followup to r12248) (bugreport:1061)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12254 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 2725f0b39..4974624e2 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1617,7 +1617,11 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str
sd = map_charid2sd(dlist->first_charid);
if( sd == NULL ) sd = map_charid2sd(dlist->second_charid);
if( sd == NULL ) sd = map_charid2sd(dlist->third_charid);
- if( sd && (drop_rate <= sd->state.autoloot || ditem->item_data.nameid == sd->state.autolootid) && sd->idletime >= (last_tick - battle_config.idle_no_autoloot) && (battle_config.homunculus_autoloot?1:!flag)
+
+ if( sd
+ && (drop_rate <= sd->state.autoloot || ditem->item_data.nameid == sd->state.autolootid)
+ && (battle_config.idle_no_autoloot == 0 || DIFF_TICK(last_tick, sd->idletime) < battle_config.idle_no_autoloot)
+ && (battle_config.homunculus_autoloot?1:!flag)
#ifdef AUTOLOOT_DISTANCE
&& check_distance_blxy(&sd->bl, dlist->x, dlist->y, AUTOLOOT_DISTANCE)
#endif