summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorDastgir Pojee <dastgirpojee@rocketmail.com>2013-10-31 00:08:56 +0530
committerDastgir Pojee <dastgirpojee@rocketmail.com>2013-10-31 00:08:56 +0530
commitd33d171e7bbe879af077099d201e7f9b86dd23b9 (patch)
treefd36e08b7d64f8b7af35b90d60fd3d9ea013a563 /src/map/pc.c
parente322c69d27d3db8c7141d27fa8baf0745de2eae4 (diff)
downloadhercules-d33d171e7bbe879af077099d201e7f9b86dd23b9.tar.gz
hercules-d33d171e7bbe879af077099d201e7f9b86dd23b9.tar.bz2
hercules-d33d171e7bbe879af077099d201e7f9b86dd23b9.tar.xz
hercules-d33d171e7bbe879af077099d201e7f9b86dd23b9.zip
Several Changes to autoloottype command.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index f3f554137..7966e49ab 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -9346,18 +9346,18 @@ void pc_overheat(struct map_session_data *sd, int val) {
*/
bool pc_isautolooting(struct map_session_data *sd, int nameid)
{
- uint8 i = 0;
+ int i = 0;
bool j = false;
- if (!sd->state.autolooting && !sd->state.autolootingtype)
+ if (sd->state.autoloottype && sd->state.autoloottype&(1<<itemdb_type(nameid)))
+ return true;
+
+ if (!sd->state.autolooting)
return false;
- 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;
+ ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == nameid);
- return (i != AUTOLOOTITEM_SIZE || j );
+ return (i != AUTOLOOTITEM_SIZE);
}
/**