Ejemplo n.º 1
0
        public static ObjectStats Read(Client psr, NReader rdr)
        {
            ObjectStats ret = new ObjectStats();

            ret.Id       = rdr.ReadInt32();
            ret.Position = Position.Read(psr, rdr);
            ret.Stats    = new KeyValuePair <StatsType, object> [rdr.ReadInt16()];
            for (int i = 0; i < ret.Stats.Length; i++)
            {
                StatsType type = (StatsType)rdr.ReadByte();
                if (type.IsUTF())
                {
                    ret.Stats[i] = new KeyValuePair <StatsType, object>(type, rdr.ReadUTF());
                }
                else
                {
                    ret.Stats[i] = new KeyValuePair <StatsType, object>(type, rdr.ReadInt32());
                }
            }
            return(ret);
        }
Ejemplo n.º 2
0
 public bool IsStringData()
 {
     return(Id.IsUTF());
 }