Rewrote the inventory code, splitting the packet updates from the list updates.

This commit is contained in:
Filip Maj
2017-09-05 14:44:06 -04:00
parent f437b36f5a
commit 81d82cd7a8
5 changed files with 224 additions and 277 deletions

View File

@@ -106,13 +106,13 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
for (int i = 0; i < slots.Length; i++)
{
InventoryItem item = normalInventory.GetItemBySlot(itemSlots[i]);
InventoryItem item = normalInventory.GetItemAtSlot(itemSlots[i]);
if (item == null)
continue;
Database.EquipItem(owner, slots[i], item.uniqueId);
list[slots[i]] = normalInventory.GetItemBySlot(itemSlots[i]);
list[slots[i]] = normalInventory.GetItemAtSlot(itemSlots[i]);
}
owner.QueuePacket(InventoryBeginChangePacket.BuildPacket(owner.actorId));
@@ -133,7 +133,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
public void Equip(ushort slot, ushort invSlot)
{
InventoryItem item = normalInventory.GetItemBySlot(invSlot);
InventoryItem item = normalInventory.GetItemAtSlot(invSlot);
if (item == null)
return;