From c9902881b75eeb1c337451a90205ba2f79dea15f Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 12 Oct 2024 10:47:03 -0700 Subject: [PATCH] Generate repo; create will save resists to db --- common/database.cpp | 6 + ...char_create_point_allocations_repository.h | 192 ++++++++++++------ .../base/base_character_data_repository.h | 72 +++++++ 3 files changed, 210 insertions(+), 60 deletions(-) diff --git a/common/database.cpp b/common/database.cpp index c0193b927..7403dc685 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -514,6 +514,12 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe c.raid_auto_consent = pp->raidAutoconsent; c.guild_auto_consent = pp->guildAutoconsent; c.RestTimer = pp->RestTimer; + c.cold_resist = pp->cold_resist; + c.fire_resist = pp->fire_resist; + c.magic_resist = pp->magic_resist; + c.disease_resist = pp->disease_resist; + c.poison_resist = pp->poison_resist; + c.corruption_resist = pp->corruption_resist; CharacterDataRepository::ReplaceOne(*this, c); diff --git a/common/repositories/base/base_char_create_point_allocations_repository.h b/common/repositories/base/base_char_create_point_allocations_repository.h index f0e7fdeb0..e7f0abe5b 100644 --- a/common/repositories/base/base_char_create_point_allocations_repository.h +++ b/common/repositories/base/base_char_create_point_allocations_repository.h @@ -34,6 +34,12 @@ public: uint32_t alloc_int; uint32_t alloc_wis; uint32_t alloc_cha; + uint32_t base_cr; + uint32_t base_fr; + uint32_t base_mr; + uint32_t base_dr; + uint32_t base_pr; + uint32_t base_corrup; }; static std::string PrimaryKey() @@ -59,6 +65,12 @@ public: "alloc_int", "alloc_wis", "alloc_cha", + "base_cr", + "base_fr", + "base_mr", + "base_dr", + "base_pr", + "base_corrup", }; } @@ -80,6 +92,12 @@ public: "alloc_int", "alloc_wis", "alloc_cha", + "base_cr", + "base_fr", + "base_mr", + "base_dr", + "base_pr", + "base_corrup", }; } @@ -120,21 +138,27 @@ public: { CharCreatePointAllocations e{}; - e.id = 0; - e.base_str = 0; - e.base_sta = 0; - e.base_dex = 0; - e.base_agi = 0; - e.base_int = 0; - e.base_wis = 0; - e.base_cha = 0; - e.alloc_str = 0; - e.alloc_sta = 0; - e.alloc_dex = 0; - e.alloc_agi = 0; - e.alloc_int = 0; - e.alloc_wis = 0; - e.alloc_cha = 0; + e.id = 0; + e.base_str = 0; + e.base_sta = 0; + e.base_dex = 0; + e.base_agi = 0; + e.base_int = 0; + e.base_wis = 0; + e.base_cha = 0; + e.alloc_str = 0; + e.alloc_sta = 0; + e.alloc_dex = 0; + e.alloc_agi = 0; + e.alloc_int = 0; + e.alloc_wis = 0; + e.alloc_cha = 0; + e.base_cr = 25; + e.base_fr = 25; + e.base_mr = 25; + e.base_dr = 15; + e.base_pr = 15; + e.base_corrup = 15; return e; } @@ -171,21 +195,27 @@ public: if (results.RowCount() == 1) { CharCreatePointAllocations e{}; - e.id = row[0] ? static_cast(strtoul(row[0], nullptr, 10)) : 0; - e.base_str = row[1] ? static_cast(strtoul(row[1], nullptr, 10)) : 0; - e.base_sta = row[2] ? static_cast(strtoul(row[2], nullptr, 10)) : 0; - e.base_dex = row[3] ? static_cast(strtoul(row[3], nullptr, 10)) : 0; - e.base_agi = row[4] ? static_cast(strtoul(row[4], nullptr, 10)) : 0; - e.base_int = row[5] ? static_cast(strtoul(row[5], nullptr, 10)) : 0; - e.base_wis = row[6] ? static_cast(strtoul(row[6], nullptr, 10)) : 0; - e.base_cha = row[7] ? static_cast(strtoul(row[7], nullptr, 10)) : 0; - e.alloc_str = row[8] ? static_cast(strtoul(row[8], nullptr, 10)) : 0; - e.alloc_sta = row[9] ? static_cast(strtoul(row[9], nullptr, 10)) : 0; - e.alloc_dex = row[10] ? static_cast(strtoul(row[10], nullptr, 10)) : 0; - e.alloc_agi = row[11] ? static_cast(strtoul(row[11], nullptr, 10)) : 0; - e.alloc_int = row[12] ? static_cast(strtoul(row[12], nullptr, 10)) : 0; - e.alloc_wis = row[13] ? static_cast(strtoul(row[13], nullptr, 10)) : 0; - e.alloc_cha = row[14] ? static_cast(strtoul(row[14], nullptr, 10)) : 0; + e.id = row[0] ? static_cast(strtoul(row[0], nullptr, 10)) : 0; + e.base_str = row[1] ? static_cast(strtoul(row[1], nullptr, 10)) : 0; + e.base_sta = row[2] ? static_cast(strtoul(row[2], nullptr, 10)) : 0; + e.base_dex = row[3] ? static_cast(strtoul(row[3], nullptr, 10)) : 0; + e.base_agi = row[4] ? static_cast(strtoul(row[4], nullptr, 10)) : 0; + e.base_int = row[5] ? static_cast(strtoul(row[5], nullptr, 10)) : 0; + e.base_wis = row[6] ? static_cast(strtoul(row[6], nullptr, 10)) : 0; + e.base_cha = row[7] ? static_cast(strtoul(row[7], nullptr, 10)) : 0; + e.alloc_str = row[8] ? static_cast(strtoul(row[8], nullptr, 10)) : 0; + e.alloc_sta = row[9] ? static_cast(strtoul(row[9], nullptr, 10)) : 0; + e.alloc_dex = row[10] ? static_cast(strtoul(row[10], nullptr, 10)) : 0; + e.alloc_agi = row[11] ? static_cast(strtoul(row[11], nullptr, 10)) : 0; + e.alloc_int = row[12] ? static_cast(strtoul(row[12], nullptr, 10)) : 0; + e.alloc_wis = row[13] ? static_cast(strtoul(row[13], nullptr, 10)) : 0; + e.alloc_cha = row[14] ? static_cast(strtoul(row[14], nullptr, 10)) : 0; + e.base_cr = row[15] ? static_cast(strtoul(row[15], nullptr, 10)) : 25; + e.base_fr = row[16] ? static_cast(strtoul(row[16], nullptr, 10)) : 25; + e.base_mr = row[17] ? static_cast(strtoul(row[17], nullptr, 10)) : 25; + e.base_dr = row[18] ? static_cast(strtoul(row[18], nullptr, 10)) : 15; + e.base_pr = row[19] ? static_cast(strtoul(row[19], nullptr, 10)) : 15; + e.base_corrup = row[20] ? static_cast(strtoul(row[20], nullptr, 10)) : 15; return e; } @@ -234,6 +264,12 @@ public: v.push_back(columns[12] + " = " + std::to_string(e.alloc_int)); v.push_back(columns[13] + " = " + std::to_string(e.alloc_wis)); v.push_back(columns[14] + " = " + std::to_string(e.alloc_cha)); + v.push_back(columns[15] + " = " + std::to_string(e.base_cr)); + v.push_back(columns[16] + " = " + std::to_string(e.base_fr)); + v.push_back(columns[17] + " = " + std::to_string(e.base_mr)); + v.push_back(columns[18] + " = " + std::to_string(e.base_dr)); + v.push_back(columns[19] + " = " + std::to_string(e.base_pr)); + v.push_back(columns[20] + " = " + std::to_string(e.base_corrup)); auto results = db.QueryDatabase( fmt::format( @@ -270,6 +306,12 @@ public: v.push_back(std::to_string(e.alloc_int)); v.push_back(std::to_string(e.alloc_wis)); v.push_back(std::to_string(e.alloc_cha)); + v.push_back(std::to_string(e.base_cr)); + v.push_back(std::to_string(e.base_fr)); + v.push_back(std::to_string(e.base_mr)); + v.push_back(std::to_string(e.base_dr)); + v.push_back(std::to_string(e.base_pr)); + v.push_back(std::to_string(e.base_corrup)); auto results = db.QueryDatabase( fmt::format( @@ -314,6 +356,12 @@ public: v.push_back(std::to_string(e.alloc_int)); v.push_back(std::to_string(e.alloc_wis)); v.push_back(std::to_string(e.alloc_cha)); + v.push_back(std::to_string(e.base_cr)); + v.push_back(std::to_string(e.base_fr)); + v.push_back(std::to_string(e.base_mr)); + v.push_back(std::to_string(e.base_dr)); + v.push_back(std::to_string(e.base_pr)); + v.push_back(std::to_string(e.base_corrup)); insert_chunks.push_back("(" + Strings::Implode(",", v) + ")"); } @@ -347,21 +395,27 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { CharCreatePointAllocations e{}; - e.id = row[0] ? static_cast(strtoul(row[0], nullptr, 10)) : 0; - e.base_str = row[1] ? static_cast(strtoul(row[1], nullptr, 10)) : 0; - e.base_sta = row[2] ? static_cast(strtoul(row[2], nullptr, 10)) : 0; - e.base_dex = row[3] ? static_cast(strtoul(row[3], nullptr, 10)) : 0; - e.base_agi = row[4] ? static_cast(strtoul(row[4], nullptr, 10)) : 0; - e.base_int = row[5] ? static_cast(strtoul(row[5], nullptr, 10)) : 0; - e.base_wis = row[6] ? static_cast(strtoul(row[6], nullptr, 10)) : 0; - e.base_cha = row[7] ? static_cast(strtoul(row[7], nullptr, 10)) : 0; - e.alloc_str = row[8] ? static_cast(strtoul(row[8], nullptr, 10)) : 0; - e.alloc_sta = row[9] ? static_cast(strtoul(row[9], nullptr, 10)) : 0; - e.alloc_dex = row[10] ? static_cast(strtoul(row[10], nullptr, 10)) : 0; - e.alloc_agi = row[11] ? static_cast(strtoul(row[11], nullptr, 10)) : 0; - e.alloc_int = row[12] ? static_cast(strtoul(row[12], nullptr, 10)) : 0; - e.alloc_wis = row[13] ? static_cast(strtoul(row[13], nullptr, 10)) : 0; - e.alloc_cha = row[14] ? static_cast(strtoul(row[14], nullptr, 10)) : 0; + e.id = row[0] ? static_cast(strtoul(row[0], nullptr, 10)) : 0; + e.base_str = row[1] ? static_cast(strtoul(row[1], nullptr, 10)) : 0; + e.base_sta = row[2] ? static_cast(strtoul(row[2], nullptr, 10)) : 0; + e.base_dex = row[3] ? static_cast(strtoul(row[3], nullptr, 10)) : 0; + e.base_agi = row[4] ? static_cast(strtoul(row[4], nullptr, 10)) : 0; + e.base_int = row[5] ? static_cast(strtoul(row[5], nullptr, 10)) : 0; + e.base_wis = row[6] ? static_cast(strtoul(row[6], nullptr, 10)) : 0; + e.base_cha = row[7] ? static_cast(strtoul(row[7], nullptr, 10)) : 0; + e.alloc_str = row[8] ? static_cast(strtoul(row[8], nullptr, 10)) : 0; + e.alloc_sta = row[9] ? static_cast(strtoul(row[9], nullptr, 10)) : 0; + e.alloc_dex = row[10] ? static_cast(strtoul(row[10], nullptr, 10)) : 0; + e.alloc_agi = row[11] ? static_cast(strtoul(row[11], nullptr, 10)) : 0; + e.alloc_int = row[12] ? static_cast(strtoul(row[12], nullptr, 10)) : 0; + e.alloc_wis = row[13] ? static_cast(strtoul(row[13], nullptr, 10)) : 0; + e.alloc_cha = row[14] ? static_cast(strtoul(row[14], nullptr, 10)) : 0; + e.base_cr = row[15] ? static_cast(strtoul(row[15], nullptr, 10)) : 25; + e.base_fr = row[16] ? static_cast(strtoul(row[16], nullptr, 10)) : 25; + e.base_mr = row[17] ? static_cast(strtoul(row[17], nullptr, 10)) : 25; + e.base_dr = row[18] ? static_cast(strtoul(row[18], nullptr, 10)) : 15; + e.base_pr = row[19] ? static_cast(strtoul(row[19], nullptr, 10)) : 15; + e.base_corrup = row[20] ? static_cast(strtoul(row[20], nullptr, 10)) : 15; all_entries.push_back(e); } @@ -386,21 +440,27 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { CharCreatePointAllocations e{}; - e.id = row[0] ? static_cast(strtoul(row[0], nullptr, 10)) : 0; - e.base_str = row[1] ? static_cast(strtoul(row[1], nullptr, 10)) : 0; - e.base_sta = row[2] ? static_cast(strtoul(row[2], nullptr, 10)) : 0; - e.base_dex = row[3] ? static_cast(strtoul(row[3], nullptr, 10)) : 0; - e.base_agi = row[4] ? static_cast(strtoul(row[4], nullptr, 10)) : 0; - e.base_int = row[5] ? static_cast(strtoul(row[5], nullptr, 10)) : 0; - e.base_wis = row[6] ? static_cast(strtoul(row[6], nullptr, 10)) : 0; - e.base_cha = row[7] ? static_cast(strtoul(row[7], nullptr, 10)) : 0; - e.alloc_str = row[8] ? static_cast(strtoul(row[8], nullptr, 10)) : 0; - e.alloc_sta = row[9] ? static_cast(strtoul(row[9], nullptr, 10)) : 0; - e.alloc_dex = row[10] ? static_cast(strtoul(row[10], nullptr, 10)) : 0; - e.alloc_agi = row[11] ? static_cast(strtoul(row[11], nullptr, 10)) : 0; - e.alloc_int = row[12] ? static_cast(strtoul(row[12], nullptr, 10)) : 0; - e.alloc_wis = row[13] ? static_cast(strtoul(row[13], nullptr, 10)) : 0; - e.alloc_cha = row[14] ? static_cast(strtoul(row[14], nullptr, 10)) : 0; + e.id = row[0] ? static_cast(strtoul(row[0], nullptr, 10)) : 0; + e.base_str = row[1] ? static_cast(strtoul(row[1], nullptr, 10)) : 0; + e.base_sta = row[2] ? static_cast(strtoul(row[2], nullptr, 10)) : 0; + e.base_dex = row[3] ? static_cast(strtoul(row[3], nullptr, 10)) : 0; + e.base_agi = row[4] ? static_cast(strtoul(row[4], nullptr, 10)) : 0; + e.base_int = row[5] ? static_cast(strtoul(row[5], nullptr, 10)) : 0; + e.base_wis = row[6] ? static_cast(strtoul(row[6], nullptr, 10)) : 0; + e.base_cha = row[7] ? static_cast(strtoul(row[7], nullptr, 10)) : 0; + e.alloc_str = row[8] ? static_cast(strtoul(row[8], nullptr, 10)) : 0; + e.alloc_sta = row[9] ? static_cast(strtoul(row[9], nullptr, 10)) : 0; + e.alloc_dex = row[10] ? static_cast(strtoul(row[10], nullptr, 10)) : 0; + e.alloc_agi = row[11] ? static_cast(strtoul(row[11], nullptr, 10)) : 0; + e.alloc_int = row[12] ? static_cast(strtoul(row[12], nullptr, 10)) : 0; + e.alloc_wis = row[13] ? static_cast(strtoul(row[13], nullptr, 10)) : 0; + e.alloc_cha = row[14] ? static_cast(strtoul(row[14], nullptr, 10)) : 0; + e.base_cr = row[15] ? static_cast(strtoul(row[15], nullptr, 10)) : 25; + e.base_fr = row[16] ? static_cast(strtoul(row[16], nullptr, 10)) : 25; + e.base_mr = row[17] ? static_cast(strtoul(row[17], nullptr, 10)) : 25; + e.base_dr = row[18] ? static_cast(strtoul(row[18], nullptr, 10)) : 15; + e.base_pr = row[19] ? static_cast(strtoul(row[19], nullptr, 10)) : 15; + e.base_corrup = row[20] ? static_cast(strtoul(row[20], nullptr, 10)) : 15; all_entries.push_back(e); } @@ -490,6 +550,12 @@ public: v.push_back(std::to_string(e.alloc_int)); v.push_back(std::to_string(e.alloc_wis)); v.push_back(std::to_string(e.alloc_cha)); + v.push_back(std::to_string(e.base_cr)); + v.push_back(std::to_string(e.base_fr)); + v.push_back(std::to_string(e.base_mr)); + v.push_back(std::to_string(e.base_dr)); + v.push_back(std::to_string(e.base_pr)); + v.push_back(std::to_string(e.base_corrup)); auto results = db.QueryDatabase( fmt::format( @@ -527,6 +593,12 @@ public: v.push_back(std::to_string(e.alloc_int)); v.push_back(std::to_string(e.alloc_wis)); v.push_back(std::to_string(e.alloc_cha)); + v.push_back(std::to_string(e.base_cr)); + v.push_back(std::to_string(e.base_fr)); + v.push_back(std::to_string(e.base_mr)); + v.push_back(std::to_string(e.base_dr)); + v.push_back(std::to_string(e.base_pr)); + v.push_back(std::to_string(e.base_corrup)); insert_chunks.push_back("(" + Strings::Implode(",", v) + ")"); } diff --git a/common/repositories/base/base_character_data_repository.h b/common/repositories/base/base_character_data_repository.h index 4e66dbd72..ba3a8acec 100644 --- a/common/repositories/base/base_character_data_repository.h +++ b/common/repositories/base/base_character_data_repository.h @@ -123,6 +123,12 @@ public: uint32_t aa_points_old; uint32_t e_last_invsnapshot; time_t deleted_at; + uint32_t cold_resist; + uint32_t fire_resist; + uint32_t magic_resist; + uint32_t disease_resist; + uint32_t poison_resist; + uint32_t corruption_resist; }; static std::string PrimaryKey() @@ -237,6 +243,12 @@ public: "aa_points_old", "e_last_invsnapshot", "deleted_at", + "cold_resist", + "fire_resist", + "magic_resist", + "disease_resist", + "poison_resist", + "corruption_resist", }; } @@ -347,6 +359,12 @@ public: "aa_points_old", "e_last_invsnapshot", "UNIX_TIMESTAMP(deleted_at)", + "cold_resist", + "fire_resist", + "magic_resist", + "disease_resist", + "poison_resist", + "corruption_resist", }; } @@ -491,6 +509,12 @@ public: e.aa_points_old = 0; e.e_last_invsnapshot = 0; e.deleted_at = 0; + e.cold_resist = 25; + e.fire_resist = 25; + e.magic_resist = 25; + e.disease_resist = 15; + e.poison_resist = 15; + e.corruption_resist = 15; return e; } @@ -631,6 +655,12 @@ public: e.aa_points_old = row[101] ? static_cast(strtoul(row[101], nullptr, 10)) : 0; e.e_last_invsnapshot = row[102] ? static_cast(strtoul(row[102], nullptr, 10)) : 0; e.deleted_at = strtoll(row[103] ? row[103] : "-1", nullptr, 10); + e.cold_resist = row[104] ? static_cast(strtoul(row[104], nullptr, 10)) : 25; + e.fire_resist = row[105] ? static_cast(strtoul(row[105], nullptr, 10)) : 25; + e.magic_resist = row[106] ? static_cast(strtoul(row[106], nullptr, 10)) : 25; + e.disease_resist = row[107] ? static_cast(strtoul(row[107], nullptr, 10)) : 15; + e.poison_resist = row[108] ? static_cast(strtoul(row[108], nullptr, 10)) : 15; + e.corruption_resist = row[109] ? static_cast(strtoul(row[109], nullptr, 10)) : 15; return e; } @@ -767,6 +797,12 @@ public: v.push_back(columns[101] + " = " + std::to_string(e.aa_points_old)); v.push_back(columns[102] + " = " + std::to_string(e.e_last_invsnapshot)); v.push_back(columns[103] + " = FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")"); + v.push_back(columns[104] + " = " + std::to_string(e.cold_resist)); + v.push_back(columns[105] + " = " + std::to_string(e.fire_resist)); + v.push_back(columns[106] + " = " + std::to_string(e.magic_resist)); + v.push_back(columns[107] + " = " + std::to_string(e.disease_resist)); + v.push_back(columns[108] + " = " + std::to_string(e.poison_resist)); + v.push_back(columns[109] + " = " + std::to_string(e.corruption_resist)); auto results = db.QueryDatabase( fmt::format( @@ -892,6 +928,12 @@ public: v.push_back(std::to_string(e.aa_points_old)); v.push_back(std::to_string(e.e_last_invsnapshot)); v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")"); + v.push_back(std::to_string(e.cold_resist)); + v.push_back(std::to_string(e.fire_resist)); + v.push_back(std::to_string(e.magic_resist)); + v.push_back(std::to_string(e.disease_resist)); + v.push_back(std::to_string(e.poison_resist)); + v.push_back(std::to_string(e.corruption_resist)); auto results = db.QueryDatabase( fmt::format( @@ -1025,6 +1067,12 @@ public: v.push_back(std::to_string(e.aa_points_old)); v.push_back(std::to_string(e.e_last_invsnapshot)); v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")"); + v.push_back(std::to_string(e.cold_resist)); + v.push_back(std::to_string(e.fire_resist)); + v.push_back(std::to_string(e.magic_resist)); + v.push_back(std::to_string(e.disease_resist)); + v.push_back(std::to_string(e.poison_resist)); + v.push_back(std::to_string(e.corruption_resist)); insert_chunks.push_back("(" + Strings::Implode(",", v) + ")"); } @@ -1162,6 +1210,12 @@ public: e.aa_points_old = row[101] ? static_cast(strtoul(row[101], nullptr, 10)) : 0; e.e_last_invsnapshot = row[102] ? static_cast(strtoul(row[102], nullptr, 10)) : 0; e.deleted_at = strtoll(row[103] ? row[103] : "-1", nullptr, 10); + e.cold_resist = row[104] ? static_cast(strtoul(row[104], nullptr, 10)) : 25; + e.fire_resist = row[105] ? static_cast(strtoul(row[105], nullptr, 10)) : 25; + e.magic_resist = row[106] ? static_cast(strtoul(row[106], nullptr, 10)) : 25; + e.disease_resist = row[107] ? static_cast(strtoul(row[107], nullptr, 10)) : 15; + e.poison_resist = row[108] ? static_cast(strtoul(row[108], nullptr, 10)) : 15; + e.corruption_resist = row[109] ? static_cast(strtoul(row[109], nullptr, 10)) : 15; all_entries.push_back(e); } @@ -1290,6 +1344,12 @@ public: e.aa_points_old = row[101] ? static_cast(strtoul(row[101], nullptr, 10)) : 0; e.e_last_invsnapshot = row[102] ? static_cast(strtoul(row[102], nullptr, 10)) : 0; e.deleted_at = strtoll(row[103] ? row[103] : "-1", nullptr, 10); + e.cold_resist = row[104] ? static_cast(strtoul(row[104], nullptr, 10)) : 25; + e.fire_resist = row[105] ? static_cast(strtoul(row[105], nullptr, 10)) : 25; + e.magic_resist = row[106] ? static_cast(strtoul(row[106], nullptr, 10)) : 25; + e.disease_resist = row[107] ? static_cast(strtoul(row[107], nullptr, 10)) : 15; + e.poison_resist = row[108] ? static_cast(strtoul(row[108], nullptr, 10)) : 15; + e.corruption_resist = row[109] ? static_cast(strtoul(row[109], nullptr, 10)) : 15; all_entries.push_back(e); } @@ -1468,6 +1528,12 @@ public: v.push_back(std::to_string(e.aa_points_old)); v.push_back(std::to_string(e.e_last_invsnapshot)); v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")"); + v.push_back(std::to_string(e.cold_resist)); + v.push_back(std::to_string(e.fire_resist)); + v.push_back(std::to_string(e.magic_resist)); + v.push_back(std::to_string(e.disease_resist)); + v.push_back(std::to_string(e.poison_resist)); + v.push_back(std::to_string(e.corruption_resist)); auto results = db.QueryDatabase( fmt::format( @@ -1594,6 +1660,12 @@ public: v.push_back(std::to_string(e.aa_points_old)); v.push_back(std::to_string(e.e_last_invsnapshot)); v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")"); + v.push_back(std::to_string(e.cold_resist)); + v.push_back(std::to_string(e.fire_resist)); + v.push_back(std::to_string(e.magic_resist)); + v.push_back(std::to_string(e.disease_resist)); + v.push_back(std::to_string(e.poison_resist)); + v.push_back(std::to_string(e.corruption_resist)); insert_chunks.push_back("(" + Strings::Implode(",", v) + ")"); }