Rental merchant:
- shouldn't count equipped item (allowing to rent multiple item)
This commit is contained in:
parent
e0550db4d8
commit
b83bfd06f5
@ -120,7 +120,7 @@ S_Rent:
|
|||||||
mes "Select the desired item.";
|
mes "Select the desired item.";
|
||||||
next;
|
next;
|
||||||
for ( .@i = 1; .@i < getargcount(); .@i += 2 ) {
|
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:";
|
.@menu$ = .@menu$ + "^4d4dff"+ getarg(.@i+1) +" - Checked out^000000:";
|
||||||
else
|
else
|
||||||
.@menu$ = .@menu$ + getarg(.@i+1) + ":";
|
.@menu$ = .@menu$ + getarg(.@i+1) + ":";
|
||||||
@ -130,7 +130,7 @@ S_Rent:
|
|||||||
if (.@s <= .@total_item) {
|
if (.@s <= .@total_item) {
|
||||||
.@index = .@s *2 +1;
|
.@index = .@s *2 +1;
|
||||||
mes "[Rental Items Manager]";
|
mes "[Rental Items Manager]";
|
||||||
if (countitem(getarg(.@index)) > 0)
|
if (countitem(getarg(.@index)) > isequippedcnt(getarg(.@index)))
|
||||||
mes "You already have "+ getarg(.@index+1) +".";
|
mes "You already have "+ getarg(.@index+1) +".";
|
||||||
else {
|
else {
|
||||||
mes "Here is "+ getarg(.@index+1) +".";
|
mes "Here is "+ getarg(.@index+1) +".";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user