Esempio n. 1
0
 public static void Deserialize(BuffConfigDefine 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);
 }
Esempio n. 2
0
        public BuffConfigDefine GetByID(int ID, BuffConfigDefine def = default(BuffConfigDefine))
        {
            BuffConfigDefine ret;

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

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

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

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

                case 0x60001:
                {
                    ins.Name = reader.ReadString();
                }
                break;

                case 0x60002:
                {
                    ins.Icon = reader.ReadString();
                }
                break;

                case 0x60003:
                {
                    ins.Effect = reader.ReadString();
                }
                break;

                case 0x70004:
                {
                    ins.ShowIcon = reader.ReadBool();
                }
                break;

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

                case 0x60006:
                {
                    ins.Description = reader.ReadString();
                }
                break;

                case 0x10007:
                {
                    ins.Target = reader.ReadInt32();
                }
                break;

                case 0x70008:
                {
                    ins.Clear = reader.ReadBool();
                }
                break;

                case 0x60009:
                {
                    ins.BroadcastType = reader.ReadString();
                }
                break;

                case 0x6000a:
                {
                    ins.BuffType = reader.ReadString();
                }
                break;

                case 0x6000b:
                {
                    ins.EffectGroup = reader.ReadString();
                }
                break;

                case 0x1000c:
                {
                    ins.Priority = reader.ReadInt32();
                }
                break;

                case 0x7000d:
                {
                    ins.Superposition = reader.ReadBool();
                }
                break;

                case 0x1000e:
                {
                    ins.SuperpositionLimit = reader.ReadInt32();
                }
                break;

                case 0x5000f:
                {
                    ins.ExistTime = reader.ReadFloat();
                }
                break;

                case 0x50010:
                {
                    ins.EffectiveInterval = reader.ReadFloat();
                }
                break;

                case 0x10011:
                {
                    ins.EffectType = reader.ReadInt32();
                }
                break;

                case 0x50012:
                {
                    ins.EffectTypeNum = reader.ReadFloat();
                }
                break;

                case 0x50013:
                {
                    ins.EffectTypePer = reader.ReadFloat();
                }
                break;

                case 0x60014:
                {
                    ins.Event.Add(reader.ReadString());
                }
                break;

                case 0x60015:
                {
                    ins.Property.Add(reader.ReadString());
                }
                break;
                }
            }
        }