Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f0e05b1
fix: removing entry from plugin timetable updates in real-time
eduardosmaniotto Mar 5, 2026
121816a
code review: fix gemini-code-assist warnings
eduardosmaniotto Mar 5, 2026
8713cc6
fix: create attribute in account page
eduardosmaniotto Mar 5, 2026
ede4b5c
feature: duplicate item on ItemStorageField
eduardosmaniotto Mar 10, 2026
bdc15b2
feature: implement offlevel
eduardosmaniotto Mar 12, 2026
72de4dd
feature: implement offlevel xp
eduardosmaniotto Mar 13, 2026
d01d6e3
feature: offlevel combo and walking
eduardosmaniotto Mar 13, 2026
01ed93f
code review: apply gemini code suggestion and fixes
eduardosmaniotto Mar 14, 2026
11339e7
code review: fix codacy issues
eduardosmaniotto Mar 14, 2026
38e3bf6
code review: apply gemini and codacy code suggestions
eduardosmaniotto Mar 14, 2026
a822011
code review: apply codacy code fixes
eduardosmaniotto Mar 14, 2026
739a9ef
feature: offlevel zen cost and repair item, cleanup code and split lo…
eduardosmaniotto Mar 14, 2026
b29a685
code review: apply codacy fixes
eduardosmaniotto Mar 14, 2026
b1b7bc6
code review: apply codacy fixes
eduardosmaniotto Mar 14, 2026
4680e39
feature: offline leveling zen handler and refactor timer
eduardosmaniotto Mar 14, 2026
8dbcc7b
code review: apply codacy fixes
eduardosmaniotto Mar 14, 2026
b8ec5c4
code review: apply codacy fixes
eduardosmaniotto Mar 14, 2026
1ec52c0
code review: apply codacy fixes
eduardosmaniotto Mar 14, 2026
dd68581
code review: remove double empty lines
eduardosmaniotto Mar 14, 2026
0e017fb
Merge branch 'master' into feature/offlevel
sven-n Mar 15, 2026
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
2 changes: 1 addition & 1 deletion src/AttributeSystem/StatAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public StatAttribute(AttributeDefinition definition, float baseValue)
{
get
{
if (this.Definition.MaximumValue.HasValue)
if (this.Definition?.MaximumValue.HasValue is true)
{
return Math.Min(this.Definition.MaximumValue.Value, this._statValue);
}
Expand Down
2 changes: 1 addition & 1 deletion src/GameLogic/DroppedItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private async ValueTask<bool> TryPickUpAsync(Player player)
this._availableToPick = false;
}

player.Logger.LogInformation("Item '{0}' was picked up by player '{1}' and added to his inventory.", this, player);
player.Logger.LogDebug("Item '{0}' was picked up by player '{1}' and added to his inventory.", this, player);
await this.DisposeAsync().ConfigureAwait(false);

return true;
Expand Down
4 changes: 2 additions & 2 deletions src/GameLogic/DroppedMoney.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ public async ValueTask<bool> TryPickUpByAsync(Player player)

if (clampMoneyOnPickup && amountToAdd < this.Amount)
{
player.Logger.LogInformation("Money '{0}' was partially picked up by player '{1}' - added {2} out of {3} (player at max limit).", this, player, amountToAdd, this.Amount);
player.Logger.LogDebug("Money '{0}' was partially picked up by player '{1}' - added {2} out of {3} (player at max limit).", this, player, amountToAdd, this.Amount);
}
else
{
player.Logger.LogInformation("Money '{0}' was picked up by player '{1}' and added to his inventory.", this, player);
player.Logger.LogDebug("Money '{0}' was picked up by player '{1}' and added to his inventory.", this, player);
}

await this.DisposeAsync().ConfigureAwait(false);
Expand Down
3 changes: 3 additions & 0 deletions src/GameLogic/GameContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ public GameContext(GameConfiguration configuration, IPersistenceContextProvider
/// <inheritdoc />
public FeaturePlugInContainer FeaturePlugIns { get; }

/// <inheritdoc />
public OfflineLeveling.OfflineLevelingManager OfflineLevelingManager { get; } = new();

/// <inheritdoc/>
public IItemPowerUpFactory ItemPowerUpFactory { get; }

Expand Down
13 changes: 13 additions & 0 deletions src/GameLogic/GameMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ public IList<IAttackable> GetAttackablesInRange(Point point, int range)
return this._areaOfInterestManager.GetInRange(point, range).OfType<IAttackable>().ToList();
}

/// <summary>
/// Gets all dropped items and money within the specified range of a point.
/// </summary>
/// <param name="point">The coordinates.</param>
/// <param name="range">The range.</param>
/// <returns>Dropped items and money in range.</returns>
public IList<ILocateable> GetDropsInRange(Point point, int range)
{
return this._areaOfInterestManager.GetInRange(point, range)
.Where(l => l is DroppedItem or DroppedMoney)
.ToList();
}

/// <summary>
/// Gets the drop by id.
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions src/GameLogic/IGameContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public interface IGameContext
/// </summary>
FeaturePlugInContainer FeaturePlugIns { get; }

/// <summary>
/// Gets the offline leveling manager which tracks active ghost players.
/// </summary>
OfflineLeveling.OfflineLevelingManager OfflineLevelingManager { get; }

/// <summary>
/// Gets the players count of the game.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/GameLogic/InventoryStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public InventoryStorage(Player player, IGameContext context)
GetInventorySize(0),
EquippableSlotsCount,
0,
new ItemStorageAdapter(player.SelectedCharacter?.Inventory ?? throw Error.NotInitializedProperty(player, "SelectedCharacter.Inventory"), FirstEquippableItemSlotIndex, player.GetInventorySize()))
new ItemStorageAdapter(player.SelectedCharacter?.Inventory ?? throw Error.NotInitializedProperty(player, "SelectedCharacter.Inventory"), FirstEquippableItemSlotIndex, player.InventorySize))
{
this._player = player;
this.EquippedItemsChanged += async eventArgs => await this.UpdateItemsOnChangeAsync(eventArgs.Item, eventArgs.IsEquipped).ConfigureAwait(false);
Expand Down
4 changes: 2 additions & 2 deletions src/GameLogic/MuHelper/MuHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class MuHelper : AsyncDisposable
/// <summary>
/// The current configuration.
/// </summary>
private readonly MuHelperConfiguration _configuration;
private readonly MuHelperServerConfiguration _configuration;

private CancellationTokenSource? _stopCts;
private Task? _runTask;
Expand All @@ -43,7 +43,7 @@ public class MuHelper : AsyncDisposable
public MuHelper(Player player)
{
this._player = player;
this._configuration = this._player.GameContext.FeaturePlugIns.GetPlugIn<MuHelperFeaturePlugIn>()?.Configuration ?? new MuHelperConfiguration();
this._configuration = this._player.GameContext.FeaturePlugIns.GetPlugIn<MuHelperFeaturePlugIn>()?.Configuration ?? new MuHelperServerConfiguration();
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions src/GameLogic/MuHelper/MuHelperFeaturePlugIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ namespace MUnique.OpenMU.GameLogic.MuHelper;
[PlugIn]
[Display(Name = nameof(PlugInResources.MuHelperFeaturePlugIn_Name), Description = nameof(PlugInResources.MuHelperFeaturePlugIn_Description), ResourceType = typeof(PlugInResources))]
[Guid("E90A72C3-0459-4323-B6D3-171F88D35542")]
public class MuHelperFeaturePlugIn : IFeaturePlugIn, ISupportCustomConfiguration<MuHelperConfiguration>, ISupportDefaultCustomConfiguration
public class MuHelperFeaturePlugIn : IFeaturePlugIn, ISupportCustomConfiguration<MuHelperServerConfiguration>, ISupportDefaultCustomConfiguration
{
/// <inheritdoc/>
public MuHelperConfiguration? Configuration { get; set; }
public MuHelperServerConfiguration? Configuration { get; set; }

/// <inheritdoc />
public object CreateDefaultConfig() => new MuHelperConfiguration();
public object CreateDefaultConfig() => new MuHelperServerConfiguration();
}
Loading