Ejemplo n.º 1
0
 public static void Deserialize(SpecialDropControlDefine ins, System.IO.Stream stream)
 {
     tabtoy.DataReader reader = new tabtoy.DataReader(stream);
     if (!reader.ReadHeader())
     {
         throw new System.Exception(string.Format("Deserialize failed: {0}", ins.GetType()));
     }
     Deserialize(ins, reader);
 }
Ejemplo n.º 2
0
        public SpecialDropControlDefine GetByID(string ID, SpecialDropControlDefine def = default(SpecialDropControlDefine))
        {
            SpecialDropControlDefine ret;

            if (_ByID.TryGetValue(ID, out ret))
            {
                return(ret);
            }

            if (def == default(SpecialDropControlDefine))
            {
                TableLogger.ErrorLine("GetByID failed, ID: {0}", ID);
            }

            return(def);
        }
Ejemplo n.º 3
0
        public static void Deserialize(SpecialDropControlDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x60000:
                {
                    ins.ID = reader.ReadString();
                }
                break;

                case 0x10001:
                {
                    ins.SeedType = reader.ReadInt32();
                }
                break;

                case 0x10002:
                {
                    ins.max = reader.ReadInt32();
                }
                break;

                case 0x10003:
                {
                    ins.DailyDropLimit = reader.ReadInt32();
                }
                break;

                case 0x10004:
                {
                    ins.DropLimit = reader.ReadInt32();
                }
                break;

                case 0x10005:
                {
                    ins.MemoryLimit = reader.ReadInt32();
                }
                break;
                }
            }
        }