mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 13:47:46 +00:00
Changed untradeable to itemType (since it's used for bazaar as well).
This commit is contained in:
parent
83fb9badd7
commit
c9116005d6
5 changed files with 38 additions and 8 deletions
|
@ -647,7 +647,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
itemId,
|
itemId,
|
||||||
quantity,
|
quantity,
|
||||||
slot,
|
slot,
|
||||||
isUntradeable,
|
itemType,
|
||||||
quality,
|
quality,
|
||||||
durability,
|
durability,
|
||||||
spiritBind,
|
spiritBind,
|
||||||
|
@ -677,7 +677,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
byte itemType = reader.GetByte(4);
|
byte itemType = reader.GetByte(4);
|
||||||
byte qualityNumber = reader.GetByte(5);
|
byte qualityNumber = reader.GetByte(5);
|
||||||
|
|
||||||
uint durability = reader.GetUInt32(6);
|
int durability = reader.GetInt32(6);
|
||||||
ushort spiritBind = reader.GetUInt16(7);
|
ushort spiritBind = reader.GetUInt16(7);
|
||||||
|
|
||||||
byte materia1 = reader.GetByte(8);
|
byte materia1 = reader.GetByte(8);
|
||||||
|
@ -701,7 +701,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static InventoryItem addItem(Player player, uint itemId, int quantity, byte quality, byte itemType, uint durability, ushort type)
|
public static InventoryItem addItem(Player player, uint itemId, int quantity, byte quality, byte itemType, int durability, ushort type)
|
||||||
{
|
{
|
||||||
InventoryItem insertedItem = null;
|
InventoryItem insertedItem = null;
|
||||||
|
|
||||||
|
@ -715,9 +715,9 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
|
|
||||||
string query = @"
|
string query = @"
|
||||||
INSERT INTO server_items
|
INSERT INTO server_items
|
||||||
(itemId, quality, isUntradeable, durability)
|
(itemId, quality, itemType, durability)
|
||||||
VALUES
|
VALUES
|
||||||
(@itemId, @quality, @isUntradeable, @durability);
|
(@itemId, @quality, @itemType, @durability);
|
||||||
";
|
";
|
||||||
|
|
||||||
MySqlCommand cmd = new MySqlCommand(query, conn);
|
MySqlCommand cmd = new MySqlCommand(query, conn);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Cyotek.Collections.Generic.CircularBuffer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=58daa28b0b2de221, processorArchitecture=MSIL">
|
<Reference Include="Cyotek.Collections.Generic.CircularBuffer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=58daa28b0b2de221, processorArchitecture=MSIL">
|
||||||
|
|
|
@ -119,7 +119,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||||
//New item that spilled over
|
//New item that spilled over
|
||||||
while (quantityCount > 0)
|
while (quantityCount > 0)
|
||||||
{
|
{
|
||||||
InventoryItem addedItem = Database.addItem(owner, itemId, Math.Min(quantityCount, 5), quality, gItem.isExclusive ? (byte)0x3 : (byte)0x0, 100, inventoryCode);
|
InventoryItem addedItem = Database.addItem(owner, itemId, Math.Min(quantityCount, 5), quality, gItem.isExclusive ? (byte)0x3 : (byte)0x0, gItem.durability, inventoryCode);
|
||||||
|
|
||||||
|
|
||||||
list.Add(addedItem);
|
list.Add(addedItem);
|
||||||
|
|
|
@ -635,6 +635,35 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||||
//zone.broadcastPacketAroundActor(this, worldMasterMessage);
|
//zone.broadcastPacketAroundActor(this, worldMasterMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void graphicChange(int slot, InventoryItem invItem)
|
||||||
|
{
|
||||||
|
Item item = Server.getItemGamedata(invItem.itemId);
|
||||||
|
|
||||||
|
if (item == null)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (item is EquipmentItem)
|
||||||
|
{
|
||||||
|
EquipmentItem eqItem = (EquipmentItem)item;
|
||||||
|
|
||||||
|
uint graphicId;
|
||||||
|
|
||||||
|
if (eqItem.graphicsWeaponId == null || eqItem.graphicsEquipmentId == null || eqItem.graphicsVariantId == null)
|
||||||
|
graphicId = 1025;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
graphicId =
|
||||||
|
eqItem.graphicsWeaponId << 20 |
|
||||||
|
eqItem.graphicsEquipmentId << 10 |
|
||||||
|
eqItem.graphicsVariantId << 5 |
|
||||||
|
eqItem.graphicsColorId << 5;
|
||||||
|
}
|
||||||
|
appearanceIds[BODYGEAR] = graphicId;
|
||||||
|
broadcastPacket(createAppearancePacket(actorId), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Inventory getInventory(ushort type)
|
public Inventory getInventory(ushort type)
|
||||||
{
|
{
|
||||||
if (inventories.ContainsKey(type))
|
if (inventories.ContainsKey(type))
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
||||||
public byte itemType;
|
public byte itemType;
|
||||||
public byte quality = 1;
|
public byte quality = 1;
|
||||||
|
|
||||||
public uint durability = 0;
|
public int durability = 0;
|
||||||
public ushort spiritbind = 0;
|
public ushort spiritbind = 0;
|
||||||
|
|
||||||
public byte materia1 = 0;
|
public byte materia1 = 0;
|
||||||
|
@ -39,7 +39,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
||||||
itemType = gItem.isExclusive ? (byte)0x3 : (byte)0x0;
|
itemType = gItem.isExclusive ? (byte)0x3 : (byte)0x0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public InventoryItem(uint uniqueId, uint itemId, int quantity, ushort slot, byte itemType, byte qualityNumber, uint durability, ushort spiritbind, byte materia1, byte materia2, byte materia3, byte materia4, byte materia5)
|
public InventoryItem(uint uniqueId, uint itemId, int quantity, ushort slot, byte itemType, byte qualityNumber, int durability, ushort spiritbind, byte materia1, byte materia2, byte materia3, byte materia4, byte materia5)
|
||||||
{
|
{
|
||||||
this.uniqueId = uniqueId;
|
this.uniqueId = uniqueId;
|
||||||
this.itemId = itemId;
|
this.itemId = itemId;
|
||||||
|
|
Loading…
Add table
Reference in a new issue