diff --git a/HearthDb/Card.cs b/HearthDb/Card.cs index 21c2dd88..5c8f2743 100644 --- a/HearthDb/Card.cs +++ b/HearthDb/Card.cs @@ -1,6 +1,5 @@ #region -using System; using System.Linq; using HearthDb.CardDefs; using HearthDb.Enums; @@ -69,7 +68,7 @@ public string[] Mechanics public Locale DefaultLanguage { get; set; } = Locale.enUS; - public bool Collectible => Convert.ToBoolean(Entity.GetTag(COLLECTIBLE)); + public bool Collectible => Entity.GetTag(COLLECTIBLE) != 0; public string GetLocName(Locale lang) => Entity.GetLocString(CARDNAME, lang); diff --git a/HearthDb/CardIds.cs b/HearthDb/CardIds.cs index eb207e4e..80eac790 100644 --- a/HearthDb/CardIds.cs +++ b/HearthDb/CardIds.cs @@ -1,3 +1,4 @@ +// ReSharper disable InconsistentNaming namespace HearthDb { /* THIS CLASS WAS GENERATED BY HearthDb.CardIdGenerator. DO NOT EDIT. */ @@ -4184,4 +4185,4 @@ public class DreamCards } } } -} \ No newline at end of file +} diff --git a/HearthDb/Cards.cs b/HearthDb/Cards.cs index e2b98020..2f130620 100644 --- a/HearthDb/Cards.cs +++ b/HearthDb/Cards.cs @@ -1,6 +1,5 @@ #region -using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -18,11 +17,11 @@ public static class Cards public static readonly Dictionary Collectible = new Dictionary(); - static Cards() - { + static Cards() { var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HearthDb.CardDefs.xml"); if(stream == null) return; + using(TextReader tr = new StreamReader(stream)) { var xml = new XmlSerializer(typeof(CardDefs.CardDefs)); @@ -38,9 +37,9 @@ static Cards() } public static Card GetFromName(string name, Locale lang, bool collectible = true) - => (collectible ? Collectible : All).Values.FirstOrDefault(x => x.GetLocName(lang)?.Equals(name, StringComparison.InvariantCultureIgnoreCase) ?? false); + => (collectible ? Collectible : All).Values.FirstOrDefault(x => x.GetLocName(lang)?.Equals(name) ?? false); public static Card GetFromDbfId(int dbfId, bool collectibe = true) => (collectibe ? Collectible : All).Values.FirstOrDefault(x => x.DbfId == dbfId); } -} \ No newline at end of file +} diff --git a/HearthDb/Enums/Enums.cs b/HearthDb/Enums/Enums.cs index 67236795..a12d5e12 100644 --- a/HearthDb/Enums/Enums.cs +++ b/HearthDb/Enums/Enums.cs @@ -1,3 +1,4 @@ +// ReSharper disable InconsistentNaming namespace HearthDb.Enums { /* THIS FILE WAS GENERATED BY HearthDb.EnumsGenerator. DO NOT EDIT. */ @@ -912,4 +913,4 @@ public enum Zone SETASIDE = 6, SECRET = 7, } -} \ No newline at end of file +} diff --git a/HearthDb/HearthDb.csproj b/HearthDb/HearthDb.csproj index 5be02aa5..eecc265d 100644 --- a/HearthDb/HearthDb.csproj +++ b/HearthDb/HearthDb.csproj @@ -1,105 +1,21 @@ - - - + + - Debug - AnyCPU - {7ED14243-E02B-4B94-AF00-A67A62C282F0} - Library - Properties - HearthDb - HearthDb - v4.5 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset + net471;netcoreapp2.0 + true + snKey.snk + 10.0.1.0 + 10.0.1.0 + false + 10.0.1 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - if exist $(ProjectDir)hsdata ( - git -C "$(ProjectDir)hsdata" fetch - git -C "$(ProjectDir)hsdata" reset --hard origin/master -) else ( - git clone --depth=1 https://github.com/HearthSim/hsdata.git "$(ProjectDir)hsdata" -) -if "$(ConfigurationName)" == "Release" ( - powershell -ExecutionPolicy Unrestricted -file "$(ProjectDir)verify.ps1" "$(ProjectDir)\" -) -xcopy /Y "$(ProjectDir)hsdata\CardDefs.xml" "$(ProjectDir)CardDefs.xml*" - - - \ No newline at end of file + + diff --git a/HearthDb/Info.cs b/HearthDb/Info.cs index de365d8e..04e54fe5 100644 --- a/HearthDb/Info.cs +++ b/HearthDb/Info.cs @@ -11,4 +11,4 @@ public static class Info { public static Version HearthDbVersion => Assembly.GetExecutingAssembly().GetName().Version; } -} \ No newline at end of file +} diff --git a/HearthDb/Properties/AssemblyInfo.cs b/HearthDb/Properties/AssemblyInfo.cs deleted file mode 100644 index 8e9537e0..00000000 --- a/HearthDb/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HearthDb")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("HearthSim")] -[assembly: AssemblyProduct("HearthDb")] -[assembly: AssemblyCopyright("Copyright © HearthSim 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7ed14243-e02b-4b94-af00-a67a62c282f0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("10.0.0.22611")] -[assembly: AssemblyFileVersion("10.0.0.22611")] diff --git a/HearthDb/snKey.snk b/HearthDb/snKey.snk new file mode 100644 index 00000000..20a2a6d5 Binary files /dev/null and b/HearthDb/snKey.snk differ