Skip to content

Commit

Permalink
Fixed scrolls and orbs durability in test accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-n committed Jan 10, 2024
1 parent bd6b7a7 commit 1868848
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </copyright>

using MUnique.OpenMU.Persistence.Initialization.Items;

namespace MUnique.OpenMU.Persistence.Initialization.Version075.TestAccounts;

using MUnique.OpenMU.AttributeSystem;
Expand All @@ -13,6 +11,7 @@ namespace MUnique.OpenMU.Persistence.Initialization.Version075.TestAccounts;
using MUnique.OpenMU.GameLogic;
using MUnique.OpenMU.GameLogic.Attributes;
using MUnique.OpenMU.Persistence.Initialization.CharacterClasses;
using MUnique.OpenMU.Persistence.Initialization.Items;

/// <summary>
/// Abstract base class for a test account initializer.
Expand Down Expand Up @@ -395,10 +394,11 @@ protected Item CreateWeapon(byte itemSlot, byte group, byte number, byte level,
/// <returns>The created orb.</returns>
protected Item CreateOrb(byte itemSlot, byte itemNumber)
{
var potion = this.Context.CreateNew<Item>();
potion.Definition = this.GameConfiguration.Items.First(def => def.Group == (byte)ItemGroups.Orbs && def.Number == itemNumber);
potion.ItemSlot = itemSlot;
return potion;
var orb = this.Context.CreateNew<Item>();
orb.Definition = this.GameConfiguration.Items.First(def => def.Group == (byte)ItemGroups.Orbs && def.Number == itemNumber);
orb.ItemSlot = itemSlot;
orb.Durability = 1;
return orb;
}

/// <summary>
Expand All @@ -409,10 +409,11 @@ protected Item CreateOrb(byte itemSlot, byte itemNumber)
/// <returns>The created scroll.</returns>
protected Item CreateScroll(byte itemSlot, byte itemNumber)
{
var potion = this.Context.CreateNew<Item>();
potion.Definition = this.GameConfiguration.Items.First(def => def.Group == (byte)ItemGroups.Scrolls && def.Number == itemNumber);
potion.ItemSlot = itemSlot;
return potion;
var scroll = this.Context.CreateNew<Item>();
scroll.Definition = this.GameConfiguration.Items.First(def => def.Group == (byte)ItemGroups.Scrolls && def.Number == itemNumber);
scroll.ItemSlot = itemSlot;
scroll.Durability = 1;
return scroll;
}

/// <summary>
Expand Down

0 comments on commit 1868848

Please sign in to comment.