Skip to content

Commit

Permalink
Merge pull request #478 from bernatvadell/fix/increase-durability
Browse files Browse the repository at this point in the history
fix decrease defense item durability with master skill buff
  • Loading branch information
sven-n authored Sep 2, 2024
2 parents d901d0c + 85465d5 commit bf22b2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/GameLogic/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public Account? Account
public NonPlayerCharacter? OpenedNpc { get; set; }

/// <inheritdoc/>
public StateMachine PlayerState { get; } = new (GameLogic.PlayerState.Initial);
public StateMachine PlayerState { get; } = new(GameLogic.PlayerState.Initial);

// TODO: TradeContext-object?

Expand Down Expand Up @@ -278,7 +278,7 @@ private set
public ISet<IWorldObserver> Observers { get; } = new HashSet<IWorldObserver>();

/// <inheritdoc/>
public AsyncReaderWriterLock ObserverLock { get; } = new ();
public AsyncReaderWriterLock ObserverLock { get; } = new();

/// <inheritdoc/>
public IPartyMember? LastPartyRequester { get; set; }
Expand Down Expand Up @@ -327,7 +327,7 @@ private set
/// <inheritdoc/>
public Point Position
{
get => new (this.SelectedCharacter?.PositionX ?? 0, this.SelectedCharacter?.PositionY ?? 0);
get => new(this.SelectedCharacter?.PositionX ?? 0, this.SelectedCharacter?.PositionY ?? 0);

set
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bf22b2b

Please sign in to comment.