public static void Deserialize(EquipDefine 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; } } }
public EquipDefine GetEquipByID(int ID, EquipDefine def = default(EquipDefine)) { EquipDefine ret; if (_EquipByID.TryGetValue(ID, out ret)) { return(ret); } if (def == default(EquipDefine)) { TableLogger.ErrorLine("GetEquipByID failed, ID: {0}", ID); } return(def); }