public static ARGB Read(DReader rdr) { var ret = new ARGB(); ret.A = rdr.ReadByte(); ret.R = rdr.ReadByte(); ret.G = rdr.ReadByte(); ret.B = rdr.ReadByte(); 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 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); }