Ejemplo n.º 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);
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
0
        public static ActiveSkillInfo Load(DataRow row)
        {
            ActiveSkillInfo inf = new ActiveSkillInfo
            {

                ID = GetDataTypes.GetUshort(row["ID"]),
                Name = (string)row["InxName"],
                Step = GetDataTypes.GetByte(row["Step"]),
                Required = (string)row["DemandSk"],
                SP = GetDataTypes.GetUshort(row["SP"]),
                HP = GetDataTypes.GetUshort(row["HP"]),
                Range = GetDataTypes.GetUshort(row["Range"]),
                CoolTime = GetDataTypes.GetUint(row["DlyTime"]),
                CastTime = GetDataTypes.GetUint(row["CastTime"]),
                DemandType = GetDataTypes.GetByte(row["DemandType"]),
                MaxTargets = GetDataTypes.GetByte(row["TargetNumber"]),
            };

            uint maxdamage =  GetDataTypes.GetUint(row["MaxWC"]);
            if (maxdamage == 0)
            {
                inf.IsMagic = true;
                inf.MinDamage =  GetDataTypes.GetUshort(row["MinMA"]);
                inf.MaxDamage =  GetDataTypes.GetUshort(row["MaxMA"]);
            }
            else
            {
                inf.MaxDamage = maxdamage;
                inf.MinDamage =  GetDataTypes.GetUint(row["MinWC"]);
            }
            return inf;
        }