mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 13:34:38 +02:00
Events are now pushed onto a stack and popped off. Turns out multiple events *CAN* happen. Fixed quantity bugs when saving to DB. Fixed buying stacks.
This commit is contained in:
parent
08c5980b22
commit
a9d4e621e3
7 changed files with 38 additions and 58 deletions
|
@ -1060,18 +1060,15 @@ namespace FFXIVClassic_Map_Server
|
|||
if (cost < 0)
|
||||
return false;
|
||||
|
||||
if (itemToBuy.GetBazaarMode() == InventoryItem.TYPE_STACK)
|
||||
{
|
||||
itemToBuy.ChangeQuantity(-quantity);
|
||||
buyer.AddItemStack(itemToBuy.itemId, quantity, itemToBuy.quality);
|
||||
buyer.GetItemPackage(Inventory.CURRENCY_CRYSTALS).RemoveItem(1000001, cost);
|
||||
}
|
||||
else
|
||||
if (itemToBuy.GetBazaarMode() == InventoryItem.TYPE_SINGLE || itemToBuy.GetBazaarMode() == InventoryItem.TYPE_MULTI || itemToBuy.GetBazaarMode() == InventoryItem.TYPE_STACK)
|
||||
{
|
||||
itemToBuy.ChangeQuantity(-quantity);
|
||||
buyer.AddItem(itemToBuy.itemId, quantity, itemToBuy.quality);
|
||||
buyer.GetItemPackage(Inventory.CURRENCY_CRYSTALS).RemoveItem(1000001, cost);
|
||||
}
|
||||
|
||||
if (itemToBuy.quantity == 0)
|
||||
Database.ClearBazaarEntry(bazaar, itemToBuy);
|
||||
|
||||
bazaar.CheckBazaarFlags();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue