diff options
author | Haru <haru@dotalux.com> | 2013-11-07 01:46:52 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-11-07 01:52:56 +0100 |
commit | 068d42e39b2dafbe37419d37b65992b8a6efd327 (patch) | |
tree | 19b597f0fed1b334d84173e2fa5c2b3a79c3c801 /src/map/script.c | |
parent | e2e34c1fde3e9846ce687e5a419953fba98da5ee (diff) | |
download | hercules-068d42e39b2dafbe37419d37b65992b8a6efd327.tar.gz hercules-068d42e39b2dafbe37419d37b65992b8a6efd327.tar.bz2 hercules-068d42e39b2dafbe37419d37b65992b8a6efd327.tar.xz hercules-068d42e39b2dafbe37419d37b65992b8a6efd327.zip |
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 <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |