Merge pull request #825 from eduardosmaniotto/feature/configurable-npc-buffs
feature: configurable npc buffs (cherry picked from commit 6a061fcad756e644dadf3721e84e3cce2a25bceb)
This commit is contained in:
81
src/Persistence/BasicModel/Buff.Generated.cs
Normal file
81
src/Persistence/BasicModel/Buff.Generated.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
// <copyright file="Buff.Generated.cs" company="MUnique">
|
||||
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
||||
// </copyright>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This source code was auto-generated by a roslyn code generator.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// ReSharper disable All
|
||||
|
||||
namespace MUnique.OpenMU.Persistence.BasicModel;
|
||||
|
||||
using MUnique.OpenMU.Persistence.Json;
|
||||
|
||||
/// <summary>
|
||||
/// A plain implementation of <see cref="Buff"/>.
|
||||
/// </summary>
|
||||
public partial class Buff : MUnique.OpenMU.DataModel.Configuration.Buff, IIdentifiable, IConvertibleTo<Buff>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of this instance.
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw object of <see cref="MagicEffectDefinition" />.
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("magicEffectDefinition")]
|
||||
public MagicEffectDefinition RawMagicEffectDefinition
|
||||
{
|
||||
get => base.MagicEffectDefinition as MagicEffectDefinition;
|
||||
set => base.MagicEffectDefinition = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override MUnique.OpenMU.DataModel.Configuration.MagicEffectDefinition MagicEffectDefinition
|
||||
{
|
||||
get => base.MagicEffectDefinition;
|
||||
set => base.MagicEffectDefinition = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override MUnique.OpenMU.DataModel.Configuration.Buff Clone(MUnique.OpenMU.DataModel.Configuration.GameConfiguration gameConfiguration)
|
||||
{
|
||||
var clone = new Buff();
|
||||
clone.AssignValuesOf(this, gameConfiguration);
|
||||
return clone;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void AssignValuesOf(MUnique.OpenMU.DataModel.Configuration.Buff other, MUnique.OpenMU.DataModel.Configuration.GameConfiguration gameConfiguration)
|
||||
{
|
||||
base.AssignValuesOf(other, gameConfiguration);
|
||||
this.Id = other.GetId();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
var baseObject = obj as IIdentifiable;
|
||||
if (baseObject != null)
|
||||
{
|
||||
return baseObject.Id == this.Id;
|
||||
}
|
||||
|
||||
return base.Equals(obj);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.Id.GetHashCode();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public Buff Convert() => this;
|
||||
}
|
||||
@@ -109,6 +109,27 @@ public partial class MonsterDefinition : MUnique.OpenMU.DataModel.Configuration.
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw collection of <see cref="Buffs" />.
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("buffs")]
|
||||
public ICollection<Buff> RawBuffs { get; } = new List<Buff>();
|
||||
|
||||
/// <inheritdoc/>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override ICollection<MUnique.OpenMU.DataModel.Configuration.Buff> Buffs
|
||||
{
|
||||
get => base.Buffs ??= new CollectionAdapter<MUnique.OpenMU.DataModel.Configuration.Buff, Buff>(this.RawBuffs);
|
||||
protected set
|
||||
{
|
||||
this.Buffs.Clear();
|
||||
foreach (var item in value)
|
||||
{
|
||||
this.Buffs.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw object of <see cref="AttackSkill" />.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user