mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Add equip ability functions
Fix EquipAbility SQL query
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
using FFXIVClassic.Common;
|
||||
|
||||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic_Map_Server.Actors;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor.inventory;
|
||||
@@ -92,14 +92,14 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||
if (!IsSpaceForAdd(itemId, quantity))
|
||||
return false;
|
||||
|
||||
Item gItem = Server.GetItemGamedata(itemId);
|
||||
ItemData 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;
|
||||
return false;
|
||||
}
|
||||
|
||||
//Check if item id exists
|
||||
@@ -175,7 +175,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||
//New item that spilled over
|
||||
for (int i = 0; i < itemId.Length; i++)
|
||||
{
|
||||
Item gItem = Server.GetItemGamedata(itemId[i]);
|
||||
ItemData gItem = Server.GetItemGamedata(itemId[i]);
|
||||
InventoryItem addedItem = Database.AddItem(owner, itemId[i], 1, (byte)1, gItem.isExclusive ? (byte)0x3 : (byte)0x0, gItem.durability, inventoryCode);
|
||||
list.Add(addedItem);
|
||||
}
|
||||
@@ -457,7 +457,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
InventoryItem item = list[i];
|
||||
Item gItem = Server.GetItemGamedata(item.itemId);
|
||||
ItemData gItem = Server.GetItemGamedata(item.itemId);
|
||||
if (item.itemId == itemId && item.quantity < gItem.maxStack)
|
||||
{
|
||||
quantityCount -= (gItem.maxStack - item.quantity);
|
||||
|
||||
Reference in New Issue
Block a user