Skip to content

Commit

Permalink
Removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-n committed Oct 27, 2023
1 parent 8e92673 commit 1bdff33
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 69 deletions.
17 changes: 0 additions & 17 deletions src/DataModel/Configuration/Items/ItemOfItemSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,6 @@ public partial class ItemOfItemSet
[JsonIgnore]
public string Name => $"{this.ItemSetGroup?.Name} {this.ItemDefinition?.Name}";

///// <inheritdoc />
//public void AssignValuesOf(ItemOfItemSet other, GameConfiguration gameConfiguration)
//{
// this.AncientSetDiscriminator = other.AncientSetDiscriminator;
// this.ItemSetGroup = other.ItemSetGroup is null ? null : gameConfiguration.ItemSetGroups.FirstOrDefault(o => o == other.ItemSetGroup);
// this.ItemDefinition = other.ItemDefinition is null ? null : gameConfiguration.Items.FirstOrDefault(o => o == other.ItemDefinition);
// this.BonusOption = other.BonusOption is null ? null : gameConfiguration.ItemOptions.SelectMany(iod => iod.PossibleOptions).FirstOrDefault(o => o == other.BonusOption);
//}

///// <inheritdoc />
//public virtual ItemOfItemSet Clone(GameConfiguration gameConfiguration)
//{
// var clone = new ItemOfItemSet();
// clone.AssignValuesOf(this, gameConfiguration);
// return clone;
//}

/// <inheritdoc/>
public override string ToString()
{
Expand Down
47 changes: 0 additions & 47 deletions src/DataModel/Configuration/MonsterDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,53 +341,6 @@ public float this[AttributeDefinition key]
}
}

///// <inheritdoc/>
//public void AssignValuesOf(object other, GameConfiguration gameConfiguration)
//{
// if (other is MonsterDefinition typedOther)
// {
// this.AssignValuesOf(typedOther, gameConfiguration);
// }
//}

///// <inheritdoc/>
//public void AssignValuesOf(MonsterDefinition other, GameConfiguration gameConfiguration)
//{
// this.AttackDelay = other.AttackDelay;
// this.AttackRange = other.AttackRange;
// this.Attribute = other.Attribute;
// this.Designation = other.Designation;
// this.IntelligenceTypeName = other.IntelligenceTypeName;
// this.MoveDelay = other.MoveDelay;
// this.MoveRange = other.MoveRange;
// this.Number = other.Number;
// this.ObjectKind = other.ObjectKind;
// this.RespawnDelay = other.RespawnDelay;
// this.ViewRange = other.ViewRange;
// this.NpcWindow = other.NpcWindow;
// this.NumberOfMaximumItemDrops = other.NumberOfMaximumItemDrops;

// // Object references:
// if (this.AttackSkill != other.AttackSkill)
// {
// this.AttackSkill = other.AttackSkill == null ? null : gameConfiguration.Skills.FirstOrDefault(s => s == other.AttackSkill);
// }

// if (this.MerchantStore is null && other.MerchantStore is not null)
// {
// // Implement cloning
// //this.MerchantStore = other.MerchantStore.Clone();
// }

// //this.MerchantStore = other.MerchantStore;

// // Collections: todo: compare collections; add new ones, remove old ones
// //this.Attributes = other.Attributes;
// //this.DropItemGroups = other.DropItemGroups;
// //this.ItemCraftings = other.ItemCraftings;
// //this.Quests = other.Quests;
//}

/// <inheritdoc/>
public override string ToString()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </copyright>

using Microsoft.Extensions.Logging.Abstractions;
using MUnique.OpenMU.Interfaces;

namespace MUnique.OpenMU.Persistence.EntityFramework;

using Microsoft.EntityFrameworkCore;
Expand Down Expand Up @@ -80,14 +77,12 @@ public override async ValueTask<IEnumerable<GameConfiguration>> GetAllAsync()
{
configs.ForEach(config =>
{
//using var context = new CachingEntityFrameworkContext(currentContext.Context, this.RepositoryProvider, false, IConfigurationChangePublisher.None, NullLogger<CachingEntityFrameworkContext>.Instance);
((EntityDataContext)currentContext.Context).CurrentGameConfiguration = config;
(this.RepositoryProvider as ICacheAwareRepositoryProvider)?.EnsureCachesForCurrentGameConfiguration();
});
}
finally
{

((EntityDataContext)currentContext.Context).CurrentGameConfiguration = oldConfig;
}

Expand Down

0 comments on commit 1bdff33

Please sign in to comment.