feat(mosstank): add VTank-style automation PoC
This commit is contained in:
parent
f6fe0f2a4f
commit
4e6e9bc9d9
212 changed files with 49462 additions and 416 deletions
|
|
@ -58,4 +58,25 @@ public sealed class ClientObjectTableUpdateTests
|
|||
[Fact]
|
||||
public void UpdateStackSize_unknownObject_returnsFalse()
|
||||
=> Assert.False(new ClientObjectTable().UpdateStackSize(0xDEADu, 1, 1));
|
||||
|
||||
[Fact]
|
||||
public void UpdateAppraisal_retainsPropertiesAndDefensiveSpellSnapshot()
|
||||
{
|
||||
var table = new ClientObjectTable();
|
||||
table.AddOrUpdate(new ClientObject { ObjectId = 0x700u });
|
||||
int updates = 0;
|
||||
table.ObjectUpdated += _ => updates++;
|
||||
var bundle = new PropertyBundle();
|
||||
bundle.Ints[106] = 420;
|
||||
uint[] spells = [1327u, 1132u];
|
||||
|
||||
Assert.True(table.UpdateAppraisal(0x700u, bundle, spells, 12.345d));
|
||||
spells[0] = 0u;
|
||||
|
||||
ClientObject item = table.Get(0x700u)!;
|
||||
Assert.Equal(420, item.Properties.Ints[106]);
|
||||
Assert.Equal([1327u, 1132u], item.AppraisedSpellIds);
|
||||
Assert.Equal(12345, item.LastAppraisalTimeMs);
|
||||
Assert.Equal(1, updates);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue