From 85465d505fc0dd223cf830fa186084fd3b0d291f Mon Sep 17 00:00:00 2001 From: bernat Date: Sun, 1 Sep 2024 18:29:43 +0200 Subject: [PATCH] fix decrease defense item durability with master skill buff --- src/GameLogic/Player.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GameLogic/Player.cs b/src/GameLogic/Player.cs index f5b7f83c5..5a4a4fbc7 100644 --- a/src/GameLogic/Player.cs +++ b/src/GameLogic/Player.cs @@ -234,7 +234,7 @@ public Account? Account public NonPlayerCharacter? OpenedNpc { get; set; } /// - public StateMachine PlayerState { get; } = new (GameLogic.PlayerState.Initial); + public StateMachine PlayerState { get; } = new(GameLogic.PlayerState.Initial); // TODO: TradeContext-object? @@ -278,7 +278,7 @@ private set public ISet Observers { get; } = new HashSet(); /// - public AsyncReaderWriterLock ObserverLock { get; } = new (); + public AsyncReaderWriterLock ObserverLock { get; } = new(); /// public IPartyMember? LastPartyRequester { get; set; } @@ -327,7 +327,7 @@ private set /// public Point Position { - get => new (this.SelectedCharacter?.PositionX ?? 0, this.SelectedCharacter?.PositionY ?? 0); + get => new(this.SelectedCharacter?.PositionX ?? 0, this.SelectedCharacter?.PositionY ?? 0); set { @@ -2255,7 +2255,7 @@ private async ValueTask DecreaseDefenseItemDurabilityAsync(Item targetItem, HitI var damageDivisor = targetItem.IsTrainablePet() ? this.GameContext.Configuration.DamagePerOnePetDurability : this.GameContext.Configuration.DamagePerOneItemDurability; if (itemDurationIncrease.HasValue) { - damageDivisor /= (double)itemDurationIncrease; + damageDivisor *= (double)itemDurationIncrease; } var decrement = hitInfo.HealthDamage / damageDivisor;