Пример #1
0
        public static SlotObject Read(DReader rdr)
        {
            SlotObject ret = new SlotObject();

            ret.ObjectId   = rdr.ReadInt32();
            ret.SlotId     = rdr.ReadInt32();
            ret.ObjectType = rdr.ReadInt32();
            return(ret);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        public static TimedPosition Read(DReader rdr)
        {
            var ret = new TimedPosition();

            ret.Time     = rdr.ReadInt32();
            ret.Position = Position.Read(rdr);
            return(ret);
        }
Пример #5
0
 public void Read(DReader rdr)
 {
     this.StatsType = (StatsType)rdr.ReadByte();
     if (IsUTFData())
     {
         this.obf2 = rdr.ReadUTF();
     }
     else
     {
         this.obf1 = rdr.ReadInt32();
     }
 }
Пример #6
0
        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);
        }
Пример #7
0
        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);
        }