From 97ca54438df553ed89fbf35a2eaab7db71a8a4d8 Mon Sep 17 00:00:00 2001 From: Emistry Date: Sun, 3 Jan 2016 17:41:30 +0800 Subject: Fix *getitem2 and @item2 refine bug. - Negative refine value isn't allowed. --- src/map/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 591bca68f..c48758db3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7253,7 +7253,7 @@ BUILDIN(getitem2) if (item_data == NULL) return -1; if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR) { - if(ref > MAX_REFINE) ref = MAX_REFINE; + ref = cap_value(ref, 0, MAX_REFINE); } else if(item_data->type==IT_PETEGG) { iden = 1; -- cgit v1.2.3-70-g09d2