mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Updated the database scripts and re-synced the database bindings
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://docs.eqemu.io/developer/repositories
|
||||
* @docs https://docs.eqemu.dev/developer/repositories
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
float graveyard_x;
|
||||
float graveyard_y;
|
||||
float graveyard_z;
|
||||
std::string graveyard_radius;
|
||||
float graveyard_radius;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@@ -292,6 +292,7 @@ public:
|
||||
e.graveyard_x = row[29] ? strtof(row[29], nullptr) : 0;
|
||||
e.graveyard_y = row[30] ? strtof(row[30], nullptr) : 0;
|
||||
e.graveyard_z = row[31] ? strtof(row[31], nullptr) : 0;
|
||||
e.graveyard_radius = row[32] ? (strtof(row[32], nullptr) > 0.0f ? strtof(row[32], nullptr) : 0) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -539,6 +540,7 @@ public:
|
||||
e.graveyard_x = row[29] ? strtof(row[29], nullptr) : 0;
|
||||
e.graveyard_y = row[30] ? strtof(row[30], nullptr) : 0;
|
||||
e.graveyard_z = row[31] ? strtof(row[31], nullptr) : 0;
|
||||
e.graveyard_radius = row[32] ? (strtof(row[32], nullptr) > 0.0f ? strtof(row[32], nullptr) : 0) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -595,6 +597,7 @@ public:
|
||||
e.graveyard_x = row[29] ? strtof(row[29], nullptr) : 0;
|
||||
e.graveyard_y = row[30] ? strtof(row[30], nullptr) : 0;
|
||||
e.graveyard_z = row[31] ? strtof(row[31], nullptr) : 0;
|
||||
e.graveyard_radius = row[32] ? (strtof(row[32], nullptr) > 0.0f ? strtof(row[32], nullptr) : 0) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
BlockedSpells e{};
|
||||
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.spellid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spellid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.zoneid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
@@ -372,7 +372,7 @@ public:
|
||||
BlockedSpells e{};
|
||||
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.spellid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spellid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.zoneid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
@@ -412,7 +412,7 @@ public:
|
||||
BlockedSpells e{};
|
||||
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.spellid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spellid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.zoneid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
|
||||
@@ -144,10 +144,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
BotBlockedBuffs e{};
|
||||
|
||||
e.bot_id = row[0] ? static_cast<uint32_t>(atoi(row[0])) : 0;
|
||||
e.spell_id = row[1] ? static_cast<uint32_t>(atoi(row[1])) : 0;
|
||||
e.blocked = row[2] ? static_cast<uint8_t>(atoi(row[2])) : 0;
|
||||
e.blocked_pet = row[3] ? static_cast<uint8_t>(atoi(row[3])) : 0;
|
||||
e.bot_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.blocked = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.blocked_pet = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -276,10 +276,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
BotBlockedBuffs e{};
|
||||
|
||||
e.bot_id = row[0] ? static_cast<uint32_t>(atoi(row[0])) : 0;
|
||||
e.spell_id = row[1] ? static_cast<uint32_t>(atoi(row[1])) : 0;
|
||||
e.blocked = row[2] ? static_cast<uint8_t>(atoi(row[2])) : 0;
|
||||
e.blocked_pet = row[3] ? static_cast<uint8_t>(atoi(row[3])) : 0;
|
||||
e.bot_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.blocked = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.blocked_pet = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -304,10 +304,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
BotBlockedBuffs e{};
|
||||
|
||||
e.bot_id = row[0] ? static_cast<uint32_t>(atoi(row[0])) : 0;
|
||||
e.spell_id = row[1] ? static_cast<uint32_t>(atoi(row[1])) : 0;
|
||||
e.blocked = row[2] ? static_cast<uint8_t>(atoi(row[2])) : 0;
|
||||
e.blocked_pet = row[3] ? static_cast<uint8_t>(atoi(row[3])) : 0;
|
||||
e.bot_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.blocked = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.blocked_pet = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
|
||||
e.buffs_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.duration_formula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.tics_remaining = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
|
||||
e.buffs_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.duration_formula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.tics_remaining = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
@@ -449,7 +449,7 @@ public:
|
||||
|
||||
e.buffs_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.duration_formula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.tics_remaining = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "common/strings.h"
|
||||
|
||||
#include <ctime>
|
||||
|
||||
class BaseBotCreateCombinationsRepository {
|
||||
public:
|
||||
struct BotCreateCombinations {
|
||||
|
||||
@@ -198,6 +198,16 @@ public:
|
||||
e.fast_heals = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.adaptive_targeting = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.casting_override = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.safe_hp_base = row[6] ? (strtof(row[6], nullptr) > 0.0f ? strtof(row[6], nullptr) : 0) : 0;
|
||||
e.safe_hp_cloth = row[7] ? (strtof(row[7], nullptr) > 0.0f ? strtof(row[7], nullptr) : 0) : 0;
|
||||
e.safe_hp_leather = row[8] ? (strtof(row[8], nullptr) > 0.0f ? strtof(row[8], nullptr) : 0) : 0;
|
||||
e.safe_hp_chain = row[9] ? (strtof(row[9], nullptr) > 0.0f ? strtof(row[9], nullptr) : 0) : 0;
|
||||
e.safe_hp_plate = row[10] ? (strtof(row[10], nullptr) > 0.0f ? strtof(row[10], nullptr) : 0) : 0;
|
||||
e.critical_hp_base = row[11] ? (strtof(row[11], nullptr) > 0.0f ? strtof(row[11], nullptr) : 0) : 0;
|
||||
e.critical_hp_cloth = row[12] ? (strtof(row[12], nullptr) > 0.0f ? strtof(row[12], nullptr) : 0) : 0;
|
||||
e.critical_hp_leather = row[13] ? (strtof(row[13], nullptr) > 0.0f ? strtof(row[13], nullptr) : 0) : 0;
|
||||
e.critical_hp_chain = row[14] ? (strtof(row[14], nullptr) > 0.0f ? strtof(row[14], nullptr) : 0) : 0;
|
||||
e.critical_hp_plate = row[15] ? (strtof(row[15], nullptr) > 0.0f ? strtof(row[15], nullptr) : 0) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -367,6 +377,16 @@ public:
|
||||
e.fast_heals = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.adaptive_targeting = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.casting_override = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.safe_hp_base = row[6] ? (strtof(row[6], nullptr) > 0.0f ? strtof(row[6], nullptr) : 0) : 0;
|
||||
e.safe_hp_cloth = row[7] ? (strtof(row[7], nullptr) > 0.0f ? strtof(row[7], nullptr) : 0) : 0;
|
||||
e.safe_hp_leather = row[8] ? (strtof(row[8], nullptr) > 0.0f ? strtof(row[8], nullptr) : 0) : 0;
|
||||
e.safe_hp_chain = row[9] ? (strtof(row[9], nullptr) > 0.0f ? strtof(row[9], nullptr) : 0) : 0;
|
||||
e.safe_hp_plate = row[10] ? (strtof(row[10], nullptr) > 0.0f ? strtof(row[10], nullptr) : 0) : 0;
|
||||
e.critical_hp_base = row[11] ? (strtof(row[11], nullptr) > 0.0f ? strtof(row[11], nullptr) : 0) : 0;
|
||||
e.critical_hp_cloth = row[12] ? (strtof(row[12], nullptr) > 0.0f ? strtof(row[12], nullptr) : 0) : 0;
|
||||
e.critical_hp_leather = row[13] ? (strtof(row[13], nullptr) > 0.0f ? strtof(row[13], nullptr) : 0) : 0;
|
||||
e.critical_hp_chain = row[14] ? (strtof(row[14], nullptr) > 0.0f ? strtof(row[14], nullptr) : 0) : 0;
|
||||
e.critical_hp_plate = row[15] ? (strtof(row[15], nullptr) > 0.0f ? strtof(row[15], nullptr) : 0) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -397,6 +417,16 @@ public:
|
||||
e.fast_heals = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.adaptive_targeting = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.casting_override = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.safe_hp_base = row[6] ? (strtof(row[6], nullptr) > 0.0f ? strtof(row[6], nullptr) : 0) : 0;
|
||||
e.safe_hp_cloth = row[7] ? (strtof(row[7], nullptr) > 0.0f ? strtof(row[7], nullptr) : 0) : 0;
|
||||
e.safe_hp_leather = row[8] ? (strtof(row[8], nullptr) > 0.0f ? strtof(row[8], nullptr) : 0) : 0;
|
||||
e.safe_hp_chain = row[9] ? (strtof(row[9], nullptr) > 0.0f ? strtof(row[9], nullptr) : 0) : 0;
|
||||
e.safe_hp_plate = row[10] ? (strtof(row[10], nullptr) > 0.0f ? strtof(row[10], nullptr) : 0) : 0;
|
||||
e.critical_hp_base = row[11] ? (strtof(row[11], nullptr) > 0.0f ? strtof(row[11], nullptr) : 0) : 0;
|
||||
e.critical_hp_cloth = row[12] ? (strtof(row[12], nullptr) > 0.0f ? strtof(row[12], nullptr) : 0) : 0;
|
||||
e.critical_hp_leather = row[13] ? (strtof(row[13], nullptr) > 0.0f ? strtof(row[13], nullptr) : 0) : 0;
|
||||
e.critical_hp_chain = row[14] ? (strtof(row[14], nullptr) > 0.0f ? strtof(row[14], nullptr) : 0) : 0;
|
||||
e.critical_hp_plate = row[15] ? (strtof(row[15], nullptr) > 0.0f ? strtof(row[15], nullptr) : 0) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "common/strings.h"
|
||||
|
||||
#include <ctime>
|
||||
|
||||
class BaseBotInspectMessagesRepository {
|
||||
public:
|
||||
struct BotInspectMessages {
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
e.pet_buffs_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.pets_index = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.duration = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
|
||||
e.pet_buffs_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.pets_index = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.duration = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
|
||||
e.pet_buffs_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.pets_index = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.duration = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
BotPets e{};
|
||||
|
||||
e.pets_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.bot_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.name = row[3] ? row[3] : "";
|
||||
e.mana = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
@@ -292,7 +292,7 @@ public:
|
||||
BotPets e{};
|
||||
|
||||
e.pets_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.bot_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.name = row[3] ? row[3] : "";
|
||||
e.mana = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
@@ -322,7 +322,7 @@ public:
|
||||
BotPets e{};
|
||||
|
||||
e.pets_index = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.bot_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.name = row[3] ? row[3] : "";
|
||||
e.mana = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
uint8_t stance;
|
||||
uint16_t setting_id;
|
||||
uint8_t setting_type;
|
||||
int32_t value;
|
||||
int64_t value;
|
||||
std::string category_name;
|
||||
std::string setting_name;
|
||||
};
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
{
|
||||
BotSettings e{};
|
||||
|
||||
e.character_id = 0;
|
||||
e.character_id = 0;
|
||||
e.bot_id = 0;
|
||||
e.stance = 0;
|
||||
e.setting_id = 0;
|
||||
@@ -160,12 +160,12 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
BotSettings e{};
|
||||
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.stance = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.setting_id = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.setting_type = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.value = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.value = row[5] ? strtoll(row[5], nullptr, 10) : 0;
|
||||
e.category_name = row[6] ? row[6] : "";
|
||||
e.setting_name = row[7] ? row[7] : "";
|
||||
|
||||
@@ -308,12 +308,12 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
BotSettings e{};
|
||||
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.stance = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.setting_id = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.setting_type = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.value = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.value = row[5] ? strtoll(row[5], nullptr, 10) : 0;
|
||||
e.category_name = row[6] ? row[6] : "";
|
||||
e.setting_name = row[7] ? row[7] : "";
|
||||
|
||||
@@ -340,12 +340,12 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
BotSettings e{};
|
||||
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.stance = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.setting_id = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.setting_type = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.value = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.value = row[5] ? strtoll(row[5], nullptr, 10) : 0;
|
||||
e.category_name = row[6] ? row[6] : "";
|
||||
e.setting_name = row[7] ? row[7] : "";
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.priority = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.min_hp = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.max_hp = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
@@ -301,7 +301,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.priority = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.min_hp = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.max_hp = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
@@ -332,7 +332,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.bot_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.priority = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.min_hp = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.max_hp = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
@@ -404,7 +404,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
e.recast_time = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.is_spell = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.is_disc = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.spell_id = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.spell_id = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.is_item = row[7] ? static_cast<uint8_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.item_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
|
||||
@@ -322,7 +322,7 @@ public:
|
||||
e.recast_time = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.is_spell = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.is_disc = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.spell_id = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.spell_id = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.is_item = row[7] ? static_cast<uint8_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.item_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
e.recast_time = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.is_spell = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.is_disc = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.spell_id = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.spell_id = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.is_item = row[7] ? static_cast<uint8_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.item_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.caster_name = row[4] ? row[4] : "";
|
||||
e.ticsremaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
@@ -382,7 +382,7 @@ public:
|
||||
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.caster_name = row[4] ? row[4] : "";
|
||||
e.ticsremaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
@@ -423,7 +423,7 @@ public:
|
||||
|
||||
e.character_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.caster_name = row[4] ? row[4] : "";
|
||||
e.ticsremaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
|
||||
@@ -132,8 +132,8 @@ public:
|
||||
uint8_t lfg;
|
||||
std::string mailkey;
|
||||
uint8_t xtargets;
|
||||
uint8_t ingame;
|
||||
uint32_t first_login;
|
||||
uint8_t ingame;
|
||||
uint32_t e_aa_effects;
|
||||
uint32_t e_percent_to_aa;
|
||||
uint32_t e_expended_aa_spent;
|
||||
@@ -248,8 +248,8 @@ public:
|
||||
"lfg",
|
||||
"mailkey",
|
||||
"xtargets",
|
||||
"ingame",
|
||||
"first_login",
|
||||
"ingame",
|
||||
"e_aa_effects",
|
||||
"e_percent_to_aa",
|
||||
"e_expended_aa_spent",
|
||||
@@ -360,8 +360,8 @@ public:
|
||||
"lfg",
|
||||
"mailkey",
|
||||
"xtargets",
|
||||
"ingame",
|
||||
"first_login",
|
||||
"ingame",
|
||||
"e_aa_effects",
|
||||
"e_percent_to_aa",
|
||||
"e_expended_aa_spent",
|
||||
@@ -506,8 +506,8 @@ public:
|
||||
e.lfg = 0;
|
||||
e.mailkey = "";
|
||||
e.xtargets = 5;
|
||||
e.ingame = 0;
|
||||
e.first_login = 0;
|
||||
e.ingame = 0;
|
||||
e.e_aa_effects = 0;
|
||||
e.e_percent_to_aa = 0;
|
||||
e.e_expended_aa_spent = 0;
|
||||
@@ -648,8 +648,8 @@ public:
|
||||
e.lfg = row[93] ? static_cast<uint8_t>(strtoul(row[93], nullptr, 10)) : 0;
|
||||
e.mailkey = row[94] ? row[94] : "";
|
||||
e.xtargets = row[95] ? static_cast<uint8_t>(strtoul(row[95], nullptr, 10)) : 5;
|
||||
e.ingame = row[96] ? static_cast<uint8_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.first_login = row[97] ? static_cast<uint32_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.first_login = row[96] ? static_cast<uint32_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.ingame = row[97] ? static_cast<uint8_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.e_aa_effects = row[98] ? static_cast<uint32_t>(strtoul(row[98], nullptr, 10)) : 0;
|
||||
e.e_percent_to_aa = row[99] ? static_cast<uint32_t>(strtoul(row[99], nullptr, 10)) : 0;
|
||||
e.e_expended_aa_spent = row[100] ? static_cast<uint32_t>(strtoul(row[100], nullptr, 10)) : 0;
|
||||
@@ -786,8 +786,8 @@ public:
|
||||
v.push_back(columns[93] + " = " + std::to_string(e.lfg));
|
||||
v.push_back(columns[94] + " = '" + Strings::Escape(e.mailkey) + "'");
|
||||
v.push_back(columns[95] + " = " + std::to_string(e.xtargets));
|
||||
v.push_back(columns[96] + " = " + std::to_string(e.ingame));
|
||||
v.push_back(columns[97] + " = " + std::to_string(e.first_login));
|
||||
v.push_back(columns[96] + " = " + std::to_string(e.first_login));
|
||||
v.push_back(columns[97] + " = " + std::to_string(e.ingame));
|
||||
v.push_back(columns[98] + " = " + std::to_string(e.e_aa_effects));
|
||||
v.push_back(columns[99] + " = " + std::to_string(e.e_percent_to_aa));
|
||||
v.push_back(columns[100] + " = " + std::to_string(e.e_expended_aa_spent));
|
||||
@@ -913,8 +913,8 @@ public:
|
||||
v.push_back(std::to_string(e.lfg));
|
||||
v.push_back("'" + Strings::Escape(e.mailkey) + "'");
|
||||
v.push_back(std::to_string(e.xtargets));
|
||||
v.push_back(std::to_string(e.ingame));
|
||||
v.push_back(std::to_string(e.first_login));
|
||||
v.push_back(std::to_string(e.ingame));
|
||||
v.push_back(std::to_string(e.e_aa_effects));
|
||||
v.push_back(std::to_string(e.e_percent_to_aa));
|
||||
v.push_back(std::to_string(e.e_expended_aa_spent));
|
||||
@@ -1048,8 +1048,8 @@ public:
|
||||
v.push_back(std::to_string(e.lfg));
|
||||
v.push_back("'" + Strings::Escape(e.mailkey) + "'");
|
||||
v.push_back(std::to_string(e.xtargets));
|
||||
v.push_back(std::to_string(e.ingame));
|
||||
v.push_back(std::to_string(e.first_login));
|
||||
v.push_back(std::to_string(e.ingame));
|
||||
v.push_back(std::to_string(e.e_aa_effects));
|
||||
v.push_back(std::to_string(e.e_percent_to_aa));
|
||||
v.push_back(std::to_string(e.e_expended_aa_spent));
|
||||
@@ -1187,8 +1187,8 @@ public:
|
||||
e.lfg = row[93] ? static_cast<uint8_t>(strtoul(row[93], nullptr, 10)) : 0;
|
||||
e.mailkey = row[94] ? row[94] : "";
|
||||
e.xtargets = row[95] ? static_cast<uint8_t>(strtoul(row[95], nullptr, 10)) : 5;
|
||||
e.ingame = row[96] ? static_cast<uint8_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.first_login = row[97] ? static_cast<uint32_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.first_login = row[96] ? static_cast<uint32_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.ingame = row[97] ? static_cast<uint8_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.e_aa_effects = row[98] ? static_cast<uint32_t>(strtoul(row[98], nullptr, 10)) : 0;
|
||||
e.e_percent_to_aa = row[99] ? static_cast<uint32_t>(strtoul(row[99], nullptr, 10)) : 0;
|
||||
e.e_expended_aa_spent = row[100] ? static_cast<uint32_t>(strtoul(row[100], nullptr, 10)) : 0;
|
||||
@@ -1317,8 +1317,8 @@ public:
|
||||
e.lfg = row[93] ? static_cast<uint8_t>(strtoul(row[93], nullptr, 10)) : 0;
|
||||
e.mailkey = row[94] ? row[94] : "";
|
||||
e.xtargets = row[95] ? static_cast<uint8_t>(strtoul(row[95], nullptr, 10)) : 5;
|
||||
e.ingame = row[96] ? static_cast<uint8_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.first_login = row[97] ? static_cast<uint32_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.first_login = row[96] ? static_cast<uint32_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.ingame = row[97] ? static_cast<uint8_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.e_aa_effects = row[98] ? static_cast<uint32_t>(strtoul(row[98], nullptr, 10)) : 0;
|
||||
e.e_percent_to_aa = row[99] ? static_cast<uint32_t>(strtoul(row[99], nullptr, 10)) : 0;
|
||||
e.e_expended_aa_spent = row[100] ? static_cast<uint32_t>(strtoul(row[100], nullptr, 10)) : 0;
|
||||
@@ -1497,8 +1497,8 @@ public:
|
||||
v.push_back(std::to_string(e.lfg));
|
||||
v.push_back("'" + Strings::Escape(e.mailkey) + "'");
|
||||
v.push_back(std::to_string(e.xtargets));
|
||||
v.push_back(std::to_string(e.ingame));
|
||||
v.push_back(std::to_string(e.first_login));
|
||||
v.push_back(std::to_string(e.ingame));
|
||||
v.push_back(std::to_string(e.e_aa_effects));
|
||||
v.push_back(std::to_string(e.e_percent_to_aa));
|
||||
v.push_back(std::to_string(e.e_expended_aa_spent));
|
||||
@@ -1625,8 +1625,8 @@ public:
|
||||
v.push_back(std::to_string(e.lfg));
|
||||
v.push_back("'" + Strings::Escape(e.mailkey) + "'");
|
||||
v.push_back(std::to_string(e.xtargets));
|
||||
v.push_back(std::to_string(e.ingame));
|
||||
v.push_back(std::to_string(e.first_login));
|
||||
v.push_back(std::to_string(e.ingame));
|
||||
v.push_back(std::to_string(e.e_aa_effects));
|
||||
v.push_back(std::to_string(e.e_percent_to_aa));
|
||||
v.push_back(std::to_string(e.e_expended_aa_spent));
|
||||
|
||||
@@ -110,8 +110,8 @@ public:
|
||||
e.character_id = 0;
|
||||
e.zone_id = 0;
|
||||
e.instance_version = -1;
|
||||
e.aa_modifier = 0;
|
||||
e.exp_modifier = 0;
|
||||
e.aa_modifier = 1;
|
||||
e.exp_modifier = 1;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -151,8 +151,8 @@ public:
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.instance_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 1;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -287,8 +287,8 @@ public:
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.instance_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 1;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -316,8 +316,8 @@ public:
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.instance_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 1;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -297,7 +297,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -269,7 +269,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
class BaseDamageshieldtypesRepository {
|
||||
public:
|
||||
struct Damageshieldtypes {
|
||||
int32_t spellid;
|
||||
uint8_t type;
|
||||
int32_t spellid;
|
||||
uint8_t type;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Damageshieldtypes e{};
|
||||
|
||||
e.spellid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spellid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
|
||||
return e;
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Damageshieldtypes e{};
|
||||
|
||||
e.spellid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spellid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Damageshieldtypes e{};
|
||||
|
||||
e.spellid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spellid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#include "common/database.h"
|
||||
#include "common/strings.h"
|
||||
|
||||
#include "cereal/cereal.hpp"
|
||||
#include <ctime>
|
||||
#include <cereal/cereal.hpp>
|
||||
|
||||
class BaseDataBucketsRepository {
|
||||
public:
|
||||
struct DataBuckets {
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
float buffer;
|
||||
uint32_t client_version_mask;
|
||||
int16_t is_ldon_door;
|
||||
int16_t close_timer_ms;
|
||||
uint16_t close_timer_ms;
|
||||
int32_t dz_switch_id;
|
||||
int8_t min_expansion;
|
||||
int8_t max_expansion;
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
e.buffer = row[28] ? strtof(row[28], nullptr) : 0;
|
||||
e.client_version_mask = row[29] ? static_cast<uint32_t>(strtoul(row[29], nullptr, 10)) : 4294967295;
|
||||
e.is_ldon_door = row[30] ? static_cast<int16_t>(atoi(row[30])) : 0;
|
||||
e.close_timer_ms = row[31] ? static_cast<int16_t>(atoi(row[31])) : 5000;
|
||||
e.close_timer_ms = row[31] ? static_cast<uint16_t>(strtoul(row[31], nullptr, 10)) : 5000;
|
||||
e.dz_switch_id = row[32] ? static_cast<int32_t>(atoi(row[32])) : 0;
|
||||
e.min_expansion = row[33] ? static_cast<int8_t>(atoi(row[33])) : -1;
|
||||
e.max_expansion = row[34] ? static_cast<int8_t>(atoi(row[34])) : -1;
|
||||
@@ -570,7 +570,7 @@ public:
|
||||
e.buffer = row[28] ? strtof(row[28], nullptr) : 0;
|
||||
e.client_version_mask = row[29] ? static_cast<uint32_t>(strtoul(row[29], nullptr, 10)) : 4294967295;
|
||||
e.is_ldon_door = row[30] ? static_cast<int16_t>(atoi(row[30])) : 0;
|
||||
e.close_timer_ms = row[31] ? static_cast<int16_t>(atoi(row[31])) : 5000;
|
||||
e.close_timer_ms = row[31] ? static_cast<uint16_t>(strtoul(row[31], nullptr, 10)) : 5000;
|
||||
e.dz_switch_id = row[32] ? static_cast<int32_t>(atoi(row[32])) : 0;
|
||||
e.min_expansion = row[33] ? static_cast<int8_t>(atoi(row[33])) : -1;
|
||||
e.max_expansion = row[34] ? static_cast<int8_t>(atoi(row[34])) : -1;
|
||||
@@ -631,7 +631,7 @@ public:
|
||||
e.buffer = row[28] ? strtof(row[28], nullptr) : 0;
|
||||
e.client_version_mask = row[29] ? static_cast<uint32_t>(strtoul(row[29], nullptr, 10)) : 4294967295;
|
||||
e.is_ldon_door = row[30] ? static_cast<int16_t>(atoi(row[30])) : 0;
|
||||
e.close_timer_ms = row[31] ? static_cast<int16_t>(atoi(row[31])) : 5000;
|
||||
e.close_timer_ms = row[31] ? static_cast<uint16_t>(strtoul(row[31], nullptr, 10)) : 5000;
|
||||
e.dz_switch_id = row[32] ? static_cast<int32_t>(atoi(row[32])) : 0;
|
||||
e.min_expansion = row[33] ? static_cast<int8_t>(atoi(row[33])) : -1;
|
||||
e.max_expansion = row[34] ? static_cast<int8_t>(atoi(row[34])) : -1;
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseGuildPermissionsRepository {
|
||||
public:
|
||||
struct GuildPermissions {
|
||||
@@ -145,10 +144,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
GuildPermissions e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.perm_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.guild_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.permission = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.perm_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.guild_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.permission = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -276,10 +275,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GuildPermissions e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.perm_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.guild_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.permission = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.perm_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.guild_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.permission = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -304,10 +303,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GuildPermissions e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.perm_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.guild_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.permission = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.perm_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.guild_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.permission = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseGuildTributesRepository {
|
||||
public:
|
||||
struct GuildTributes {
|
||||
@@ -157,13 +156,13 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
GuildTributes e{};
|
||||
|
||||
e.guild_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||
e.tribute_id_1 = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||
e.tribute_id_1_tier = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||
e.tribute_id_2 = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.tribute_id_2_tier = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||
e.time_remaining = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||
e.enabled = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.tribute_id_1 = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.tribute_id_1_tier = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute_id_2 = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.tribute_id_2_tier = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.time_remaining = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.enabled = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -301,13 +300,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GuildTributes e{};
|
||||
|
||||
e.guild_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||
e.tribute_id_1 = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||
e.tribute_id_1_tier = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||
e.tribute_id_2 = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.tribute_id_2_tier = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||
e.time_remaining = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||
e.enabled = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.tribute_id_1 = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.tribute_id_1_tier = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute_id_2 = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.tribute_id_2_tier = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.time_remaining = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.enabled = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -332,13 +331,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GuildTributes e{};
|
||||
|
||||
e.guild_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||
e.tribute_id_1 = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||
e.tribute_id_1_tier = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||
e.tribute_id_2 = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.tribute_id_2_tier = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||
e.time_remaining = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||
e.enabled = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.tribute_id_1 = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.tribute_id_1_tier = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute_id_2 = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.tribute_id_2_tier = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.time_remaining = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.enabled = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseGuildsRepository {
|
||||
public:
|
||||
struct Guilds {
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.type = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 1;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.skill = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.locked = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.type = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 1;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.skill = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.locked = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.type = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 1;
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.skill = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.locked = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
|
||||
e.MercBuffId = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.MercId = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.SpellId = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.SpellId = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.CasterLevel = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.DurationFormula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.TicsRemaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
@@ -397,7 +397,7 @@ public:
|
||||
|
||||
e.MercBuffId = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.MercId = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.SpellId = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.SpellId = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.CasterLevel = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.DurationFormula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.TicsRemaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
@@ -440,7 +440,7 @@ public:
|
||||
|
||||
e.MercBuffId = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.MercId = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.SpellId = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.SpellId = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.CasterLevel = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.DurationFormula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.TicsRemaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spellid = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spellid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
@@ -373,7 +373,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spellid = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spellid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
@@ -413,7 +413,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spellid = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.spellid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#include "common/database.h"
|
||||
#include "common/strings.h"
|
||||
|
||||
#include "cereal/cereal.hpp"
|
||||
#include <ctime>
|
||||
#include <cereal/cereal.hpp>
|
||||
|
||||
class BasePlayerEventLogSettingsRepository {
|
||||
public:
|
||||
struct PlayerEventLogSettings {
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#include "common/database.h"
|
||||
#include "common/strings.h"
|
||||
|
||||
#include "cereal/cereal.hpp"
|
||||
#include <ctime>
|
||||
#include <cereal/cereal.hpp>
|
||||
|
||||
class BasePlayerEventLogsRepository {
|
||||
public:
|
||||
struct PlayerEventLogs {
|
||||
|
||||
@@ -49,6 +49,7 @@ public:
|
||||
uint32_t augment_4_id;
|
||||
uint32_t augment_5_id;
|
||||
uint32_t augment_6_id;
|
||||
time_t created_at;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@@ -72,6 +73,7 @@ public:
|
||||
"augment_4_id",
|
||||
"augment_5_id",
|
||||
"augment_6_id",
|
||||
"created_at",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -91,6 +93,7 @@ public:
|
||||
"augment_4_id",
|
||||
"augment_5_id",
|
||||
"augment_6_id",
|
||||
"UNIX_TIMESTAMP(created_at)",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -144,6 +147,7 @@ public:
|
||||
e.augment_4_id = 0;
|
||||
e.augment_5_id = 0;
|
||||
e.augment_6_id = 0;
|
||||
e.created_at = 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -193,6 +197,7 @@ public:
|
||||
e.augment_4_id = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augment_5_id = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.augment_6_id = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.created_at = strtoll(row[13] ? row[13] : "-1", nullptr, 10);
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -238,6 +243,7 @@ public:
|
||||
v.push_back(columns[10] + " = " + std::to_string(e.augment_4_id));
|
||||
v.push_back(columns[11] + " = " + std::to_string(e.augment_5_id));
|
||||
v.push_back(columns[12] + " = " + std::to_string(e.augment_6_id));
|
||||
v.push_back(columns[13] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -272,6 +278,7 @@ public:
|
||||
v.push_back(std::to_string(e.augment_4_id));
|
||||
v.push_back(std::to_string(e.augment_5_id));
|
||||
v.push_back(std::to_string(e.augment_6_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -314,6 +321,7 @@ public:
|
||||
v.push_back(std::to_string(e.augment_4_id));
|
||||
v.push_back(std::to_string(e.augment_5_id));
|
||||
v.push_back(std::to_string(e.augment_6_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@@ -360,6 +368,7 @@ public:
|
||||
e.augment_4_id = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augment_5_id = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.augment_6_id = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.created_at = strtoll(row[13] ? row[13] : "-1", nullptr, 10);
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -397,6 +406,7 @@ public:
|
||||
e.augment_4_id = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augment_5_id = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.augment_6_id = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.created_at = strtoll(row[13] ? row[13] : "-1", nullptr, 10);
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -484,6 +494,7 @@ public:
|
||||
v.push_back(std::to_string(e.augment_4_id));
|
||||
v.push_back(std::to_string(e.augment_5_id));
|
||||
v.push_back(std::to_string(e.augment_6_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -519,6 +530,7 @@ public:
|
||||
v.push_back(std::to_string(e.augment_4_id));
|
||||
v.push_back(std::to_string(e.augment_5_id));
|
||||
v.push_back(std::to_string(e.augment_6_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
SpellBuckets e{};
|
||||
|
||||
e.spell_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.bucket_name = row[1] ? row[1] : "";
|
||||
e.bucket_value = row[2] ? row[2] : "";
|
||||
e.bucket_comparison = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
@@ -276,7 +276,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
SpellBuckets e{};
|
||||
|
||||
e.spell_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.bucket_name = row[1] ? row[1] : "";
|
||||
e.bucket_value = row[2] ? row[2] : "";
|
||||
e.bucket_comparison = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
@@ -304,7 +304,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
SpellBuckets e{};
|
||||
|
||||
e.spell_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.spell_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.bucket_name = row[1] ? row[1] : "";
|
||||
e.bucket_value = row[2] ? row[2] : "";
|
||||
e.bucket_comparison = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
int32_t fast_regen_mana;
|
||||
int32_t fast_regen_endurance;
|
||||
int32_t npc_max_aggro_dist;
|
||||
uint32_t client_update_range;
|
||||
int32_t client_update_range;
|
||||
int32_t underworld_teleport_index;
|
||||
int32_t lava_damage;
|
||||
int32_t min_lava_damage;
|
||||
@@ -616,7 +616,7 @@ public:
|
||||
e.fast_regen_mana = row[89] ? static_cast<int32_t>(atoi(row[89])) : 180;
|
||||
e.fast_regen_endurance = row[90] ? static_cast<int32_t>(atoi(row[90])) : 180;
|
||||
e.npc_max_aggro_dist = row[91] ? static_cast<int32_t>(atoi(row[91])) : 600;
|
||||
e.client_update_range = row[92] ? static_cast<uint32_t>(strtoul(row[92], nullptr, 10)) : 600;
|
||||
e.client_update_range = row[92] ? static_cast<int32_t>(atoi(row[92])) : 600;
|
||||
e.underworld_teleport_index = row[93] ? static_cast<int32_t>(atoi(row[93])) : 0;
|
||||
e.lava_damage = row[94] ? static_cast<int32_t>(atoi(row[94])) : 50;
|
||||
e.min_lava_damage = row[95] ? static_cast<int32_t>(atoi(row[95])) : 10;
|
||||
@@ -1127,7 +1127,7 @@ public:
|
||||
e.fast_regen_mana = row[89] ? static_cast<int32_t>(atoi(row[89])) : 180;
|
||||
e.fast_regen_endurance = row[90] ? static_cast<int32_t>(atoi(row[90])) : 180;
|
||||
e.npc_max_aggro_dist = row[91] ? static_cast<int32_t>(atoi(row[91])) : 600;
|
||||
e.client_update_range = row[92] ? static_cast<uint32_t>(strtoul(row[92], nullptr, 10)) : 600;
|
||||
e.client_update_range = row[92] ? static_cast<int32_t>(atoi(row[92])) : 600;
|
||||
e.underworld_teleport_index = row[93] ? static_cast<int32_t>(atoi(row[93])) : 0;
|
||||
e.lava_damage = row[94] ? static_cast<int32_t>(atoi(row[94])) : 50;
|
||||
e.min_lava_damage = row[95] ? static_cast<int32_t>(atoi(row[95])) : 10;
|
||||
@@ -1250,7 +1250,7 @@ public:
|
||||
e.fast_regen_mana = row[89] ? static_cast<int32_t>(atoi(row[89])) : 180;
|
||||
e.fast_regen_endurance = row[90] ? static_cast<int32_t>(atoi(row[90])) : 180;
|
||||
e.npc_max_aggro_dist = row[91] ? static_cast<int32_t>(atoi(row[91])) : 600;
|
||||
e.client_update_range = row[92] ? static_cast<uint32_t>(strtoul(row[92], nullptr, 10)) : 600;
|
||||
e.client_update_range = row[92] ? static_cast<int32_t>(atoi(row[92])) : 600;
|
||||
e.underworld_teleport_index = row[93] ? static_cast<int32_t>(atoi(row[93])) : 0;
|
||||
e.lava_damage = row[94] ? static_cast<int32_t>(atoi(row[94])) : 50;
|
||||
e.min_lava_damage = row[95] ? static_cast<int32_t>(atoi(row[95])) : 10;
|
||||
|
||||
Reference in New Issue
Block a user