diff options
author | shennetsind <ind@henn.et> | 2013-11-04 22:45:55 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-11-04 22:45:55 -0200 |
commit | 5b5618f072a6aaa7a32aae516809bd0671580631 (patch) | |
tree | dd9371afbbd0cfca71673dece4d3352f33ba41a7 /src/map/pc.c | |
parent | 0a965aafde882e905ea71f3bcef8f4ff81c1c327 (diff) | |
parent | ba5ca9e100564cecb4a1fb1edabca1c042c10204 (diff) | |
download | hercules-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.c | 10 |
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); } |