acdream/tests/AcDream.Core.Tests/Items/AetheriaUnlockStateTests.cs
Erik edc9be3008 fix(paperdoll): port quest-gated Aetheria slots
Add the three authored blue, yellow, and red sigil backgrounds and drive their visibility from player PropertyInt.AetheriaBitfield bits 1/2/4 at login and on live updates, matching gmPaperDollUI::UpdateAetheria. Include the sigil equip masks in the shared slot table and narrow AP-108.

Co-Authored-By: Codex <codex@openai.com>
2026-07-13 09:55:20 +02:00

29 lines
889 B
C#

using AcDream.Core.Items;
using Xunit;
namespace AcDream.Core.Tests.Items;
public sealed class AetheriaUnlockStateTests
{
[Fact]
public void Missing_property_means_all_slots_locked()
{
var player = new ClientObject { ObjectId = 1 };
Assert.Equal(AetheriaUnlockState.None, AetheriaUnlocks.Read(player));
}
[Fact]
public void Property_322_preserves_the_three_independent_retail_bits()
{
var player = new ClientObject { ObjectId = 1 };
player.Properties.Ints[AetheriaUnlocks.PropertyId] =
(int)(AetheriaUnlockState.Blue | AetheriaUnlockState.Red);
AetheriaUnlockState actual = AetheriaUnlocks.Read(player);
Assert.True((actual & AetheriaUnlockState.Blue) != 0);
Assert.False((actual & AetheriaUnlockState.Yellow) != 0);
Assert.True((actual & AetheriaUnlockState.Red) != 0);
}
}