Skip to content

Commit

Permalink
code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-n committed Oct 6, 2024
1 parent e4b255c commit 0bb42d0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/GameLogic/PlayerActions/PlayerStore/BuyRequestAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public async ValueTask BuyItemAsync(Player player, Player requestedPlayer, byte
if (!requestedPlayer.ShopStorage.StoreOpen)
{
player.Logger.LogDebug("Store not open anymore, Character {0}", requestedPlayer.SelectedCharacter?.Name);
//await player.InvokeViewPlugInAsync<IShowMessagePlugIn>(p => p.ShowMessageAsync("Player's Store not open anymore.", MessageType.BlueNormal)).ConfigureAwait(false);
await player.InvokeViewPlugInAsync<IPlayerShopBuyRequestResultPlugIn>(p => p.ShowResultAsync(requestedPlayer, ItemBuyResult.ShopNotOpened, null)).ConfigureAwait(false);
return;
}
Expand All @@ -79,7 +78,6 @@ public async ValueTask BuyItemAsync(Player player, Player requestedPlayer, byte
if (item is null)
{
await player.InvokeViewPlugInAsync<IPlayerShopBuyRequestResultPlugIn>(p => p.ShowResultAsync(requestedPlayer, ItemBuyResult.InvalidShopSlot, null)).ConfigureAwait(false);
// await player.InvokeViewPlugInAsync<IShowMessagePlugIn>(p => p.ShowMessageAsync("Sorry, Item was sold in the meantime.", MessageType.BlueNormal)).ConfigureAwait(false);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async ValueTask AddExperienceAsync(int exp, IAttackable? obj, ExperienceT
await this._player.Connection.SendExperienceGainedExtendedAsync(
Convert(experienceType),
(uint)exp,
(uint)damage,
damage,
killedId,
killerId)
.ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int Write()
{
var size = PlayerShopItemListExtendedRef.GetRequiredSize(items.Count, PlayerShopItemExtendedRef.GetRequiredSize(itemSerializer.NeededSpace));
var span = connection.Output.GetSpan(size)[..size];
var packet = new PlayerShopItemListExtendedRef(span)
_ = new PlayerShopItemListExtendedRef(span)
{
Action = isUpdate
? PlayerShopItemListExtended.ActionKind.UpdateAfterItemChange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int Write()
{
var size = QuestProgressExtendedRef.Length;
var span = connection.Output.GetSpan(size)[..size];
var packet = new QuestProgressExtendedRef(span)
_ = new QuestProgressExtendedRef(span)
{
QuestGroup = (ushort)quest.Group,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async ValueTask ShowQuestStateAsync(CharacterQuestState? questState)
{
if (questState is null || questState.Group == QuestConstants.LegacyQuestGroup)
{
await this.ShowLegacyQuestStateAsync(questState ??= this._player.SelectedCharacter?.QuestStates.FirstOrDefault(state => state.Group == QuestConstants.LegacyQuestGroup)).ConfigureAwait(false);
await this.ShowLegacyQuestStateAsync(this._player.SelectedCharacter?.QuestStates.FirstOrDefault(state => state.Group == QuestConstants.LegacyQuestGroup)).ConfigureAwait(false);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/GameServer/RemoteView/World/AppearanceChangedPlugIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class AppearanceChangedExtendedPlugIn : IAppearanceChangedPlugIn
public async ValueTask AppearanceChangedAsync(Player changedPlayer, Item item)
{
var connection = this._player.Connection;
if (connection is null || changedPlayer.Inventory is not { } inventory)
if (connection is null || changedPlayer.Inventory is null)
{
return;
}
Expand Down

0 comments on commit 0bb42d0

Please sign in to comment.