summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorDastgir <dastgir@users.noreply.github.com>2016-01-05 10:59:34 +0530
committerDastgir <dastgir@users.noreply.github.com>2016-01-05 10:59:34 +0530
commitf002d76118033b92bb445d96814d518f8e373f09 (patch)
tree903f7035cce4611bee90f6e27a476fe5bc1968eb /src/map/atcommand.c
parentd83cae0fbd1bed4a10dc2976baf797c297018574 (diff)
parent97ca54438df553ed89fbf35a2eaab7db71a8a4d8 (diff)
downloadhercules-f002d76118033b92bb445d96814d518f8e373f09.tar.gz
hercules-f002d76118033b92bb445d96814d518f8e373f09.tar.bz2
hercules-f002d76118033b92bb445d96814d518f8e373f09.tar.xz
hercules-f002d76118033b92bb445d96814d518f8e373f09.zip
Merge pull request #1058 from Emistry/scriptcommand_getitem2
Fix *getitem2 and @item2 refine bug.
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d98ef8d94..e18b81f44 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1315,12 +1315,11 @@ ACMD(item2)
}
if (item_data->type == IT_PETARMOR)
refine = 0;
- if (refine > MAX_REFINE)
- refine = MAX_REFINE;
} else {
identify = 1;
refine = attr = 0;
}
+ refine = cap_value(refine, 0, MAX_REFINE);
for (i = 0; i < loop; i++) {
memset(&item_tmp, 0, sizeof(item_tmp));
item_tmp.nameid = item_id;