示例#1
0
        public static ActiveSkillInfo Load(DataTableReaderEx reader)
        {
            ActiveSkillInfo inf = new ActiveSkillInfo
            {
                ID         = reader.GetUInt16("ID"),
                Name       = reader.GetString("InxName"),
                Step       = reader.GetByte("Step"),
                Required   = reader.GetString("DemandSk"),
                SP         = reader.GetUInt16("SP"),
                HP         = reader.GetUInt16("HP"),
                Range      = reader.GetUInt16("Range"),
                CoolTime   = reader.GetUInt32("DlyTime"),
                CastTime   = reader.GetUInt32("CastTime"),
                DemandType = reader.GetByte("DemandType"),
                MaxTargets = reader.GetByte("TargetNumber"),
            };

            ushort maxdamage = (ushort)reader.GetUInt32("MaxWC");

            if (maxdamage == 0)
            {
                inf.IsMagic   = true;
                inf.MinDamage = (ushort)reader.GetUInt32("MinMA");
                inf.MaxDamage = (ushort)reader.GetUInt32("MaxMA");
            }
            else
            {
                inf.MaxDamage = maxdamage;
                inf.MinDamage = (ushort)reader.GetUInt32("MinWC");
            }
            return(inf);
        }
示例#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);
        }
示例#3
0
        public static DropGroupInfo Load(DataTableReaderEx reader)
        {
            DropGroupInfo info = new DropGroupInfo()
            {
                GroupID  = reader.GetString("ItemID"),
                MinCount = reader.GetByte("MinQtty"),
                MaxCount = reader.GetByte("MaxQtty"),
                Items    = new List <ItemInfo>()
            };

            return(info);
        }
示例#4
0
        public static MobInfoServer Load(DataTableReaderEx reader)
        {
            MobInfoServer info = new MobInfoServer
            {
                ID              = reader.GetUInt32("ID"),
                InxName         = reader.GetString("InxName"),
                Visible         = reader.GetByte("Visible"),
                AC              = reader.GetUInt16("AC"),
                TB              = reader.GetUInt16("TB"),
                MR              = reader.GetUInt16("MR"),
                MB              = reader.GetUInt16("MB"),
                EnemyDetectType = reader.GetUInt32("EnemyDetectType"),
                MobKillInx      = reader.GetUInt32("MobKillInx"),
                MonEXP          = reader.GetUInt32("MonEXP"),
                EXPRange        = reader.GetUInt16("EXPRange"),
                DetectCha       = reader.GetUInt16("DetectCha"),
                ResetInterval   = reader.GetByte("ResetInterval"),
                CutInterval     = reader.GetUInt16("CutInterval"),
                CutNonAT        = reader.GetUInt32("CutNonAT"),
                FollowCha       = reader.GetUInt32("FollowCha"),
                PceHPRcvDly     = reader.GetUInt16("PceHPRcvDly"),
                PceHPRcv        = reader.GetUInt16("PceHPRcv"),
                AtkHPRcvDly     = reader.GetUInt16("AtkHPRcvDly"),
                AtkHPRcv        = reader.GetUInt16("AtkHPRcv"),
                Str             = reader.GetUInt16("Str"),
                Dex             = reader.GetUInt16("Dex"),
                Con             = reader.GetUInt16("Con"),
                Int             = reader.GetUInt16("Int"),
                Men             = reader.GetUInt16("Men"),
                MobRaceType     = reader.GetUInt32("MobRaceType"),
                Rank            = reader.GetByte("Rank"),
                FamilyArea      = reader.GetUInt32("FamilyArea"),
                FamilyRescArea  = reader.GetUInt32("FamilyRescArea"),
                FamilyRescCount = reader.GetByte("FamilyRescCount"),
                BloodingResi    = reader.GetUInt16("BloodingResi"),
                StunResi        = reader.GetUInt16("StunResi"),
                MoveSpeedResi   = reader.GetUInt16("MoveSpeedResi"),
                FearResi        = reader.GetUInt16("FearResi"),
                ResIndex        = reader.GetString("ResIndex"),
                KQKillPoint     = reader.GetUInt16("KQKillPoint"),
                Return2Regen    = reader.GetByte("Return2Regen"),
                IsRoaming       = reader.GetByte("IsRoaming"),
                RoamingNumber   = reader.GetByte("RoamingNumber"),
                RoamingDistance = reader.GetUInt16("RoamingDistance"),
                MaxSP           = reader.GetUInt16("MaxSP"),
                BroadAtDead     = reader.GetByte("BroadAtDead"),
                TurnSpeed       = reader.GetUInt16("TurnSpeed"),
                WalkChase       = reader.GetUInt16("WalkChase"),
                AllCanLoot      = reader.GetByte("AllCanLoot"),
                DmgByHealMin    = reader.GetUInt16("DmgByHealMin"),
                DmgByHealMax    = reader.GetUInt16("DmgByHealMax"),
            };

            return(info);
        }
示例#5
0
        public static MobInfo Load(DataTableReaderEx reader)
        {
            MobInfo inf = new MobInfo
            {
                Name     = reader.GetString("InxName"),
                ID       = reader.GetUInt16("ID"),
                Level    = (byte)reader.GetUInt32("Level"),
                MaxHP    = reader.GetUInt32("MaxHP"),
                RunSpeed = (ushort)reader.GetUInt32("RunSpeed"),
                IsNPC    = Convert.ToBoolean(reader.GetByte("IsNPC")),
                Size     = (ushort)reader.GetUInt32("Size"),
                Type     = (byte)reader.GetUInt32("Type"),
                IsAggro  = Convert.ToBoolean(reader.GetByte("IsPlayerSide")),
                Drops    = new List <DropInfo>()
            };

            return(inf);
        }
示例#6
0
        public static MapInfo Load(DataTableReaderEx reader)
        {
            MapInfo info = new MapInfo
            {
                ID        = reader.GetUInt16("ID"),
                ShortName = reader.GetString("MapName"),
                FullName  = reader.GetString("Name"),
                RegenX    = (int)reader.GetUInt32("RegenX"),
                RegenY    = (int)reader.GetUInt16("RegenY"),
                Kingdom   = reader.GetByte("KingdomMap"),
                ViewRange = (ushort)reader.GetUInt32("Sight"),
            };

            return(info);
        }
示例#7
0
        public static ShineNPC Load(DataTableReaderEx reader)
        {
            ShineNPC info = new ShineNPC
            {
                MobName  = reader.GetString("MobName"),
                Map      = reader.GetString("Map"),
                Coord_X  = reader.GetInt32("Coord-X"),
                Coord_Y  = reader.GetInt32("Coord-Y"),
                Direct   = reader.GetInt16("Direct"),
                NPCMenu  = reader.GetByte("NPCMenu"),
                Role     = reader.GetString("Role"),
                RoleArg0 = reader.GetString("RoleArg0"),
            };

            return(info);
        }
示例#8
0
        public static LinkTable Load(DataTableReaderEx reader)
        {
            LinkTable info = new LinkTable
            {
                argument  = reader.GetString("argument"),
                MapServer = reader.GetString("MapServer"),
                MapClient = reader.GetString("MapClient"),
                Coord_X   = reader.GetInt32("Coord-X"),
                Coord_Y   = reader.GetInt32("Coord-Y"),
                Direct    = reader.GetInt16("Direct"),
                LevelFrom = reader.GetInt16("LevelFrom"),
                LevelTo   = reader.GetInt16("LevelTo"),
                Party     = reader.GetByte("Party"),
            };

            return(info);
        }
示例#9
0
 public void LoadExpTable()
 {
     ExpTable = new Dictionary <byte, ulong>();
     try
     {
         using (var tables = new ShineReader(folder + @"\ChrCommon.txt"))
         {
             using (DataTableReaderEx reader = new DataTableReaderEx(tables["StatTable"]))
             {
                 while (reader.Read())
                 {
                     ExpTable.Add(reader.GetByte("level"), reader.GetUInt64("NextExp"));
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Log.WriteLine(LogLevel.Exception, "Couldn't load EXP table: {0}", ex.ToString());
     }
 }
示例#10
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;
 }