projectiles
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,180 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SystemRevivalServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ProjectileSystemAndEquipmentSlots : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "EquippedAccessory",
|
||||
table: "dungeon_characters",
|
||||
newName: "EquippedRing2");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AmmunitionType",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "varchar(32)",
|
||||
maxLength: 32,
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "ArrowRecoveryChance",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsThrowable",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ProjectileRange",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "ProjectileSpeed",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "QuiverCapacity",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "RequiresAmmunition",
|
||||
table: "dungeon_item_definitions",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "EquippedNecklace",
|
||||
table: "dungeon_characters",
|
||||
type: "bigint unsigned",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "EquippedQuiver",
|
||||
table: "dungeon_characters",
|
||||
type: "bigint unsigned",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "EquippedRing1",
|
||||
table: "dungeon_characters",
|
||||
type: "bigint unsigned",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "dungeon_quiver_ammo_slots",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<ulong>(type: "bigint unsigned", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
QuiverCharacterItemId = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
SlotIndex = table.Column<int>(type: "int", nullable: false),
|
||||
ItemDefinitionId = table.Column<int>(type: "int", nullable: false),
|
||||
Quantity = table.Column<int>(type: "int", nullable: false),
|
||||
MaxQuantity = table.Column<int>(type: "int", nullable: false),
|
||||
QuiverItemId = table.Column<ulong>(type: "bigint unsigned", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_dungeon_quiver_ammo_slots", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_dungeon_quiver_ammo_slots_dungeon_character_items_QuiverItem~",
|
||||
column: x => x.QuiverItemId,
|
||||
principalTable: "dungeon_character_items",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_dungeon_quiver_ammo_slots_dungeon_item_definitions_ItemDefin~",
|
||||
column: x => x.ItemDefinitionId,
|
||||
principalTable: "dungeon_item_definitions",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_dungeon_quiver_ammo_slots_ItemDefinitionId",
|
||||
table: "dungeon_quiver_ammo_slots",
|
||||
column: "ItemDefinitionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_dungeon_quiver_ammo_slots_QuiverItemId",
|
||||
table: "dungeon_quiver_ammo_slots",
|
||||
column: "QuiverItemId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "dungeon_quiver_ammo_slots");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AmmunitionType",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ArrowRecoveryChance",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsThrowable",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProjectileRange",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProjectileSpeed",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "QuiverCapacity",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RequiresAmmunition",
|
||||
table: "dungeon_item_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EquippedNecklace",
|
||||
table: "dungeon_characters");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EquippedQuiver",
|
||||
table: "dungeon_characters");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EquippedRing1",
|
||||
table: "dungeon_characters");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "EquippedRing2",
|
||||
table: "dungeon_characters",
|
||||
newName: "EquippedAccessory");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -416,9 +416,6 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Property<int>("Endurance")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<ulong?>("EquippedAccessory")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong?>("EquippedBoots")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
@@ -434,9 +431,21 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Property<ulong?>("EquippedLegs")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong?>("EquippedNecklace")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong?>("EquippedOffhand")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong?>("EquippedQuiver")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong?>("EquippedRing1")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong?>("EquippedRing2")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong?>("EquippedWeapon")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
@@ -814,9 +823,16 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("AmmunitionType")
|
||||
.HasMaxLength(32)
|
||||
.HasColumnType("varchar(32)");
|
||||
|
||||
b.Property<int>("Armor")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("ArrowRecoveryChance")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("AttackRange")
|
||||
.HasColumnType("float");
|
||||
|
||||
@@ -871,6 +887,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Property<bool>("IsTeleportScroll")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("IsThrowable")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ManaRestore")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -948,6 +967,15 @@ namespace SystemRevivalServer.Migrations
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("varchar(64)");
|
||||
|
||||
b.Property<int>("ProjectileRange")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("ProjectileSpeed")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("QuiverCapacity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Rarity")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -966,6 +994,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Property<int>("RequiredWisdom")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("RequiresAmmunition")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("ResistancesJson")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1024)
|
||||
@@ -1531,6 +1562,41 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_instances");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonQuiverAmmoSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<int>("ItemDefinitionId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("MaxQuantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<ulong>("QuiverCharacterItemId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<ulong?>("QuiverItemId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<int>("SlotIndex")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ItemDefinitionId");
|
||||
|
||||
b.HasIndex("QuiverItemId");
|
||||
|
||||
b.ToTable("dungeon_quiver_ammo_slots");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -2891,6 +2957,23 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Creator");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonQuiverAmmoSlot", b =>
|
||||
{
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacterItem", "QuiverItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("QuiverItemId");
|
||||
|
||||
b.Navigation("ItemDefinition");
|
||||
|
||||
b.Navigation("QuiverItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
|
||||
Reference in New Issue
Block a user