Issue information

Issue ID
#1574
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
May 27, 2008 11:59
Last Post
Hercules Elf Bot
May 27, 2008 11:59
Confirmation
N/A

Hercules Elf Bot - May 27, 2008 11:59

Originally posted by [b]~AnnieRuru~[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1574

http://nopaste.php-quake.net/19119 this script from this topic http://www.eathena.ws/board/index.php?show...889&hl=shop
I am wondering why nobody post this bug before

this is how to reproduce this bug
1. don't make yourself has enough jellopy
2. buy 1 apple, 1 banana 1 grape each, and the script says not enough jellopy yeah
3. @item jellopy 100
3. this time, buy only 1 grape
the result now is you bought 1 grape, 1 banana and 1 more grape again

Note if you use this shop buy 1 more grape again, the variable array is reset finally

so I guessing the array is reset if the trade is really "successful"
but if the player doesn't have enough item, the array isn't reset


so I guess to fix this is,
instead of clearing the array if the user successfully purchase
why not clear the array at the startup of this command before the array define ?

This post has been edited by ~AnnieRuru~: May 27 2008, 10:14 PM