changes
This commit is contained in:
parent
31d75a8e0d
commit
0774b48501
@ -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)
|
||||
|
||||
@ -453,7 +453,6 @@ namespace DiIiS_NA
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll", ExactSpelling = true)]
|
||||
|
||||
static extern IntPtr GetConsoleWindow();
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
|
||||
Loading…
Reference in New Issue
user.block.title