diff options
author | Dastgir Pojee <dastgirpojee@rocketmail.com> | 2013-10-18 10:57:06 +0530 |
---|---|---|
committer | Dastgir Pojee <dastgirpojee@rocketmail.com> | 2013-10-18 10:57:06 +0530 |
commit | e322c69d27d3db8c7141d27fa8baf0745de2eae4 (patch) | |
tree | 3ad6511427ba3d99ed4befbd1c8c4400558a6319 /src/map/pc.c | |
parent | 9128feccf3bddda94a7f8a170305565416815b40 (diff) | |
download | hercules-e322c69d27d3db8c7141d27fa8baf0745de2eae4.tar.gz hercules-e322c69d27d3db8c7141d27fa8baf0745de2eae4.tar.bz2 hercules-e322c69d27d3db8c7141d27fa8baf0745de2eae4.tar.xz hercules-e322c69d27d3db8c7141d27fa8baf0745de2eae4.zip |
Since our neighbours added it, we too wanted this feature. Topic:http://hercules.ws/board/topic/2540-add-rathena-new-aloot-type/
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 157d9e28a..f3f554137 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9346,11 +9346,18 @@ 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 ) + uint8 i = 0; + bool j = false; + + if (!sd->state.autolooting && !sd->state.autolootingtype) return false; - ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == nameid); - return (i != AUTOLOOTITEM_SIZE); + + if (sd->state.autolooting) + ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == nameid); + if (sd->state.autolootingtype && sd->state.autoloottype&(1<<itemdb_type(nameid))) + j = true; + + return (i != AUTOLOOTITEM_SIZE || j ); } /** |