From 9b9162469d837de7db2351290f0dbc44a6b574fe Mon Sep 17 00:00:00 2001 From: Kamus Date: Mon, 8 Dec 2025 13:14:59 -0300 Subject: [PATCH 1/8] Three spell effects were added: - Knockback (for some reason it was "invisible" and unused) - Grievous Wounds - Healing Boost The healing and healing null percentages are editable in the server settings (I had trouble modifying the database, so I decided to leave it to someone more experienced). I added comments to everything possible to make it as clear as possible. Feedback is appreciated, as this is my first pull request for this project. --- .../Config/CombatOptions.cs | 10 ++++ .../Entities/SpellEffect.cs | 4 ++ Intersect.Client.Core/Localization/Strings.cs | 3 + Intersect.Editor/Localization/Strings.cs | 3 + Intersect.Server.Core/Entities/Entity.cs | 56 +++++++++++++++++-- Intersect.Server.Core/Localization/Strings.cs | 3 + 6 files changed, 75 insertions(+), 4 deletions(-) diff --git a/Framework/Intersect.Framework.Core/Config/CombatOptions.cs b/Framework/Intersect.Framework.Core/Config/CombatOptions.cs index ad0b6d5134..e793812a3c 100644 --- a/Framework/Intersect.Framework.Core/Config/CombatOptions.cs +++ b/Framework/Intersect.Framework.Core/Config/CombatOptions.cs @@ -83,4 +83,14 @@ public partial class CombatOptions /// If enabled, this allows players to cast friendly spells on players who aren't in their guild or party /// public bool EnableAllPlayersFriendlyInSafeZone { get; set; } = false; + + /// + /// Percentage of healing reduction when Grievous Wounds effect is applied. Default 50%. + /// + public int GrievousWoundsHealingReduction { get; set; } = 50; + + /// + /// Percentage of healing increase when Healing Boost effect is applied. Default 50%. + /// + public int HealingBoostPercentage { get; set; } = 50; } diff --git a/Framework/Intersect.Framework.Core/Entities/SpellEffect.cs b/Framework/Intersect.Framework.Core/Entities/SpellEffect.cs index 5445e44340..5dda46e8fb 100644 --- a/Framework/Intersect.Framework.Core/Entities/SpellEffect.cs +++ b/Framework/Intersect.Framework.Core/Entities/SpellEffect.cs @@ -29,4 +29,8 @@ public enum SpellEffect Taunt = 12, Knockback = 13, + + GrievousWounds = 14, + + HealingBoost = 15, } diff --git a/Intersect.Client.Core/Localization/Strings.cs b/Intersect.Client.Core/Localization/Strings.cs index e7d315fc32..bfee2759ec 100644 --- a/Intersect.Client.Core/Localization/Strings.cs +++ b/Intersect.Client.Core/Localization/Strings.cs @@ -2646,6 +2646,9 @@ public partial struct SpellDescription {10, @"Sleep"}, {11, @"On-Hit"}, {12, @"Taunt"}, + {13, @"Knockback"}, + {14, @"Grievous Wounds"}, + {15, @"Healing Boost"}, }; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] diff --git a/Intersect.Editor/Localization/Strings.cs b/Intersect.Editor/Localization/Strings.cs index 9321a0d29d..e48ace8d79 100644 --- a/Intersect.Editor/Localization/Strings.cs +++ b/Intersect.Editor/Localization/Strings.cs @@ -5312,6 +5312,9 @@ public partial struct SpellEditor {10, @"Sleep"}, {11, @"OnHit"}, {12, @"Taunt"}, + {13, @"Knockback"}, + {14, @"Grievous Wounds"}, + {15, @"Healing Boost"}, }; public static LocalizedString effectgroup = @"Effect"; diff --git a/Intersect.Server.Core/Entities/Entity.cs b/Intersect.Server.Core/Entities/Entity.cs index ed1f6f6a3a..b0c0841b7e 100644 --- a/Intersect.Server.Core/Entities/Entity.cs +++ b/Intersect.Server.Core/Entities/Entity.cs @@ -1551,12 +1551,53 @@ public void AddVital(Vital vital, long amount) return; } + // Apply healing modifiers for Health only (positive amounts = healing) + if (vital == Vital.Health && amount > 0) + { + amount = ApplyHealingModifiers(amount); + } + var vitalId = (int)vital; var maxVitalValue = GetMaxVital(vitalId); var safeAmount = Math.Min(amount, long.MaxValue - maxVitalValue); SetVital(vital, GetVital(vital) + safeAmount); } + /// + /// Applies Grievous Wounds and Healing Boost modifiers to healing amount. + /// Formula: Healing × (1 + boost) × (1 - reduction) + /// + protected long ApplyHealingModifiers(long healAmount) + { + if (healAmount <= 0) + { + return healAmount; + } + + var boostModifier = 0.0; + var reductionModifier = 0.0; + + foreach (var status in CachedStatuses) + { + if (status.Type == SpellEffect.GrievousWounds) + { + reductionModifier += Options.Instance.Combat.GrievousWoundsHealingReduction / 100.0; + } + else if (status.Type == SpellEffect.HealingBoost) + { + boostModifier += Options.Instance.Combat.HealingBoostPercentage / 100.0; + } + } + + // Cap reduction at 100% to avoid negative healing + reductionModifier = Math.Min(1.0, reductionModifier); + + // Apply multiplicative formula: Healing × (1 + boost) × (1 - reduction) + var finalModifier = (1.0 + boostModifier) * (1.0 - reductionModifier); + + return (long)(healAmount * finalModifier); + } + public void SubVital(Vital vital, long amount) { if (!Enum.IsDefined(vital)) @@ -2211,10 +2252,17 @@ public void Attack( } else if (baseDamage < 0 && !enemy.IsFullVital(Vital.Health)) { - enemy.AddVital(Vital.Health, -baseDamage); - PacketSender.SendActionMsg( - enemy, Strings.Combat.AddSymbol + Math.Abs(baseDamage), CustomColors.Combat.Heal - ); + var healAmount = -baseDamage; + var previousHealth = enemy.GetVital(Vital.Health); + enemy.AddVital(Vital.Health, healAmount); + var actualHealed = enemy.GetVital(Vital.Health) - previousHealth; + + if (actualHealed > 0) + { + PacketSender.SendActionMsg( + enemy, Strings.Combat.AddSymbol + actualHealed, CustomColors.Combat.Heal + ); + } } } diff --git a/Intersect.Server.Core/Localization/Strings.cs b/Intersect.Server.Core/Localization/Strings.cs index bf0b8a7099..66d3dc261f 100644 --- a/Intersect.Server.Core/Localization/Strings.cs +++ b/Intersect.Server.Core/Localization/Strings.cs @@ -334,6 +334,9 @@ public sealed partial class CombatNamespace : LocaleNamespace {10, @"SLEEP!"}, {11, @"ON HIT!"}, {12, @"TAUNT!"}, + {13, @"KNOCKBACK!"}, + {14, @"GRIEVOUS WOUNDS!"}, + {15, @"HEALING BOOST!"}, } ); From c27e9eb89fa6a30f10c9dc0caf74bc96856d0964 Mon Sep 17 00:00:00 2001 From: Kamus Date: Mon, 8 Dec 2025 23:04:03 -0300 Subject: [PATCH 2/8] Fix and add usage to the knockback skill effect --- .../Spells/SpellCombatDescriptor.cs | 5 +++ .../Forms/Editors/frmSpell.Designer.cs | 39 ++++++++++++++++++- Intersect.Editor/Forms/Editors/frmSpell.cs | 14 +++++++ Intersect.Editor/Localization/Strings.cs | 3 ++ .../Entities/Combat/Status.cs | 11 ++++++ .../Game/SqliteGameContextModelSnapshot.cs | 3 ++ 6 files changed, 74 insertions(+), 1 deletion(-) diff --git a/Framework/Intersect.Framework.Core/GameObjects/Spells/SpellCombatDescriptor.cs b/Framework/Intersect.Framework.Core/GameObjects/Spells/SpellCombatDescriptor.cs index 8325bc031c..912503dc89 100644 --- a/Framework/Intersect.Framework.Core/GameObjects/Spells/SpellCombatDescriptor.cs +++ b/Framework/Intersect.Framework.Core/GameObjects/Spells/SpellCombatDescriptor.cs @@ -83,6 +83,11 @@ public string PercentageStatDiffJson public SpellEffect Effect { get; set; } + /// + /// Number of tiles to push the target when Knockback effect is applied. + /// + public int KnockbackTiles { get; set; } = 1; + public string TransformSprite { get; set; } [Column("OnHit")] diff --git a/Intersect.Editor/Forms/Editors/frmSpell.Designer.cs b/Intersect.Editor/Forms/Editors/frmSpell.Designer.cs index cae7914140..ca37758bc6 100644 --- a/Intersect.Editor/Forms/Editors/frmSpell.Designer.cs +++ b/Intersect.Editor/Forms/Editors/frmSpell.Designer.cs @@ -121,6 +121,8 @@ private void InitializeComponent() this.picSprite = new System.Windows.Forms.PictureBox(); this.cmbTransform = new DarkUI.Controls.DarkComboBox(); this.lblSprite = new System.Windows.Forms.Label(); + this.lblKnockbackTiles = new System.Windows.Forms.Label(); + this.nudKnockbackTiles = new DarkUI.Controls.DarkNumericUpDown(); this.grpEffectDuration = new DarkUI.Controls.DarkGroupBox(); this.nudBuffDuration = new DarkUI.Controls.DarkNumericUpDown(); this.lblBuffDuration = new System.Windows.Forms.Label(); @@ -206,6 +208,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudTick)).BeginInit(); this.grpEffect.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picSprite)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudKnockbackTiles)).BeginInit(); this.grpEffectDuration.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudBuffDuration)).BeginInit(); this.grpDamage.SuspendLayout(); @@ -1511,6 +1514,8 @@ private void InitializeComponent() this.grpEffect.Controls.Add(this.picSprite); this.grpEffect.Controls.Add(this.cmbTransform); this.grpEffect.Controls.Add(this.lblSprite); + this.grpEffect.Controls.Add(this.lblKnockbackTiles); + this.grpEffect.Controls.Add(this.nudKnockbackTiles); this.grpEffect.ForeColor = System.Drawing.Color.Gainsboro; this.grpEffect.Location = new System.Drawing.Point(224, 243); this.grpEffect.Name = "grpEffect"; @@ -1554,7 +1559,10 @@ private void InitializeComponent() "Shield", "Sleep", "On Hit", - "Taunt"}); + "Taunt", + "Knockback", + "Grievous Wounds", + "Healing Boost"}); this.cmbExtraEffect.Location = new System.Drawing.Point(5, 31); this.cmbExtraEffect.Name = "cmbExtraEffect"; this.cmbExtraEffect.Size = new System.Drawing.Size(80, 21); @@ -1605,6 +1613,32 @@ private void InitializeComponent() this.lblSprite.TabIndex = 40; this.lblSprite.Text = "Sprite:"; // + // lblKnockbackTiles + // + + this.lblKnockbackTiles.AutoSize = true; + this.lblKnockbackTiles.Location = new System.Drawing.Point(91, 34); + this.lblKnockbackTiles.Name = "lblKnockbackTiles"; + this.lblKnockbackTiles.Size = new System.Drawing.Size(32, 13); + this.lblKnockbackTiles.TabIndex = 45; + this.lblKnockbackTiles.Text = "Tiles:"; + this.lblKnockbackTiles.Visible = false; + // + // nudKnockbackTiles + // + + this.nudKnockbackTiles.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(69)))), ((int)(((byte)(73)))), ((int)(((byte)(74))))); + this.nudKnockbackTiles.ForeColor = System.Drawing.Color.Gainsboro; + this.nudKnockbackTiles.Location = new System.Drawing.Point(129, 31); + this.nudKnockbackTiles.Maximum = new decimal(new int[] { 10, 0, 0, 0 }); + this.nudKnockbackTiles.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + this.nudKnockbackTiles.Name = "nudKnockbackTiles"; + this.nudKnockbackTiles.Size = new System.Drawing.Size(50, 20); + this.nudKnockbackTiles.TabIndex = 46; + this.nudKnockbackTiles.Value = new decimal(new int[] { 1, 0, 0, 0 }); + this.nudKnockbackTiles.Visible = false; + this.nudKnockbackTiles.ValueChanged += new System.EventHandler(this.nudKnockbackTiles_ValueChanged); + // // grpEffectDuration // this.grpEffectDuration.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48))))); @@ -2415,6 +2449,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudHitRadius)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudCastRange)).EndInit(); this.grpCombat.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.nudKnockbackTiles)).EndInit(); this.grpStats.ResumeLayout(false); this.grpStats.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudSpdPercentage)).EndInit(); @@ -2607,5 +2642,7 @@ private void InitializeComponent() private DarkComboBox cmbTickAnimation; private System.Windows.Forms.Label lblSpriteCastAnimation; private DarkComboBox cmbCastSprite; + private System.Windows.Forms.Label lblKnockbackTiles; + private DarkNumericUpDown nudKnockbackTiles; } } diff --git a/Intersect.Editor/Forms/Editors/frmSpell.cs b/Intersect.Editor/Forms/Editors/frmSpell.cs index 714070b114..2e366b55f3 100644 --- a/Intersect.Editor/Forms/Editors/frmSpell.cs +++ b/Intersect.Editor/Forms/Editors/frmSpell.cs @@ -535,6 +535,8 @@ private void cmbExtraEffect_SelectedIndexChanged(object sender, EventArgs e) lblSprite.Visible = false; cmbTransform.Visible = false; picSprite.Visible = false; + lblKnockbackTiles.Visible = false; + nudKnockbackTiles.Visible = false; if (cmbExtraEffect.SelectedIndex == 6) //Transform { @@ -567,6 +569,13 @@ private void cmbExtraEffect_SelectedIndexChanged(object sender, EventArgs e) picSprite.BackgroundImage = null; } } + + if (cmbExtraEffect.SelectedIndex == (int)SpellEffect.Knockback) // Knockback + { + lblKnockbackTiles.Visible = true; + nudKnockbackTiles.Visible = true; + nudKnockbackTiles.Value = Math.Max(1, mEditorItem.Combat.KnockbackTiles); + } } private void frmSpell_FormClosed(object sender, FormClosedEventArgs e) @@ -1100,4 +1109,9 @@ private void cmbTickAnimation_SelectedIndexChanged(object sender, EventArgs e) Guid animationId = AnimationDescriptor.IdFromList(cmbTickAnimation.SelectedIndex - 1); mEditorItem.TickAnimation = AnimationDescriptor.Get(animationId); } + + private void nudKnockbackTiles_ValueChanged(object sender, EventArgs e) + { + mEditorItem.Combat.KnockbackTiles = (int)nudKnockbackTiles.Value; + } } diff --git a/Intersect.Editor/Localization/Strings.cs b/Intersect.Editor/Localization/Strings.cs index e48ace8d79..7635823f63 100644 --- a/Intersect.Editor/Localization/Strings.cs +++ b/Intersect.Editor/Localization/Strings.cs @@ -5364,6 +5364,9 @@ public partial struct SpellEditor [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public static LocalizedString TickAnimation = @"Tick Animation:"; + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public static LocalizedString knockbacktiles = @"Tiles:"; + public static LocalizedString magicresist = @"Magic Resist:"; public static LocalizedString manacost = @"Mana Cost:"; diff --git a/Intersect.Server.Core/Entities/Combat/Status.cs b/Intersect.Server.Core/Entities/Combat/Status.cs index 7010055f66..27074c4315 100644 --- a/Intersect.Server.Core/Entities/Combat/Status.cs +++ b/Intersect.Server.Core/Entities/Combat/Status.cs @@ -208,6 +208,17 @@ public Status(Entity en, Entity attacker, SpellDescriptor spell, SpellEffect typ } } + + // If this is a Knockback effect, apply the displacement (push target away from attacker) + if (Type == SpellEffect.Knockback && spell.Combat.KnockbackTiles > 0) + { + // Calculate direction from attacker to target, then that's the direction to push + var knockbackDirection = Attacker.GetDirectionTo(en); + if (knockbackDirection != Direction.None) + { + var dash = new Dash(en, spell.Combat.KnockbackTiles, knockbackDirection, false, false, false, false); + } + } } public long[] Shield { get; set; } = new long[Enum.GetValues().Length]; diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/SqliteGameContextModelSnapshot.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/SqliteGameContextModelSnapshot.cs index 90d1d8d58d..f2a6f3952c 100644 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/SqliteGameContextModelSnapshot.cs +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/SqliteGameContextModelSnapshot.cs @@ -1535,6 +1535,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) b1.Property("HotDotInterval") .HasColumnType("INTEGER"); + b1.Property("KnockbackTiles") + .HasColumnType("INTEGER"); + b1.Property("OnHitDuration") .HasColumnType("INTEGER") .HasColumnName("OnHit"); From 922eecf3b13f6c859af992da230a5fb8e04d11fe Mon Sep 17 00:00:00 2001 From: Kamus Date: Tue, 9 Dec 2025 09:03:58 -0300 Subject: [PATCH 3/8] Migration files (this was helped by AI (Gemini)) so maybe its all wrong, use with caution (works for me but with a initial bug) all damages and values of the spells are reseted by default when runs by first time --- ...010045_KnockbackTilesMigration.Designer.cs | 1652 +++++++++++++++++ .../20251209010045_KnockbackTilesMigration.cs | 28 + 2 files changed, 1680 insertions(+) create mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.Designer.cs create mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.cs diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.Designer.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.Designer.cs new file mode 100644 index 0000000000..34acadc6c6 --- /dev/null +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.Designer.cs @@ -0,0 +1,1652 @@ +// +using System; +using Intersect.Server.Database.GameData; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Intersect.Server.Migrations.Sqlite.Game +{ + [DbContext(typeof(SqliteGameContext))] + [Migration("20251209010045_KnockbackTilesMigration")] + partial class KnockbackTilesMigration + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.11"); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Animations.AnimationDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CompleteSound") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("Sound") + .HasColumnType("TEXT"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Animations"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Crafting.CraftingRecipeDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("EventId") + .HasColumnType("TEXT") + .HasColumnName("Event"); + + b.Property("FailureChance") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("IngredientsJson") + .HasColumnType("TEXT") + .HasColumnName("Ingredients"); + + b.Property("ItemId") + .HasColumnType("TEXT"); + + b.Property("ItemLossChance") + .HasColumnType("INTEGER"); + + b.Property("JsonCraftingRequirements") + .HasColumnType("TEXT") + .HasColumnName("CraftingRequirements"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("Quantity") + .HasColumnType("INTEGER"); + + b.Property("Time") + .HasColumnType("INTEGER"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Crafts"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Crafting.CraftingTableDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CraftsJson") + .HasColumnType("TEXT") + .HasColumnName("Crafts"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("CraftingTables"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Events.EventDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CanRunInParallel") + .HasColumnType("INTEGER"); + + b.Property("CommonEvent") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("Global") + .HasColumnType("INTEGER"); + + b.Property("MapId") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("PagesJson") + .HasColumnType("TEXT") + .HasColumnName("Pages"); + + b.Property("SpawnX") + .HasColumnType("INTEGER"); + + b.Property("SpawnY") + .HasColumnType("INTEGER"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Events"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.EquipmentProperties", b => + { + b.Property("DescriptorId") + .HasColumnType("TEXT"); + + b.HasKey("DescriptorId"); + + b.ToTable("Items_EquipmentProperties"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.ItemDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AnimationId") + .HasColumnType("TEXT") + .HasColumnName("Animation"); + + b.Property("AttackAnimationId") + .HasColumnType("TEXT") + .HasColumnName("AttackAnimation"); + + b.Property("AttackSpeedModifier") + .HasColumnType("INTEGER"); + + b.Property("AttackSpeedValue") + .HasColumnType("INTEGER"); + + b.Property("BlockAbsorption") + .HasColumnType("INTEGER"); + + b.Property("BlockAmount") + .HasColumnType("INTEGER"); + + b.Property("BlockChance") + .HasColumnType("INTEGER"); + + b.Property("CanBag") + .HasColumnType("INTEGER"); + + b.Property("CanBank") + .HasColumnType("INTEGER"); + + b.Property("CanDrop") + .HasColumnType("INTEGER") + .HasColumnName("Bound"); + + b.Property("CanGuildBank") + .HasColumnType("INTEGER"); + + b.Property("CanSell") + .HasColumnType("INTEGER"); + + b.Property("CanTrade") + .HasColumnType("INTEGER"); + + b.Property("CannotUseMessage") + .HasColumnType("TEXT"); + + b.Property("Cooldown") + .HasColumnType("INTEGER"); + + b.Property("CooldownGroup") + .HasColumnType("TEXT"); + + b.Property("CritChance") + .HasColumnType("INTEGER"); + + b.Property("CritMultiplier") + .HasColumnType("REAL"); + + b.Property("Damage") + .HasColumnType("INTEGER"); + + b.Property("DamageType") + .HasColumnType("INTEGER"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DespawnTime") + .HasColumnType("INTEGER"); + + b.Property("DropChanceOnDeath") + .HasColumnType("INTEGER"); + + b.Property("EffectsJson") + .HasColumnType("TEXT") + .HasColumnName("Effects"); + + b.Property("EquipmentAnimationId") + .HasColumnType("TEXT") + .HasColumnName("EquipmentAnimation"); + + b.Property("EquipmentSlot") + .HasColumnType("INTEGER"); + + b.Property("EventId") + .HasColumnType("TEXT") + .HasColumnName("Event"); + + b.Property("EventTriggersJson") + .HasColumnType("TEXT") + .HasColumnName("EventTriggers"); + + b.Property("FemalePaperdoll") + .HasColumnType("TEXT"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("Icon") + .HasColumnType("TEXT"); + + b.Property("IgnoreCooldownReduction") + .HasColumnType("INTEGER"); + + b.Property("IgnoreGlobalCooldown") + .HasColumnType("INTEGER"); + + b.Property("ItemType") + .HasColumnType("INTEGER"); + + b.Property("JsonColor") + .HasColumnType("TEXT") + .HasColumnName("Color"); + + b.Property("JsonUsageRequirements") + .HasColumnType("TEXT") + .HasColumnName("UsageRequirements"); + + b.Property("MalePaperdoll") + .HasColumnType("TEXT"); + + b.Property("MaxBankStack") + .HasColumnType("INTEGER"); + + b.Property("MaxInventoryStack") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("PercentageStatsJson") + .HasColumnType("TEXT") + .HasColumnName("PercentageStatsGiven"); + + b.Property("PercentageVitalsJson") + .HasColumnType("TEXT") + .HasColumnName("PercentageVitalsGiven"); + + b.Property("Price") + .HasColumnType("INTEGER"); + + b.Property("ProjectileId") + .HasColumnType("TEXT") + .HasColumnName("Projectile"); + + b.Property("QuickCast") + .HasColumnType("INTEGER"); + + b.Property("Rarity") + .HasColumnType("INTEGER"); + + b.Property("Scaling") + .HasColumnType("INTEGER"); + + b.Property("ScalingStat") + .HasColumnType("INTEGER"); + + b.Property("SingleUse") + .HasColumnType("INTEGER") + .HasColumnName("DestroySpell"); + + b.Property("SlotCount") + .HasColumnType("INTEGER"); + + b.Property("Speed") + .HasColumnType("INTEGER"); + + b.Property("SpellId") + .HasColumnType("TEXT") + .HasColumnName("Spell"); + + b.Property("Stackable") + .HasColumnType("INTEGER"); + + b.Property("StatsJson") + .HasColumnType("TEXT") + .HasColumnName("StatsGiven"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.Property("Tool") + .HasColumnType("INTEGER"); + + b.Property("TwoHanded") + .HasColumnType("INTEGER"); + + b.Property("VitalsJson") + .HasColumnType("TEXT") + .HasColumnName("VitalsGiven"); + + b.Property("VitalsRegenJson") + .HasColumnType("TEXT") + .HasColumnName("VitalsRegen"); + + b.Property("WeaponSpriteOverride") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("Items"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Mapping.Tilesets.TilesetDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Tilesets"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Maps.MapList.MapList", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("JsonData") + .HasColumnType("TEXT") + .HasColumnName("JsonData"); + + b.HasKey("Id"); + + b.ToTable("MapFolders"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.NPCs.NPCDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Aggressive") + .HasColumnType("INTEGER"); + + b.Property("AttackAllies") + .HasColumnType("INTEGER"); + + b.Property("AttackAnimationId") + .HasColumnType("TEXT") + .HasColumnName("AttackAnimation"); + + b.Property("AttackOnSightConditionsJson") + .HasColumnType("TEXT") + .HasColumnName("AttackOnSightConditions"); + + b.Property("AttackSpeedModifier") + .HasColumnType("INTEGER"); + + b.Property("AttackSpeedValue") + .HasColumnType("INTEGER"); + + b.Property("CraftsJson") + .HasColumnType("TEXT") + .HasColumnName("Spells"); + + b.Property("CritChance") + .HasColumnType("INTEGER"); + + b.Property("CritMultiplier") + .HasColumnType("REAL"); + + b.Property("Damage") + .HasColumnType("INTEGER"); + + b.Property("DamageType") + .HasColumnType("INTEGER"); + + b.Property("Experience") + .HasColumnType("INTEGER"); + + b.Property("FleeHealthPercentage") + .HasColumnType("INTEGER"); + + b.Property("FocusHighestDamageDealer") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("ImmunitiesJson") + .HasColumnType("TEXT") + .HasColumnName("Immunities"); + + b.Property("IndividualizedLoot") + .HasColumnType("INTEGER"); + + b.Property("JsonAggroList") + .HasColumnType("TEXT") + .HasColumnName("AggroList"); + + b.Property("JsonColor") + .HasColumnType("TEXT") + .HasColumnName("Color"); + + b.Property("JsonDrops") + .HasColumnType("TEXT") + .HasColumnName("Drops"); + + b.Property("JsonMaxVital") + .HasColumnType("TEXT") + .HasColumnName("MaxVital"); + + b.Property("JsonStat") + .HasColumnType("TEXT") + .HasColumnName("Stats"); + + b.Property("Level") + .HasColumnType("INTEGER"); + + b.Property("Movement") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("NpcVsNpcEnabled") + .HasColumnType("INTEGER"); + + b.Property("OnDeathEventId") + .HasColumnType("TEXT") + .HasColumnName("OnDeathEvent"); + + b.Property("OnDeathPartyEventId") + .HasColumnType("TEXT") + .HasColumnName("OnDeathPartyEvent"); + + b.Property("PlayerCanAttackConditionsJson") + .HasColumnType("TEXT") + .HasColumnName("PlayerCanAttackConditions"); + + b.Property("PlayerFriendConditionsJson") + .HasColumnType("TEXT") + .HasColumnName("PlayerFriendConditions"); + + b.Property("RegenJson") + .HasColumnType("TEXT") + .HasColumnName("VitalRegen"); + + b.Property("ResetRadius") + .HasColumnType("INTEGER"); + + b.Property("Scaling") + .HasColumnType("INTEGER"); + + b.Property("ScalingStat") + .HasColumnType("INTEGER"); + + b.Property("SightRange") + .HasColumnType("INTEGER"); + + b.Property("SpawnDuration") + .HasColumnType("INTEGER"); + + b.Property("SpellFrequency") + .HasColumnType("INTEGER"); + + b.Property("Sprite") + .HasColumnType("TEXT"); + + b.Property("Swarm") + .HasColumnType("INTEGER"); + + b.Property("Tenacity") + .HasColumnType("REAL"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Npcs"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.PlayerClass.ClassDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AttackAnimationId") + .HasColumnType("TEXT") + .HasColumnName("AttackAnimation"); + + b.Property("AttackSpeedModifier") + .HasColumnType("INTEGER"); + + b.Property("AttackSpeedValue") + .HasColumnType("INTEGER"); + + b.Property("AttackSpriteOverride") + .HasColumnType("TEXT"); + + b.Property("BaseExp") + .HasColumnType("INTEGER"); + + b.Property("BasePoints") + .HasColumnType("INTEGER"); + + b.Property("CritChance") + .HasColumnType("INTEGER"); + + b.Property("CritMultiplier") + .HasColumnType("REAL"); + + b.Property("Damage") + .HasColumnType("INTEGER"); + + b.Property("DamageType") + .HasColumnType("INTEGER"); + + b.Property("ExpIncrease") + .HasColumnType("INTEGER"); + + b.Property("ExpOverridesJson") + .HasColumnType("TEXT") + .HasColumnName("ExperienceOverrides"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("IncreasePercentage") + .HasColumnType("INTEGER"); + + b.Property("JsonBaseStats") + .HasColumnType("TEXT") + .HasColumnName("BaseStats"); + + b.Property("JsonBaseVitals") + .HasColumnType("TEXT") + .HasColumnName("BaseVitals"); + + b.Property("JsonItems") + .HasColumnType("TEXT") + .HasColumnName("Items"); + + b.Property("JsonSpells") + .HasColumnType("TEXT") + .HasColumnName("Spells"); + + b.Property("JsonSprites") + .HasColumnType("TEXT") + .HasColumnName("Sprites"); + + b.Property("Locked") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("PointIncrease") + .HasColumnType("INTEGER"); + + b.Property("RegenJson") + .HasColumnType("TEXT") + .HasColumnName("VitalRegen"); + + b.Property("Scaling") + .HasColumnType("INTEGER"); + + b.Property("ScalingStat") + .HasColumnType("INTEGER"); + + b.Property("SpawnDir") + .HasColumnType("INTEGER"); + + b.Property("SpawnMapId") + .HasColumnType("TEXT") + .HasColumnName("SpawnMap"); + + b.Property("SpawnX") + .HasColumnType("INTEGER"); + + b.Property("SpawnY") + .HasColumnType("INTEGER"); + + b.Property("StatIncreaseJson") + .HasColumnType("TEXT") + .HasColumnName("StatIncreases"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.Property("VitalIncreaseJson") + .HasColumnType("TEXT") + .HasColumnName("VitalIncreases"); + + b.HasKey("Id"); + + b.ToTable("Classes"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Resources.ResourceDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CannotHarvestMessage") + .HasColumnType("TEXT"); + + b.Property("DeathAnimationId") + .HasColumnType("TEXT") + .HasColumnName("DeathAnimation"); + + b.Property("EventId") + .HasColumnType("TEXT") + .HasColumnName("Event"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("JsonDrops") + .HasColumnType("TEXT") + .HasColumnName("Drops"); + + b.Property("JsonHarvestingRequirements") + .HasColumnType("TEXT") + .HasColumnName("HarvestingRequirements"); + + b.Property("JsonStates") + .HasColumnType("TEXT") + .HasColumnName("States"); + + b.Property("MaxHp") + .HasColumnType("INTEGER"); + + b.Property("MinHp") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("SpawnDuration") + .HasColumnType("INTEGER"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.Property("Tool") + .HasColumnType("INTEGER"); + + b.Property("UseExplicitMaxHealthForResourceStates") + .HasColumnType("INTEGER"); + + b.Property("VitalRegen") + .HasColumnType("INTEGER"); + + b.Property("WalkableAfter") + .HasColumnType("INTEGER"); + + b.Property("WalkableBefore") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Resources"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Variables.GuildVariableDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("DataType") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("TextId") + .HasColumnType("TEXT"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("GuildVariables"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Variables.PlayerVariableDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("DataType") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("TextId") + .HasColumnType("TEXT"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("PlayerVariables"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Variables.ServerVariableDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("DataType") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("Json") + .HasColumnType("TEXT") + .HasColumnName("Value"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("TextId") + .HasColumnType("TEXT"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("ServerVariables"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Variables.UserVariableDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("DataType") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("TextId") + .HasColumnType("TEXT"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("UserVariables"); + }); + + modelBuilder.Entity("Intersect.GameObjects.DaylightCycleDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("DaylightHuesJson") + .HasColumnType("TEXT") + .HasColumnName("DaylightHues"); + + b.Property("RangeInterval") + .HasColumnType("INTEGER"); + + b.Property("Rate") + .HasColumnType("REAL"); + + b.Property("SyncTime") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Time"); + }); + + modelBuilder.Entity("Intersect.GameObjects.ProjectileDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AmmoItemId") + .HasColumnType("TEXT") + .HasColumnName("Ammo"); + + b.Property("AmmoRequired") + .HasColumnType("INTEGER"); + + b.Property("AnimationsJson") + .HasColumnType("TEXT") + .HasColumnName("Animations"); + + b.Property("Delay") + .HasColumnType("INTEGER"); + + b.Property("DirectShotBehavior") + .HasColumnType("INTEGER"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("GrappleHook") + .HasColumnType("INTEGER"); + + b.Property("GrappleHookOptionsJson") + .HasColumnType("TEXT") + .HasColumnName("GrappleHookOptions"); + + b.Property("HomingBehavior") + .HasColumnType("INTEGER"); + + b.Property("IgnoreActiveResources") + .HasColumnType("INTEGER"); + + b.Property("IgnoreExhaustedResources") + .HasColumnType("INTEGER"); + + b.Property("IgnoreMapBlocks") + .HasColumnType("INTEGER"); + + b.Property("IgnoreZDimension") + .HasColumnType("INTEGER"); + + b.Property("Knockback") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("PierceTarget") + .HasColumnType("INTEGER"); + + b.Property("Quantity") + .HasColumnType("INTEGER"); + + b.Property("Range") + .HasColumnType("INTEGER"); + + b.Property("SpawnsJson") + .HasColumnType("TEXT") + .HasColumnName("SpawnLocations"); + + b.Property("Speed") + .HasColumnType("INTEGER"); + + b.Property("SpellId") + .HasColumnType("TEXT") + .HasColumnName("Spell"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Projectiles"); + }); + + modelBuilder.Entity("Intersect.GameObjects.QuestDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("BeforeDescription") + .HasColumnType("TEXT"); + + b.Property("CompletedCategory") + .HasColumnType("TEXT"); + + b.Property("DoNotShowUnlessRequirementsMet") + .HasColumnType("INTEGER"); + + b.Property("EndDescription") + .HasColumnType("TEXT"); + + b.Property("EndEventId") + .HasColumnType("TEXT") + .HasColumnName("EndEvent"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("InProgressCategory") + .HasColumnType("TEXT"); + + b.Property("InProgressDescription") + .HasColumnType("TEXT"); + + b.Property("JsonRequirements") + .HasColumnType("TEXT") + .HasColumnName("Requirements"); + + b.Property("LogAfterComplete") + .HasColumnType("INTEGER"); + + b.Property("LogBeforeOffer") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("OrderValue") + .HasColumnType("INTEGER"); + + b.Property("Quitable") + .HasColumnType("INTEGER"); + + b.Property("Repeatable") + .HasColumnType("INTEGER"); + + b.Property("StartDescription") + .HasColumnType("TEXT"); + + b.Property("StartEventId") + .HasColumnType("TEXT") + .HasColumnName("StartEvent"); + + b.Property("TasksJson") + .HasColumnType("TEXT") + .HasColumnName("Tasks"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.Property("UnstartedCategory") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("Quests"); + }); + + modelBuilder.Entity("Intersect.GameObjects.ShopDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("BuySound") + .HasColumnType("TEXT"); + + b.Property("BuyingWhitelist") + .HasColumnType("INTEGER"); + + b.Property("DefaultCurrencyId") + .HasColumnType("TEXT") + .HasColumnName("DefaultCurrency"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("JsonBuyingItems") + .HasColumnType("TEXT") + .HasColumnName("BuyingItems"); + + b.Property("JsonSellingItems") + .HasColumnType("TEXT") + .HasColumnName("SellingItems"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("SellSound") + .HasColumnType("TEXT"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Shops"); + }); + + modelBuilder.Entity("Intersect.GameObjects.SpellDescriptor", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("Bound") + .HasColumnType("INTEGER"); + + b.Property("CannotCastMessage") + .HasColumnType("TEXT"); + + b.Property("CastAnimationId") + .HasColumnType("TEXT") + .HasColumnName("CastAnimation"); + + b.Property("CastDuration") + .HasColumnType("INTEGER"); + + b.Property("CastSpriteOverride") + .HasColumnType("TEXT"); + + b.Property("CooldownDuration") + .HasColumnType("INTEGER"); + + b.Property("CooldownGroup") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("EventId") + .HasColumnType("TEXT") + .HasColumnName("Event"); + + b.Property("Folder") + .HasColumnType("TEXT"); + + b.Property("HitAnimationId") + .HasColumnType("TEXT") + .HasColumnName("HitAnimation"); + + b.Property("Icon") + .HasColumnType("TEXT"); + + b.Property("IgnoreCooldownReduction") + .HasColumnType("INTEGER"); + + b.Property("IgnoreGlobalCooldown") + .HasColumnType("INTEGER"); + + b.Property("JsonCastRequirements") + .HasColumnType("TEXT") + .HasColumnName("CastRequirements"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("SpellType") + .HasColumnType("INTEGER"); + + b.Property("TickAnimationId") + .HasColumnType("TEXT") + .HasColumnName("TickAnimation"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.Property("VitalCostJson") + .HasColumnType("TEXT") + .HasColumnName("VitalCost"); + + b.HasKey("Id"); + + b.ToTable("Spells"); + }); + + modelBuilder.Entity("Intersect.Server.Maps.MapController", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("AHue") + .HasColumnType("INTEGER"); + + b.Property("AttributeData") + .HasColumnType("BLOB") + .HasColumnName("Attributes"); + + b.Property("BHue") + .HasColumnType("INTEGER"); + + b.Property("Brightness") + .HasColumnType("INTEGER"); + + b.Property("Down") + .HasColumnType("TEXT"); + + b.Property("EventIdsJson") + .HasColumnType("TEXT") + .HasColumnName("Events"); + + b.Property("Fog") + .HasColumnType("TEXT"); + + b.Property("FogTransparency") + .HasColumnType("INTEGER"); + + b.Property("FogXSpeed") + .HasColumnType("INTEGER"); + + b.Property("FogYSpeed") + .HasColumnType("INTEGER"); + + b.Property("GHue") + .HasColumnType("INTEGER"); + + b.Property("HideEquipment") + .HasColumnType("INTEGER"); + + b.Property("IsIndoors") + .HasColumnType("INTEGER"); + + b.Property("Left") + .HasColumnType("TEXT"); + + b.Property("LightsJson") + .HasColumnType("TEXT") + .HasColumnName("Lights"); + + b.Property("Music") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT") + .HasColumnOrder(0); + + b.Property("NpcSpawnsJson") + .HasColumnType("TEXT") + .HasColumnName("NpcSpawns"); + + b.Property("OverlayGraphic") + .HasColumnType("TEXT"); + + b.Property("Panorama") + .HasColumnType("TEXT"); + + b.Property("PlayerLightColorJson") + .HasColumnType("TEXT") + .HasColumnName("PlayerLightColor"); + + b.Property("PlayerLightExpand") + .HasColumnType("REAL"); + + b.Property("PlayerLightIntensity") + .HasColumnType("INTEGER"); + + b.Property("PlayerLightSize") + .HasColumnType("INTEGER"); + + b.Property("RHue") + .HasColumnType("INTEGER"); + + b.Property("Revision") + .HasColumnType("INTEGER"); + + b.Property("Right") + .HasColumnType("TEXT"); + + b.Property("Sound") + .HasColumnType("TEXT"); + + b.Property("TileData") + .HasColumnType("BLOB"); + + b.Property("TimeCreated") + .HasColumnType("INTEGER"); + + b.Property("Up") + .HasColumnType("TEXT"); + + b.Property("WeatherAnimationId") + .HasColumnType("TEXT") + .HasColumnName("WeatherAnimation"); + + b.Property("WeatherIntensity") + .HasColumnType("INTEGER"); + + b.Property("WeatherXSpeed") + .HasColumnType("INTEGER"); + + b.Property("WeatherYSpeed") + .HasColumnType("INTEGER"); + + b.Property("ZoneType") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.ToTable("Maps"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Animations.AnimationDescriptor", b => + { + b.OwnsOne("Intersect.Framework.Core.GameObjects.Animations.AnimationLayer", "Lower", b1 => + { + b1.Property("AnimationDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("AlternateRenderLayer") + .HasColumnType("INTEGER"); + + b1.Property("DisableRotations") + .HasColumnType("INTEGER"); + + b1.Property("FrameCount") + .HasColumnType("INTEGER"); + + b1.Property("FrameSpeed") + .HasColumnType("INTEGER"); + + b1.Property("Light") + .HasColumnType("TEXT"); + + b1.Property("LoopCount") + .HasColumnType("INTEGER"); + + b1.Property("Sprite") + .HasColumnType("TEXT"); + + b1.Property("XFrames") + .HasColumnType("INTEGER"); + + b1.Property("YFrames") + .HasColumnType("INTEGER"); + + b1.HasKey("AnimationDescriptorId"); + + b1.ToTable("Animations"); + + b1.WithOwner() + .HasForeignKey("AnimationDescriptorId"); + }); + + b.OwnsOne("Intersect.Framework.Core.GameObjects.Animations.AnimationLayer", "Upper", b1 => + { + b1.Property("AnimationDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("AlternateRenderLayer") + .HasColumnType("INTEGER"); + + b1.Property("DisableRotations") + .HasColumnType("INTEGER"); + + b1.Property("FrameCount") + .HasColumnType("INTEGER"); + + b1.Property("FrameSpeed") + .HasColumnType("INTEGER"); + + b1.Property("Light") + .HasColumnType("TEXT"); + + b1.Property("LoopCount") + .HasColumnType("INTEGER"); + + b1.Property("Sprite") + .HasColumnType("TEXT"); + + b1.Property("XFrames") + .HasColumnType("INTEGER"); + + b1.Property("YFrames") + .HasColumnType("INTEGER"); + + b1.HasKey("AnimationDescriptorId"); + + b1.ToTable("Animations"); + + b1.WithOwner() + .HasForeignKey("AnimationDescriptorId"); + }); + + b.Navigation("Lower"); + + b.Navigation("Upper"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.EquipmentProperties", b => + { + b.HasOne("Intersect.Framework.Core.GameObjects.Items.ItemDescriptor", "Descriptor") + .WithOne("EquipmentProperties") + .HasForeignKey("Intersect.Framework.Core.GameObjects.Items.EquipmentProperties", "DescriptorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_AbilityPower", b1 => + { + b1.Property("EquipmentPropertiesDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("HighRange") + .HasColumnType("INTEGER"); + + b1.Property("LowRange") + .HasColumnType("INTEGER"); + + b1.HasKey("EquipmentPropertiesDescriptorId"); + + b1.ToTable("Items_EquipmentProperties"); + + b1.WithOwner() + .HasForeignKey("EquipmentPropertiesDescriptorId"); + }); + + b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_Attack", b1 => + { + b1.Property("EquipmentPropertiesDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("HighRange") + .HasColumnType("INTEGER"); + + b1.Property("LowRange") + .HasColumnType("INTEGER"); + + b1.HasKey("EquipmentPropertiesDescriptorId"); + + b1.ToTable("Items_EquipmentProperties"); + + b1.WithOwner() + .HasForeignKey("EquipmentPropertiesDescriptorId"); + }); + + b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_Defense", b1 => + { + b1.Property("EquipmentPropertiesDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("HighRange") + .HasColumnType("INTEGER"); + + b1.Property("LowRange") + .HasColumnType("INTEGER"); + + b1.HasKey("EquipmentPropertiesDescriptorId"); + + b1.ToTable("Items_EquipmentProperties"); + + b1.WithOwner() + .HasForeignKey("EquipmentPropertiesDescriptorId"); + }); + + b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_MagicResist", b1 => + { + b1.Property("EquipmentPropertiesDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("HighRange") + .HasColumnType("INTEGER"); + + b1.Property("LowRange") + .HasColumnType("INTEGER"); + + b1.HasKey("EquipmentPropertiesDescriptorId"); + + b1.ToTable("Items_EquipmentProperties"); + + b1.WithOwner() + .HasForeignKey("EquipmentPropertiesDescriptorId"); + }); + + b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_Speed", b1 => + { + b1.Property("EquipmentPropertiesDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("HighRange") + .HasColumnType("INTEGER"); + + b1.Property("LowRange") + .HasColumnType("INTEGER"); + + b1.HasKey("EquipmentPropertiesDescriptorId"); + + b1.ToTable("Items_EquipmentProperties"); + + b1.WithOwner() + .HasForeignKey("EquipmentPropertiesDescriptorId"); + }); + + b.Navigation("Descriptor"); + + b.Navigation("StatRange_AbilityPower"); + + b.Navigation("StatRange_Attack"); + + b.Navigation("StatRange_Defense"); + + b.Navigation("StatRange_MagicResist"); + + b.Navigation("StatRange_Speed"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.ItemDescriptor", b => + { + b.OwnsOne("Intersect.Framework.Core.GameObjects.Items.ConsumableData", "Consumable", b1 => + { + b1.Property("ItemDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("Percentage") + .HasColumnType("INTEGER"); + + b1.Property("Type") + .HasColumnType("INTEGER"); + + b1.Property("Value") + .HasColumnType("INTEGER"); + + b1.HasKey("ItemDescriptorId"); + + b1.ToTable("Items"); + + b1.WithOwner() + .HasForeignKey("ItemDescriptorId"); + }); + + b.Navigation("Consumable"); + }); + + modelBuilder.Entity("Intersect.GameObjects.SpellDescriptor", b => + { + b.OwnsOne("Intersect.GameObjects.SpellCombatDescriptor", "Combat", b1 => + { + b1.Property("SpellDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("CastRange") + .HasColumnType("INTEGER"); + + b1.Property("CritChance") + .HasColumnType("INTEGER"); + + b1.Property("CritMultiplier") + .HasColumnType("REAL"); + + b1.Property("DamageType") + .HasColumnType("INTEGER"); + + b1.Property("Duration") + .HasColumnType("INTEGER"); + + b1.Property("Effect") + .HasColumnType("INTEGER"); + + b1.Property("Friendly") + .HasColumnType("INTEGER"); + + b1.Property("HitRadius") + .HasColumnType("INTEGER"); + + b1.Property("HoTDoT") + .HasColumnType("INTEGER"); + + b1.Property("HotDotInterval") + .HasColumnType("INTEGER"); + + b1.Property("KnockbackTiles") + .HasColumnType("INTEGER"); + + b1.Property("OnHitDuration") + .HasColumnType("INTEGER") + .HasColumnName("OnHit"); + + b1.Property("PercentageStatDiffJson") + .HasColumnType("TEXT") + .HasColumnName("PercentageStatDiff"); + + b1.Property("ProjectileId") + .HasColumnType("TEXT") + .HasColumnName("Projectile"); + + b1.Property("Scaling") + .HasColumnType("INTEGER"); + + b1.Property("ScalingStat") + .HasColumnType("INTEGER"); + + b1.Property("StatDiffJson") + .HasColumnType("TEXT") + .HasColumnName("StatDiff"); + + b1.Property("TargetType") + .HasColumnType("INTEGER"); + + b1.Property("TransformSprite") + .HasColumnType("TEXT"); + + b1.Property("TrapDuration") + .HasColumnType("INTEGER") + .HasColumnName("Trap"); + + b1.Property("VitalDiffJson") + .HasColumnType("TEXT") + .HasColumnName("VitalDiff"); + + b1.HasKey("SpellDescriptorId"); + + b1.ToTable("Spells"); + + b1.WithOwner() + .HasForeignKey("SpellDescriptorId"); + }); + + b.OwnsOne("Intersect.GameObjects.SpellDashDescriptor", "Dash", b1 => + { + b1.Property("SpellDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("IgnoreActiveResources") + .HasColumnType("INTEGER"); + + b1.Property("IgnoreInactiveResources") + .HasColumnType("INTEGER"); + + b1.Property("IgnoreMapBlocks") + .HasColumnType("INTEGER"); + + b1.Property("IgnoreZDimensionAttributes") + .HasColumnType("INTEGER"); + + b1.HasKey("SpellDescriptorId"); + + b1.ToTable("Spells"); + + b1.WithOwner() + .HasForeignKey("SpellDescriptorId"); + }); + + b.OwnsOne("Intersect.GameObjects.SpellWarpDescriptor", "Warp", b1 => + { + b1.Property("SpellDescriptorId") + .HasColumnType("TEXT"); + + b1.Property("Dir") + .HasColumnType("INTEGER"); + + b1.Property("MapId") + .HasColumnType("TEXT"); + + b1.Property("X") + .HasColumnType("INTEGER"); + + b1.Property("Y") + .HasColumnType("INTEGER"); + + b1.HasKey("SpellDescriptorId"); + + b1.ToTable("Spells"); + + b1.WithOwner() + .HasForeignKey("SpellDescriptorId"); + }); + + b.Navigation("Combat"); + + b.Navigation("Dash"); + + b.Navigation("Warp"); + }); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.ItemDescriptor", b => + { + b.Navigation("EquipmentProperties"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.cs new file mode 100644 index 0000000000..a3f687d30a --- /dev/null +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Intersect.Server.Migrations.Sqlite.Game +{ + /// + public partial class KnockbackTilesMigration : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Combat_KnockbackTiles", + table: "Spells", + type: "INTEGER", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Combat_KnockbackTiles", + table: "Spells"); + } + } +} From 3e1baabd9b181509a0965bf72de3d2736bb282f8 Mon Sep 17 00:00:00 2001 From: Kamus Date: Thu, 11 Dec 2025 11:21:19 -0300 Subject: [PATCH 4/8] Added the migration to MySQL and SQLite (By GeminiAI), edited a few things for better usage, and now im gonna test every scenario --- .../Config/CombatOptions.cs | 8 ---- .../Entities/SpellEffect.cs | 2 +- .../Spells/SpellCombatDescriptor.cs | 2 + .../Forms/Editors/frmSpell.Designer.cs | 32 +++++++++++++ Intersect.Editor/Forms/Editors/frmSpell.cs | 14 ++++++ Intersect.Server.Core/Database/DbInterface.cs | 20 ++++++-- .../Database/MigrationScheduler.cs | 5 ++ Intersect.Server.Core/Entities/Entity.cs | 43 ++++++++++------- ..._AddGrievousWoundsAndHealBoost.Designer.cs | 27 +++++++++++ ...210000000_AddGrievousWoundsAndHealBoost.cs | 40 ++++++++++++++++ ...0000_ConsolidateHealingEffects.Designer.cs | 27 +++++++++++ ...0251211000000_ConsolidateHealingEffects.cs | 42 +++++++++++++++++ ...010045_KnockbackTilesMigration.Designer.cs | 43 +++++++++++++++++ .../20251209010045_KnockbackTilesMigration.cs | 28 +++++++++++ ..._AddGrievousWoundsAndHealBoost.Designer.cs | 47 +++++++++++++++++++ ...210000000_AddGrievousWoundsAndHealBoost.cs | 40 ++++++++++++++++ ...0000_ConsolidateHealingEffects.Designer.cs | 27 +++++++++++ ...0251211000000_ConsolidateHealingEffects.cs | 42 +++++++++++++++++ 18 files changed, 457 insertions(+), 32 deletions(-) create mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs create mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs create mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs create mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs create mode 100644 Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs create mode 100644 Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs create mode 100644 Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs create mode 100644 Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs create mode 100644 Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs create mode 100644 Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs diff --git a/Framework/Intersect.Framework.Core/Config/CombatOptions.cs b/Framework/Intersect.Framework.Core/Config/CombatOptions.cs index e793812a3c..489be38bca 100644 --- a/Framework/Intersect.Framework.Core/Config/CombatOptions.cs +++ b/Framework/Intersect.Framework.Core/Config/CombatOptions.cs @@ -84,13 +84,5 @@ public partial class CombatOptions /// public bool EnableAllPlayersFriendlyInSafeZone { get; set; } = false; - /// - /// Percentage of healing reduction when Grievous Wounds effect is applied. Default 50%. - /// - public int GrievousWoundsHealingReduction { get; set; } = 50; - /// - /// Percentage of healing increase when Healing Boost effect is applied. Default 50%. - /// - public int HealingBoostPercentage { get; set; } = 50; } diff --git a/Framework/Intersect.Framework.Core/Entities/SpellEffect.cs b/Framework/Intersect.Framework.Core/Entities/SpellEffect.cs index 5dda46e8fb..77b8be1ce8 100644 --- a/Framework/Intersect.Framework.Core/Entities/SpellEffect.cs +++ b/Framework/Intersect.Framework.Core/Entities/SpellEffect.cs @@ -30,7 +30,7 @@ public enum SpellEffect Knockback = 13, - GrievousWounds = 14, + HealingReduction = 14, HealingBoost = 15, } diff --git a/Framework/Intersect.Framework.Core/GameObjects/Spells/SpellCombatDescriptor.cs b/Framework/Intersect.Framework.Core/GameObjects/Spells/SpellCombatDescriptor.cs index 912503dc89..c05f3e50a0 100644 --- a/Framework/Intersect.Framework.Core/GameObjects/Spells/SpellCombatDescriptor.cs +++ b/Framework/Intersect.Framework.Core/GameObjects/Spells/SpellCombatDescriptor.cs @@ -88,6 +88,8 @@ public string PercentageStatDiffJson /// public int KnockbackTiles { get; set; } = 1; + public int? PercentageEffect { get; set; } + public string TransformSprite { get; set; } [Column("OnHit")] diff --git a/Intersect.Editor/Forms/Editors/frmSpell.Designer.cs b/Intersect.Editor/Forms/Editors/frmSpell.Designer.cs index ca37758bc6..5a56f69388 100644 --- a/Intersect.Editor/Forms/Editors/frmSpell.Designer.cs +++ b/Intersect.Editor/Forms/Editors/frmSpell.Designer.cs @@ -123,6 +123,8 @@ private void InitializeComponent() this.lblSprite = new System.Windows.Forms.Label(); this.lblKnockbackTiles = new System.Windows.Forms.Label(); this.nudKnockbackTiles = new DarkUI.Controls.DarkNumericUpDown(); + this.lblPercentageEffect = new System.Windows.Forms.Label(); + this.nudPercentageEffect = new DarkUI.Controls.DarkNumericUpDown(); this.grpEffectDuration = new DarkUI.Controls.DarkGroupBox(); this.nudBuffDuration = new DarkUI.Controls.DarkNumericUpDown(); this.lblBuffDuration = new System.Windows.Forms.Label(); @@ -209,6 +211,7 @@ private void InitializeComponent() this.grpEffect.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picSprite)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudKnockbackTiles)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudPercentageEffect)).BeginInit(); this.grpEffectDuration.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudBuffDuration)).BeginInit(); this.grpDamage.SuspendLayout(); @@ -1516,6 +1519,8 @@ private void InitializeComponent() this.grpEffect.Controls.Add(this.lblSprite); this.grpEffect.Controls.Add(this.lblKnockbackTiles); this.grpEffect.Controls.Add(this.nudKnockbackTiles); + this.grpEffect.Controls.Add(this.lblPercentageEffect); + this.grpEffect.Controls.Add(this.nudPercentageEffect); this.grpEffect.ForeColor = System.Drawing.Color.Gainsboro; this.grpEffect.Location = new System.Drawing.Point(224, 243); this.grpEffect.Name = "grpEffect"; @@ -1639,6 +1644,30 @@ private void InitializeComponent() this.nudKnockbackTiles.Visible = false; this.nudKnockbackTiles.ValueChanged += new System.EventHandler(this.nudKnockbackTiles_ValueChanged); // + // lblPercentageEffect + // + this.lblPercentageEffect.AutoSize = true; + this.lblPercentageEffect.Location = new System.Drawing.Point(91, 34); + this.lblPercentageEffect.Name = "lblPercentageEffect"; + this.lblPercentageEffect.Size = new System.Drawing.Size(32, 13); + this.lblPercentageEffect.TabIndex = 47; + this.lblPercentageEffect.Text = "%:"; + this.lblPercentageEffect.Visible = false; + // + // nudPercentageEffect + // + this.nudPercentageEffect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(69)))), ((int)(((byte)(73)))), ((int)(((byte)(74))))); + this.nudPercentageEffect.ForeColor = System.Drawing.Color.Gainsboro; + this.nudPercentageEffect.Location = new System.Drawing.Point(129, 31); + this.nudPercentageEffect.Maximum = new decimal(new int[] { 1000, 0, 0, 0 }); + this.nudPercentageEffect.Minimum = new decimal(new int[] { 0, 0, 0, 0 }); + this.nudPercentageEffect.Name = "nudPercentageEffect"; + this.nudPercentageEffect.Size = new System.Drawing.Size(50, 20); + this.nudPercentageEffect.TabIndex = 48; + this.nudPercentageEffect.Value = new decimal(new int[] { 0, 0, 0, 0 }); + this.nudPercentageEffect.Visible = false; + this.nudPercentageEffect.ValueChanged += new System.EventHandler(this.nudPercentageEffect_ValueChanged); + // // grpEffectDuration // this.grpEffectDuration.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48))))); @@ -2450,6 +2479,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudCastRange)).EndInit(); this.grpCombat.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.nudKnockbackTiles)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudPercentageEffect)).EndInit(); this.grpStats.ResumeLayout(false); this.grpStats.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudSpdPercentage)).EndInit(); @@ -2644,5 +2674,7 @@ private void InitializeComponent() private DarkComboBox cmbCastSprite; private System.Windows.Forms.Label lblKnockbackTiles; private DarkNumericUpDown nudKnockbackTiles; + private System.Windows.Forms.Label lblPercentageEffect; + private DarkNumericUpDown nudPercentageEffect; } } diff --git a/Intersect.Editor/Forms/Editors/frmSpell.cs b/Intersect.Editor/Forms/Editors/frmSpell.cs index 2e366b55f3..9e763d73bb 100644 --- a/Intersect.Editor/Forms/Editors/frmSpell.cs +++ b/Intersect.Editor/Forms/Editors/frmSpell.cs @@ -378,6 +378,7 @@ private void UpdateSpellTypePanels() chkHOTDOT.Checked = mEditorItem.Combat.HoTDoT; nudBuffDuration.Value = mEditorItem.Combat.Duration; nudTick.Value = mEditorItem.Combat.HotDotInterval; + nudPercentageEffect.Value = mEditorItem.Combat.PercentageEffect ?? 0; cmbExtraEffect.SelectedIndex = (int)mEditorItem.Combat.Effect; cmbExtraEffect_SelectedIndexChanged(null, null); } @@ -537,6 +538,8 @@ private void cmbExtraEffect_SelectedIndexChanged(object sender, EventArgs e) picSprite.Visible = false; lblKnockbackTiles.Visible = false; nudKnockbackTiles.Visible = false; + lblPercentageEffect.Visible = false; + nudPercentageEffect.Visible = false; if (cmbExtraEffect.SelectedIndex == 6) //Transform { @@ -576,6 +579,12 @@ private void cmbExtraEffect_SelectedIndexChanged(object sender, EventArgs e) nudKnockbackTiles.Visible = true; nudKnockbackTiles.Value = Math.Max(1, mEditorItem.Combat.KnockbackTiles); } + + if (cmbExtraEffect.SelectedIndex == (int)SpellEffect.HealingReduction || cmbExtraEffect.SelectedIndex == (int)SpellEffect.HealingBoost) + { + lblPercentageEffect.Visible = true; + nudPercentageEffect.Visible = true; + } } private void frmSpell_FormClosed(object sender, FormClosedEventArgs e) @@ -1114,4 +1123,9 @@ private void nudKnockbackTiles_ValueChanged(object sender, EventArgs e) { mEditorItem.Combat.KnockbackTiles = (int)nudKnockbackTiles.Value; } + + private void nudPercentageEffect_ValueChanged(object sender, EventArgs e) + { + mEditorItem.Combat.PercentageEffect = (int)nudPercentageEffect.Value; + } } diff --git a/Intersect.Server.Core/Database/DbInterface.cs b/Intersect.Server.Core/Database/DbInterface.cs index f02da4f30f..fae07ff317 100644 --- a/Intersect.Server.Core/Database/DbInterface.cs +++ b/Intersect.Server.Core/Database/DbInterface.cs @@ -220,25 +220,28 @@ private static void ProcessMigrations(TContext context) { if (!context.HasPendingMigrations) { - ApplicationContext.Context.Value?.Logger.LogDebug($"No pending migrations for {context.GetType().GetName(qualified: true)}, skipping..."); + ApplicationContext.Context.Value?.Logger.LogInformation($"No pending migrations for {context.GetType().GetName(qualified: true)}, skipping..."); return; } - ApplicationContext.Context.Value?.Logger.LogDebug($"Pending schema migrations for {typeof(TContext).Name}:\n\t{string.Join("\n\t", context.PendingSchemaMigrations)}"); - ApplicationContext.Context.Value?.Logger.LogDebug($"Pending data migrations for {typeof(TContext).Name}:\n\t{string.Join("\n\t", context.PendingDataMigrationNames)}"); + ApplicationContext.Context.Value?.Logger.LogInformation($"Pending schema migrations for {typeof(TContext).Name}:\n\t{string.Join("\n\t", context.PendingSchemaMigrations)}"); + ApplicationContext.Context.Value?.Logger.LogInformation($"Pending data migrations for {typeof(TContext).Name}:\n\t{string.Join("\n\t", context.PendingDataMigrationNames)}"); var migrationScheduler = new MigrationScheduler(context); - ApplicationContext.Context.Value?.Logger.LogDebug("Scheduling pending migrations..."); + ApplicationContext.Context.Value?.Logger.LogInformation("Scheduling pending migrations..."); migrationScheduler.SchedulePendingMigrations(); - ApplicationContext.Context.Value?.Logger.LogDebug("Applying scheduled migrations..."); + ApplicationContext.Context.Value?.Logger.LogInformation("Applying scheduled migrations..."); migrationScheduler.ApplyScheduledMigrations(); + ApplicationContext.Context.Value?.Logger.LogInformation("Scheduled migrations applied."); var remainingPendingSchemaMigrations = context.PendingSchemaMigrations.ToList(); var processedSchemaMigrations = context.PendingSchemaMigrations.Where(migration => !remainingPendingSchemaMigrations.Contains(migration)); + ApplicationContext.Context.Value?.Logger.LogInformation("Notifying context of processed schema migrations..."); context.OnSchemaMigrationsProcessed(processedSchemaMigrations.ToArray()); + ApplicationContext.Context.Value?.Logger.LogInformation("Migration processing complete."); } internal static ILoggerFactory CreateLoggerFactory(DatabaseOptions databaseOptions) @@ -302,6 +305,7 @@ private static bool EnsureUpdated(IServerContext serverContext) EnableSensitiveDataLogging = true, LoggerFactory = CreateLoggerFactory(loggingDatabaseOptions), }); + ApplicationContext.Context.Value?.Logger.LogInformation("Logging context created."); // We don't want anyone running the old migration tool accidentally try @@ -326,6 +330,7 @@ private static bool EnsureUpdated(IServerContext serverContext) // ignored } + ApplicationContext.Context.Value?.Logger.LogInformation("Checking pending migrations..."); var gameContextPendingMigrations = gameContext.PendingSchemaMigrations; var playerContextPendingMigrations = playerContext.PendingSchemaMigrations; var loggingContextPendingMigrations = loggingContext.PendingSchemaMigrations; @@ -340,6 +345,8 @@ private static bool EnsureUpdated(IServerContext serverContext) !loggingContextPendingMigrations.Contains("20191118024649_RequestLogs") ); + ApplicationContext.Context.Value?.Logger.LogInformation($"Show migration warning: {showMigrationWarning}"); + if (showMigrationWarning) { if (serverContext.StartupOptions.MigrateAutomatically) @@ -394,11 +401,14 @@ private static bool EnsureUpdated(IServerContext serverContext) Console.WriteLine("No migrations pending that require user acceptance, skipping prompt..."); } + ApplicationContext.Context.Value?.Logger.LogInformation("Processing migrations..."); var contexts = new List { gameContext, playerContext, loggingContext }; foreach (var context in contexts) { var contextType = context.GetType().FindGenericTypeParameters(typeof(IntersectDbContext<>)).First(); + ApplicationContext.Context.Value?.Logger.LogInformation($"Processing migration for context: {contextType.Name}"); _methodInfoProcessMigrations.MakeGenericMethod(contextType).Invoke(null, new object[] { context }); + ApplicationContext.Context.Value?.Logger.LogInformation($"Finished migration for context: {contextType.Name}"); } return true; diff --git a/Intersect.Server.Core/Database/MigrationScheduler.cs b/Intersect.Server.Core/Database/MigrationScheduler.cs index 394ada1a33..0f415552de 100644 --- a/Intersect.Server.Core/Database/MigrationScheduler.cs +++ b/Intersect.Server.Core/Database/MigrationScheduler.cs @@ -63,13 +63,16 @@ public void ApplyScheduledMigrations() while (scheduleSegment.Any()) { + ApplicationContext.Context.Value?.Logger.LogInformation($"Schedule segment count: {scheduleSegment.Count}"); var targetMigration = scheduleSegment .TakeWhile(metadata => metadata is SchemaMigrationMetadata) .LastOrDefault(); if (targetMigration is SchemaMigrationMetadata) { + ApplicationContext.Context.Value?.Logger.LogInformation($"Migrating schema via EF Core to: {targetMigration.Name}"); migrator.Migrate(targetMigration.Name); + ApplicationContext.Context.Value?.Logger.LogInformation($"EF Core migration to {targetMigration.Name} finished."); scheduleSegment = scheduleSegment .SkipWhile(metadata => metadata is SchemaMigrationMetadata) @@ -94,7 +97,9 @@ public void ApplyScheduledMigrations() throw new InvalidOperationException($"Failed to create instance of data migration: {scheduledDataMigration.MigratorType.FullName}"); } + ApplicationContext.Context.Value?.Logger.LogInformation($"Executing data migration: {scheduledDataMigration.Name}"); dataMigration.Up(_context.ContextOptions); + ApplicationContext.Context.Value?.Logger.LogInformation($"Data migration {scheduledDataMigration.Name} finished."); scheduleSegment = scheduleSegment .Skip(1) diff --git a/Intersect.Server.Core/Entities/Entity.cs b/Intersect.Server.Core/Entities/Entity.cs index b0c0841b7e..3eeb210d5d 100644 --- a/Intersect.Server.Core/Entities/Entity.cs +++ b/Intersect.Server.Core/Entities/Entity.cs @@ -1564,8 +1564,9 @@ public void AddVital(Vital vital, long amount) } /// - /// Applies Grievous Wounds and Healing Boost modifiers to healing amount. - /// Formula: Healing × (1 + boost) × (1 - reduction) + /// Applies Healing Reduction and Healing Boost modifiers to healing amount. + /// Formula: Healing * (1 + boost) OR Healing * (1 - reduction) + /// Only the latest applied effect is considered. /// protected long ApplyHealingModifiers(long healAmount) { @@ -1574,28 +1575,34 @@ protected long ApplyHealingModifiers(long healAmount) return healAmount; } - var boostModifier = 0.0; - var reductionModifier = 0.0; + // Find the latest applied status that is either HealingReduction or HealingBoost + var latestStatus = CachedStatuses + .Where(s => s.Type == SpellEffect.HealingReduction || s.Type == SpellEffect.HealingBoost) + .OrderByDescending(s => s.StartTime) + .FirstOrDefault(); - foreach (var status in CachedStatuses) + if (latestStatus == null) { - if (status.Type == SpellEffect.GrievousWounds) - { - reductionModifier += Options.Instance.Combat.GrievousWoundsHealingReduction / 100.0; - } - else if (status.Type == SpellEffect.HealingBoost) - { - boostModifier += Options.Instance.Combat.HealingBoostPercentage / 100.0; - } + return healAmount; } - // Cap reduction at 100% to avoid negative healing - reductionModifier = Math.Min(1.0, reductionModifier); + var percentage = latestStatus.Spell.Combat.PercentageEffect ?? 0; - // Apply multiplicative formula: Healing × (1 + boost) × (1 - reduction) - var finalModifier = (1.0 + boostModifier) * (1.0 - reductionModifier); + if (latestStatus.Type == SpellEffect.HealingReduction) + { + // Reduction: 0 to 100% + var reduction = Math.Clamp(percentage, 0, 100) / 100.0; + return (long)(healAmount * (1.0 - reduction)); + } + + if (latestStatus.Type == SpellEffect.HealingBoost) + { + // Boost: 0 to 1000% + var boost = Math.Clamp(percentage, 0, 1000) / 100.0; + return (long)(healAmount * (1.0 + boost)); + } - return (long)(healAmount * finalModifier); + return healAmount; } public void SubVital(Vital vital, long amount) diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs new file mode 100644 index 0000000000..721d73536c --- /dev/null +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs @@ -0,0 +1,27 @@ +// +using System; +using Intersect.Server.Database.GameData; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Intersect.Server.Migrations.Sqlite.Game +{ + [DbContext(typeof(SqliteGameContext))] + [Migration("20251210000000_AddGrievousWoundsAndHealBoost")] + partial class AddGrievousWoundsAndHealBoost + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.11"); + // Model snapshot skipped for manual migration to avoid massive file duplication. + // Runtime only needs Up/Down. +#pragma warning restore 612, 618 + } + } +} diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs new file mode 100644 index 0000000000..b24e5af884 --- /dev/null +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs @@ -0,0 +1,40 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Intersect.Server.Migrations.Sqlite.Game +{ + /// + public partial class AddGrievousWoundsAndHealBoost : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Combat_GrievousWoundsReduction", + table: "Spells", + type: "INTEGER", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "Combat_HealingBoostPercentage", + table: "Spells", + type: "INTEGER", + nullable: false, + defaultValue: 0); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Combat_GrievousWoundsReduction", + table: "Spells"); + + migrationBuilder.DropColumn( + name: "Combat_HealingBoostPercentage", + table: "Spells"); + } + } +} diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs new file mode 100644 index 0000000000..9bc4f83353 --- /dev/null +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs @@ -0,0 +1,27 @@ +// +using System; +using Intersect.Server.Database.GameData; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Intersect.Server.Migrations.Sqlite.Game +{ + [DbContext(typeof(SqliteGameContext))] + [Migration("20251211000000_ConsolidateHealingEffects")] + partial class ConsolidateHealingEffects + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.11"); + // Model snapshot skipped for manual migration to avoid massive file duplication. + // Runtime only needs Up/Down. +#pragma warning restore 612, 618 + } + } +} diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs new file mode 100644 index 0000000000..7a6df7cdde --- /dev/null +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs @@ -0,0 +1,42 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Intersect.Server.Migrations.Sqlite.Game +{ + /// + public partial class ConsolidateHealingEffects : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Combat_PercentageEffect", + table: "Spells", + type: "INTEGER", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Combat_PercentageEffect", + table: "Spells"); + + migrationBuilder.AddColumn( + name: "Combat_GrievousWoundsReduction", + table: "Spells", + type: "INTEGER", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "Combat_HealingBoostPercentage", + table: "Spells", + type: "INTEGER", + nullable: false, + defaultValue: 0); + } + } +} diff --git a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs new file mode 100644 index 0000000000..7b078c693b --- /dev/null +++ b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs @@ -0,0 +1,43 @@ +// +using Intersect.Server.Database.GameData; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Intersect.Server.Migrations.MySql.Game +{ + [DbContext(typeof(MySqlGameContext))] + [Migration("20251209010045_KnockbackTilesMigration")] + partial class KnockbackTilesMigration + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.11"); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Spells.SpellDescriptor", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Combat_KnockbackTiles") + .HasColumnType("int"); + + // ... other properties ... + + b.HasKey("Id"); + + b.ToTable("Spells"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs new file mode 100644 index 0000000000..f379de2818 --- /dev/null +++ b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Intersect.Server.Migrations.MySql.Game +{ + /// + public partial class KnockbackTilesMigration : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Combat_KnockbackTiles", + table: "Spells", + type: "int", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Combat_KnockbackTiles", + table: "Spells"); + } + } +} diff --git a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs new file mode 100644 index 0000000000..cfad18d782 --- /dev/null +++ b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs @@ -0,0 +1,47 @@ +// +using Intersect.Server.Database.GameData; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Intersect.Server.Migrations.MySql.Game +{ + [DbContext(typeof(MySqlGameContext))] + [Migration("20251210000000_AddGrievousWoundsAndHealBoost")] + partial class AddGrievousWoundsAndHealBoost + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.11"); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Spells.SpellDescriptor", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Combat_KnockbackTiles") + .HasColumnType("int"); + + b.Property("Combat_GrievousWoundsReduction") + .HasColumnType("int"); + + b.Property("Combat_HealingBoostPercentage") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Spells"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs new file mode 100644 index 0000000000..8cdb0988de --- /dev/null +++ b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs @@ -0,0 +1,40 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Intersect.Server.Migrations.MySql.Game +{ + /// + public partial class AddGrievousWoundsAndHealBoost : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Combat_GrievousWoundsReduction", + table: "Spells", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "Combat_HealingBoostPercentage", + table: "Spells", + type: "int", + nullable: false, + defaultValue: 0); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Combat_GrievousWoundsReduction", + table: "Spells"); + + migrationBuilder.DropColumn( + name: "Combat_HealingBoostPercentage", + table: "Spells"); + } + } +} diff --git a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs new file mode 100644 index 0000000000..b17b04d469 --- /dev/null +++ b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs @@ -0,0 +1,27 @@ +// +using System; +using Intersect.Server.Database.GameData; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Intersect.Server.Migrations.MySql.Game +{ + [DbContext(typeof(MySqlGameContext))] + [Migration("20251211000000_ConsolidateHealingEffects")] + partial class ConsolidateHealingEffects + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.11"); + // Model snapshot skipped for manual migration to avoid massive file duplication. + // Runtime only needs Up/Down. +#pragma warning restore 612, 618 + } + } +} diff --git a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs new file mode 100644 index 0000000000..4ed5ad2297 --- /dev/null +++ b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs @@ -0,0 +1,42 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Intersect.Server.Migrations.MySql.Game +{ + /// + public partial class ConsolidateHealingEffects : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Combat_PercentageEffect", + table: "Spells", + type: "int", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Combat_PercentageEffect", + table: "Spells"); + + migrationBuilder.AddColumn( + name: "Combat_GrievousWoundsReduction", + table: "Spells", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "Combat_HealingBoostPercentage", + table: "Spells", + type: "int", + nullable: false, + defaultValue: 0); + } + } +} From 17ee7bd0d143bd8af8e1918517296f17246919d3 Mon Sep 17 00:00:00 2001 From: Kamus Date: Thu, 11 Dec 2025 12:07:02 -0300 Subject: [PATCH 5/8] Unwanted columns removed (only "Combat_KnockbackTiles" and "Combat_PercentageEffect" remain) Migration modified to reflect previously requested names --- ..._AddGrievousWoundsAndHealBoost.Designer.cs | 1 - ...210000000_AddGrievousWoundsAndHealBoost.cs | 18 ++------ ...0000_ConsolidateHealingEffects.Designer.cs | 28 +----------- ...0251211000000_ConsolidateHealingEffects.cs | 43 +------------------ ..._AddGrievousWoundsAndHealBoost.Designer.cs | 5 +-- ...210000000_AddGrievousWoundsAndHealBoost.cs | 18 ++------ ...0000_ConsolidateHealingEffects.Designer.cs | 28 +----------- ...0251211000000_ConsolidateHealingEffects.cs | 43 +------------------ 8 files changed, 11 insertions(+), 173 deletions(-) diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs index 721d73536c..82812e0386 100644 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs @@ -1,5 +1,4 @@ // -using System; using Intersect.Server.Database.GameData; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs index b24e5af884..101a1b022c 100644 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs @@ -11,29 +11,17 @@ public partial class AddGrievousWoundsAndHealBoost : Migration protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( - name: "Combat_GrievousWoundsReduction", + name: "Combat_PercentageEffect", table: "Spells", type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "Combat_HealingBoostPercentage", - table: "Spells", - type: "INTEGER", - nullable: false, - defaultValue: 0); + nullable: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( - name: "Combat_GrievousWoundsReduction", - table: "Spells"); - - migrationBuilder.DropColumn( - name: "Combat_HealingBoostPercentage", + name: "Combat_PercentageEffect", table: "Spells"); } } diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs index 9bc4f83353..b8f505e473 100644 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs @@ -1,27 +1 @@ -// -using System; -using Intersect.Server.Database.GameData; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Intersect.Server.Migrations.Sqlite.Game -{ - [DbContext(typeof(SqliteGameContext))] - [Migration("20251211000000_ConsolidateHealingEffects")] - partial class ConsolidateHealingEffects - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.11"); - // Model snapshot skipped for manual migration to avoid massive file duplication. - // Runtime only needs Up/Down. -#pragma warning restore 612, 618 - } - } -} +// 20251211000000_ConsolidateHealingEffects is deleted as it is no longer needed after refactoring 20251210000000_AddGrievousWoundsAndHealBoost diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs index 7a6df7cdde..b8f505e473 100644 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs @@ -1,42 +1 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Intersect.Server.Migrations.Sqlite.Game -{ - /// - public partial class ConsolidateHealingEffects : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Combat_PercentageEffect", - table: "Spells", - type: "INTEGER", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Combat_PercentageEffect", - table: "Spells"); - - migrationBuilder.AddColumn( - name: "Combat_GrievousWoundsReduction", - table: "Spells", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "Combat_HealingBoostPercentage", - table: "Spells", - type: "INTEGER", - nullable: false, - defaultValue: 0); - } - } -} +// 20251211000000_ConsolidateHealingEffects is deleted as it is no longer needed after refactoring 20251210000000_AddGrievousWoundsAndHealBoost diff --git a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs index cfad18d782..151da20bae 100644 --- a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs @@ -31,10 +31,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("Combat_KnockbackTiles") .HasColumnType("int"); - b.Property("Combat_GrievousWoundsReduction") - .HasColumnType("int"); - - b.Property("Combat_HealingBoostPercentage") + b.Property("Combat_PercentageEffect") .HasColumnType("int"); b.HasKey("Id"); diff --git a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs index 8cdb0988de..cf54c1c8e3 100644 --- a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs @@ -11,29 +11,17 @@ public partial class AddGrievousWoundsAndHealBoost : Migration protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( - name: "Combat_GrievousWoundsReduction", + name: "Combat_PercentageEffect", table: "Spells", type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "Combat_HealingBoostPercentage", - table: "Spells", - type: "int", - nullable: false, - defaultValue: 0); + nullable: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( - name: "Combat_GrievousWoundsReduction", - table: "Spells"); - - migrationBuilder.DropColumn( - name: "Combat_HealingBoostPercentage", + name: "Combat_PercentageEffect", table: "Spells"); } } diff --git a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs index b17b04d469..b8f505e473 100644 --- a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs @@ -1,27 +1 @@ -// -using System; -using Intersect.Server.Database.GameData; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Intersect.Server.Migrations.MySql.Game -{ - [DbContext(typeof(MySqlGameContext))] - [Migration("20251211000000_ConsolidateHealingEffects")] - partial class ConsolidateHealingEffects - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.11"); - // Model snapshot skipped for manual migration to avoid massive file duplication. - // Runtime only needs Up/Down. -#pragma warning restore 612, 618 - } - } -} +// 20251211000000_ConsolidateHealingEffects is deleted as it is no longer needed after refactoring 20251210000000_AddGrievousWoundsAndHealBoost diff --git a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs index 4ed5ad2297..b8f505e473 100644 --- a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs @@ -1,42 +1 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Intersect.Server.Migrations.MySql.Game -{ - /// - public partial class ConsolidateHealingEffects : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Combat_PercentageEffect", - table: "Spells", - type: "int", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Combat_PercentageEffect", - table: "Spells"); - - migrationBuilder.AddColumn( - name: "Combat_GrievousWoundsReduction", - table: "Spells", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "Combat_HealingBoostPercentage", - table: "Spells", - type: "int", - nullable: false, - defaultValue: 0); - } - } -} +// 20251211000000_ConsolidateHealingEffects is deleted as it is no longer needed after refactoring 20251210000000_AddGrievousWoundsAndHealBoost From 670bbb1d68f0a17e8576974a5fa7cdc00e4d1b82 Mon Sep 17 00:00:00 2001 From: Kamus Date: Mon, 15 Dec 2025 13:21:51 -0300 Subject: [PATCH 6/8] Fixed the logic of the spells and edited the migration files (Migration helped by Gemini AI 3.0) --- .../Entities/Combat/Status.cs | 11 +- Intersect.Server.Core/Entities/Entity.cs | 151 +- Intersect.Server.Core/Entities/Npc.cs | 6 + Intersect.Server.Core/Entities/Player.cs | 5 +- ...010045_KnockbackTilesMigration.Designer.cs | 1652 ----------------- ...251212000000_AddCombatEffects.Designer.cs} | 4 +- ....cs => 20251212000000_AddCombatEffects.cs} | 13 +- ...010045_KnockbackTilesMigration.Designer.cs | 44 +- .../20251209010045_KnockbackTilesMigration.cs | 29 +- ..._AddGrievousWoundsAndHealBoost.Designer.cs | 45 +- ...210000000_AddGrievousWoundsAndHealBoost.cs | 29 +- ...0251212000000_AddCombatEffects.Designer.cs | 44 + .../Game/20251212000000_AddCombatEffects.cs | 19 +- 13 files changed, 138 insertions(+), 1914 deletions(-) delete mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.Designer.cs rename Intersect.Server.Core/Migrations/Sqlite/Game/{20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs => 20251212000000_AddCombatEffects.Designer.cs} (87%) rename Intersect.Server.Core/Migrations/Sqlite/Game/{20251210000000_AddGrievousWoundsAndHealBoost.cs => 20251212000000_AddCombatEffects.cs} (63%) create mode 100644 Intersect.Server/Migrations/MySql/Game/20251212000000_AddCombatEffects.Designer.cs rename Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.cs => Intersect.Server/Migrations/MySql/Game/20251212000000_AddCombatEffects.cs (52%) diff --git a/Intersect.Server.Core/Entities/Combat/Status.cs b/Intersect.Server.Core/Entities/Combat/Status.cs index 27074c4315..353b9d61e3 100644 --- a/Intersect.Server.Core/Entities/Combat/Status.cs +++ b/Intersect.Server.Core/Entities/Combat/Status.cs @@ -209,16 +209,7 @@ public Status(Entity en, Entity attacker, SpellDescriptor spell, SpellEffect typ } - // If this is a Knockback effect, apply the displacement (push target away from attacker) - if (Type == SpellEffect.Knockback && spell.Combat.KnockbackTiles > 0) - { - // Calculate direction from attacker to target, then that's the direction to push - var knockbackDirection = Attacker.GetDirectionTo(en); - if (knockbackDirection != Direction.None) - { - var dash = new Dash(en, spell.Combat.KnockbackTiles, knockbackDirection, false, false, false, false); - } - } + } public long[] Shield { get; set; } = new long[Enum.GetValues().Length]; diff --git a/Intersect.Server.Core/Entities/Entity.cs b/Intersect.Server.Core/Entities/Entity.cs index 3eeb210d5d..5f91b90665 100644 --- a/Intersect.Server.Core/Entities/Entity.cs +++ b/Intersect.Server.Core/Entities/Entity.cs @@ -1575,34 +1575,36 @@ protected long ApplyHealingModifiers(long healAmount) return healAmount; } - // Find the latest applied status that is either HealingReduction or HealingBoost - var latestStatus = CachedStatuses - .Where(s => s.Type == SpellEffect.HealingReduction || s.Type == SpellEffect.HealingBoost) - .OrderByDescending(s => s.StartTime) - .FirstOrDefault(); + // Multiplicative Stacking Logic + // 1. Calculate the strongest (highest %) Healing Boost currently active. + var maxBoost = 0; + var maxReduction = 0; - if (latestStatus == null) + foreach (var status in CachedStatuses) { - return healAmount; + if (status.Type == SpellEffect.HealingBoost) + { + var val = status.Spell.Combat.PercentageEffect ?? 0; + if (val > maxBoost) maxBoost = val; + } + else if (status.Type == SpellEffect.HealingReduction) + { + var val = status.Spell.Combat.PercentageEffect ?? 0; + if (val > maxReduction) maxReduction = val; + } } - var percentage = latestStatus.Spell.Combat.PercentageEffect ?? 0; + // 2. Apply Boost Multiplier (e.g. 50% boost -> 1.5x) + double boostMultiplier = 1.0 + (Math.Clamp(maxBoost, 0, 1000) / 100.0); - if (latestStatus.Type == SpellEffect.HealingReduction) - { - // Reduction: 0 to 100% - var reduction = Math.Clamp(percentage, 0, 100) / 100.0; - return (long)(healAmount * (1.0 - reduction)); - } - - if (latestStatus.Type == SpellEffect.HealingBoost) - { - // Boost: 0 to 1000% - var boost = Math.Clamp(percentage, 0, 1000) / 100.0; - return (long)(healAmount * (1.0 + boost)); - } + // 3. Apply Reduction Multiplier (e.g. 40% reduction -> 0.6x) + // Clamp reduction to max 100% (multiplier 0.0) to prevents negative healing (damage) + double reductionMultiplier = 1.0 - (Math.Clamp(maxReduction, 0, 100) / 100.0); - return healAmount; + // 4. Final Calculation + // Result = Base * Boost * Reduction + // If reduction is 100%, multiplier is 0, result is 0. + return (long)(healAmount * boostMultiplier * reductionMultiplier); } public void SubVital(Vital vital, long amount) @@ -1663,7 +1665,8 @@ public virtual void TryAttack(Entity target, if (parentSpell != null) { - TryAttack(target, parentSpell); + var willKnockback = projectile != null && projectile.Knockback > 0; + TryAttack(target, parentSpell, false, false, willKnockback); } var targetPlayer = target as Player; @@ -1711,7 +1714,8 @@ public virtual void TryAttack(Entity target, var s = projectile.Spell; if (s != null) { - HandleAoESpell(projectile.SpellId, s.Combat.HitRadius, target.MapId, target.X, target.Y, null); + var willKnockback = projectile.Knockback > 0; + HandleAoESpell(projectile.SpellId, s.Combat.HitRadius, target.MapId, target.X, target.Y, null, willKnockback ? target : null); } //Check that the npc has not been destroyed by the splash spell @@ -1727,79 +1731,9 @@ public virtual void TryAttack(Entity target, return; } - if (projectile.HomingBehavior || projectile.DirectShotBehavior) - { - // we need to get the direction based on the shooter's position and the target's position and angle between them - double angle = 0; - if (target.MapId == MapId) - { - angle = Math.Atan2(target.Y - Y, target.X - X); - } - else - { - var grid = DbInterface.GetGrid(Map.MapGrid); - bool angleFound = false; - - for (var y = Map.MapGridY - 1; y <= Map.MapGridY + 1; y++) - { - for (var x = Map.MapGridX - 1; x <= Map.MapGridX + 1; x++) - { - if (x < 0 || x >= grid.MapIdGrid.GetLength(0) || y < 0 || y >= grid.MapIdGrid.GetLength(1)) - { - continue; - } - - if (grid.MapIdGrid[x, y] == target.MapId) - { - int targetAbsoluteX = target.X + (x * Options.Instance.Map.MapWidth); - int targetAbsoluteY = target.Y + (y * Options.Instance.Map.MapHeight); - int playerAbsoluteX = X + (Map.MapGridX * Options.Instance.Map.MapWidth); - int playerAbsoluteY = Y + (Map.MapGridY * Options.Instance.Map.MapHeight); - - angle = Math.Atan2(targetAbsoluteY - playerAbsoluteY, targetAbsoluteX - playerAbsoluteX); - angleFound = true; - break; - } - } - - if (angleFound) break; - } - } - - var angleDegrees = angle * (180 / Math.PI); - if (angleDegrees >= -30 && angleDegrees <= 30) - { - projectileDir = Direction.Right; - } - else if (angleDegrees >= 30 && angleDegrees <= 60) - { - projectileDir = Direction.DownRight; - } - else if (angleDegrees >= 60 && angleDegrees <= 120) - { - projectileDir = Direction.Down; - } - else if (angleDegrees >= 120 && angleDegrees <= 150) - { - projectileDir = Direction.DownLeft; - } - else if (angleDegrees >= 150 || angleDegrees <= -150) - { - projectileDir = Direction.Left; - } - else if (angleDegrees >= -150 && angleDegrees <= -120) - { - projectileDir = Direction.UpLeft; - } - else if (angleDegrees >= -120 && angleDegrees <= -60) - { - projectileDir = Direction.Up; - } - else if (angleDegrees >= -60 && angleDegrees <= -30) - { - projectileDir = Direction.UpRight; - } - } + // Logic removed: Trust the projectileDir passed from ProjectileSpawn, which knows the impact angle. + // Previously, this recalculated direction based on Shooter <-> Target, which caused incorrect knockback + // if the shooter moved or if the projectile curved (homing). // If there is knock-back: knock them backwards. if (projectile.Knockback > 0 && ((int)projectileDir < Options.Instance.Map.MovementDirections) && !target.Immunities.Contains(SpellEffect.Knockback)) @@ -1813,7 +1747,8 @@ public virtual void TryAttack( Entity target, SpellDescriptor spellDescriptor, bool onHitTrigger = false, - bool trapTrigger = false + bool trapTrigger = false, + bool ignoreKnockback = false ) { if (target is Resource || target is EventPageInstance) @@ -1979,6 +1914,21 @@ public virtual void TryAttack( { new Status(target, this, spellDescriptor, spellDescriptor.Combat.Effect, statBuffTime, ""); + // Handle Knockback (moved here from Status.cs to prevent double-application) + if (spellDescriptor.Combat.Effect == SpellEffect.Knockback && !ignoreKnockback && !target.Immunities.Contains(SpellEffect.Knockback)) + { + var knockbackDirection = GetDirectionTo(target); + if (knockbackDirection != Direction.None) + { + // Use Spell's KnockbackTiles configuration + var tiles = spellDescriptor.Combat.KnockbackTiles; + if (tiles > 0) + { + new Dash(target, tiles, knockbackDirection, false, false, false, false); + } + } + } + if (target is Npc npc) { npc.AssignTarget(this); @@ -2749,7 +2699,8 @@ private void HandleAoESpell( Guid startMapId, int startX, int startY, - Entity spellTarget + Entity spellTarget, + Entity knockbackExclusionTarget = null ) { var spellBase = SpellDescriptor.Get(spellId); @@ -2778,7 +2729,7 @@ Entity spellTarget } } - TryAttack(entity, spellBase); //Handle damage + TryAttack(entity, spellBase, false, false, entity == knockbackExclusionTarget); //Handle damage } } } diff --git a/Intersect.Server.Core/Entities/Npc.cs b/Intersect.Server.Core/Entities/Npc.cs index 118855cdbb..a7c4955f8d 100644 --- a/Intersect.Server.Core/Entities/Npc.cs +++ b/Intersect.Server.Core/Entities/Npc.cs @@ -503,6 +503,9 @@ private static bool PredicateStunnedOrSleeping(Status status) case SpellEffect.Shield: case SpellEffect.OnHit: case SpellEffect.Taunt: + case SpellEffect.Knockback: + case SpellEffect.HealingReduction: + case SpellEffect.HealingBoost: case null: return false; @@ -530,6 +533,9 @@ private static bool PredicateUnableToCastSpells(Status status) case SpellEffect.Shield: case SpellEffect.OnHit: case SpellEffect.Taunt: + case SpellEffect.Knockback: + case SpellEffect.HealingReduction: + case SpellEffect.HealingBoost: case null: return false; diff --git a/Intersect.Server.Core/Entities/Player.cs b/Intersect.Server.Core/Entities/Player.cs index 61e9933670..fa663d3e2e 100644 --- a/Intersect.Server.Core/Entities/Player.cs +++ b/Intersect.Server.Core/Entities/Player.cs @@ -1668,7 +1668,8 @@ public override void TryAttack( Entity target, SpellDescriptor spellDescriptor, bool onHitTrigger = false, - bool trapTrigger = false + bool trapTrigger = false, + bool ignoreKnockback = false ) { if (!trapTrigger && !ValidTauntTarget(target)) //Traps ignore taunts. @@ -1676,7 +1677,7 @@ public override void TryAttack( return; } - base.TryAttack(target, spellDescriptor, onHitTrigger, trapTrigger); + base.TryAttack(target, spellDescriptor, onHitTrigger, trapTrigger, ignoreKnockback); } /// diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.Designer.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.Designer.cs deleted file mode 100644 index 34acadc6c6..0000000000 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.Designer.cs +++ /dev/null @@ -1,1652 +0,0 @@ -// -using System; -using Intersect.Server.Database.GameData; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Intersect.Server.Migrations.Sqlite.Game -{ - [DbContext(typeof(SqliteGameContext))] - [Migration("20251209010045_KnockbackTilesMigration")] - partial class KnockbackTilesMigration - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.11"); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Animations.AnimationDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CompleteSound") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("Sound") - .HasColumnType("TEXT"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Animations"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Crafting.CraftingRecipeDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("EventId") - .HasColumnType("TEXT") - .HasColumnName("Event"); - - b.Property("FailureChance") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("IngredientsJson") - .HasColumnType("TEXT") - .HasColumnName("Ingredients"); - - b.Property("ItemId") - .HasColumnType("TEXT"); - - b.Property("ItemLossChance") - .HasColumnType("INTEGER"); - - b.Property("JsonCraftingRequirements") - .HasColumnType("TEXT") - .HasColumnName("CraftingRequirements"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("Quantity") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Crafts"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Crafting.CraftingTableDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CraftsJson") - .HasColumnType("TEXT") - .HasColumnName("Crafts"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("CraftingTables"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Events.EventDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CanRunInParallel") - .HasColumnType("INTEGER"); - - b.Property("CommonEvent") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("Global") - .HasColumnType("INTEGER"); - - b.Property("MapId") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("PagesJson") - .HasColumnType("TEXT") - .HasColumnName("Pages"); - - b.Property("SpawnX") - .HasColumnType("INTEGER"); - - b.Property("SpawnY") - .HasColumnType("INTEGER"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Events"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.EquipmentProperties", b => - { - b.Property("DescriptorId") - .HasColumnType("TEXT"); - - b.HasKey("DescriptorId"); - - b.ToTable("Items_EquipmentProperties"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.ItemDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AnimationId") - .HasColumnType("TEXT") - .HasColumnName("Animation"); - - b.Property("AttackAnimationId") - .HasColumnType("TEXT") - .HasColumnName("AttackAnimation"); - - b.Property("AttackSpeedModifier") - .HasColumnType("INTEGER"); - - b.Property("AttackSpeedValue") - .HasColumnType("INTEGER"); - - b.Property("BlockAbsorption") - .HasColumnType("INTEGER"); - - b.Property("BlockAmount") - .HasColumnType("INTEGER"); - - b.Property("BlockChance") - .HasColumnType("INTEGER"); - - b.Property("CanBag") - .HasColumnType("INTEGER"); - - b.Property("CanBank") - .HasColumnType("INTEGER"); - - b.Property("CanDrop") - .HasColumnType("INTEGER") - .HasColumnName("Bound"); - - b.Property("CanGuildBank") - .HasColumnType("INTEGER"); - - b.Property("CanSell") - .HasColumnType("INTEGER"); - - b.Property("CanTrade") - .HasColumnType("INTEGER"); - - b.Property("CannotUseMessage") - .HasColumnType("TEXT"); - - b.Property("Cooldown") - .HasColumnType("INTEGER"); - - b.Property("CooldownGroup") - .HasColumnType("TEXT"); - - b.Property("CritChance") - .HasColumnType("INTEGER"); - - b.Property("CritMultiplier") - .HasColumnType("REAL"); - - b.Property("Damage") - .HasColumnType("INTEGER"); - - b.Property("DamageType") - .HasColumnType("INTEGER"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("DespawnTime") - .HasColumnType("INTEGER"); - - b.Property("DropChanceOnDeath") - .HasColumnType("INTEGER"); - - b.Property("EffectsJson") - .HasColumnType("TEXT") - .HasColumnName("Effects"); - - b.Property("EquipmentAnimationId") - .HasColumnType("TEXT") - .HasColumnName("EquipmentAnimation"); - - b.Property("EquipmentSlot") - .HasColumnType("INTEGER"); - - b.Property("EventId") - .HasColumnType("TEXT") - .HasColumnName("Event"); - - b.Property("EventTriggersJson") - .HasColumnType("TEXT") - .HasColumnName("EventTriggers"); - - b.Property("FemalePaperdoll") - .HasColumnType("TEXT"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("Icon") - .HasColumnType("TEXT"); - - b.Property("IgnoreCooldownReduction") - .HasColumnType("INTEGER"); - - b.Property("IgnoreGlobalCooldown") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("JsonColor") - .HasColumnType("TEXT") - .HasColumnName("Color"); - - b.Property("JsonUsageRequirements") - .HasColumnType("TEXT") - .HasColumnName("UsageRequirements"); - - b.Property("MalePaperdoll") - .HasColumnType("TEXT"); - - b.Property("MaxBankStack") - .HasColumnType("INTEGER"); - - b.Property("MaxInventoryStack") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("PercentageStatsJson") - .HasColumnType("TEXT") - .HasColumnName("PercentageStatsGiven"); - - b.Property("PercentageVitalsJson") - .HasColumnType("TEXT") - .HasColumnName("PercentageVitalsGiven"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("ProjectileId") - .HasColumnType("TEXT") - .HasColumnName("Projectile"); - - b.Property("QuickCast") - .HasColumnType("INTEGER"); - - b.Property("Rarity") - .HasColumnType("INTEGER"); - - b.Property("Scaling") - .HasColumnType("INTEGER"); - - b.Property("ScalingStat") - .HasColumnType("INTEGER"); - - b.Property("SingleUse") - .HasColumnType("INTEGER") - .HasColumnName("DestroySpell"); - - b.Property("SlotCount") - .HasColumnType("INTEGER"); - - b.Property("Speed") - .HasColumnType("INTEGER"); - - b.Property("SpellId") - .HasColumnType("TEXT") - .HasColumnName("Spell"); - - b.Property("Stackable") - .HasColumnType("INTEGER"); - - b.Property("StatsJson") - .HasColumnType("TEXT") - .HasColumnName("StatsGiven"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.Property("Tool") - .HasColumnType("INTEGER"); - - b.Property("TwoHanded") - .HasColumnType("INTEGER"); - - b.Property("VitalsJson") - .HasColumnType("TEXT") - .HasColumnName("VitalsGiven"); - - b.Property("VitalsRegenJson") - .HasColumnType("TEXT") - .HasColumnName("VitalsRegen"); - - b.Property("WeaponSpriteOverride") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Items"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Mapping.Tilesets.TilesetDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Tilesets"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Maps.MapList.MapList", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("JsonData") - .HasColumnType("TEXT") - .HasColumnName("JsonData"); - - b.HasKey("Id"); - - b.ToTable("MapFolders"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.NPCs.NPCDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Aggressive") - .HasColumnType("INTEGER"); - - b.Property("AttackAllies") - .HasColumnType("INTEGER"); - - b.Property("AttackAnimationId") - .HasColumnType("TEXT") - .HasColumnName("AttackAnimation"); - - b.Property("AttackOnSightConditionsJson") - .HasColumnType("TEXT") - .HasColumnName("AttackOnSightConditions"); - - b.Property("AttackSpeedModifier") - .HasColumnType("INTEGER"); - - b.Property("AttackSpeedValue") - .HasColumnType("INTEGER"); - - b.Property("CraftsJson") - .HasColumnType("TEXT") - .HasColumnName("Spells"); - - b.Property("CritChance") - .HasColumnType("INTEGER"); - - b.Property("CritMultiplier") - .HasColumnType("REAL"); - - b.Property("Damage") - .HasColumnType("INTEGER"); - - b.Property("DamageType") - .HasColumnType("INTEGER"); - - b.Property("Experience") - .HasColumnType("INTEGER"); - - b.Property("FleeHealthPercentage") - .HasColumnType("INTEGER"); - - b.Property("FocusHighestDamageDealer") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("ImmunitiesJson") - .HasColumnType("TEXT") - .HasColumnName("Immunities"); - - b.Property("IndividualizedLoot") - .HasColumnType("INTEGER"); - - b.Property("JsonAggroList") - .HasColumnType("TEXT") - .HasColumnName("AggroList"); - - b.Property("JsonColor") - .HasColumnType("TEXT") - .HasColumnName("Color"); - - b.Property("JsonDrops") - .HasColumnType("TEXT") - .HasColumnName("Drops"); - - b.Property("JsonMaxVital") - .HasColumnType("TEXT") - .HasColumnName("MaxVital"); - - b.Property("JsonStat") - .HasColumnType("TEXT") - .HasColumnName("Stats"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Movement") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("NpcVsNpcEnabled") - .HasColumnType("INTEGER"); - - b.Property("OnDeathEventId") - .HasColumnType("TEXT") - .HasColumnName("OnDeathEvent"); - - b.Property("OnDeathPartyEventId") - .HasColumnType("TEXT") - .HasColumnName("OnDeathPartyEvent"); - - b.Property("PlayerCanAttackConditionsJson") - .HasColumnType("TEXT") - .HasColumnName("PlayerCanAttackConditions"); - - b.Property("PlayerFriendConditionsJson") - .HasColumnType("TEXT") - .HasColumnName("PlayerFriendConditions"); - - b.Property("RegenJson") - .HasColumnType("TEXT") - .HasColumnName("VitalRegen"); - - b.Property("ResetRadius") - .HasColumnType("INTEGER"); - - b.Property("Scaling") - .HasColumnType("INTEGER"); - - b.Property("ScalingStat") - .HasColumnType("INTEGER"); - - b.Property("SightRange") - .HasColumnType("INTEGER"); - - b.Property("SpawnDuration") - .HasColumnType("INTEGER"); - - b.Property("SpellFrequency") - .HasColumnType("INTEGER"); - - b.Property("Sprite") - .HasColumnType("TEXT"); - - b.Property("Swarm") - .HasColumnType("INTEGER"); - - b.Property("Tenacity") - .HasColumnType("REAL"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Npcs"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.PlayerClass.ClassDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AttackAnimationId") - .HasColumnType("TEXT") - .HasColumnName("AttackAnimation"); - - b.Property("AttackSpeedModifier") - .HasColumnType("INTEGER"); - - b.Property("AttackSpeedValue") - .HasColumnType("INTEGER"); - - b.Property("AttackSpriteOverride") - .HasColumnType("TEXT"); - - b.Property("BaseExp") - .HasColumnType("INTEGER"); - - b.Property("BasePoints") - .HasColumnType("INTEGER"); - - b.Property("CritChance") - .HasColumnType("INTEGER"); - - b.Property("CritMultiplier") - .HasColumnType("REAL"); - - b.Property("Damage") - .HasColumnType("INTEGER"); - - b.Property("DamageType") - .HasColumnType("INTEGER"); - - b.Property("ExpIncrease") - .HasColumnType("INTEGER"); - - b.Property("ExpOverridesJson") - .HasColumnType("TEXT") - .HasColumnName("ExperienceOverrides"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("IncreasePercentage") - .HasColumnType("INTEGER"); - - b.Property("JsonBaseStats") - .HasColumnType("TEXT") - .HasColumnName("BaseStats"); - - b.Property("JsonBaseVitals") - .HasColumnType("TEXT") - .HasColumnName("BaseVitals"); - - b.Property("JsonItems") - .HasColumnType("TEXT") - .HasColumnName("Items"); - - b.Property("JsonSpells") - .HasColumnType("TEXT") - .HasColumnName("Spells"); - - b.Property("JsonSprites") - .HasColumnType("TEXT") - .HasColumnName("Sprites"); - - b.Property("Locked") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("PointIncrease") - .HasColumnType("INTEGER"); - - b.Property("RegenJson") - .HasColumnType("TEXT") - .HasColumnName("VitalRegen"); - - b.Property("Scaling") - .HasColumnType("INTEGER"); - - b.Property("ScalingStat") - .HasColumnType("INTEGER"); - - b.Property("SpawnDir") - .HasColumnType("INTEGER"); - - b.Property("SpawnMapId") - .HasColumnType("TEXT") - .HasColumnName("SpawnMap"); - - b.Property("SpawnX") - .HasColumnType("INTEGER"); - - b.Property("SpawnY") - .HasColumnType("INTEGER"); - - b.Property("StatIncreaseJson") - .HasColumnType("TEXT") - .HasColumnName("StatIncreases"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.Property("VitalIncreaseJson") - .HasColumnType("TEXT") - .HasColumnName("VitalIncreases"); - - b.HasKey("Id"); - - b.ToTable("Classes"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Resources.ResourceDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("CannotHarvestMessage") - .HasColumnType("TEXT"); - - b.Property("DeathAnimationId") - .HasColumnType("TEXT") - .HasColumnName("DeathAnimation"); - - b.Property("EventId") - .HasColumnType("TEXT") - .HasColumnName("Event"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("JsonDrops") - .HasColumnType("TEXT") - .HasColumnName("Drops"); - - b.Property("JsonHarvestingRequirements") - .HasColumnType("TEXT") - .HasColumnName("HarvestingRequirements"); - - b.Property("JsonStates") - .HasColumnType("TEXT") - .HasColumnName("States"); - - b.Property("MaxHp") - .HasColumnType("INTEGER"); - - b.Property("MinHp") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("SpawnDuration") - .HasColumnType("INTEGER"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.Property("Tool") - .HasColumnType("INTEGER"); - - b.Property("UseExplicitMaxHealthForResourceStates") - .HasColumnType("INTEGER"); - - b.Property("VitalRegen") - .HasColumnType("INTEGER"); - - b.Property("WalkableAfter") - .HasColumnType("INTEGER"); - - b.Property("WalkableBefore") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Resources"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Variables.GuildVariableDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("DataType") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("TextId") - .HasColumnType("TEXT"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GuildVariables"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Variables.PlayerVariableDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("DataType") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("TextId") - .HasColumnType("TEXT"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("PlayerVariables"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Variables.ServerVariableDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("DataType") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("Json") - .HasColumnType("TEXT") - .HasColumnName("Value"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("TextId") - .HasColumnType("TEXT"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("ServerVariables"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Variables.UserVariableDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("DataType") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("TextId") - .HasColumnType("TEXT"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("UserVariables"); - }); - - modelBuilder.Entity("Intersect.GameObjects.DaylightCycleDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("DaylightHuesJson") - .HasColumnType("TEXT") - .HasColumnName("DaylightHues"); - - b.Property("RangeInterval") - .HasColumnType("INTEGER"); - - b.Property("Rate") - .HasColumnType("REAL"); - - b.Property("SyncTime") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Time"); - }); - - modelBuilder.Entity("Intersect.GameObjects.ProjectileDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AmmoItemId") - .HasColumnType("TEXT") - .HasColumnName("Ammo"); - - b.Property("AmmoRequired") - .HasColumnType("INTEGER"); - - b.Property("AnimationsJson") - .HasColumnType("TEXT") - .HasColumnName("Animations"); - - b.Property("Delay") - .HasColumnType("INTEGER"); - - b.Property("DirectShotBehavior") - .HasColumnType("INTEGER"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("GrappleHook") - .HasColumnType("INTEGER"); - - b.Property("GrappleHookOptionsJson") - .HasColumnType("TEXT") - .HasColumnName("GrappleHookOptions"); - - b.Property("HomingBehavior") - .HasColumnType("INTEGER"); - - b.Property("IgnoreActiveResources") - .HasColumnType("INTEGER"); - - b.Property("IgnoreExhaustedResources") - .HasColumnType("INTEGER"); - - b.Property("IgnoreMapBlocks") - .HasColumnType("INTEGER"); - - b.Property("IgnoreZDimension") - .HasColumnType("INTEGER"); - - b.Property("Knockback") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("PierceTarget") - .HasColumnType("INTEGER"); - - b.Property("Quantity") - .HasColumnType("INTEGER"); - - b.Property("Range") - .HasColumnType("INTEGER"); - - b.Property("SpawnsJson") - .HasColumnType("TEXT") - .HasColumnName("SpawnLocations"); - - b.Property("Speed") - .HasColumnType("INTEGER"); - - b.Property("SpellId") - .HasColumnType("TEXT") - .HasColumnName("Spell"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Projectiles"); - }); - - modelBuilder.Entity("Intersect.GameObjects.QuestDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BeforeDescription") - .HasColumnType("TEXT"); - - b.Property("CompletedCategory") - .HasColumnType("TEXT"); - - b.Property("DoNotShowUnlessRequirementsMet") - .HasColumnType("INTEGER"); - - b.Property("EndDescription") - .HasColumnType("TEXT"); - - b.Property("EndEventId") - .HasColumnType("TEXT") - .HasColumnName("EndEvent"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("InProgressCategory") - .HasColumnType("TEXT"); - - b.Property("InProgressDescription") - .HasColumnType("TEXT"); - - b.Property("JsonRequirements") - .HasColumnType("TEXT") - .HasColumnName("Requirements"); - - b.Property("LogAfterComplete") - .HasColumnType("INTEGER"); - - b.Property("LogBeforeOffer") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("OrderValue") - .HasColumnType("INTEGER"); - - b.Property("Quitable") - .HasColumnType("INTEGER"); - - b.Property("Repeatable") - .HasColumnType("INTEGER"); - - b.Property("StartDescription") - .HasColumnType("TEXT"); - - b.Property("StartEventId") - .HasColumnType("TEXT") - .HasColumnName("StartEvent"); - - b.Property("TasksJson") - .HasColumnType("TEXT") - .HasColumnName("Tasks"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.Property("UnstartedCategory") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Quests"); - }); - - modelBuilder.Entity("Intersect.GameObjects.ShopDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("BuySound") - .HasColumnType("TEXT"); - - b.Property("BuyingWhitelist") - .HasColumnType("INTEGER"); - - b.Property("DefaultCurrencyId") - .HasColumnType("TEXT") - .HasColumnName("DefaultCurrency"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("JsonBuyingItems") - .HasColumnType("TEXT") - .HasColumnName("BuyingItems"); - - b.Property("JsonSellingItems") - .HasColumnType("TEXT") - .HasColumnName("SellingItems"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("SellSound") - .HasColumnType("TEXT"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Shops"); - }); - - modelBuilder.Entity("Intersect.GameObjects.SpellDescriptor", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("Bound") - .HasColumnType("INTEGER"); - - b.Property("CannotCastMessage") - .HasColumnType("TEXT"); - - b.Property("CastAnimationId") - .HasColumnType("TEXT") - .HasColumnName("CastAnimation"); - - b.Property("CastDuration") - .HasColumnType("INTEGER"); - - b.Property("CastSpriteOverride") - .HasColumnType("TEXT"); - - b.Property("CooldownDuration") - .HasColumnType("INTEGER"); - - b.Property("CooldownGroup") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("EventId") - .HasColumnType("TEXT") - .HasColumnName("Event"); - - b.Property("Folder") - .HasColumnType("TEXT"); - - b.Property("HitAnimationId") - .HasColumnType("TEXT") - .HasColumnName("HitAnimation"); - - b.Property("Icon") - .HasColumnType("TEXT"); - - b.Property("IgnoreCooldownReduction") - .HasColumnType("INTEGER"); - - b.Property("IgnoreGlobalCooldown") - .HasColumnType("INTEGER"); - - b.Property("JsonCastRequirements") - .HasColumnType("TEXT") - .HasColumnName("CastRequirements"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("SpellType") - .HasColumnType("INTEGER"); - - b.Property("TickAnimationId") - .HasColumnType("TEXT") - .HasColumnName("TickAnimation"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.Property("VitalCostJson") - .HasColumnType("TEXT") - .HasColumnName("VitalCost"); - - b.HasKey("Id"); - - b.ToTable("Spells"); - }); - - modelBuilder.Entity("Intersect.Server.Maps.MapController", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AHue") - .HasColumnType("INTEGER"); - - b.Property("AttributeData") - .HasColumnType("BLOB") - .HasColumnName("Attributes"); - - b.Property("BHue") - .HasColumnType("INTEGER"); - - b.Property("Brightness") - .HasColumnType("INTEGER"); - - b.Property("Down") - .HasColumnType("TEXT"); - - b.Property("EventIdsJson") - .HasColumnType("TEXT") - .HasColumnName("Events"); - - b.Property("Fog") - .HasColumnType("TEXT"); - - b.Property("FogTransparency") - .HasColumnType("INTEGER"); - - b.Property("FogXSpeed") - .HasColumnType("INTEGER"); - - b.Property("FogYSpeed") - .HasColumnType("INTEGER"); - - b.Property("GHue") - .HasColumnType("INTEGER"); - - b.Property("HideEquipment") - .HasColumnType("INTEGER"); - - b.Property("IsIndoors") - .HasColumnType("INTEGER"); - - b.Property("Left") - .HasColumnType("TEXT"); - - b.Property("LightsJson") - .HasColumnType("TEXT") - .HasColumnName("Lights"); - - b.Property("Music") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT") - .HasColumnOrder(0); - - b.Property("NpcSpawnsJson") - .HasColumnType("TEXT") - .HasColumnName("NpcSpawns"); - - b.Property("OverlayGraphic") - .HasColumnType("TEXT"); - - b.Property("Panorama") - .HasColumnType("TEXT"); - - b.Property("PlayerLightColorJson") - .HasColumnType("TEXT") - .HasColumnName("PlayerLightColor"); - - b.Property("PlayerLightExpand") - .HasColumnType("REAL"); - - b.Property("PlayerLightIntensity") - .HasColumnType("INTEGER"); - - b.Property("PlayerLightSize") - .HasColumnType("INTEGER"); - - b.Property("RHue") - .HasColumnType("INTEGER"); - - b.Property("Revision") - .HasColumnType("INTEGER"); - - b.Property("Right") - .HasColumnType("TEXT"); - - b.Property("Sound") - .HasColumnType("TEXT"); - - b.Property("TileData") - .HasColumnType("BLOB"); - - b.Property("TimeCreated") - .HasColumnType("INTEGER"); - - b.Property("Up") - .HasColumnType("TEXT"); - - b.Property("WeatherAnimationId") - .HasColumnType("TEXT") - .HasColumnName("WeatherAnimation"); - - b.Property("WeatherIntensity") - .HasColumnType("INTEGER"); - - b.Property("WeatherXSpeed") - .HasColumnType("INTEGER"); - - b.Property("WeatherYSpeed") - .HasColumnType("INTEGER"); - - b.Property("ZoneType") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Maps"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Animations.AnimationDescriptor", b => - { - b.OwnsOne("Intersect.Framework.Core.GameObjects.Animations.AnimationLayer", "Lower", b1 => - { - b1.Property("AnimationDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("AlternateRenderLayer") - .HasColumnType("INTEGER"); - - b1.Property("DisableRotations") - .HasColumnType("INTEGER"); - - b1.Property("FrameCount") - .HasColumnType("INTEGER"); - - b1.Property("FrameSpeed") - .HasColumnType("INTEGER"); - - b1.Property("Light") - .HasColumnType("TEXT"); - - b1.Property("LoopCount") - .HasColumnType("INTEGER"); - - b1.Property("Sprite") - .HasColumnType("TEXT"); - - b1.Property("XFrames") - .HasColumnType("INTEGER"); - - b1.Property("YFrames") - .HasColumnType("INTEGER"); - - b1.HasKey("AnimationDescriptorId"); - - b1.ToTable("Animations"); - - b1.WithOwner() - .HasForeignKey("AnimationDescriptorId"); - }); - - b.OwnsOne("Intersect.Framework.Core.GameObjects.Animations.AnimationLayer", "Upper", b1 => - { - b1.Property("AnimationDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("AlternateRenderLayer") - .HasColumnType("INTEGER"); - - b1.Property("DisableRotations") - .HasColumnType("INTEGER"); - - b1.Property("FrameCount") - .HasColumnType("INTEGER"); - - b1.Property("FrameSpeed") - .HasColumnType("INTEGER"); - - b1.Property("Light") - .HasColumnType("TEXT"); - - b1.Property("LoopCount") - .HasColumnType("INTEGER"); - - b1.Property("Sprite") - .HasColumnType("TEXT"); - - b1.Property("XFrames") - .HasColumnType("INTEGER"); - - b1.Property("YFrames") - .HasColumnType("INTEGER"); - - b1.HasKey("AnimationDescriptorId"); - - b1.ToTable("Animations"); - - b1.WithOwner() - .HasForeignKey("AnimationDescriptorId"); - }); - - b.Navigation("Lower"); - - b.Navigation("Upper"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.EquipmentProperties", b => - { - b.HasOne("Intersect.Framework.Core.GameObjects.Items.ItemDescriptor", "Descriptor") - .WithOne("EquipmentProperties") - .HasForeignKey("Intersect.Framework.Core.GameObjects.Items.EquipmentProperties", "DescriptorId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_AbilityPower", b1 => - { - b1.Property("EquipmentPropertiesDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("HighRange") - .HasColumnType("INTEGER"); - - b1.Property("LowRange") - .HasColumnType("INTEGER"); - - b1.HasKey("EquipmentPropertiesDescriptorId"); - - b1.ToTable("Items_EquipmentProperties"); - - b1.WithOwner() - .HasForeignKey("EquipmentPropertiesDescriptorId"); - }); - - b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_Attack", b1 => - { - b1.Property("EquipmentPropertiesDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("HighRange") - .HasColumnType("INTEGER"); - - b1.Property("LowRange") - .HasColumnType("INTEGER"); - - b1.HasKey("EquipmentPropertiesDescriptorId"); - - b1.ToTable("Items_EquipmentProperties"); - - b1.WithOwner() - .HasForeignKey("EquipmentPropertiesDescriptorId"); - }); - - b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_Defense", b1 => - { - b1.Property("EquipmentPropertiesDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("HighRange") - .HasColumnType("INTEGER"); - - b1.Property("LowRange") - .HasColumnType("INTEGER"); - - b1.HasKey("EquipmentPropertiesDescriptorId"); - - b1.ToTable("Items_EquipmentProperties"); - - b1.WithOwner() - .HasForeignKey("EquipmentPropertiesDescriptorId"); - }); - - b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_MagicResist", b1 => - { - b1.Property("EquipmentPropertiesDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("HighRange") - .HasColumnType("INTEGER"); - - b1.Property("LowRange") - .HasColumnType("INTEGER"); - - b1.HasKey("EquipmentPropertiesDescriptorId"); - - b1.ToTable("Items_EquipmentProperties"); - - b1.WithOwner() - .HasForeignKey("EquipmentPropertiesDescriptorId"); - }); - - b.OwnsOne("Intersect.GameObjects.Ranges.ItemRange", "StatRange_Speed", b1 => - { - b1.Property("EquipmentPropertiesDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("HighRange") - .HasColumnType("INTEGER"); - - b1.Property("LowRange") - .HasColumnType("INTEGER"); - - b1.HasKey("EquipmentPropertiesDescriptorId"); - - b1.ToTable("Items_EquipmentProperties"); - - b1.WithOwner() - .HasForeignKey("EquipmentPropertiesDescriptorId"); - }); - - b.Navigation("Descriptor"); - - b.Navigation("StatRange_AbilityPower"); - - b.Navigation("StatRange_Attack"); - - b.Navigation("StatRange_Defense"); - - b.Navigation("StatRange_MagicResist"); - - b.Navigation("StatRange_Speed"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.ItemDescriptor", b => - { - b.OwnsOne("Intersect.Framework.Core.GameObjects.Items.ConsumableData", "Consumable", b1 => - { - b1.Property("ItemDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("Percentage") - .HasColumnType("INTEGER"); - - b1.Property("Type") - .HasColumnType("INTEGER"); - - b1.Property("Value") - .HasColumnType("INTEGER"); - - b1.HasKey("ItemDescriptorId"); - - b1.ToTable("Items"); - - b1.WithOwner() - .HasForeignKey("ItemDescriptorId"); - }); - - b.Navigation("Consumable"); - }); - - modelBuilder.Entity("Intersect.GameObjects.SpellDescriptor", b => - { - b.OwnsOne("Intersect.GameObjects.SpellCombatDescriptor", "Combat", b1 => - { - b1.Property("SpellDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("CastRange") - .HasColumnType("INTEGER"); - - b1.Property("CritChance") - .HasColumnType("INTEGER"); - - b1.Property("CritMultiplier") - .HasColumnType("REAL"); - - b1.Property("DamageType") - .HasColumnType("INTEGER"); - - b1.Property("Duration") - .HasColumnType("INTEGER"); - - b1.Property("Effect") - .HasColumnType("INTEGER"); - - b1.Property("Friendly") - .HasColumnType("INTEGER"); - - b1.Property("HitRadius") - .HasColumnType("INTEGER"); - - b1.Property("HoTDoT") - .HasColumnType("INTEGER"); - - b1.Property("HotDotInterval") - .HasColumnType("INTEGER"); - - b1.Property("KnockbackTiles") - .HasColumnType("INTEGER"); - - b1.Property("OnHitDuration") - .HasColumnType("INTEGER") - .HasColumnName("OnHit"); - - b1.Property("PercentageStatDiffJson") - .HasColumnType("TEXT") - .HasColumnName("PercentageStatDiff"); - - b1.Property("ProjectileId") - .HasColumnType("TEXT") - .HasColumnName("Projectile"); - - b1.Property("Scaling") - .HasColumnType("INTEGER"); - - b1.Property("ScalingStat") - .HasColumnType("INTEGER"); - - b1.Property("StatDiffJson") - .HasColumnType("TEXT") - .HasColumnName("StatDiff"); - - b1.Property("TargetType") - .HasColumnType("INTEGER"); - - b1.Property("TransformSprite") - .HasColumnType("TEXT"); - - b1.Property("TrapDuration") - .HasColumnType("INTEGER") - .HasColumnName("Trap"); - - b1.Property("VitalDiffJson") - .HasColumnType("TEXT") - .HasColumnName("VitalDiff"); - - b1.HasKey("SpellDescriptorId"); - - b1.ToTable("Spells"); - - b1.WithOwner() - .HasForeignKey("SpellDescriptorId"); - }); - - b.OwnsOne("Intersect.GameObjects.SpellDashDescriptor", "Dash", b1 => - { - b1.Property("SpellDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("IgnoreActiveResources") - .HasColumnType("INTEGER"); - - b1.Property("IgnoreInactiveResources") - .HasColumnType("INTEGER"); - - b1.Property("IgnoreMapBlocks") - .HasColumnType("INTEGER"); - - b1.Property("IgnoreZDimensionAttributes") - .HasColumnType("INTEGER"); - - b1.HasKey("SpellDescriptorId"); - - b1.ToTable("Spells"); - - b1.WithOwner() - .HasForeignKey("SpellDescriptorId"); - }); - - b.OwnsOne("Intersect.GameObjects.SpellWarpDescriptor", "Warp", b1 => - { - b1.Property("SpellDescriptorId") - .HasColumnType("TEXT"); - - b1.Property("Dir") - .HasColumnType("INTEGER"); - - b1.Property("MapId") - .HasColumnType("TEXT"); - - b1.Property("X") - .HasColumnType("INTEGER"); - - b1.Property("Y") - .HasColumnType("INTEGER"); - - b1.HasKey("SpellDescriptorId"); - - b1.ToTable("Spells"); - - b1.WithOwner() - .HasForeignKey("SpellDescriptorId"); - }); - - b.Navigation("Combat"); - - b.Navigation("Dash"); - - b.Navigation("Warp"); - }); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Items.ItemDescriptor", b => - { - b.Navigation("EquipmentProperties"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251212000000_AddCombatEffects.Designer.cs similarity index 87% rename from Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs rename to Intersect.Server.Core/Migrations/Sqlite/Game/20251212000000_AddCombatEffects.Designer.cs index 82812e0386..393236da37 100644 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251212000000_AddCombatEffects.Designer.cs @@ -10,8 +10,8 @@ namespace Intersect.Server.Migrations.Sqlite.Game { [DbContext(typeof(SqliteGameContext))] - [Migration("20251210000000_AddGrievousWoundsAndHealBoost")] - partial class AddGrievousWoundsAndHealBoost + [Migration("20251212000000_AddCombatEffects")] + partial class AddCombatEffects { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251212000000_AddCombatEffects.cs similarity index 63% rename from Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs rename to Intersect.Server.Core/Migrations/Sqlite/Game/20251212000000_AddCombatEffects.cs index 101a1b022c..682ff09b17 100644 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs +++ b/Intersect.Server.Core/Migrations/Sqlite/Game/20251212000000_AddCombatEffects.cs @@ -5,11 +5,18 @@ namespace Intersect.Server.Migrations.Sqlite.Game { /// - public partial class AddGrievousWoundsAndHealBoost : Migration + public partial class AddCombatEffects : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { + migrationBuilder.AddColumn( + name: "Combat_KnockbackTiles", + table: "Spells", + type: "INTEGER", + nullable: false, + defaultValue: 1); + migrationBuilder.AddColumn( name: "Combat_PercentageEffect", table: "Spells", @@ -20,6 +27,10 @@ protected override void Up(MigrationBuilder migrationBuilder) /// protected override void Down(MigrationBuilder migrationBuilder) { + migrationBuilder.DropColumn( + name: "Combat_KnockbackTiles", + table: "Spells"); + migrationBuilder.DropColumn( name: "Combat_PercentageEffect", table: "Spells"); diff --git a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs index 7b078c693b..36667b9c31 100644 --- a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs @@ -1,43 +1 @@ -// -using Intersect.Server.Database.GameData; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Intersect.Server.Migrations.MySql.Game -{ - [DbContext(typeof(MySqlGameContext))] - [Migration("20251209010045_KnockbackTilesMigration")] - partial class KnockbackTilesMigration - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.11"); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Spells.SpellDescriptor", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasColumnType("longtext"); - - b.Property("Combat_KnockbackTiles") - .HasColumnType("int"); - - // ... other properties ... - - b.HasKey("Id"); - - b.ToTable("Spells"); - }); -#pragma warning restore 612, 618 - } - } -} +// Deleted diff --git a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs index f379de2818..36667b9c31 100644 --- a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs @@ -1,28 +1 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Intersect.Server.Migrations.MySql.Game -{ - /// - public partial class KnockbackTilesMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Combat_KnockbackTiles", - table: "Spells", - type: "int", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Combat_KnockbackTiles", - table: "Spells"); - } - } -} +// Deleted diff --git a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs index 151da20bae..36667b9c31 100644 --- a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs @@ -1,44 +1 @@ -// -using Intersect.Server.Database.GameData; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Intersect.Server.Migrations.MySql.Game -{ - [DbContext(typeof(MySqlGameContext))] - [Migration("20251210000000_AddGrievousWoundsAndHealBoost")] - partial class AddGrievousWoundsAndHealBoost - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.11"); - - modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Spells.SpellDescriptor", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasColumnType("longtext"); - - b.Property("Combat_KnockbackTiles") - .HasColumnType("int"); - - b.Property("Combat_PercentageEffect") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Spells"); - }); -#pragma warning restore 612, 618 - } - } -} +// Deleted diff --git a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs index cf54c1c8e3..36667b9c31 100644 --- a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs @@ -1,28 +1 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Intersect.Server.Migrations.MySql.Game -{ - /// - public partial class AddGrievousWoundsAndHealBoost : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Combat_PercentageEffect", - table: "Spells", - type: "int", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Combat_PercentageEffect", - table: "Spells"); - } - } -} +// Deleted diff --git a/Intersect.Server/Migrations/MySql/Game/20251212000000_AddCombatEffects.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251212000000_AddCombatEffects.Designer.cs new file mode 100644 index 0000000000..b84cff153c --- /dev/null +++ b/Intersect.Server/Migrations/MySql/Game/20251212000000_AddCombatEffects.Designer.cs @@ -0,0 +1,44 @@ +// +using Intersect.Server.Database.GameData; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Intersect.Server.Migrations.MySql.Game +{ + [DbContext(typeof(MySqlGameContext))] + [Migration("20251212000000_AddCombatEffects")] + partial class AddCombatEffects + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.11"); + + modelBuilder.Entity("Intersect.Framework.Core.GameObjects.Spells.SpellDescriptor", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Combat_KnockbackTiles") + .HasColumnType("int"); + + b.Property("Combat_PercentageEffect") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Spells"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.cs b/Intersect.Server/Migrations/MySql/Game/20251212000000_AddCombatEffects.cs similarity index 52% rename from Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.cs rename to Intersect.Server/Migrations/MySql/Game/20251212000000_AddCombatEffects.cs index a3f687d30a..0274bd21d8 100644 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251209010045_KnockbackTilesMigration.cs +++ b/Intersect.Server/Migrations/MySql/Game/20251212000000_AddCombatEffects.cs @@ -1,11 +1,11 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace Intersect.Server.Migrations.Sqlite.Game +namespace Intersect.Server.Migrations.MySql.Game { /// - public partial class KnockbackTilesMigration : Migration + public partial class AddCombatEffects : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -13,7 +13,14 @@ protected override void Up(MigrationBuilder migrationBuilder) migrationBuilder.AddColumn( name: "Combat_KnockbackTiles", table: "Spells", - type: "INTEGER", + type: "int", + nullable: false, + defaultValue: 1); + + migrationBuilder.AddColumn( + name: "Combat_PercentageEffect", + table: "Spells", + type: "int", nullable: true); } @@ -23,6 +30,10 @@ protected override void Down(MigrationBuilder migrationBuilder) migrationBuilder.DropColumn( name: "Combat_KnockbackTiles", table: "Spells"); + + migrationBuilder.DropColumn( + name: "Combat_PercentageEffect", + table: "Spells"); } } } From 7dbc06f13ef974063c1b1f210d22d6716da398a2 Mon Sep 17 00:00:00 2001 From: Kamus Date: Mon, 15 Dec 2025 13:26:53 -0300 Subject: [PATCH 7/8] Deleted the innecessary migration files --- .../Game/20251211000000_ConsolidateHealingEffects.Designer.cs | 1 - .../Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs | 1 - .../Game/20251209010045_KnockbackTilesMigration.Designer.cs | 1 - .../MySql/Game/20251209010045_KnockbackTilesMigration.cs | 1 - .../20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs | 1 - .../MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs | 1 - .../Game/20251211000000_ConsolidateHealingEffects.Designer.cs | 1 - .../MySql/Game/20251211000000_ConsolidateHealingEffects.cs | 1 - 8 files changed, 8 deletions(-) delete mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs delete mode 100644 Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs delete mode 100644 Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs delete mode 100644 Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs delete mode 100644 Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs delete mode 100644 Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs delete mode 100644 Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs delete mode 100644 Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs deleted file mode 100644 index b8f505e473..0000000000 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.Designer.cs +++ /dev/null @@ -1 +0,0 @@ -// 20251211000000_ConsolidateHealingEffects is deleted as it is no longer needed after refactoring 20251210000000_AddGrievousWoundsAndHealBoost diff --git a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs b/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs deleted file mode 100644 index b8f505e473..0000000000 --- a/Intersect.Server.Core/Migrations/Sqlite/Game/20251211000000_ConsolidateHealingEffects.cs +++ /dev/null @@ -1 +0,0 @@ -// 20251211000000_ConsolidateHealingEffects is deleted as it is no longer needed after refactoring 20251210000000_AddGrievousWoundsAndHealBoost diff --git a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs deleted file mode 100644 index 36667b9c31..0000000000 --- a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.Designer.cs +++ /dev/null @@ -1 +0,0 @@ -// Deleted diff --git a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs b/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs deleted file mode 100644 index 36667b9c31..0000000000 --- a/Intersect.Server/Migrations/MySql/Game/20251209010045_KnockbackTilesMigration.cs +++ /dev/null @@ -1 +0,0 @@ -// Deleted diff --git a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs deleted file mode 100644 index 36667b9c31..0000000000 --- a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.Designer.cs +++ /dev/null @@ -1 +0,0 @@ -// Deleted diff --git a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs b/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs deleted file mode 100644 index 36667b9c31..0000000000 --- a/Intersect.Server/Migrations/MySql/Game/20251210000000_AddGrievousWoundsAndHealBoost.cs +++ /dev/null @@ -1 +0,0 @@ -// Deleted diff --git a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs deleted file mode 100644 index b8f505e473..0000000000 --- a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.Designer.cs +++ /dev/null @@ -1 +0,0 @@ -// 20251211000000_ConsolidateHealingEffects is deleted as it is no longer needed after refactoring 20251210000000_AddGrievousWoundsAndHealBoost diff --git a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs b/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs deleted file mode 100644 index b8f505e473..0000000000 --- a/Intersect.Server/Migrations/MySql/Game/20251211000000_ConsolidateHealingEffects.cs +++ /dev/null @@ -1 +0,0 @@ -// 20251211000000_ConsolidateHealingEffects is deleted as it is no longer needed after refactoring 20251210000000_AddGrievousWoundsAndHealBoost From 2e7dd1c9e4aaf1ce78f04d81249a98c0164c5f67 Mon Sep 17 00:00:00 2001 From: Kamus Date: Mon, 15 Dec 2025 13:49:00 -0300 Subject: [PATCH 8/8] Fixed empty spaces --- Framework/Intersect.Framework.Core/Config/CombatOptions.cs | 2 -- Intersect.Server.Core/Entities/Combat/Status.cs | 2 -- 2 files changed, 4 deletions(-) diff --git a/Framework/Intersect.Framework.Core/Config/CombatOptions.cs b/Framework/Intersect.Framework.Core/Config/CombatOptions.cs index 489be38bca..ad0b6d5134 100644 --- a/Framework/Intersect.Framework.Core/Config/CombatOptions.cs +++ b/Framework/Intersect.Framework.Core/Config/CombatOptions.cs @@ -83,6 +83,4 @@ public partial class CombatOptions /// If enabled, this allows players to cast friendly spells on players who aren't in their guild or party /// public bool EnableAllPlayersFriendlyInSafeZone { get; set; } = false; - - } diff --git a/Intersect.Server.Core/Entities/Combat/Status.cs b/Intersect.Server.Core/Entities/Combat/Status.cs index 353b9d61e3..7010055f66 100644 --- a/Intersect.Server.Core/Entities/Combat/Status.cs +++ b/Intersect.Server.Core/Entities/Combat/Status.cs @@ -208,8 +208,6 @@ public Status(Entity en, Entity attacker, SpellDescriptor spell, SpellEffect typ } } - - } public long[] Shield { get; set; } = new long[Enum.GetValues().Length];