Пример #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"),
                EquipType    = (byte)reader.GetUInt32("equip"),
                InxName      = reader.GetString("inxname"),
                MaxLot       = (byte)reader.GetUInt32("maxlot"),
                AttackSpeed  = (ushort)reader.GetUInt32("atkspeed"),
                Level        = (byte)reader.GetUInt32("demandlv"),
                Type         = (byte)reader.GetUInt32("type"),
                Class        = (byte)reader.GetUInt32("class"),
                UpgradeLimit = reader.GetByte("uplimit"),
                Jobs         = (byte)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);
        }
Пример #2
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"),
         EquipType = (byte)reader.GetUInt32("equip"),
         InxName = reader.GetString("inxname"),
         MaxLot = (byte)reader.GetUInt32("maxlot"),
         AttackSpeed = (ushort)reader.GetUInt32("atkspeed"),
         Level = (byte)reader.GetUInt32("demandlv"),
         Type = (byte)reader.GetUInt32("type"),
         Class = (byte)reader.GetUInt32("class"),
         UpgradeLimit = reader.GetByte("uplimit"),
         Jobs = (byte)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;
 }