mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
more work on commands
- moved script object to wrapper class to catch and log exceptions - added loggers for basepacket/subpacket (todo: colour and use them in NLog.config) - finished up most commands (todo: !property and !property2) - todo: create and use mysql wrapper class to log exceptions
This commit is contained in:
@@ -87,15 +87,21 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||
AddItem(itemId, quantity, 1);
|
||||
}
|
||||
|
||||
public void AddItem(uint itemId, int quantity, byte quality)
|
||||
public bool AddItem(uint itemId, int quantity, byte quality)
|
||||
{
|
||||
if (!IsSpaceForAdd(itemId, quantity))
|
||||
return;
|
||||
return false;
|
||||
|
||||
Item gItem = Server.GetItemGamedata(itemId);
|
||||
List<ushort> slotsToUpdate = new List<ushort>();
|
||||
List<SubPacket> addItemPackets = new List<SubPacket>();
|
||||
|
||||
if (gItem == null)
|
||||
{
|
||||
Program.Log.Error("Inventory.AddItem: unable to find item %u", itemId);
|
||||
return false;
|
||||
}
|
||||
|
||||
//Check if item id exists
|
||||
int quantityCount = quantity;
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
@@ -152,6 +158,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||
|
||||
owner.QueuePacket(InventorySetEndPacket.BuildPacket(owner.actorId));
|
||||
owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId));
|
||||
return true;
|
||||
}
|
||||
|
||||
public void AddItem(uint[] itemId)
|
||||
|
Reference in New Issue
Block a user