Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Source/ACE.Server/WorldObjects/Creature_Vitals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public bool VitalHeartBeat(CreatureVital vital)
var enchantmentMod = EnchantmentManager.GetRegenerationMod(vital);

var augMod = 1.0f;
if (this is Player player && player.AugmentationFasterRegen > 0)
if (this is Player player && player.AugmentationFasterRegen > 0 && ForwardCommand == MotionCommand.Sleeping)
augMod += player.AugmentationFasterRegen;

// cap rate?
Expand Down Expand Up @@ -200,6 +200,9 @@ public float GetAttributeMod(CreatureVital vital)
return attributeMod;
}

private MotionCommand ForwardCommand => CurrentMovementData.MovementType == MovementType.Invalid && CurrentMovementData.Invalid != null ?
CurrentMovementData.Invalid.State.ForwardCommand : MotionCommand.Invalid;

/// <summary>
/// Returns the vital regeneration modifier based on player stance
/// (combat, crouch, sitting, sleeping)
Expand All @@ -212,7 +215,7 @@ public float GetStanceMod(CreatureVital vital)
// does not apply for mana?
if (vital.Vital == PropertyAttribute2nd.MaxMana) return 1.0f;

var forwardCommand = CurrentMovementData.MovementType == MovementType.Invalid && CurrentMovementData.Invalid != null ? CurrentMovementData.Invalid.State.ForwardCommand : MotionCommand.Invalid;
var forwardCommand = ForwardCommand;

// combat mode / running
if (CombatMode != CombatMode.NonCombat || forwardCommand == MotionCommand.RunForward)
Expand Down