mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-24 20:12:20 +00:00
* Improve GWCA bindings generator based on headers * Move all structs to gwca * Progress * Complete parser work * More generator adjustments * GWCA fixes * GWCA improvements * GWCA fixes * GWCA fixes * GWCA fixes * GWCA fixes * Fix API usage of GWCA * Update GWCA --------- Co-authored-by: Alexandru Macocian <amacocian@microsoft.com>
19 lines
579 B
C#
19 lines
579 B
C#
using Daybreak.API.Interop.GuildWars;
|
|
using Daybreak.Shared.Models.Api;
|
|
|
|
namespace Daybreak.API.Extensions;
|
|
|
|
public static class AttributeContextExtensions
|
|
{
|
|
public static IEnumerable<AttributeEntry> GetAttributeEntryList(this AttributeStructArray54 attributes)
|
|
{
|
|
foreach (var attribute in attributes)
|
|
{
|
|
if (attribute.LevelBase > 0 && attribute.Level >= attribute.LevelBase)
|
|
{
|
|
yield return new AttributeEntry((uint)attribute.Id, attribute.LevelBase, attribute.Level);
|
|
}
|
|
}
|
|
}
|
|
}
|