This commit is contained in:
Lucca Faria Ferri 2023-09-13 04:27:03 +02:00
parent 31d75a8e0d
commit 0774b48501
2 changed files with 7 additions and 25 deletions

View File

@ -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)

View File

@ -453,7 +453,6 @@ namespace DiIiS_NA
}
[DllImport("kernel32.dll", ExactSpelling = true)]
static extern IntPtr GetConsoleWindow();
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]