public BuffDefine GetBuffByID(int ID, BuffDefine def = default(BuffDefine)) { BuffDefine ret; if (_BuffByID.TryGetValue(ID, out ret)) { return(ret); } if (def == default(BuffDefine)) { TableLogger.ErrorLine("GetBuffByID failed, ID: {0}", ID); } return(def); }
public static void Deserialize(BuffDefine 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.Desc = reader.ReadString(); } break; case 0x60003: { ins.Icon = reader.ReadString(); } break; case 0x10004: { ins.Type = reader.ReadInt32(); } break; case 0x10005: { ins.Duration = reader.ReadInt32(); } break; case 0x10006: { ins.Args.Add(reader.ReadInt32()); } break; case 0x10007: { ins.Group = reader.ReadInt32(); } break; case 0x70008: { ins.IsDebuff = reader.ReadBool(); } break; case 0x10009: { ins.Overlay = reader.ReadInt32(); } break; case 0x1000a: { ins.ImmunityList.Add(reader.ReadInt32()); } break; case 0x1000b: { ins.ConflictList.Add(reader.ReadInt32()); } break; case 0x7000c: { ins.IsDisplay = reader.ReadBool(); } break; case 0x6000d: { ins.Effect = reader.ReadString(); } break; } } }