fix(ui): select and examine favorite spells like retail
This commit is contained in:
parent
043ab10b3c
commit
3e31b0ac70
23 changed files with 974 additions and 34 deletions
|
|
@ -165,6 +165,39 @@ public sealed class SpellComponentRequirementServiceTests
|
|||
Assert.False(service.HasRequiredComponents(50u));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExaminationFormulaPreservesOrderAndReportsNestedOwnership()
|
||||
{
|
||||
var objects = new ClientObjectTable();
|
||||
objects.AddOrUpdate(new ClientObject { ObjectId = 1u, Name = "Player" });
|
||||
objects.AddOrUpdate(new ClientObject
|
||||
{
|
||||
ObjectId = 2u,
|
||||
ContainerId = 1u,
|
||||
Type = ItemType.Container,
|
||||
});
|
||||
objects.AddOrUpdate(new ClientObject
|
||||
{
|
||||
ObjectId = 3u,
|
||||
WeenieClassId = 101u,
|
||||
ContainerId = 2u,
|
||||
});
|
||||
var service = Service(
|
||||
objects,
|
||||
[10u, 11u, 10u],
|
||||
new Dictionary<uint, uint>
|
||||
{
|
||||
[10u] = 101u,
|
||||
[11u] = 102u,
|
||||
});
|
||||
|
||||
Assert.Equal(
|
||||
new uint[] { 10u, 11u, 10u },
|
||||
service.GetAppropriateFormula(50u));
|
||||
Assert.True(service.IsComponentOwned(10u));
|
||||
Assert.False(service.IsComponentOwned(11u));
|
||||
}
|
||||
|
||||
private static SpellComponentRequirementService Service(
|
||||
ClientObjectTable objects,
|
||||
IReadOnlyList<uint> components,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue