fix(movement): invalidate burden on enchantment changes
This commit is contained in:
parent
2b9dfec9d7
commit
d6e8b60303
13 changed files with 231 additions and 25 deletions
|
|
@ -229,6 +229,10 @@ public sealed class LiveSessionEventRouter : ILiveSessionEventRouting
|
|||
if (kind == LocalPlayerState.AttributeKind.Strength)
|
||||
RecomputeBurden(inventory, character);
|
||||
});
|
||||
SubscribeParameterless(
|
||||
h => character.Character.Spellbook.EnchantmentsChanged += h,
|
||||
h => character.Character.Spellbook.EnchantmentsChanged -= h,
|
||||
() => RecomputeBurden(inventory, character));
|
||||
|
||||
// Current-stamina push — CACQualities::InqRunRate/InqJumpVelocity's
|
||||
// stamina==0 effective-skill-zeroing gate (pseudocode doc §5).
|
||||
|
|
@ -370,8 +374,8 @@ public sealed class LiveSessionEventRouter : ILiveSessionEventRouting
|
|||
{
|
||||
uint player = inventory.PlayerGuid();
|
||||
ClientObject? playerObject = inventory.Objects.Get(player);
|
||||
int strength = (int)(character.Character.LocalPlayer
|
||||
.GetAttribute(LocalPlayerState.AttributeKind.Strength)?.Current ?? 0u);
|
||||
int strength = character.Character.LocalPlayer
|
||||
.GetEffectiveAttribute(LocalPlayerState.AttributeKind.Strength) ?? 0;
|
||||
int aug = playerObject?.Properties.GetInt(
|
||||
(uint)PropertyInt.AugmentationIncreasedCarryingCapacity) ?? 0;
|
||||
int capacity = EncumbranceSystem.EncumbranceCapacity(strength, aug);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue