예제 #1
0
 /// <summary>
 /// Needs serious fixing in the reader, as it throws invalid casts (files all use uint, but f**k those)
 /// </summary>
 /// <param name="reader"></param>
 /// <returns></returns>
 public static ItemInfo Load(DataTableReaderEx reader)
 {
     ItemInfo itemInfo = new ItemInfo
     {
         ItemID = reader.GetUInt16("id"),
         Slot = (ItemSlot)reader.GetUInt32("equip"),
         InxName = reader.GetString("inxname"),
         MaxLot = (byte)reader.GetUInt32("maxlot"),
         AttackSpeed = (ushort)reader.GetUInt32("atkspeed"),
         Level = (byte)reader.GetUInt32("demandlv"),
         Type = (ItemType)reader.GetUInt32("type"),
         Class = (ItemClass)reader.GetUInt32("class"),
         UpgradeLimit = reader.GetByte("uplimit"),
         Jobs = UnpackWhoEquip(reader.GetUInt32("whoequip")),
         TwoHand = reader.GetBoolean("TwoHand"),
         MinMagic = (ushort)reader.GetUInt32("minma"),
         MaxMagic = (ushort)reader.GetUInt32("maxma"),
         MinMelee = (ushort)reader.GetUInt32("minwc"),
         MaxMelee = (ushort)reader.GetUInt32("maxwc"),
         WeaponDef = (ushort)reader.GetUInt32("ac"),
         MagicDef = (ushort)reader.GetUInt32("mr"),
         UpSucRation = reader.GetUInt16("UpSucRatio"),
         UpResource = reader.GetByte("UpResource")
     };
     return itemInfo;
 }