feat(player): port retail augmentation stat chain
This commit is contained in:
parent
0cb60d98a0
commit
461a1fb7b4
22 changed files with 953 additions and 138 deletions
|
|
@ -233,6 +233,58 @@ public sealed class LiveSessionEventRouterTests
|
|||
router.Dispose();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ObjectTablePropertyChange_RecomputesMovementSkillAugmentations()
|
||||
{
|
||||
using var session = NewSession();
|
||||
const uint playerGuid = 0x50000001u;
|
||||
var objects = new ClientObjectTable();
|
||||
var character = new RuntimeCharacterState();
|
||||
character.LocalPlayer.OnSkillUpdate(
|
||||
RuntimeCharacterState.RunSkillId,
|
||||
ranks: 0u,
|
||||
status: 3u,
|
||||
xp: 0u,
|
||||
init: 0u,
|
||||
resistance: 0u,
|
||||
lastUsed: 0d,
|
||||
formulaBonus: 200u);
|
||||
character.UpdateMovementSkillBase(
|
||||
runSkillBase: 200,
|
||||
jumpSkillBase: -1);
|
||||
|
||||
var router = new LiveSessionEventRouter(
|
||||
session,
|
||||
NoOpEntitySink(),
|
||||
NoOpEnvironmentSink(),
|
||||
new LiveInventorySessionBindings(
|
||||
objects,
|
||||
PlayerGuid: () => playerGuid,
|
||||
OnShortcuts: null,
|
||||
OnUseDone: null,
|
||||
ItemMana: new ItemManaState(),
|
||||
ExternalContainers: new ExternalContainerState()),
|
||||
new LiveCharacterSessionBindings(
|
||||
new CombatState(),
|
||||
character,
|
||||
ResolveSkillFormulaBonus: null,
|
||||
OnSkillsUpdated: null,
|
||||
OnConfirmationRequest: null,
|
||||
OnConfirmationDone: null,
|
||||
ClientTime: () => 0d),
|
||||
NewSocialBindings());
|
||||
router.Attach();
|
||||
|
||||
var properties = new PropertyBundle();
|
||||
properties.Ints[(uint)PropertyInt.LumAugAllSkills] = 2;
|
||||
properties.Ints[(uint)PropertyInt.AugmentationJackOfAllTrades] = 1;
|
||||
properties.Ints[(uint)PropertyInt.LumAugSkilledSpec] = 3;
|
||||
objects.UpsertProperties(playerGuid, properties);
|
||||
|
||||
Assert.Equal(213, character.MovementSkills.RunSkill);
|
||||
router.Dispose();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void StaminaVitalChange_PushesCurrentStamina()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue