mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Finished writing the query and editing the inventory methods to use the gamedata.
This commit is contained in:
parent
4bebeb387a
commit
83fb9badd7
5 changed files with 63 additions and 38 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using FFXIVClassic_Lobby_Server;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -14,9 +15,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
public int quantity = 1;
|
||||
public ushort slot;
|
||||
|
||||
public int maxStack = 99999;
|
||||
|
||||
public bool isUntradeable = false;
|
||||
public byte itemType;
|
||||
public byte quality = 1;
|
||||
|
||||
public uint durability = 0;
|
||||
|
@ -34,16 +33,19 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
this.uniqueId = id;
|
||||
this.itemId = itemId;
|
||||
this.quantity = quantity;
|
||||
this.slot = slot;
|
||||
this.slot = slot;
|
||||
|
||||
Item gItem = Server.getItemGamedata(id);
|
||||
itemType = gItem.isExclusive ? (byte)0x3 : (byte)0x0;
|
||||
}
|
||||
|
||||
public InventoryItem(uint uniqueId, uint itemId, int quantity, ushort slot, bool isUntradeable, 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, uint durability, ushort spiritbind, byte materia1, byte materia2, byte materia3, byte materia4, byte materia5)
|
||||
{
|
||||
this.uniqueId = uniqueId;
|
||||
this.itemId = itemId;
|
||||
this.quantity = quantity;
|
||||
this.slot = slot;
|
||||
this.isUntradeable = isUntradeable;
|
||||
this.itemType = itemType;
|
||||
this.quality = qualityNumber;
|
||||
this.durability = durability;
|
||||
this.spiritbind = spiritbind;
|
||||
|
@ -73,7 +75,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
binWriter.Write((UInt32)0x00000000);
|
||||
binWriter.Write((UInt32)0x00000000);
|
||||
|
||||
binWriter.Write(isUntradeable ? (UInt32)0x3 : (UInt32)0x0);
|
||||
binWriter.Write((UInt32)itemType);
|
||||
|
||||
binWriter.Write((UInt32)0x00000000);
|
||||
|
||||
|
|
|
@ -426,15 +426,18 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
|
||||
public readonly short additionalEffect;
|
||||
public readonly bool materialBindPermission;
|
||||
public readonly short materiaTable;
|
||||
public readonly short materializeTable;
|
||||
|
||||
public EquipmentItem(MySqlDataReader reader)
|
||||
: base (reader)
|
||||
{
|
||||
graphicsWeaponId = reader.GetUInt32("weaponId");
|
||||
graphicsEquipmentId = reader.GetUInt32("equipmentId");
|
||||
graphicsVariantId = reader.GetUInt32("variantId");
|
||||
graphicsColorId = reader.GetUInt32("colorId");
|
||||
if (!reader.IsDBNull(reader.GetOrdinal("weaponId")) && !reader.IsDBNull(reader.GetOrdinal("equipmentId")) && !reader.IsDBNull(reader.GetOrdinal("variantId")) && !reader.IsDBNull(reader.GetOrdinal("colorId")))
|
||||
{
|
||||
graphicsWeaponId = reader.GetUInt32("weaponId");
|
||||
graphicsEquipmentId = reader.GetUInt32("equipmentId");
|
||||
graphicsVariantId = reader.GetUInt32("variantId");
|
||||
graphicsColorId = reader.GetUInt32("colorId");
|
||||
}
|
||||
|
||||
equipPoint = reader.GetInt32("equipPoint");
|
||||
equipTribe = reader.GetInt16("equipTribe");
|
||||
|
@ -461,8 +464,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
paramBonusValue10 = reader.GetInt16("paramBonusValue10");
|
||||
|
||||
additionalEffect = reader.GetInt16("additionalEffect");
|
||||
materialBindPermission = reader.GetBoolean("materialBindPermission");
|
||||
materiaTable = reader.GetInt16("materiaTable");
|
||||
materialBindPermission = reader.GetBoolean("materiaBindPermission");
|
||||
materializeTable = reader.GetInt16("materializeTable");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -529,8 +532,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
class ArmorItem : EquipmentItem
|
||||
{
|
||||
//armor sheet
|
||||
public readonly short defence;
|
||||
public readonly short magicDefence;
|
||||
public readonly short defense;
|
||||
public readonly short magicDefense;
|
||||
public readonly short criticalDefense;
|
||||
public readonly short evasion;
|
||||
public readonly short magicResistance;
|
||||
|
@ -547,8 +550,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
public ArmorItem(MySqlDataReader reader)
|
||||
: base(reader)
|
||||
{
|
||||
defence = reader.GetInt16("defence");
|
||||
magicDefence = reader.GetInt16("magicDefence");
|
||||
defense = reader.GetInt16("defense");
|
||||
magicDefense = reader.GetInt16("magicDefense");
|
||||
criticalDefense = reader.GetInt16("criticalDefense");
|
||||
evasion = reader.GetInt16("evasion");
|
||||
magicResistance = reader.GetInt16("magicResistance");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue