public static void Deserialize(TestDefine 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 0x10002: { ins.IconID = reader.ReadInt32(); } break; } } }
public TestDefine GetTestByName(string Name, TestDefine def = default(TestDefine)) { TestDefine ret; if (_TestByName.TryGetValue(Name, out ret)) { return(ret); } if (def == default(TestDefine)) { TableLogger.ErrorLine("GetTestByName failed, Name: {0}", Name); } return(def); }
public TestDefine GetTestByID(int ID, TestDefine def = default(TestDefine)) { TestDefine ret; if (_TestByID.TryGetValue(ID, out ret)) { return(ret); } if (def == default(TestDefine)) { TableLogger.ErrorLine("GetTestByID failed, ID: {0}", ID); } return(def); }
public static void Deserialize(TestDefine ins, tabtoy.DataReader reader) { int tag = -1; while (-1 != (tag = reader.ReadTag())) { switch (tag) { case 0x10000: { ins.ID = reader.ReadInt32(); } break; case 0x10001: { ins.TestInt = reader.ReadInt32(); } break; case 0x20002: { ins.TestLong = reader.ReadInt64(); } break; case 0x50003: { ins.TestFloat = reader.ReadFloat(); } break; case 0x60004: { ins.TestString = reader.ReadString(); } break; case 0x10005: { ins.TestIntArr.Add(reader.ReadInt32()); } break; case 0x50006: { ins.TestFloat2 = reader.ReadFloat(); } break; case 0x60007: { ins.TestStringArr.Add(reader.ReadString()); } break; case 0x80008: { ins.TestEnum0 = reader.ReadEnum <SkillTriggerType>(); } break; case 0x80009: { ins.TestEnum1 = reader.ReadEnum <SkillTriggerType>(); } break; case 0x9000a: { ins.TestClass = reader.ReadStruct <DropShow>(DropShowDeserializeHandler); } break; case 0x6000b: { ins.Name = reader.ReadString(); } break; } } }