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:
Filip Maj 2017-12-10 22:32:24 -05:00
parent 08c5980b22
commit a9d4e621e3
7 changed files with 38 additions and 58 deletions

View file

@ -151,18 +151,7 @@ namespace FFXIVClassic_Map_Server.Actors
ushort itemPackage = GetPackageForItem(catalogID);
if (itemPackages.ContainsKey(itemPackage))
{
InventoryItem item = Server.GetWorldManager().CreateItem(catalogID, quantity, quality);
itemPackages[itemPackage].AddItem(item);
}
}
public void AddItemStack(uint catalogID, int quantity, byte quality)
{
ItemData itemData = Server.GetItemGamedata(catalogID);
if (itemData != null)
{
int totalQuantity = itemData.maxStack * quantity;
AddItem(catalogID, totalQuantity, quality);
itemPackages[itemPackage].AddItem(catalogID, quantity, quality);
}
}