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); }
public static MobInfo Load(DataRow row) { MobInfo inf = new MobInfo { Name = (string)row["InxName"], ID = GetDataTypes.GetUshort(row["ID"]), Level = GetDataTypes.GetByte(row["Level"]), MaxHP = GetDataTypes.GetUint(row["MaxHP"]), RunSpeed = GetDataTypes.GetUshort(row["RunSpeed"]), IsNpc = GetDataTypes.GetBool(row["IsNPC"]), Size = GetDataTypes.GetUshort(row["Size"]), Type = GetDataTypes.GetByte(row["Type"]), IsAggro = GetDataTypes.GetBool(row["IsPlayerSide"]), Drops = new List<DropInfo>() }; return inf; }