// // Licensed under the MIT License. See LICENSE file in the project root for full license information. // //------------------------------------------------------------------------------ // // This source code was auto-generated by a roslyn code generator. // //------------------------------------------------------------------------------ // ReSharper disable All namespace MUnique.OpenMU.Persistence.BasicModel; using MUnique.OpenMU.Persistence.Json; /// /// A plain implementation of . /// public partial class MonsterDefinition : MUnique.OpenMU.DataModel.Configuration.MonsterDefinition, IIdentifiable, IConvertibleTo { /// /// Gets or sets the identifier of this instance. /// public Guid Id { get; set; } /// /// Gets the raw collection of . /// [System.Text.Json.Serialization.JsonPropertyName("itemCraftings")] public ICollection RawItemCraftings { get; } = new List(); /// [System.Text.Json.Serialization.JsonIgnore] public override ICollection ItemCraftings { get => base.ItemCraftings ??= new CollectionAdapter(this.RawItemCraftings); protected set { this.ItemCraftings.Clear(); foreach (var item in value) { this.ItemCraftings.Add(item); } } } /// /// Gets the raw collection of . /// [System.Text.Json.Serialization.JsonPropertyName("dropItemGroups")] public ICollection RawDropItemGroups { get; } = new List(); /// [System.Text.Json.Serialization.JsonIgnore] public override ICollection DropItemGroups { get => base.DropItemGroups ??= new CollectionAdapter(this.RawDropItemGroups); protected set { this.DropItemGroups.Clear(); foreach (var item in value) { this.DropItemGroups.Add(item); } } } /// /// Gets the raw collection of . /// [System.Text.Json.Serialization.JsonPropertyName("attributes")] public ICollection RawAttributes { get; } = new List(); /// [System.Text.Json.Serialization.JsonIgnore] public override ICollection Attributes { get => base.Attributes ??= new CollectionAdapter(this.RawAttributes); protected set { this.Attributes.Clear(); foreach (var item in value) { this.Attributes.Add(item); } } } /// /// Gets the raw collection of . /// [System.Text.Json.Serialization.JsonPropertyName("quests")] public ICollection RawQuests { get; } = new List(); /// [System.Text.Json.Serialization.JsonIgnore] public override ICollection Quests { get => base.Quests ??= new CollectionAdapter(this.RawQuests); protected set { this.Quests.Clear(); foreach (var item in value) { this.Quests.Add(item); } } } /// /// Gets the raw collection of . /// [System.Text.Json.Serialization.JsonPropertyName("buffs")] public ICollection RawBuffs { get; } = new List(); /// [System.Text.Json.Serialization.JsonIgnore] public override ICollection Buffs { get => base.Buffs ??= new CollectionAdapter(this.RawBuffs); protected set { this.Buffs.Clear(); foreach (var item in value) { this.Buffs.Add(item); } } } /// /// Gets the raw object of . /// [System.Text.Json.Serialization.JsonPropertyName("attackSkill")] public Skill RawAttackSkill { get => base.AttackSkill as Skill; set => base.AttackSkill = value; } /// [System.Text.Json.Serialization.JsonIgnore] public override MUnique.OpenMU.DataModel.Configuration.Skill AttackSkill { get => base.AttackSkill; set => base.AttackSkill = value; } /// /// Gets the raw object of . /// [System.Text.Json.Serialization.JsonPropertyName("merchantStore")] public ItemStorage RawMerchantStore { get => base.MerchantStore as ItemStorage; set => base.MerchantStore = value; } /// [System.Text.Json.Serialization.JsonIgnore] public override MUnique.OpenMU.DataModel.Entities.ItemStorage MerchantStore { get => base.MerchantStore; set => base.MerchantStore = value; } /// public override MUnique.OpenMU.DataModel.Configuration.MonsterDefinition Clone(MUnique.OpenMU.DataModel.Configuration.GameConfiguration gameConfiguration) { var clone = new MonsterDefinition(); clone.AssignValuesOf(this, gameConfiguration); return clone; } /// public override void AssignValuesOf(MUnique.OpenMU.DataModel.Configuration.MonsterDefinition other, MUnique.OpenMU.DataModel.Configuration.GameConfiguration gameConfiguration) { base.AssignValuesOf(other, gameConfiguration); this.Id = other.GetId(); } /// public override bool Equals(object obj) { var baseObject = obj as IIdentifiable; if (baseObject != null) { return baseObject.Id == this.Id; } return base.Equals(obj); } /// public override int GetHashCode() { return this.Id.GetHashCode(); } /// public MonsterDefinition Convert() => this; }