MilkBowl / LocalShops

A Shop plugin for Bukkit (Minecraft Server)
http://forums.bukkit.org/threads/17131/
GNU General Public License v2.0
8 stars 4 forks source link

Purchase Incorrect Amount #4

Closed cerealcable closed 13 years ago

cerealcable commented 13 years ago

When purchasing a large quantity with insufficient funds, the amount of an item is reduced to a single item (even though it is in a bundle larger than 1).

Example: Starting money: $317.00 White Wool is selling in the shop for $230.00 per bundle of 64 [Stock: 1731]

/shop buy white wool 400
The bundle size is 64 order reduced to 384
You could only afford 1 of White Wool
You purchased 1 White Wool for 230.00 Dollars

The shop debug output in which this happened:

2011-06-28 08:40:00 [INFO] [LocalShops] CONSOLE issued: debug 917
2011-06-28 08:40:00 [INFO] Shop Information
2011-06-28 08:40:00 [INFO]    UUID:            2ca3c3ec-d6b0-4e8c-bb54-80cc38446917
2011-06-28 08:40:00 [INFO]    Name:            TurtleWood
2011-06-28 08:40:00 [INFO]    Creator:         Cebekazu
2011-06-28 08:40:00 [INFO]    Owner:           BaldTurtle
2011-06-28 08:40:00 [INFO]    Managers:        
2011-06-28 08:40:00 [INFO]    Minimum Balance: 0.00
2011-06-28 08:40:00 [INFO]    Unlimited Money: No
2011-06-28 08:40:00 [INFO]    Unlimited Stock: No
2011-06-28 08:40:00 [INFO]    Location A:      97, 65, 440
2011-06-28 08:40:00 [INFO]    Location B:      112, 70, 456
2011-06-28 08:40:00 [INFO]    World:           world
2011-06-28 08:40:00 [INFO] Shop Inventory
2011-06-28 08:40:00 [INFO]    BP=Buy Price, BS=Buy Size, SP=Sell Price, SS=Sell Size, ST=Stock, MX=Max Stock
2011-06-28 08:40:00 [INFO]    Id        BP     BS  SP     SS  ST  MX 
2011-06-28 08:40:00 [INFO]       263:1  200.00 64  0.00   1   10655 0  
2011-06-28 08:40:00 [INFO]       320:0  0.00   1   0.00   1   789 0  
2011-06-28 08:40:00 [INFO]       281:0  0.00   1   0.00   1   1   0  
2011-06-28 08:40:00 [INFO]       288:0  0.00   1   45.00  64  256 0  
2011-06-28 08:40:00 [INFO]       279:0  0.00   1   0.00   1   1   0  
2011-06-28 08:40:00 [INFO]        87:0  1.00   1   0.00   1   744 0  
2011-06-28 08:40:00 [INFO]       328:0  140.00 1   140.00 1   1289 10 
2011-06-28 08:40:00 [INFO]       266:0  0.00   1   0.00   1   62  0  
2011-06-28 08:40:00 [INFO]         3:0  70.00  64  0.00   1   22  0  
2011-06-28 08:40:00 [INFO]       278:0  295.00 1   0.00   1   1   0  
2011-06-28 08:40:00 [INFO]        35:12 0.00   1   0.00   1   2   0  
2011-06-28 08:40:00 [INFO]       302:0  150.00 1   0.00   1   31  0  
2011-06-28 08:40:00 [INFO]       305:0  150.00 1   0.00   1   35  0  
2011-06-28 08:40:00 [INFO]       312:0  695.00 1   0.00   1   0   0  
2011-06-28 08:40:00 [INFO]        50:0  1.00   1   0.00   1   210 0  
2011-06-28 08:40:00 [INFO]       265:0  25.00  1   23.00  1   9506 0  
2011-06-28 08:40:00 [INFO]        10:0  60.00  1   0.00   1   0   0  
2011-06-28 08:40:00 [INFO]       311:0  795.00 1   0.00   1   0   0  
2011-06-28 08:40:00 [INFO]        79:0  10.00  1   0.00   1   0   0  
2011-06-28 08:40:00 [INFO]       295:0  0.00   1   0.00   1   16  0  
2011-06-28 08:40:00 [INFO]        35:0  230.00 64  0.00   1   1731 0  
2011-06-28 08:40:00 [INFO]        53:0  0.00   1   0.00   1   6   0  
2011-06-28 08:40:00 [INFO]       260:0  15.00  1   14.00  1   347 0  
2011-06-28 08:40:00 [INFO]       349:0  0.00   1   0.00   1   10  0  
2011-06-28 08:40:00 [INFO]        44:1  0.00   1   0.00   1   4   0  
2011-06-28 08:40:00 [INFO]         6:0  0.00   1   15.00  64  320 0  
2011-06-28 08:40:00 [INFO]        14:0  0.00   1   0.00   1   6   0  
2011-06-28 08:40:00 [INFO]       352:0  0.00   1   0.00   1   5   0  
2011-06-28 08:40:00 [INFO]        81:0  1.00   2   0.00   1   1802 0  
2011-06-28 08:40:00 [INFO]        15:0  0.00   1   0.00   1   26  0  
2011-06-28 08:40:00 [INFO]        44:2  0.00   1   0.00   1   14  0  
2011-06-28 08:40:00 [INFO]        76:0  0.00   1   0.00   1   5   0  
2011-06-28 08:40:00 [INFO]       287:0  1.00   1   20.00  64  0   0  
2011-06-28 08:40:00 [INFO]        45:0  220.00 64  150.00 64  0   0  
2011-06-28 08:40:00 [INFO]       323:0  1.00   1   0.00   1   10  0  
2011-06-28 08:40:00 [INFO]       351:4  0.00   1   0.00   1   94  0  
2011-06-28 08:40:00 [INFO]       338:0  0.00   1   0.00   1   29  0  
2011-06-28 08:40:00 [INFO]       318:0  0.00   1   0.00   1   8   0  
2011-06-28 08:40:00 [INFO]       303:0  150.00 1   0.00   1   32  0  
2011-06-28 08:40:00 [INFO]       262:0  0.00   1   0.00   1   6   0  
2011-06-28 08:40:00 [INFO]       346:0  10.00  1   0.00   1   0   0  
2011-06-28 08:40:00 [INFO]         1:0  110.00 64  105.00 64  39724 0  
2011-06-28 08:40:00 [INFO]       263:0  200.00 64  120.00 64  12  0  
2011-06-28 08:40:00 [INFO]        58:0  0.00   1   0.00   1   2   0  
2011-06-28 08:40:00 [INFO]         8:0  15.00  1   0.00   1   219 0  
2011-06-28 08:40:00 [INFO]         6:2  0.00   1   0.00   1   2   0  
2011-06-28 08:40:00 [INFO]       276:0  195.00 1   0.00   1   0   0  
2011-06-28 08:40:00 [INFO]        17:0  3.00   1   120.00 64  1085 0  
2011-06-28 08:40:00 [INFO]        17:1  0.00   1   0.00   1   65  0  
2011-06-28 08:40:00 [INFO]        12:0  55.00  64  35.00  64  1493 0  
2011-06-28 08:40:00 [INFO]         5:0  50.00  64  30.00  64  9694 0  
2011-06-28 08:40:00 [INFO]       264:0  115.00 1   95.00  1   3889 0  
2011-06-28 08:40:00 [INFO]        19:0  5000.00 1   0.00   1   0   0  
2011-06-28 08:40:00 [INFO]       331:0  70.00  64  35.00  64  8972 0  
2011-06-28 08:40:00 [INFO]       297:0  3.00   1   8.00   5   0   0  
2011-06-28 08:40:00 [INFO]        13:0  0.00   1   0.00   1   156 0  
2011-06-28 08:40:00 [INFO]        44:0  0.00   1   0.00   1   77  0  
2011-06-28 08:40:00 [INFO]       304:0  150.00 1   0.00   1   35  0  
2011-06-28 08:40:00 [INFO]        66:0  15.00  1   0.00   1   216 0  
2011-06-28 08:40:00 [INFO]         4:0  41.00  64  30.00  64  5782 0  
2011-06-28 08:40:00 [INFO]        20:0  100.00 64  75.00  64  5   0  
2011-06-28 08:40:00 [INFO]       313:0  395.00 1   0.00   1   0   0  
2011-06-28 08:40:00 [INFO]        27:0  0.00   1   0.00   1   11  0  
2011-06-28 08:40:00 [INFO]        49:0  27.00  1   25.00  1   118 0  
2011-06-28 08:40:00 [INFO]       283:0  0.00   1   0.00   1   3   0  
2011-06-28 08:40:00 [INFO]       296:0  1.00   1   30.00  64  4535 0  
2011-06-28 08:40:00 [INFO]       280:0  1.00   1   0.00   1   60  0  
2011-06-28 08:40:00 [INFO]       310:0  495.00 1   0.00   1   0   0
cerealcable commented 13 years ago

I was able to confirm & duplicate this bug.

Sleaker commented 13 years ago

Fix in 2668b63efd3c3079dc07a7d3949e61268f3c5eb2