mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-25 02:13:32 +02:00
Added "ToString" methods for Items, Packages, and Actors for easier debugging. Rewrote dealing code in InventoryItem as well as the WorldMaster. Rewrote how Bazaar and Retainer inventory is stored on the DB, merging all three tables into one. Removed a bunch of DB code due to the previous point. Random Item cleanup.
This commit is contained in:
parent
e96cc0c758
commit
3dcd9af6c0
10 changed files with 656 additions and 857 deletions
|
@ -1147,7 +1147,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
return;
|
||||
|
||||
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId, true));
|
||||
itemPackages[(ushort)id].SendUpdate(player);
|
||||
itemPackages[(ushort)id].SendFullPackage(player);
|
||||
player.QueuePacket(InventoryEndChangePacket.BuildPacket(actorId));
|
||||
}
|
||||
|
||||
|
@ -1179,23 +1179,14 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
}
|
||||
}
|
||||
|
||||
public void SetItem(InventoryItem item, ushort itemPackage, ushort slot)
|
||||
{
|
||||
if (itemPackages.ContainsKey(itemPackage))
|
||||
{
|
||||
itemPackages[itemPackage].SetItem(slot, item);
|
||||
}
|
||||
}
|
||||
|
||||
public void MoveItem(InventoryItem item, ushort destinationPackage)
|
||||
{
|
||||
ushort sourcePackage = item.itemPackage;
|
||||
|
||||
if (!itemPackages.ContainsKey(sourcePackage) && !itemPackages.ContainsKey(destinationPackage))
|
||||
return;
|
||||
|
||||
itemPackages[sourcePackage].RemoveItem(item);
|
||||
itemPackages[destinationPackage].AddItem(item);
|
||||
|
||||
itemPackages[sourcePackage].MoveItem(item, itemPackages[destinationPackage]);
|
||||
}
|
||||
|
||||
public void RemoveItem(uint catalogID)
|
||||
|
@ -1227,15 +1218,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
|
||||
public void RemoveItem(InventoryItem item)
|
||||
{
|
||||
RemoveItem(item, 1);
|
||||
}
|
||||
|
||||
public void RemoveItem(InventoryItem item, int quantity)
|
||||
{
|
||||
if (itemPackages.ContainsKey(item.itemPackage))
|
||||
{
|
||||
itemPackages[item.itemPackage].RemoveItem(item, quantity);
|
||||
}
|
||||
itemPackages[item.itemPackage].RemoveItem(item);
|
||||
}
|
||||
|
||||
public bool HasItem(uint catalogID)
|
||||
|
@ -1270,7 +1253,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
public InventoryItem GetItem(LuaUtils.ItemRefParam reference)
|
||||
{
|
||||
if (reference.actorId != actorId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue