GameAttribute.List.cs name fix and made dependent on GameAttribute.cs

This commit is contained in:
Lucca Faria Ferri 2023-02-09 22:51:26 -08:00
parent ab7f61ea14
commit b8c68c3db8
2 changed files with 7 additions and 3 deletions

View File

@ -120,4 +120,10 @@
</None>
</ItemGroup>
<ItemGroup>
<Compile Update="D3-GameServer\MessageSystem\GameAttribute.List.cs">
<DependentUpon>GameAttribute.cs</DependentUpon>
</Compile>
</ItemGroup>
</Project>

View File

@ -15,9 +15,7 @@ namespace DiIiS_NA.GameServer.MessageSystem
Attributes = typeof(GameAttribute).GetFields()
.Where(a =>
a.IsStatic &&
(a.FieldType.Name == "GameAttributeI" ||
a.FieldType.Name == "GameAttributeF" ||
a.FieldType.Name == "GameAttributeB"))
a.FieldType.Name is nameof(GameAttributeI) or nameof(GameAttributeF) or nameof(GameAttributeB))
.Select(a => a.GetValue(null) as GameAttribute)
.OrderBy(a => a.Id)
.ToArray();