From 068d42e39b2dafbe37419d37b65992b8a6efd327 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 7 Nov 2013 01:46:52 +0100 Subject: Fixed equip command failing when another item of the same kind is equipped - The command now correctly skips the already equipped items, rather than trying to equip them again (and fail during the process). - Special thanks to Poison. Signed-off-by: Haru --- src/map/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/script.c b/src/map/script.c index 5f7dd777a..b30073486 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -12995,7 +12995,7 @@ BUILDIN(equip) ShowError("wrong item ID : equipitem(%i)\n",nameid); return false; } - ARR_FIND( 0, MAX_INVENTORY, i, sd->status.inventory[i].nameid == nameid ); + ARR_FIND( 0, MAX_INVENTORY, i, sd->status.inventory[i].nameid == nameid && sd->status.inventory[i].equip == 0 ); if( i < MAX_INVENTORY ) pc->equipitem(sd,i,item_data->equip); -- cgit v1.2.3-60-g2f50