Moved SendItemPackage to character class. Added a flag check after a bazaar purchase is made. Discovered a flag in InventoryBeginChangePacket that either modifies the client package or clears and refills it. Implemented this mode for a bunch of "SendFullInventory" methods.

This commit is contained in:
Filip Maj
2017-12-10 15:13:33 -05:00
parent f5ea82f735
commit 08c5980b22
6 changed files with 24 additions and 25 deletions

View File

@@ -5,6 +5,7 @@ using FFXIVClassic_Map_Server.actors.group;
using FFXIVClassic_Map_Server.Actors.Chara;
using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.packets.send.actor;
using FFXIVClassic_Map_Server.packets.send.actor.inventory;
using FFXIVClassic_Map_Server.utils;
using System.Collections.Generic;
@@ -125,6 +126,16 @@ namespace FFXIVClassic_Map_Server.Actors
#region Inventory
public void SendItemPackage(Player player, uint id)
{
if (!itemPackages.ContainsKey((ushort)id))
return;
player.QueuePacket(InventoryBeginChangePacket.BuildPacket(actorId, true));
itemPackages[(ushort)id].SendFullInventory(player);
player.QueuePacket(InventoryEndChangePacket.BuildPacket(actorId));
}
public void AddItem(uint catalogID)
{
AddItem(catalogID, 1);