mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user