public static SlotObject Read(DReader rdr) { SlotObject ret = new SlotObject(); ret.ObjectId = rdr.ReadInt32(); ret.SlotId = rdr.ReadInt32(); ret.ObjectType = rdr.ReadInt32(); return(ret); }
public static TradeItem Read(DReader rdr) { var ret = new TradeItem(); ret.Item = rdr.ReadInt32(); ret.SlotType = rdr.ReadInt32(); ret.Tradeable = rdr.ReadBoolean(); ret.Included = rdr.ReadBoolean(); return(ret); }
public static BitmapData Read(DReader rdr) { BitmapData ret = new BitmapData(); ret.Width = rdr.ReadInt32(); ret.Height = rdr.ReadInt32(); ret.Bytes = new byte[ret.Width * ret.Height * 4]; ret.Bytes = rdr.ReadBytes(ret.Bytes.Length); return(ret); }
public static TimedPosition Read(DReader rdr) { var ret = new TimedPosition(); ret.Time = rdr.ReadInt32(); ret.Position = Position.Read(rdr); return(ret); }
public void Read(DReader rdr) { this.StatsType = (StatsType)rdr.ReadByte(); if (IsUTFData()) { this.obf2 = rdr.ReadUTF(); } else { this.obf1 = rdr.ReadInt32(); } }
public static Status Read(DReader rdr) { Status ret = new Status(); ret.ObjectId = rdr.ReadInt32(); ret.Position = Position.Read(rdr); ret.StatData = new StatData[rdr.ReadInt16()]; for (int i = 0; i < ret.StatData.Length; i++) { StatData statData = new StatData(); statData.Read(rdr); ret.StatData[i] = statData; } return(ret); }
public static ObjectStats Read(DReader rdr) { var ret = new ObjectStats(); ret.Id = rdr.ReadInt32(); ret.Position = Position.Read(rdr); ret.Stats = new KeyValuePair <StatsType, object> [rdr.ReadInt16()]; for (var i = 0; i < ret.Stats.Length; i++) { var type = (StatsType)rdr.ReadByte(); if (type == StatsType.GUILD || type == StatsType.NAME) { ret.Stats[i] = new KeyValuePair <StatsType, object>(type, rdr.ReadUTF()); } else { ret.Stats[i] = new KeyValuePair <StatsType, object>(type, rdr.ReadInt16()); } } return(ret); }