diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ItemsSystem/Affix.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ItemsSystem/Affix.cs index 23e4065..4c6dc4f 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ItemsSystem/Affix.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ItemsSystem/Affix.cs @@ -23,42 +23,25 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem foreach (var asset in MPQStorage.Data.Assets[SNOGroup.GameBalance].Values) { GameBalance data = asset.Data as GameBalance; - if (data != null && data.Type == BalanceType.AffixList) + if (data is not { Type: BalanceType.AffixList }) continue; + foreach (AffixTable affixDefinition in data.Affixes.Where(affixDefinition => affixDefinition.Hash == AffixGbid)) { - foreach (var affixDefinition in data.Affixes) - { - if (affixDefinition.Hash == AffixGbid) return affixDefinition; - } + return affixDefinition; } } return null; } } - public int Price - { - get - { - return (Definition == null ? 0 : Definition.Cost); - } - } + public int Price => (Definition == null ? 0 : Definition.Cost); - public int ItemLevel - { - get - { - return (Definition == null ? 0 : Definition.AffixLevel); - } - } + public int ItemLevel => (Definition == null ? 0 : Definition.AffixLevel); public float Score = 0f; public int Rating { - get - { - return (int)(Price * (1 + Score)); - } + get => (int)(Price * (1 + Score)); set { } } @@ -69,7 +52,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem public override String ToString() { - return String.Format("{0}", AffixGbid); + return AffixGbid.ToString(); } public static Affix Parse(String affixString) diff --git a/src/DiIiS-NA/Program.cs b/src/DiIiS-NA/Program.cs index 1458034..a7c67ab 100644 --- a/src/DiIiS-NA/Program.cs +++ b/src/DiIiS-NA/Program.cs @@ -453,7 +453,6 @@ namespace DiIiS_NA } [DllImport("kernel32.dll", ExactSpelling = true)] - static extern IntPtr GetConsoleWindow(); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]