summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-04 22:45:55 -0200
committershennetsind <ind@henn.et>2013-11-04 22:45:55 -0200
commit5b5618f072a6aaa7a32aae516809bd0671580631 (patch)
treedd9371afbbd0cfca71673dece4d3352f33ba41a7 /src/map/pc.c
parent0a965aafde882e905ea71f3bcef8f4ff81c1c327 (diff)
parentba5ca9e100564cecb4a1fb1edabca1c042c10204 (diff)
downloadhercules-5b5618f072a6aaa7a32aae516809bd0671580631.tar.gz
hercules-5b5618f072a6aaa7a32aae516809bd0671580631.tar.bz2
hercules-5b5618f072a6aaa7a32aae516809bd0671580631.tar.xz
hercules-5b5618f072a6aaa7a32aae516809bd0671580631.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 1ed66a313..d1d76fd4c 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -9414,10 +9414,16 @@ void pc_overheat(struct map_session_data *sd, int val) {
*/
bool pc_isautolooting(struct map_session_data *sd, int nameid)
{
- int i;
- if( !sd->state.autolooting )
+ int i = 0;
+
+ if (sd->state.autoloottype && sd->state.autoloottype&(1<<itemdb_type(nameid)))
+ return true;
+
+ if (!sd->state.autolooting)
return false;
+
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == nameid);
+
return (i != AUTOLOOTITEM_SIZE);
}