baseline: OpenMU upstream b5a0961 (fresh source)
This commit is contained in:
183
src/Persistence/BasicModel/MonsterDefinition.Generated.cs
Normal file
183
src/Persistence/BasicModel/MonsterDefinition.Generated.cs
Normal file
@@ -0,0 +1,183 @@
|
||||
// <copyright file="MonsterDefinition.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="MonsterDefinition"/>.
|
||||
/// </summary>
|
||||
public partial class MonsterDefinition : MUnique.OpenMU.DataModel.Configuration.MonsterDefinition, IIdentifiable, IConvertibleTo<MonsterDefinition>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of this instance.
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw collection of <see cref="ItemCraftings" />.
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("itemCraftings")]
|
||||
public ICollection<ItemCrafting> RawItemCraftings { get; } = new List<ItemCrafting>();
|
||||
|
||||
/// <inheritdoc/>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override ICollection<MUnique.OpenMU.DataModel.Configuration.ItemCrafting.ItemCrafting> ItemCraftings
|
||||
{
|
||||
get => base.ItemCraftings ??= new CollectionAdapter<MUnique.OpenMU.DataModel.Configuration.ItemCrafting.ItemCrafting, ItemCrafting>(this.RawItemCraftings);
|
||||
protected set
|
||||
{
|
||||
this.ItemCraftings.Clear();
|
||||
foreach (var item in value)
|
||||
{
|
||||
this.ItemCraftings.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw collection of <see cref="DropItemGroups" />.
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("dropItemGroups")]
|
||||
public ICollection<DropItemGroup> RawDropItemGroups { get; } = new List<DropItemGroup>();
|
||||
|
||||
/// <inheritdoc/>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override ICollection<MUnique.OpenMU.DataModel.Configuration.DropItemGroup> DropItemGroups
|
||||
{
|
||||
get => base.DropItemGroups ??= new CollectionAdapter<MUnique.OpenMU.DataModel.Configuration.DropItemGroup, DropItemGroup>(this.RawDropItemGroups);
|
||||
protected set
|
||||
{
|
||||
this.DropItemGroups.Clear();
|
||||
foreach (var item in value)
|
||||
{
|
||||
this.DropItemGroups.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw collection of <see cref="Attributes" />.
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attributes")]
|
||||
public ICollection<MonsterAttribute> RawAttributes { get; } = new List<MonsterAttribute>();
|
||||
|
||||
/// <inheritdoc/>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override ICollection<MUnique.OpenMU.DataModel.Configuration.MonsterAttribute> Attributes
|
||||
{
|
||||
get => base.Attributes ??= new CollectionAdapter<MUnique.OpenMU.DataModel.Configuration.MonsterAttribute, MonsterAttribute>(this.RawAttributes);
|
||||
protected set
|
||||
{
|
||||
this.Attributes.Clear();
|
||||
foreach (var item in value)
|
||||
{
|
||||
this.Attributes.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw collection of <see cref="Quests" />.
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("quests")]
|
||||
public ICollection<QuestDefinition> RawQuests { get; } = new List<QuestDefinition>();
|
||||
|
||||
/// <inheritdoc/>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override ICollection<MUnique.OpenMU.DataModel.Configuration.Quests.QuestDefinition> Quests
|
||||
{
|
||||
get => base.Quests ??= new CollectionAdapter<MUnique.OpenMU.DataModel.Configuration.Quests.QuestDefinition, QuestDefinition>(this.RawQuests);
|
||||
protected set
|
||||
{
|
||||
this.Quests.Clear();
|
||||
foreach (var item in value)
|
||||
{
|
||||
this.Quests.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw object of <see cref="AttackSkill" />.
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attackSkill")]
|
||||
public Skill RawAttackSkill
|
||||
{
|
||||
get => base.AttackSkill as Skill;
|
||||
set => base.AttackSkill = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override MUnique.OpenMU.DataModel.Configuration.Skill AttackSkill
|
||||
{
|
||||
get => base.AttackSkill;
|
||||
set => base.AttackSkill = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw object of <see cref="MerchantStore" />.
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchantStore")]
|
||||
public ItemStorage RawMerchantStore
|
||||
{
|
||||
get => base.MerchantStore as ItemStorage;
|
||||
set => base.MerchantStore = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override MUnique.OpenMU.DataModel.Entities.ItemStorage MerchantStore
|
||||
{
|
||||
get => base.MerchantStore;
|
||||
set => base.MerchantStore = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override MUnique.OpenMU.DataModel.Configuration.MonsterDefinition Clone(MUnique.OpenMU.DataModel.Configuration.GameConfiguration gameConfiguration)
|
||||
{
|
||||
var clone = new MonsterDefinition();
|
||||
clone.AssignValuesOf(this, gameConfiguration);
|
||||
return clone;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void AssignValuesOf(MUnique.OpenMU.DataModel.Configuration.MonsterDefinition 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 MonsterDefinition Convert() => this;
|
||||
}
|
||||
Reference in New Issue
Block a user