Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/GameLogic/Administration/GameMasterItemFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static TemporaryItem CreateItem(ItemDefinition itemDefinition, ItemSpecif
{
var item = new TemporaryItem();
item.Definition = itemDefinition;

// The mobility talisman's durability represents remaining uses rather than quantity.
var identifier = new ItemIdentifier(itemDefinition.Number, itemDefinition.Group);
item.Durability = item.IsStackable() && identifier != ItemConstants.TalismanOfMobility
Expand Down
2 changes: 1 addition & 1 deletion src/GameLogic/PlayerActions/Trade/TradeAcceptAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async ValueTask HandleTradeAcceptAsync(ITrader tradeAccepter, bool accept

if (!await tradeAccepter.PlayerState.TryAdvanceToAsync(PlayerState.TradeOpened).ConfigureAwait(false) || !await tradePartner.PlayerState.TryAdvanceToAsync(PlayerState.TradeOpened).ConfigureAwait(false))
{
////Something bad happened here...
// Failed to open the trade because a player could not enter the TradeOpened state.
await this.CancelTradeAsync(tradeAccepter).ConfigureAwait(false);
await this.CancelTradeAsync(tradePartner).ConfigureAwait(false);
await tradePartner.InvokeViewPlugInAsync<IShowTradeRequestAnswerPlugIn>(p => p.ShowTradeRequestAnswerAsync(false)).ConfigureAwait(false);
Expand Down
4 changes: 2 additions & 2 deletions src/Persistence/EntityFramework/CachedRepository{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public CachedRepository(IRepository<T> baseRepository)
protected IRepository<T> BaseRepository { get; }

/// <inheritdoc/>
async ValueTask<IEnumerable> IRepository.GetAllAsync(CancellationToken cancellationToken = default)
async ValueTask<IEnumerable> IRepository.GetAllAsync(CancellationToken cancellationToken)
{
return await this.GetAllAsync(cancellationToken).ConfigureAwait(false);
}
Expand All @@ -58,7 +58,7 @@ public async ValueTask<IEnumerable<T>> GetAllAsync(CancellationToken cancellatio
}

/// <inheritdoc/>
async ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
async ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken)
{
return await this.GetByIdAsync(id, cancellationToken).ConfigureAwait(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public ValueTask<IEnumerable<T>> GetAllAsync(CancellationToken cancellationToken
}

/// <inheritdoc/>
async ValueTask<IEnumerable> IRepository.GetAllAsync(CancellationToken cancellationToken = default)
async ValueTask<IEnumerable> IRepository.GetAllAsync(CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
return await this.GetAllAsync(cancellationToken).ConfigureAwait(false);
Expand Down Expand Up @@ -109,7 +109,7 @@ public async ValueTask<bool> DeleteAsync(Guid id)
}

/// <inheritdoc />
async ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
async ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken)
{
return await this.GetByIdAsync(id, cancellationToken).ConfigureAwait(false);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Persistence/EntityFramework/GenericRepositoryBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public async ValueTask<bool> DeleteAsync(object obj)
}

/// <inheritdoc/>
async ValueTask<IEnumerable> IRepository.GetAllAsync(CancellationToken cancellationToken = default)
async ValueTask<IEnumerable> IRepository.GetAllAsync(CancellationToken cancellationToken)
{
return await this.GetAllAsync(cancellationToken).ConfigureAwait(false);
}
Expand Down Expand Up @@ -99,7 +99,7 @@ public virtual async ValueTask<IEnumerable<T>> GetAllAsync(CancellationToken can
}

/// <inheritdoc/>
async ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
async ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken)
{
return await this.GetByIdAsync(id, cancellationToken).ConfigureAwait(false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/InMemory/MemoryRepository{TValue}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void OnSaveChanges()
}

/// <inheritdoc/>
async ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
async ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken)
{
return await this.GetByIdAsync(id, cancellationToken).ConfigureAwait(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ private void CreateFlameOfCondor()
feather.MaximumItemLevel = 1;
feather.Number = 52;
feather.Group = 13;
// The drop group of the Barracks of Balgass is the only source of this item. A drop level above the level of the
// monsters (117 to 119) would make DefaultDropGenerator refuse it for every kill, so it has no drop level.
feather.DropLevel = 0;
feather.Width = 1;
feather.Height = 2;
Expand Down
4 changes: 2 additions & 2 deletions src/Persistence/RepositoryAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ValueTask<bool> DeleteAsync(Guid id)
}

/// <inheritdoc />
async ValueTask<IEnumerable> IRepository.GetAllAsync(CancellationToken cancellationToken = default)
async ValueTask<IEnumerable> IRepository.GetAllAsync(CancellationToken cancellationToken)
{
return await this.GetAllAsync(cancellationToken).ConfigureAwait(false);
}
Expand All @@ -56,7 +56,7 @@ public async ValueTask<IEnumerable<T>> GetAllAsync(CancellationToken cancellatio
}

/// <inheritdoc />
ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
ValueTask<object?> IRepository.GetByIdAsync(Guid id, CancellationToken cancellationToken)
{
return this._repository.GetByIdAsync(id, cancellationToken);
}
Expand Down