From b83bfd06f50bc58ee25a4109fe2c8d4e333fc99a Mon Sep 17 00:00:00 2001 From: Atemo Date: Sun, 28 Aug 2016 22:36:58 +0200 Subject: [PATCH] Rental merchant: - shouldn't count equipped item (allowing to rent multiple item) --- npc/re/merchants/te_merchant.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/re/merchants/te_merchant.txt b/npc/re/merchants/te_merchant.txt index f0ca877aac..464dc1358f 100644 --- a/npc/re/merchants/te_merchant.txt +++ b/npc/re/merchants/te_merchant.txt @@ -120,7 +120,7 @@ S_Rent: mes "Select the desired item."; next; for ( .@i = 1; .@i < getargcount(); .@i += 2 ) { - if (countitem(getarg(.@i)) > 0) + if (countitem(getarg(.@i)) > isequippedcnt(getarg(.@i)))// don't count item equipped .@menu$ = .@menu$ + "^4d4dff"+ getarg(.@i+1) +" - Checked out^000000:"; else .@menu$ = .@menu$ + getarg(.@i+1) + ":"; @@ -130,7 +130,7 @@ S_Rent: if (.@s <= .@total_item) { .@index = .@s *2 +1; mes "[Rental Items Manager]"; - if (countitem(getarg(.@index)) > 0) + if (countitem(getarg(.@index)) > isequippedcnt(getarg(.@index))) mes "You already have "+ getarg(.@index+1) +"."; else { mes "Here is "+ getarg(.@index+1) +".";