예제 #1
0
        public static void Deserialize(ModifierDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

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

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

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

                case 0x10003:
                {
                    ins.Args.Add(reader.ReadInt32());
                }
                break;
                }
            }
        }
예제 #2
0
        public ModifierDefine GetModifierByID(int ID, ModifierDefine def = default(ModifierDefine))
        {
            ModifierDefine ret;

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

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

            return(def);
        }