summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorEmistry <Equinox1991@gmail.com>2016-01-03 17:41:30 +0800
committerEmistry <Equinox1991@gmail.com>2016-01-03 18:16:10 +0800
commit97ca54438df553ed89fbf35a2eaab7db71a8a4d8 (patch)
tree3bcee440f6a6a2bf63fdc00240ab13b8f5f697a0 /src/map/atcommand.c
parentbabc4d54f2fe008bb32479d669b32e341b10f14b (diff)
downloadhercules-97ca54438df553ed89fbf35a2eaab7db71a8a4d8.tar.gz
hercules-97ca54438df553ed89fbf35a2eaab7db71a8a4d8.tar.bz2
hercules-97ca54438df553ed89fbf35a2eaab7db71a8a4d8.tar.xz
hercules-97ca54438df553ed89fbf35a2eaab7db71a8a4d8.zip
Fix *getitem2 and @item2 refine bug.
- Negative refine value isn't allowed.
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 c26daee54..66921862c 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;