Added the UpdateItemPackage packet used to signal the server to send bazaar item info. Added a transaction method in WorldManager. Fixed some inventory bugs. InvItems now track what player, itempackage, and itemslot they are in... and may have their quantity set from there. Fixed DB SetQuantity bug.

This commit is contained in:
Filip Maj 2017-12-10 13:38:53 -05:00
parent b2e273d7cf
commit f5ea82f735
8 changed files with 156 additions and 51 deletions

View file

@ -145,6 +145,16 @@ namespace FFXIVClassic_Map_Server.Actors
}
}
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);
}
}
public void AddItem(InventoryItem item)
{
ushort itemPackage = GetPackageForItem(item.GetItemData().catalogID);
@ -228,7 +238,7 @@ namespace FFXIVClassic_Map_Server.Actors
ushort itemPackage = GetPackageForItem(catalogID);
if (itemPackages.ContainsKey(itemPackage))
{
itemPackages[itemPackage].HasItem(catalogID, minQuantity, quality);
return itemPackages[itemPackage].HasItem(catalogID, minQuantity, quality);
}
return false;
}