mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
[Repositories] Add more precise types to repository generator (#2391)
* Make utils/scripts/generators/repository-generator.pl aware of more datatypes This adds support for unsigned and more integer types. It also avoids using parsing functions that require casting (still needed in some cases) Having the data types in the Repository structs better map to the types in the database will allow us to avoid casting when we pull data out of them. And as a benefit, assume something is wrong if we do :) Hopefully clean up some warnings due to casting too. Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
parent
fcf01f6d87
commit
6f7fa98996
@ -19,20 +19,20 @@
|
|||||||
class BaseAaAbilityRepository {
|
class BaseAaAbilityRepository {
|
||||||
public:
|
public:
|
||||||
struct AaAbility {
|
struct AaAbility {
|
||||||
int id;
|
uint32_t id;
|
||||||
std::string name;
|
std::string name;
|
||||||
int category;
|
int32_t category;
|
||||||
int classes;
|
int32_t classes;
|
||||||
int races;
|
int32_t races;
|
||||||
int drakkin_heritage;
|
int32_t drakkin_heritage;
|
||||||
int deities;
|
int32_t deities;
|
||||||
int status;
|
int32_t status;
|
||||||
int type;
|
int32_t type;
|
||||||
int charges;
|
int32_t charges;
|
||||||
int grant_only;
|
int8_t grant_only;
|
||||||
int first_rank_id;
|
int32_t first_rank_id;
|
||||||
int enabled;
|
uint8_t enabled;
|
||||||
int reset_on_death;
|
int8_t reset_on_death;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -166,20 +166,20 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AaAbility e{};
|
AaAbility e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.category = atoi(row[2]);
|
e.category = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.classes = atoi(row[3]);
|
e.classes = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.races = atoi(row[4]);
|
e.races = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.drakkin_heritage = atoi(row[5]);
|
e.drakkin_heritage = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.deities = atoi(row[6]);
|
e.deities = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.status = atoi(row[7]);
|
e.status = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.type = atoi(row[8]);
|
e.type = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.charges = atoi(row[9]);
|
e.charges = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.grant_only = atoi(row[10]);
|
e.grant_only = static_cast<int8_t>(atoi(row[10]));
|
||||||
e.first_rank_id = atoi(row[11]);
|
e.first_rank_id = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.enabled = atoi(row[12]);
|
e.enabled = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.reset_on_death = atoi(row[13]);
|
e.reset_on_death = static_cast<int8_t>(atoi(row[13]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -338,20 +338,20 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AaAbility e{};
|
AaAbility e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.category = atoi(row[2]);
|
e.category = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.classes = atoi(row[3]);
|
e.classes = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.races = atoi(row[4]);
|
e.races = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.drakkin_heritage = atoi(row[5]);
|
e.drakkin_heritage = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.deities = atoi(row[6]);
|
e.deities = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.status = atoi(row[7]);
|
e.status = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.type = atoi(row[8]);
|
e.type = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.charges = atoi(row[9]);
|
e.charges = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.grant_only = atoi(row[10]);
|
e.grant_only = static_cast<int8_t>(atoi(row[10]));
|
||||||
e.first_rank_id = atoi(row[11]);
|
e.first_rank_id = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.enabled = atoi(row[12]);
|
e.enabled = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.reset_on_death = atoi(row[13]);
|
e.reset_on_death = static_cast<int8_t>(atoi(row[13]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -376,20 +376,20 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AaAbility e{};
|
AaAbility e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.category = atoi(row[2]);
|
e.category = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.classes = atoi(row[3]);
|
e.classes = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.races = atoi(row[4]);
|
e.races = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.drakkin_heritage = atoi(row[5]);
|
e.drakkin_heritage = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.deities = atoi(row[6]);
|
e.deities = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.status = atoi(row[7]);
|
e.status = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.type = atoi(row[8]);
|
e.type = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.charges = atoi(row[9]);
|
e.charges = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.grant_only = atoi(row[10]);
|
e.grant_only = static_cast<int8_t>(atoi(row[10]));
|
||||||
e.first_rank_id = atoi(row[11]);
|
e.first_rank_id = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.enabled = atoi(row[12]);
|
e.enabled = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.reset_on_death = atoi(row[13]);
|
e.reset_on_death = static_cast<int8_t>(atoi(row[13]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
class BaseAaRankEffectsRepository {
|
class BaseAaRankEffectsRepository {
|
||||||
public:
|
public:
|
||||||
struct AaRankEffects {
|
struct AaRankEffects {
|
||||||
int rank_id;
|
uint32_t rank_id;
|
||||||
int slot;
|
uint32_t slot;
|
||||||
int effect_id;
|
int32_t effect_id;
|
||||||
int base1;
|
int32_t base1;
|
||||||
int base2;
|
int32_t base2;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -130,11 +130,11 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AaRankEffects e{};
|
AaRankEffects e{};
|
||||||
|
|
||||||
e.rank_id = atoi(row[0]);
|
e.rank_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.effect_id = atoi(row[2]);
|
e.effect_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.base1 = atoi(row[3]);
|
e.base1 = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.base2 = atoi(row[4]);
|
e.base2 = static_cast<int32_t>(atoi(row[4]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -266,11 +266,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AaRankEffects e{};
|
AaRankEffects e{};
|
||||||
|
|
||||||
e.rank_id = atoi(row[0]);
|
e.rank_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.effect_id = atoi(row[2]);
|
e.effect_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.base1 = atoi(row[3]);
|
e.base1 = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.base2 = atoi(row[4]);
|
e.base2 = static_cast<int32_t>(atoi(row[4]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -295,11 +295,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AaRankEffects e{};
|
AaRankEffects e{};
|
||||||
|
|
||||||
e.rank_id = atoi(row[0]);
|
e.rank_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.effect_id = atoi(row[2]);
|
e.effect_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.base1 = atoi(row[3]);
|
e.base1 = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.base2 = atoi(row[4]);
|
e.base2 = static_cast<int32_t>(atoi(row[4]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseAaRankPrereqsRepository {
|
class BaseAaRankPrereqsRepository {
|
||||||
public:
|
public:
|
||||||
struct AaRankPrereqs {
|
struct AaRankPrereqs {
|
||||||
int rank_id;
|
uint32_t rank_id;
|
||||||
int aa_id;
|
int32_t aa_id;
|
||||||
int points;
|
int32_t points;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AaRankPrereqs e{};
|
AaRankPrereqs e{};
|
||||||
|
|
||||||
e.rank_id = atoi(row[0]);
|
e.rank_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.aa_id = atoi(row[1]);
|
e.aa_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.points = atoi(row[2]);
|
e.points = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AaRankPrereqs e{};
|
AaRankPrereqs e{};
|
||||||
|
|
||||||
e.rank_id = atoi(row[0]);
|
e.rank_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.aa_id = atoi(row[1]);
|
e.aa_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.points = atoi(row[2]);
|
e.points = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AaRankPrereqs e{};
|
AaRankPrereqs e{};
|
||||||
|
|
||||||
e.rank_id = atoi(row[0]);
|
e.rank_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.aa_id = atoi(row[1]);
|
e.aa_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.points = atoi(row[2]);
|
e.points = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,19 +19,19 @@
|
|||||||
class BaseAaRanksRepository {
|
class BaseAaRanksRepository {
|
||||||
public:
|
public:
|
||||||
struct AaRanks {
|
struct AaRanks {
|
||||||
int id;
|
uint32_t id;
|
||||||
int upper_hotkey_sid;
|
int32_t upper_hotkey_sid;
|
||||||
int lower_hotkey_sid;
|
int32_t lower_hotkey_sid;
|
||||||
int title_sid;
|
int32_t title_sid;
|
||||||
int desc_sid;
|
int32_t desc_sid;
|
||||||
int cost;
|
int32_t cost;
|
||||||
int level_req;
|
int32_t level_req;
|
||||||
int spell;
|
int32_t spell;
|
||||||
int spell_type;
|
int32_t spell_type;
|
||||||
int recast_time;
|
int32_t recast_time;
|
||||||
int expansion;
|
int32_t expansion;
|
||||||
int prev_id;
|
int32_t prev_id;
|
||||||
int next_id;
|
int32_t next_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -162,19 +162,19 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AaRanks e{};
|
AaRanks e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.upper_hotkey_sid = atoi(row[1]);
|
e.upper_hotkey_sid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.lower_hotkey_sid = atoi(row[2]);
|
e.lower_hotkey_sid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.title_sid = atoi(row[3]);
|
e.title_sid = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.desc_sid = atoi(row[4]);
|
e.desc_sid = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.cost = atoi(row[5]);
|
e.cost = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.level_req = atoi(row[6]);
|
e.level_req = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.spell = atoi(row[7]);
|
e.spell = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.spell_type = atoi(row[8]);
|
e.spell_type = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.recast_time = atoi(row[9]);
|
e.recast_time = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.expansion = atoi(row[10]);
|
e.expansion = static_cast<int32_t>(atoi(row[10]));
|
||||||
e.prev_id = atoi(row[11]);
|
e.prev_id = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.next_id = atoi(row[12]);
|
e.next_id = static_cast<int32_t>(atoi(row[12]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -330,19 +330,19 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AaRanks e{};
|
AaRanks e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.upper_hotkey_sid = atoi(row[1]);
|
e.upper_hotkey_sid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.lower_hotkey_sid = atoi(row[2]);
|
e.lower_hotkey_sid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.title_sid = atoi(row[3]);
|
e.title_sid = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.desc_sid = atoi(row[4]);
|
e.desc_sid = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.cost = atoi(row[5]);
|
e.cost = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.level_req = atoi(row[6]);
|
e.level_req = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.spell = atoi(row[7]);
|
e.spell = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.spell_type = atoi(row[8]);
|
e.spell_type = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.recast_time = atoi(row[9]);
|
e.recast_time = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.expansion = atoi(row[10]);
|
e.expansion = static_cast<int32_t>(atoi(row[10]));
|
||||||
e.prev_id = atoi(row[11]);
|
e.prev_id = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.next_id = atoi(row[12]);
|
e.next_id = static_cast<int32_t>(atoi(row[12]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -367,19 +367,19 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AaRanks e{};
|
AaRanks e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.upper_hotkey_sid = atoi(row[1]);
|
e.upper_hotkey_sid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.lower_hotkey_sid = atoi(row[2]);
|
e.lower_hotkey_sid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.title_sid = atoi(row[3]);
|
e.title_sid = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.desc_sid = atoi(row[4]);
|
e.desc_sid = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.cost = atoi(row[5]);
|
e.cost = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.level_req = atoi(row[6]);
|
e.level_req = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.spell = atoi(row[7]);
|
e.spell = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.spell_type = atoi(row[8]);
|
e.spell_type = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.recast_time = atoi(row[9]);
|
e.recast_time = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.expansion = atoi(row[10]);
|
e.expansion = static_cast<int32_t>(atoi(row[10]));
|
||||||
e.prev_id = atoi(row[11]);
|
e.prev_id = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.next_id = atoi(row[12]);
|
e.next_id = static_cast<int32_t>(atoi(row[12]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
class BaseAccountFlagsRepository {
|
class BaseAccountFlagsRepository {
|
||||||
public:
|
public:
|
||||||
struct AccountFlags {
|
struct AccountFlags {
|
||||||
int p_accid;
|
uint32_t p_accid;
|
||||||
std::string p_flag;
|
std::string p_flag;
|
||||||
std::string p_value;
|
std::string p_value;
|
||||||
};
|
};
|
||||||
@ -122,7 +122,7 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AccountFlags e{};
|
AccountFlags e{};
|
||||||
|
|
||||||
e.p_accid = atoi(row[0]);
|
e.p_accid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.p_flag = row[1] ? row[1] : "";
|
e.p_flag = row[1] ? row[1] : "";
|
||||||
e.p_value = row[2] ? row[2] : "";
|
e.p_value = row[2] ? row[2] : "";
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AccountFlags e{};
|
AccountFlags e{};
|
||||||
|
|
||||||
e.p_accid = atoi(row[0]);
|
e.p_accid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.p_flag = row[1] ? row[1] : "";
|
e.p_flag = row[1] ? row[1] : "";
|
||||||
e.p_value = row[2] ? row[2] : "";
|
e.p_value = row[2] ? row[2] : "";
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AccountFlags e{};
|
AccountFlags e{};
|
||||||
|
|
||||||
e.p_accid = atoi(row[0]);
|
e.p_accid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.p_flag = row[1] ? row[1] : "";
|
e.p_flag = row[1] ? row[1] : "";
|
||||||
e.p_value = row[2] ? row[2] : "";
|
e.p_value = row[2] ? row[2] : "";
|
||||||
|
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseAccountIpRepository {
|
class BaseAccountIpRepository {
|
||||||
public:
|
public:
|
||||||
struct AccountIp {
|
struct AccountIp {
|
||||||
int accid;
|
int32_t accid;
|
||||||
std::string ip;
|
std::string ip;
|
||||||
int count;
|
int32_t count;
|
||||||
std::string lastused;
|
std::string lastused;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -126,9 +126,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AccountIp e{};
|
AccountIp e{};
|
||||||
|
|
||||||
e.accid = atoi(row[0]);
|
e.accid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.ip = row[1] ? row[1] : "";
|
e.ip = row[1] ? row[1] : "";
|
||||||
e.count = atoi(row[2]);
|
e.count = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.lastused = row[3] ? row[3] : "";
|
e.lastused = row[3] ? row[3] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -258,9 +258,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AccountIp e{};
|
AccountIp e{};
|
||||||
|
|
||||||
e.accid = atoi(row[0]);
|
e.accid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.ip = row[1] ? row[1] : "";
|
e.ip = row[1] ? row[1] : "";
|
||||||
e.count = atoi(row[2]);
|
e.count = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.lastused = row[3] ? row[3] : "";
|
e.lastused = row[3] ? row[3] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -286,9 +286,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AccountIp e{};
|
AccountIp e{};
|
||||||
|
|
||||||
e.accid = atoi(row[0]);
|
e.accid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.ip = row[1] ? row[1] : "";
|
e.ip = row[1] ? row[1] : "";
|
||||||
e.count = atoi(row[2]);
|
e.count = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.lastused = row[3] ? row[3] : "";
|
e.lastused = row[3] ? row[3] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,25 +19,25 @@
|
|||||||
class BaseAccountRepository {
|
class BaseAccountRepository {
|
||||||
public:
|
public:
|
||||||
struct Account {
|
struct Account {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string charname;
|
std::string charname;
|
||||||
int sharedplat;
|
uint32_t sharedplat;
|
||||||
std::string password;
|
std::string password;
|
||||||
int status;
|
int32_t status;
|
||||||
std::string ls_id;
|
std::string ls_id;
|
||||||
int lsaccount_id;
|
uint32_t lsaccount_id;
|
||||||
int gmspeed;
|
uint8_t gmspeed;
|
||||||
int invulnerable;
|
int8_t invulnerable;
|
||||||
int flymode;
|
int8_t flymode;
|
||||||
int ignore_tells;
|
int8_t ignore_tells;
|
||||||
int revoked;
|
uint8_t revoked;
|
||||||
int karma;
|
uint32_t karma;
|
||||||
std::string minilogin_ip;
|
std::string minilogin_ip;
|
||||||
int hideme;
|
int8_t hideme;
|
||||||
int rulesflag;
|
uint8_t rulesflag;
|
||||||
time_t suspendeduntil;
|
time_t suspendeduntil;
|
||||||
int time_creation;
|
uint32_t time_creation;
|
||||||
std::string ban_reason;
|
std::string ban_reason;
|
||||||
std::string suspend_reason;
|
std::string suspend_reason;
|
||||||
std::string crc_eqgame;
|
std::string crc_eqgame;
|
||||||
@ -206,25 +206,25 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Account e{};
|
Account e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.charname = row[2] ? row[2] : "";
|
e.charname = row[2] ? row[2] : "";
|
||||||
e.sharedplat = atoi(row[3]);
|
e.sharedplat = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.password = row[4] ? row[4] : "";
|
e.password = row[4] ? row[4] : "";
|
||||||
e.status = atoi(row[5]);
|
e.status = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.ls_id = row[6] ? row[6] : "";
|
e.ls_id = row[6] ? row[6] : "";
|
||||||
e.lsaccount_id = atoi(row[7]);
|
e.lsaccount_id = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.gmspeed = atoi(row[8]);
|
e.gmspeed = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.invulnerable = atoi(row[9]);
|
e.invulnerable = static_cast<int8_t>(atoi(row[9]));
|
||||||
e.flymode = atoi(row[10]);
|
e.flymode = static_cast<int8_t>(atoi(row[10]));
|
||||||
e.ignore_tells = atoi(row[11]);
|
e.ignore_tells = static_cast<int8_t>(atoi(row[11]));
|
||||||
e.revoked = atoi(row[12]);
|
e.revoked = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.karma = atoi(row[13]);
|
e.karma = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.minilogin_ip = row[14] ? row[14] : "";
|
e.minilogin_ip = row[14] ? row[14] : "";
|
||||||
e.hideme = atoi(row[15]);
|
e.hideme = static_cast<int8_t>(atoi(row[15]));
|
||||||
e.rulesflag = atoi(row[16]);
|
e.rulesflag = static_cast<uint8_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||||
e.time_creation = atoi(row[18]);
|
e.time_creation = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.ban_reason = row[19] ? row[19] : "";
|
e.ban_reason = row[19] ? row[19] : "";
|
||||||
e.suspend_reason = row[20] ? row[20] : "";
|
e.suspend_reason = row[20] ? row[20] : "";
|
||||||
e.crc_eqgame = row[21] ? row[21] : "";
|
e.crc_eqgame = row[21] ? row[21] : "";
|
||||||
@ -417,25 +417,25 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Account e{};
|
Account e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.charname = row[2] ? row[2] : "";
|
e.charname = row[2] ? row[2] : "";
|
||||||
e.sharedplat = atoi(row[3]);
|
e.sharedplat = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.password = row[4] ? row[4] : "";
|
e.password = row[4] ? row[4] : "";
|
||||||
e.status = atoi(row[5]);
|
e.status = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.ls_id = row[6] ? row[6] : "";
|
e.ls_id = row[6] ? row[6] : "";
|
||||||
e.lsaccount_id = atoi(row[7]);
|
e.lsaccount_id = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.gmspeed = atoi(row[8]);
|
e.gmspeed = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.invulnerable = atoi(row[9]);
|
e.invulnerable = static_cast<int8_t>(atoi(row[9]));
|
||||||
e.flymode = atoi(row[10]);
|
e.flymode = static_cast<int8_t>(atoi(row[10]));
|
||||||
e.ignore_tells = atoi(row[11]);
|
e.ignore_tells = static_cast<int8_t>(atoi(row[11]));
|
||||||
e.revoked = atoi(row[12]);
|
e.revoked = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.karma = atoi(row[13]);
|
e.karma = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.minilogin_ip = row[14] ? row[14] : "";
|
e.minilogin_ip = row[14] ? row[14] : "";
|
||||||
e.hideme = atoi(row[15]);
|
e.hideme = static_cast<int8_t>(atoi(row[15]));
|
||||||
e.rulesflag = atoi(row[16]);
|
e.rulesflag = static_cast<uint8_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||||
e.time_creation = atoi(row[18]);
|
e.time_creation = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.ban_reason = row[19] ? row[19] : "";
|
e.ban_reason = row[19] ? row[19] : "";
|
||||||
e.suspend_reason = row[20] ? row[20] : "";
|
e.suspend_reason = row[20] ? row[20] : "";
|
||||||
e.crc_eqgame = row[21] ? row[21] : "";
|
e.crc_eqgame = row[21] ? row[21] : "";
|
||||||
@ -465,25 +465,25 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Account e{};
|
Account e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.charname = row[2] ? row[2] : "";
|
e.charname = row[2] ? row[2] : "";
|
||||||
e.sharedplat = atoi(row[3]);
|
e.sharedplat = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.password = row[4] ? row[4] : "";
|
e.password = row[4] ? row[4] : "";
|
||||||
e.status = atoi(row[5]);
|
e.status = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.ls_id = row[6] ? row[6] : "";
|
e.ls_id = row[6] ? row[6] : "";
|
||||||
e.lsaccount_id = atoi(row[7]);
|
e.lsaccount_id = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.gmspeed = atoi(row[8]);
|
e.gmspeed = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.invulnerable = atoi(row[9]);
|
e.invulnerable = static_cast<int8_t>(atoi(row[9]));
|
||||||
e.flymode = atoi(row[10]);
|
e.flymode = static_cast<int8_t>(atoi(row[10]));
|
||||||
e.ignore_tells = atoi(row[11]);
|
e.ignore_tells = static_cast<int8_t>(atoi(row[11]));
|
||||||
e.revoked = atoi(row[12]);
|
e.revoked = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.karma = atoi(row[13]);
|
e.karma = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.minilogin_ip = row[14] ? row[14] : "";
|
e.minilogin_ip = row[14] ? row[14] : "";
|
||||||
e.hideme = atoi(row[15]);
|
e.hideme = static_cast<int8_t>(atoi(row[15]));
|
||||||
e.rulesflag = atoi(row[16]);
|
e.rulesflag = static_cast<uint8_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||||
e.time_creation = atoi(row[18]);
|
e.time_creation = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.ban_reason = row[19] ? row[19] : "";
|
e.ban_reason = row[19] ? row[19] : "";
|
||||||
e.suspend_reason = row[20] ? row[20] : "";
|
e.suspend_reason = row[20] ? row[20] : "";
|
||||||
e.crc_eqgame = row[21] ? row[21] : "";
|
e.crc_eqgame = row[21] ? row[21] : "";
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseAccountRewardsRepository {
|
class BaseAccountRewardsRepository {
|
||||||
public:
|
public:
|
||||||
struct AccountRewards {
|
struct AccountRewards {
|
||||||
int account_id;
|
uint32_t account_id;
|
||||||
int reward_id;
|
uint32_t reward_id;
|
||||||
int amount;
|
uint32_t amount;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AccountRewards e{};
|
AccountRewards e{};
|
||||||
|
|
||||||
e.account_id = atoi(row[0]);
|
e.account_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.reward_id = atoi(row[1]);
|
e.reward_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.amount = atoi(row[2]);
|
e.amount = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AccountRewards e{};
|
AccountRewards e{};
|
||||||
|
|
||||||
e.account_id = atoi(row[0]);
|
e.account_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.reward_id = atoi(row[1]);
|
e.reward_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.amount = atoi(row[2]);
|
e.amount = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AccountRewards e{};
|
AccountRewards e{};
|
||||||
|
|
||||||
e.account_id = atoi(row[0]);
|
e.account_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.reward_id = atoi(row[1]);
|
e.reward_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.amount = atoi(row[2]);
|
e.amount = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,15 +19,15 @@
|
|||||||
class BaseAdventureDetailsRepository {
|
class BaseAdventureDetailsRepository {
|
||||||
public:
|
public:
|
||||||
struct AdventureDetails {
|
struct AdventureDetails {
|
||||||
int id;
|
uint32_t id;
|
||||||
int adventure_id;
|
uint16_t adventure_id;
|
||||||
int instance_id;
|
int32_t instance_id;
|
||||||
int count;
|
uint16_t count;
|
||||||
int assassinate_count;
|
uint16_t assassinate_count;
|
||||||
int status;
|
uint8_t status;
|
||||||
int time_created;
|
uint32_t time_created;
|
||||||
int time_zoned;
|
uint32_t time_zoned;
|
||||||
int time_completed;
|
uint32_t time_completed;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -146,15 +146,15 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AdventureDetails e{};
|
AdventureDetails e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.adventure_id = atoi(row[1]);
|
e.adventure_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.instance_id = atoi(row[2]);
|
e.instance_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.count = atoi(row[3]);
|
e.count = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.assassinate_count = atoi(row[4]);
|
e.assassinate_count = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.status = atoi(row[5]);
|
e.status = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.time_created = atoi(row[6]);
|
e.time_created = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.time_zoned = atoi(row[7]);
|
e.time_zoned = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.time_completed = atoi(row[8]);
|
e.time_completed = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -297,15 +297,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureDetails e{};
|
AdventureDetails e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.adventure_id = atoi(row[1]);
|
e.adventure_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.instance_id = atoi(row[2]);
|
e.instance_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.count = atoi(row[3]);
|
e.count = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.assassinate_count = atoi(row[4]);
|
e.assassinate_count = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.status = atoi(row[5]);
|
e.status = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.time_created = atoi(row[6]);
|
e.time_created = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.time_zoned = atoi(row[7]);
|
e.time_zoned = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.time_completed = atoi(row[8]);
|
e.time_completed = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -330,15 +330,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureDetails e{};
|
AdventureDetails e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.adventure_id = atoi(row[1]);
|
e.adventure_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.instance_id = atoi(row[2]);
|
e.instance_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.count = atoi(row[3]);
|
e.count = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.assassinate_count = atoi(row[4]);
|
e.assassinate_count = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.status = atoi(row[5]);
|
e.status = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.time_created = atoi(row[6]);
|
e.time_created = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.time_zoned = atoi(row[7]);
|
e.time_zoned = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.time_completed = atoi(row[8]);
|
e.time_completed = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseAdventureMembersRepository {
|
class BaseAdventureMembersRepository {
|
||||||
public:
|
public:
|
||||||
struct AdventureMembers {
|
struct AdventureMembers {
|
||||||
int id;
|
uint32_t id;
|
||||||
int charid;
|
uint32_t charid;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -118,8 +118,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AdventureMembers e{};
|
AdventureMembers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureMembers e{};
|
AdventureMembers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -268,8 +268,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureMembers e{};
|
AdventureMembers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,17 +19,17 @@
|
|||||||
class BaseAdventureStatsRepository {
|
class BaseAdventureStatsRepository {
|
||||||
public:
|
public:
|
||||||
struct AdventureStats {
|
struct AdventureStats {
|
||||||
int player_id;
|
uint32_t player_id;
|
||||||
int guk_wins;
|
uint32_t guk_wins;
|
||||||
int mir_wins;
|
uint32_t mir_wins;
|
||||||
int mmc_wins;
|
uint32_t mmc_wins;
|
||||||
int ruj_wins;
|
uint32_t ruj_wins;
|
||||||
int tak_wins;
|
uint32_t tak_wins;
|
||||||
int guk_losses;
|
uint32_t guk_losses;
|
||||||
int mir_losses;
|
uint32_t mir_losses;
|
||||||
int mmc_losses;
|
uint32_t mmc_losses;
|
||||||
int ruj_losses;
|
uint32_t ruj_losses;
|
||||||
int tak_losses;
|
uint32_t tak_losses;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -154,17 +154,17 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AdventureStats e{};
|
AdventureStats e{};
|
||||||
|
|
||||||
e.player_id = atoi(row[0]);
|
e.player_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.guk_wins = atoi(row[1]);
|
e.guk_wins = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.mir_wins = atoi(row[2]);
|
e.mir_wins = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.mmc_wins = atoi(row[3]);
|
e.mmc_wins = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.ruj_wins = atoi(row[4]);
|
e.ruj_wins = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.tak_wins = atoi(row[5]);
|
e.tak_wins = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.guk_losses = atoi(row[6]);
|
e.guk_losses = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.mir_losses = atoi(row[7]);
|
e.mir_losses = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.mmc_losses = atoi(row[8]);
|
e.mmc_losses = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.ruj_losses = atoi(row[9]);
|
e.ruj_losses = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.tak_losses = atoi(row[10]);
|
e.tak_losses = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -314,17 +314,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureStats e{};
|
AdventureStats e{};
|
||||||
|
|
||||||
e.player_id = atoi(row[0]);
|
e.player_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.guk_wins = atoi(row[1]);
|
e.guk_wins = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.mir_wins = atoi(row[2]);
|
e.mir_wins = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.mmc_wins = atoi(row[3]);
|
e.mmc_wins = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.ruj_wins = atoi(row[4]);
|
e.ruj_wins = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.tak_wins = atoi(row[5]);
|
e.tak_wins = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.guk_losses = atoi(row[6]);
|
e.guk_losses = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.mir_losses = atoi(row[7]);
|
e.mir_losses = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.mmc_losses = atoi(row[8]);
|
e.mmc_losses = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.ruj_losses = atoi(row[9]);
|
e.ruj_losses = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.tak_losses = atoi(row[10]);
|
e.tak_losses = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -349,17 +349,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureStats e{};
|
AdventureStats e{};
|
||||||
|
|
||||||
e.player_id = atoi(row[0]);
|
e.player_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.guk_wins = atoi(row[1]);
|
e.guk_wins = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.mir_wins = atoi(row[2]);
|
e.mir_wins = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.mmc_wins = atoi(row[3]);
|
e.mmc_wins = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.ruj_wins = atoi(row[4]);
|
e.ruj_wins = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.tak_wins = atoi(row[5]);
|
e.tak_wins = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.guk_losses = atoi(row[6]);
|
e.guk_losses = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.mir_losses = atoi(row[7]);
|
e.mir_losses = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.mmc_losses = atoi(row[8]);
|
e.mmc_losses = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.ruj_losses = atoi(row[9]);
|
e.ruj_losses = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.tak_losses = atoi(row[10]);
|
e.tak_losses = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
class BaseAdventureTemplateEntryFlavorRepository {
|
class BaseAdventureTemplateEntryFlavorRepository {
|
||||||
public:
|
public:
|
||||||
struct AdventureTemplateEntryFlavor {
|
struct AdventureTemplateEntryFlavor {
|
||||||
int id;
|
uint32_t id;
|
||||||
std::string text;
|
std::string text;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AdventureTemplateEntryFlavor e{};
|
AdventureTemplateEntryFlavor e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.text = row[1] ? row[1] : "";
|
e.text = row[1] ? row[1] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -242,7 +242,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureTemplateEntryFlavor e{};
|
AdventureTemplateEntryFlavor e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.text = row[1] ? row[1] : "";
|
e.text = row[1] ? row[1] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -268,7 +268,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureTemplateEntryFlavor e{};
|
AdventureTemplateEntryFlavor e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.text = row[1] ? row[1] : "";
|
e.text = row[1] ? row[1] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseAdventureTemplateEntryRepository {
|
class BaseAdventureTemplateEntryRepository {
|
||||||
public:
|
public:
|
||||||
struct AdventureTemplateEntry {
|
struct AdventureTemplateEntry {
|
||||||
int id;
|
uint32_t id;
|
||||||
int template_id;
|
uint32_t template_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -118,8 +118,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AdventureTemplateEntry e{};
|
AdventureTemplateEntry e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.template_id = atoi(row[1]);
|
e.template_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureTemplateEntry e{};
|
AdventureTemplateEntry e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.template_id = atoi(row[1]);
|
e.template_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -268,8 +268,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureTemplateEntry e{};
|
AdventureTemplateEntry e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.template_id = atoi(row[1]);
|
e.template_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,39 +19,39 @@
|
|||||||
class BaseAdventureTemplateRepository {
|
class BaseAdventureTemplateRepository {
|
||||||
public:
|
public:
|
||||||
struct AdventureTemplate {
|
struct AdventureTemplate {
|
||||||
int id;
|
uint32_t id;
|
||||||
std::string zone;
|
std::string zone;
|
||||||
int zone_version;
|
uint8_t zone_version;
|
||||||
int is_hard;
|
uint8_t is_hard;
|
||||||
int is_raid;
|
uint8_t is_raid;
|
||||||
int min_level;
|
uint8_t min_level;
|
||||||
int max_level;
|
uint8_t max_level;
|
||||||
int type;
|
uint8_t type;
|
||||||
int type_data;
|
uint32_t type_data;
|
||||||
int type_count;
|
uint16_t type_count;
|
||||||
float assa_x;
|
float assa_x;
|
||||||
float assa_y;
|
float assa_y;
|
||||||
float assa_z;
|
float assa_z;
|
||||||
float assa_h;
|
float assa_h;
|
||||||
std::string text;
|
std::string text;
|
||||||
int duration;
|
uint32_t duration;
|
||||||
int zone_in_time;
|
uint32_t zone_in_time;
|
||||||
int win_points;
|
uint16_t win_points;
|
||||||
int lose_points;
|
uint16_t lose_points;
|
||||||
int theme;
|
uint8_t theme;
|
||||||
int zone_in_zone_id;
|
uint16_t zone_in_zone_id;
|
||||||
float zone_in_x;
|
float zone_in_x;
|
||||||
float zone_in_y;
|
float zone_in_y;
|
||||||
int zone_in_object_id;
|
int16_t zone_in_object_id;
|
||||||
float dest_x;
|
float dest_x;
|
||||||
float dest_y;
|
float dest_y;
|
||||||
float dest_z;
|
float dest_z;
|
||||||
float dest_h;
|
float dest_h;
|
||||||
int graveyard_zone_id;
|
uint32_t graveyard_zone_id;
|
||||||
float graveyard_x;
|
float graveyard_x;
|
||||||
float graveyard_y;
|
float graveyard_y;
|
||||||
float graveyard_z;
|
float graveyard_z;
|
||||||
float graveyard_radius;
|
std::string graveyard_radius;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -242,39 +242,38 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AdventureTemplate e{};
|
AdventureTemplate e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.zone_version = atoi(row[2]);
|
e.zone_version = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_hard = atoi(row[3]);
|
e.is_hard = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.is_raid = atoi(row[4]);
|
e.is_raid = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.min_level = atoi(row[5]);
|
e.min_level = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.max_level = atoi(row[6]);
|
e.max_level = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.type = atoi(row[7]);
|
e.type = static_cast<uint8_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.type_data = atoi(row[8]);
|
e.type_data = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.type_count = atoi(row[9]);
|
e.type_count = static_cast<uint16_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.assa_x = static_cast<float>(atof(row[10]));
|
e.assa_x = strtof(row[10], nullptr);
|
||||||
e.assa_y = static_cast<float>(atof(row[11]));
|
e.assa_y = strtof(row[11], nullptr);
|
||||||
e.assa_z = static_cast<float>(atof(row[12]));
|
e.assa_z = strtof(row[12], nullptr);
|
||||||
e.assa_h = static_cast<float>(atof(row[13]));
|
e.assa_h = strtof(row[13], nullptr);
|
||||||
e.text = row[14] ? row[14] : "";
|
e.text = row[14] ? row[14] : "";
|
||||||
e.duration = atoi(row[15]);
|
e.duration = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.zone_in_time = atoi(row[16]);
|
e.zone_in_time = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.win_points = atoi(row[17]);
|
e.win_points = static_cast<uint16_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.lose_points = atoi(row[18]);
|
e.lose_points = static_cast<uint16_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.theme = atoi(row[19]);
|
e.theme = static_cast<uint8_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.zone_in_zone_id = atoi(row[20]);
|
e.zone_in_zone_id = static_cast<uint16_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.zone_in_x = static_cast<float>(atof(row[21]));
|
e.zone_in_x = strtof(row[21], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[22]));
|
e.zone_in_y = strtof(row[22], nullptr);
|
||||||
e.zone_in_object_id = atoi(row[23]);
|
e.zone_in_object_id = static_cast<int16_t>(atoi(row[23]));
|
||||||
e.dest_x = static_cast<float>(atof(row[24]));
|
e.dest_x = strtof(row[24], nullptr);
|
||||||
e.dest_y = static_cast<float>(atof(row[25]));
|
e.dest_y = strtof(row[25], nullptr);
|
||||||
e.dest_z = static_cast<float>(atof(row[26]));
|
e.dest_z = strtof(row[26], nullptr);
|
||||||
e.dest_h = static_cast<float>(atof(row[27]));
|
e.dest_h = strtof(row[27], nullptr);
|
||||||
e.graveyard_zone_id = atoi(row[28]);
|
e.graveyard_zone_id = static_cast<uint32_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.graveyard_x = static_cast<float>(atof(row[29]));
|
e.graveyard_x = strtof(row[29], nullptr);
|
||||||
e.graveyard_y = static_cast<float>(atof(row[30]));
|
e.graveyard_y = strtof(row[30], nullptr);
|
||||||
e.graveyard_z = static_cast<float>(atof(row[31]));
|
e.graveyard_z = strtof(row[31], nullptr);
|
||||||
e.graveyard_radius = static_cast<float>(atof(row[32]));
|
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -490,39 +489,38 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureTemplate e{};
|
AdventureTemplate e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.zone_version = atoi(row[2]);
|
e.zone_version = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_hard = atoi(row[3]);
|
e.is_hard = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.is_raid = atoi(row[4]);
|
e.is_raid = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.min_level = atoi(row[5]);
|
e.min_level = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.max_level = atoi(row[6]);
|
e.max_level = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.type = atoi(row[7]);
|
e.type = static_cast<uint8_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.type_data = atoi(row[8]);
|
e.type_data = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.type_count = atoi(row[9]);
|
e.type_count = static_cast<uint16_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.assa_x = static_cast<float>(atof(row[10]));
|
e.assa_x = strtof(row[10], nullptr);
|
||||||
e.assa_y = static_cast<float>(atof(row[11]));
|
e.assa_y = strtof(row[11], nullptr);
|
||||||
e.assa_z = static_cast<float>(atof(row[12]));
|
e.assa_z = strtof(row[12], nullptr);
|
||||||
e.assa_h = static_cast<float>(atof(row[13]));
|
e.assa_h = strtof(row[13], nullptr);
|
||||||
e.text = row[14] ? row[14] : "";
|
e.text = row[14] ? row[14] : "";
|
||||||
e.duration = atoi(row[15]);
|
e.duration = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.zone_in_time = atoi(row[16]);
|
e.zone_in_time = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.win_points = atoi(row[17]);
|
e.win_points = static_cast<uint16_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.lose_points = atoi(row[18]);
|
e.lose_points = static_cast<uint16_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.theme = atoi(row[19]);
|
e.theme = static_cast<uint8_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.zone_in_zone_id = atoi(row[20]);
|
e.zone_in_zone_id = static_cast<uint16_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.zone_in_x = static_cast<float>(atof(row[21]));
|
e.zone_in_x = strtof(row[21], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[22]));
|
e.zone_in_y = strtof(row[22], nullptr);
|
||||||
e.zone_in_object_id = atoi(row[23]);
|
e.zone_in_object_id = static_cast<int16_t>(atoi(row[23]));
|
||||||
e.dest_x = static_cast<float>(atof(row[24]));
|
e.dest_x = strtof(row[24], nullptr);
|
||||||
e.dest_y = static_cast<float>(atof(row[25]));
|
e.dest_y = strtof(row[25], nullptr);
|
||||||
e.dest_z = static_cast<float>(atof(row[26]));
|
e.dest_z = strtof(row[26], nullptr);
|
||||||
e.dest_h = static_cast<float>(atof(row[27]));
|
e.dest_h = strtof(row[27], nullptr);
|
||||||
e.graveyard_zone_id = atoi(row[28]);
|
e.graveyard_zone_id = static_cast<uint32_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.graveyard_x = static_cast<float>(atof(row[29]));
|
e.graveyard_x = strtof(row[29], nullptr);
|
||||||
e.graveyard_y = static_cast<float>(atof(row[30]));
|
e.graveyard_y = strtof(row[30], nullptr);
|
||||||
e.graveyard_z = static_cast<float>(atof(row[31]));
|
e.graveyard_z = strtof(row[31], nullptr);
|
||||||
e.graveyard_radius = static_cast<float>(atof(row[32]));
|
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -547,39 +545,38 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AdventureTemplate e{};
|
AdventureTemplate e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.zone_version = atoi(row[2]);
|
e.zone_version = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_hard = atoi(row[3]);
|
e.is_hard = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.is_raid = atoi(row[4]);
|
e.is_raid = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.min_level = atoi(row[5]);
|
e.min_level = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.max_level = atoi(row[6]);
|
e.max_level = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.type = atoi(row[7]);
|
e.type = static_cast<uint8_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.type_data = atoi(row[8]);
|
e.type_data = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.type_count = atoi(row[9]);
|
e.type_count = static_cast<uint16_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.assa_x = static_cast<float>(atof(row[10]));
|
e.assa_x = strtof(row[10], nullptr);
|
||||||
e.assa_y = static_cast<float>(atof(row[11]));
|
e.assa_y = strtof(row[11], nullptr);
|
||||||
e.assa_z = static_cast<float>(atof(row[12]));
|
e.assa_z = strtof(row[12], nullptr);
|
||||||
e.assa_h = static_cast<float>(atof(row[13]));
|
e.assa_h = strtof(row[13], nullptr);
|
||||||
e.text = row[14] ? row[14] : "";
|
e.text = row[14] ? row[14] : "";
|
||||||
e.duration = atoi(row[15]);
|
e.duration = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.zone_in_time = atoi(row[16]);
|
e.zone_in_time = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.win_points = atoi(row[17]);
|
e.win_points = static_cast<uint16_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.lose_points = atoi(row[18]);
|
e.lose_points = static_cast<uint16_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.theme = atoi(row[19]);
|
e.theme = static_cast<uint8_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.zone_in_zone_id = atoi(row[20]);
|
e.zone_in_zone_id = static_cast<uint16_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.zone_in_x = static_cast<float>(atof(row[21]));
|
e.zone_in_x = strtof(row[21], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[22]));
|
e.zone_in_y = strtof(row[22], nullptr);
|
||||||
e.zone_in_object_id = atoi(row[23]);
|
e.zone_in_object_id = static_cast<int16_t>(atoi(row[23]));
|
||||||
e.dest_x = static_cast<float>(atof(row[24]));
|
e.dest_x = strtof(row[24], nullptr);
|
||||||
e.dest_y = static_cast<float>(atof(row[25]));
|
e.dest_y = strtof(row[25], nullptr);
|
||||||
e.dest_z = static_cast<float>(atof(row[26]));
|
e.dest_z = strtof(row[26], nullptr);
|
||||||
e.dest_h = static_cast<float>(atof(row[27]));
|
e.dest_h = strtof(row[27], nullptr);
|
||||||
e.graveyard_zone_id = atoi(row[28]);
|
e.graveyard_zone_id = static_cast<uint32_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.graveyard_x = static_cast<float>(atof(row[29]));
|
e.graveyard_x = strtof(row[29], nullptr);
|
||||||
e.graveyard_y = static_cast<float>(atof(row[30]));
|
e.graveyard_y = strtof(row[30], nullptr);
|
||||||
e.graveyard_z = static_cast<float>(atof(row[31]));
|
e.graveyard_z = strtof(row[31], nullptr);
|
||||||
e.graveyard_radius = static_cast<float>(atof(row[32]));
|
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseAlternateCurrencyRepository {
|
class BaseAlternateCurrencyRepository {
|
||||||
public:
|
public:
|
||||||
struct AlternateCurrency {
|
struct AlternateCurrency {
|
||||||
int id;
|
int32_t id;
|
||||||
int item_id;
|
int32_t item_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -118,8 +118,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
AlternateCurrency e{};
|
AlternateCurrency e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.item_id = atoi(row[1]);
|
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AlternateCurrency e{};
|
AlternateCurrency e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.item_id = atoi(row[1]);
|
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -268,8 +268,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
AlternateCurrency e{};
|
AlternateCurrency e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.item_id = atoi(row[1]);
|
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,17 +19,17 @@
|
|||||||
class BaseAurasRepository {
|
class BaseAurasRepository {
|
||||||
public:
|
public:
|
||||||
struct Auras {
|
struct Auras {
|
||||||
int type;
|
int32_t type;
|
||||||
int npc_type;
|
int32_t npc_type;
|
||||||
std::string name;
|
std::string name;
|
||||||
int spell_id;
|
int32_t spell_id;
|
||||||
int distance;
|
int32_t distance;
|
||||||
int aura_type;
|
int32_t aura_type;
|
||||||
int spawn_type;
|
int32_t spawn_type;
|
||||||
int movement;
|
int32_t movement;
|
||||||
int duration;
|
int32_t duration;
|
||||||
int icon;
|
int32_t icon;
|
||||||
int cast_time;
|
int32_t cast_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -154,17 +154,17 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Auras e{};
|
Auras e{};
|
||||||
|
|
||||||
e.type = atoi(row[0]);
|
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.npc_type = atoi(row[1]);
|
e.npc_type = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.spell_id = atoi(row[3]);
|
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.distance = atoi(row[4]);
|
e.distance = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.aura_type = atoi(row[5]);
|
e.aura_type = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.spawn_type = atoi(row[6]);
|
e.spawn_type = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.movement = atoi(row[7]);
|
e.movement = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.duration = atoi(row[8]);
|
e.duration = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.icon = atoi(row[9]);
|
e.icon = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.cast_time = atoi(row[10]);
|
e.cast_time = static_cast<int32_t>(atoi(row[10]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -314,17 +314,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Auras e{};
|
Auras e{};
|
||||||
|
|
||||||
e.type = atoi(row[0]);
|
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.npc_type = atoi(row[1]);
|
e.npc_type = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.spell_id = atoi(row[3]);
|
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.distance = atoi(row[4]);
|
e.distance = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.aura_type = atoi(row[5]);
|
e.aura_type = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.spawn_type = atoi(row[6]);
|
e.spawn_type = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.movement = atoi(row[7]);
|
e.movement = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.duration = atoi(row[8]);
|
e.duration = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.icon = atoi(row[9]);
|
e.icon = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.cast_time = atoi(row[10]);
|
e.cast_time = static_cast<int32_t>(atoi(row[10]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -349,17 +349,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Auras e{};
|
Auras e{};
|
||||||
|
|
||||||
e.type = atoi(row[0]);
|
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.npc_type = atoi(row[1]);
|
e.npc_type = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.spell_id = atoi(row[3]);
|
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.distance = atoi(row[4]);
|
e.distance = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.aura_type = atoi(row[5]);
|
e.aura_type = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.spawn_type = atoi(row[6]);
|
e.spawn_type = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.movement = atoi(row[7]);
|
e.movement = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.duration = atoi(row[8]);
|
e.duration = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.icon = atoi(row[9]);
|
e.icon = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.cast_time = atoi(row[10]);
|
e.cast_time = static_cast<int32_t>(atoi(row[10]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,16 +19,16 @@
|
|||||||
class BaseBaseDataRepository {
|
class BaseBaseDataRepository {
|
||||||
public:
|
public:
|
||||||
struct BaseData {
|
struct BaseData {
|
||||||
int level;
|
uint32_t level;
|
||||||
int class_;
|
uint32_t class_;
|
||||||
float hp;
|
double hp;
|
||||||
float mana;
|
double mana;
|
||||||
float end;
|
double end;
|
||||||
float unk1;
|
double unk1;
|
||||||
float unk2;
|
double unk2;
|
||||||
float hp_fac;
|
double hp_fac;
|
||||||
float mana_fac;
|
double mana_fac;
|
||||||
float end_fac;
|
double end_fac;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -150,16 +150,16 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
BaseData e{};
|
BaseData e{};
|
||||||
|
|
||||||
e.level = atoi(row[0]);
|
e.level = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.class_ = atoi(row[1]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.hp = static_cast<float>(atof(row[2]));
|
e.hp = strtod(row[2], nullptr);
|
||||||
e.mana = static_cast<float>(atof(row[3]));
|
e.mana = strtod(row[3], nullptr);
|
||||||
e.end = static_cast<float>(atof(row[4]));
|
e.end = strtod(row[4], nullptr);
|
||||||
e.unk1 = static_cast<float>(atof(row[5]));
|
e.unk1 = strtod(row[5], nullptr);
|
||||||
e.unk2 = static_cast<float>(atof(row[6]));
|
e.unk2 = strtod(row[6], nullptr);
|
||||||
e.hp_fac = static_cast<float>(atof(row[7]));
|
e.hp_fac = strtod(row[7], nullptr);
|
||||||
e.mana_fac = static_cast<float>(atof(row[8]));
|
e.mana_fac = strtod(row[8], nullptr);
|
||||||
e.end_fac = static_cast<float>(atof(row[9]));
|
e.end_fac = strtod(row[9], nullptr);
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -306,16 +306,16 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
BaseData e{};
|
BaseData e{};
|
||||||
|
|
||||||
e.level = atoi(row[0]);
|
e.level = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.class_ = atoi(row[1]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.hp = static_cast<float>(atof(row[2]));
|
e.hp = strtod(row[2], nullptr);
|
||||||
e.mana = static_cast<float>(atof(row[3]));
|
e.mana = strtod(row[3], nullptr);
|
||||||
e.end = static_cast<float>(atof(row[4]));
|
e.end = strtod(row[4], nullptr);
|
||||||
e.unk1 = static_cast<float>(atof(row[5]));
|
e.unk1 = strtod(row[5], nullptr);
|
||||||
e.unk2 = static_cast<float>(atof(row[6]));
|
e.unk2 = strtod(row[6], nullptr);
|
||||||
e.hp_fac = static_cast<float>(atof(row[7]));
|
e.hp_fac = strtod(row[7], nullptr);
|
||||||
e.mana_fac = static_cast<float>(atof(row[8]));
|
e.mana_fac = strtod(row[8], nullptr);
|
||||||
e.end_fac = static_cast<float>(atof(row[9]));
|
e.end_fac = strtod(row[9], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -340,16 +340,16 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
BaseData e{};
|
BaseData e{};
|
||||||
|
|
||||||
e.level = atoi(row[0]);
|
e.level = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.class_ = atoi(row[1]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.hp = static_cast<float>(atof(row[2]));
|
e.hp = strtod(row[2], nullptr);
|
||||||
e.mana = static_cast<float>(atof(row[3]));
|
e.mana = strtod(row[3], nullptr);
|
||||||
e.end = static_cast<float>(atof(row[4]));
|
e.end = strtod(row[4], nullptr);
|
||||||
e.unk1 = static_cast<float>(atof(row[5]));
|
e.unk1 = strtod(row[5], nullptr);
|
||||||
e.unk2 = static_cast<float>(atof(row[6]));
|
e.unk2 = strtod(row[6], nullptr);
|
||||||
e.hp_fac = static_cast<float>(atof(row[7]));
|
e.hp_fac = strtod(row[7], nullptr);
|
||||||
e.mana_fac = static_cast<float>(atof(row[8]));
|
e.mana_fac = strtod(row[8], nullptr);
|
||||||
e.end_fac = static_cast<float>(atof(row[9]));
|
e.end_fac = strtod(row[9], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseBlockedSpellsRepository {
|
class BaseBlockedSpellsRepository {
|
||||||
public:
|
public:
|
||||||
struct BlockedSpells {
|
struct BlockedSpells {
|
||||||
int id;
|
int32_t id;
|
||||||
int spellid;
|
uint32_t spellid;
|
||||||
int type;
|
int8_t type;
|
||||||
int zoneid;
|
int32_t zoneid;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
float z;
|
float z;
|
||||||
@ -158,16 +158,16 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
BlockedSpells e{};
|
BlockedSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.spellid = atoi(row[1]);
|
e.spellid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<int8_t>(atoi(row[2]));
|
||||||
e.zoneid = atoi(row[3]);
|
e.zoneid = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.x_diff = static_cast<float>(atof(row[7]));
|
e.x_diff = strtof(row[7], nullptr);
|
||||||
e.y_diff = static_cast<float>(atof(row[8]));
|
e.y_diff = strtof(row[8], nullptr);
|
||||||
e.z_diff = static_cast<float>(atof(row[9]));
|
e.z_diff = strtof(row[9], nullptr);
|
||||||
e.message = row[10] ? row[10] : "";
|
e.message = row[10] ? row[10] : "";
|
||||||
e.description = row[11] ? row[11] : "";
|
e.description = row[11] ? row[11] : "";
|
||||||
|
|
||||||
@ -321,16 +321,16 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
BlockedSpells e{};
|
BlockedSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.spellid = atoi(row[1]);
|
e.spellid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<int8_t>(atoi(row[2]));
|
||||||
e.zoneid = atoi(row[3]);
|
e.zoneid = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.x_diff = static_cast<float>(atof(row[7]));
|
e.x_diff = strtof(row[7], nullptr);
|
||||||
e.y_diff = static_cast<float>(atof(row[8]));
|
e.y_diff = strtof(row[8], nullptr);
|
||||||
e.z_diff = static_cast<float>(atof(row[9]));
|
e.z_diff = strtof(row[9], nullptr);
|
||||||
e.message = row[10] ? row[10] : "";
|
e.message = row[10] ? row[10] : "";
|
||||||
e.description = row[11] ? row[11] : "";
|
e.description = row[11] ? row[11] : "";
|
||||||
|
|
||||||
@ -357,16 +357,16 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
BlockedSpells e{};
|
BlockedSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.spellid = atoi(row[1]);
|
e.spellid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<int8_t>(atoi(row[2]));
|
||||||
e.zoneid = atoi(row[3]);
|
e.zoneid = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.x_diff = static_cast<float>(atof(row[7]));
|
e.x_diff = strtof(row[7], nullptr);
|
||||||
e.y_diff = static_cast<float>(atof(row[8]));
|
e.y_diff = strtof(row[8], nullptr);
|
||||||
e.z_diff = static_cast<float>(atof(row[9]));
|
e.z_diff = strtof(row[9], nullptr);
|
||||||
e.message = row[10] ? row[10] : "";
|
e.message = row[10] ? row[10] : "";
|
||||||
e.description = row[11] ? row[11] : "";
|
e.description = row[11] ? row[11] : "";
|
||||||
|
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseBooksRepository {
|
class BaseBooksRepository {
|
||||||
public:
|
public:
|
||||||
struct Books {
|
struct Books {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string txtfile;
|
std::string txtfile;
|
||||||
int language;
|
int32_t language;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Books e{};
|
Books e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.txtfile = row[2] ? row[2] : "";
|
e.txtfile = row[2] ? row[2] : "";
|
||||||
e.language = atoi(row[3]);
|
e.language = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -257,10 +257,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Books e{};
|
Books e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.txtfile = row[2] ? row[2] : "";
|
e.txtfile = row[2] ? row[2] : "";
|
||||||
e.language = atoi(row[3]);
|
e.language = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -285,10 +285,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Books e{};
|
Books e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.txtfile = row[2] ? row[2] : "";
|
e.txtfile = row[2] ? row[2] : "";
|
||||||
e.language = atoi(row[3]);
|
e.language = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,35 +19,35 @@
|
|||||||
class BaseBugReportsRepository {
|
class BaseBugReportsRepository {
|
||||||
public:
|
public:
|
||||||
struct BugReports {
|
struct BugReports {
|
||||||
int id;
|
uint32_t id;
|
||||||
std::string zone;
|
std::string zone;
|
||||||
int client_version_id;
|
uint32_t client_version_id;
|
||||||
std::string client_version_name;
|
std::string client_version_name;
|
||||||
int account_id;
|
uint32_t account_id;
|
||||||
int character_id;
|
uint32_t character_id;
|
||||||
std::string character_name;
|
std::string character_name;
|
||||||
int reporter_spoof;
|
int8_t reporter_spoof;
|
||||||
int category_id;
|
uint32_t category_id;
|
||||||
std::string category_name;
|
std::string category_name;
|
||||||
std::string reporter_name;
|
std::string reporter_name;
|
||||||
std::string ui_path;
|
std::string ui_path;
|
||||||
float pos_x;
|
float pos_x;
|
||||||
float pos_y;
|
float pos_y;
|
||||||
float pos_z;
|
float pos_z;
|
||||||
int heading;
|
uint32_t heading;
|
||||||
int time_played;
|
uint32_t time_played;
|
||||||
int target_id;
|
uint32_t target_id;
|
||||||
std::string target_name;
|
std::string target_name;
|
||||||
int optional_info_mask;
|
uint32_t optional_info_mask;
|
||||||
int _can_duplicate;
|
int8_t _can_duplicate;
|
||||||
int _crash_bug;
|
int8_t _crash_bug;
|
||||||
int _target_info;
|
int8_t _target_info;
|
||||||
int _character_flags;
|
int8_t _character_flags;
|
||||||
int _unknown_value;
|
int8_t _unknown_value;
|
||||||
std::string bug_report;
|
std::string bug_report;
|
||||||
std::string system_info;
|
std::string system_info;
|
||||||
time_t report_datetime;
|
time_t report_datetime;
|
||||||
int bug_status;
|
uint8_t bug_status;
|
||||||
time_t last_review;
|
time_t last_review;
|
||||||
std::string last_reviewer;
|
std::string last_reviewer;
|
||||||
std::string reviewer_notes;
|
std::string reviewer_notes;
|
||||||
@ -238,35 +238,35 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
BugReports e{};
|
BugReports e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.client_version_id = atoi(row[2]);
|
e.client_version_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.client_version_name = row[3] ? row[3] : "";
|
e.client_version_name = row[3] ? row[3] : "";
|
||||||
e.account_id = atoi(row[4]);
|
e.account_id = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.character_id = atoi(row[5]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.character_name = row[6] ? row[6] : "";
|
e.character_name = row[6] ? row[6] : "";
|
||||||
e.reporter_spoof = atoi(row[7]);
|
e.reporter_spoof = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.category_id = atoi(row[8]);
|
e.category_id = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.category_name = row[9] ? row[9] : "";
|
e.category_name = row[9] ? row[9] : "";
|
||||||
e.reporter_name = row[10] ? row[10] : "";
|
e.reporter_name = row[10] ? row[10] : "";
|
||||||
e.ui_path = row[11] ? row[11] : "";
|
e.ui_path = row[11] ? row[11] : "";
|
||||||
e.pos_x = static_cast<float>(atof(row[12]));
|
e.pos_x = strtof(row[12], nullptr);
|
||||||
e.pos_y = static_cast<float>(atof(row[13]));
|
e.pos_y = strtof(row[13], nullptr);
|
||||||
e.pos_z = static_cast<float>(atof(row[14]));
|
e.pos_z = strtof(row[14], nullptr);
|
||||||
e.heading = atoi(row[15]);
|
e.heading = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.time_played = atoi(row[16]);
|
e.time_played = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.target_id = atoi(row[17]);
|
e.target_id = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.target_name = row[18] ? row[18] : "";
|
e.target_name = row[18] ? row[18] : "";
|
||||||
e.optional_info_mask = atoi(row[19]);
|
e.optional_info_mask = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e._can_duplicate = atoi(row[20]);
|
e._can_duplicate = static_cast<int8_t>(atoi(row[20]));
|
||||||
e._crash_bug = atoi(row[21]);
|
e._crash_bug = static_cast<int8_t>(atoi(row[21]));
|
||||||
e._target_info = atoi(row[22]);
|
e._target_info = static_cast<int8_t>(atoi(row[22]));
|
||||||
e._character_flags = atoi(row[23]);
|
e._character_flags = static_cast<int8_t>(atoi(row[23]));
|
||||||
e._unknown_value = atoi(row[24]);
|
e._unknown_value = static_cast<int8_t>(atoi(row[24]));
|
||||||
e.bug_report = row[25] ? row[25] : "";
|
e.bug_report = row[25] ? row[25] : "";
|
||||||
e.system_info = row[26] ? row[26] : "";
|
e.system_info = row[26] ? row[26] : "";
|
||||||
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
||||||
e.bug_status = atoi(row[28]);
|
e.bug_status = static_cast<uint8_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.last_review = strtoll(row[29] ? row[29] : "-1", nullptr, 10);
|
e.last_review = strtoll(row[29] ? row[29] : "-1", nullptr, 10);
|
||||||
e.last_reviewer = row[30] ? row[30] : "";
|
e.last_reviewer = row[30] ? row[30] : "";
|
||||||
e.reviewer_notes = row[31] ? row[31] : "";
|
e.reviewer_notes = row[31] ? row[31] : "";
|
||||||
@ -481,35 +481,35 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
BugReports e{};
|
BugReports e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.client_version_id = atoi(row[2]);
|
e.client_version_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.client_version_name = row[3] ? row[3] : "";
|
e.client_version_name = row[3] ? row[3] : "";
|
||||||
e.account_id = atoi(row[4]);
|
e.account_id = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.character_id = atoi(row[5]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.character_name = row[6] ? row[6] : "";
|
e.character_name = row[6] ? row[6] : "";
|
||||||
e.reporter_spoof = atoi(row[7]);
|
e.reporter_spoof = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.category_id = atoi(row[8]);
|
e.category_id = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.category_name = row[9] ? row[9] : "";
|
e.category_name = row[9] ? row[9] : "";
|
||||||
e.reporter_name = row[10] ? row[10] : "";
|
e.reporter_name = row[10] ? row[10] : "";
|
||||||
e.ui_path = row[11] ? row[11] : "";
|
e.ui_path = row[11] ? row[11] : "";
|
||||||
e.pos_x = static_cast<float>(atof(row[12]));
|
e.pos_x = strtof(row[12], nullptr);
|
||||||
e.pos_y = static_cast<float>(atof(row[13]));
|
e.pos_y = strtof(row[13], nullptr);
|
||||||
e.pos_z = static_cast<float>(atof(row[14]));
|
e.pos_z = strtof(row[14], nullptr);
|
||||||
e.heading = atoi(row[15]);
|
e.heading = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.time_played = atoi(row[16]);
|
e.time_played = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.target_id = atoi(row[17]);
|
e.target_id = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.target_name = row[18] ? row[18] : "";
|
e.target_name = row[18] ? row[18] : "";
|
||||||
e.optional_info_mask = atoi(row[19]);
|
e.optional_info_mask = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e._can_duplicate = atoi(row[20]);
|
e._can_duplicate = static_cast<int8_t>(atoi(row[20]));
|
||||||
e._crash_bug = atoi(row[21]);
|
e._crash_bug = static_cast<int8_t>(atoi(row[21]));
|
||||||
e._target_info = atoi(row[22]);
|
e._target_info = static_cast<int8_t>(atoi(row[22]));
|
||||||
e._character_flags = atoi(row[23]);
|
e._character_flags = static_cast<int8_t>(atoi(row[23]));
|
||||||
e._unknown_value = atoi(row[24]);
|
e._unknown_value = static_cast<int8_t>(atoi(row[24]));
|
||||||
e.bug_report = row[25] ? row[25] : "";
|
e.bug_report = row[25] ? row[25] : "";
|
||||||
e.system_info = row[26] ? row[26] : "";
|
e.system_info = row[26] ? row[26] : "";
|
||||||
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
||||||
e.bug_status = atoi(row[28]);
|
e.bug_status = static_cast<uint8_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.last_review = strtoll(row[29] ? row[29] : "-1", nullptr, 10);
|
e.last_review = strtoll(row[29] ? row[29] : "-1", nullptr, 10);
|
||||||
e.last_reviewer = row[30] ? row[30] : "";
|
e.last_reviewer = row[30] ? row[30] : "";
|
||||||
e.reviewer_notes = row[31] ? row[31] : "";
|
e.reviewer_notes = row[31] ? row[31] : "";
|
||||||
@ -537,35 +537,35 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
BugReports e{};
|
BugReports e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.client_version_id = atoi(row[2]);
|
e.client_version_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.client_version_name = row[3] ? row[3] : "";
|
e.client_version_name = row[3] ? row[3] : "";
|
||||||
e.account_id = atoi(row[4]);
|
e.account_id = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.character_id = atoi(row[5]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.character_name = row[6] ? row[6] : "";
|
e.character_name = row[6] ? row[6] : "";
|
||||||
e.reporter_spoof = atoi(row[7]);
|
e.reporter_spoof = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.category_id = atoi(row[8]);
|
e.category_id = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.category_name = row[9] ? row[9] : "";
|
e.category_name = row[9] ? row[9] : "";
|
||||||
e.reporter_name = row[10] ? row[10] : "";
|
e.reporter_name = row[10] ? row[10] : "";
|
||||||
e.ui_path = row[11] ? row[11] : "";
|
e.ui_path = row[11] ? row[11] : "";
|
||||||
e.pos_x = static_cast<float>(atof(row[12]));
|
e.pos_x = strtof(row[12], nullptr);
|
||||||
e.pos_y = static_cast<float>(atof(row[13]));
|
e.pos_y = strtof(row[13], nullptr);
|
||||||
e.pos_z = static_cast<float>(atof(row[14]));
|
e.pos_z = strtof(row[14], nullptr);
|
||||||
e.heading = atoi(row[15]);
|
e.heading = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.time_played = atoi(row[16]);
|
e.time_played = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.target_id = atoi(row[17]);
|
e.target_id = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.target_name = row[18] ? row[18] : "";
|
e.target_name = row[18] ? row[18] : "";
|
||||||
e.optional_info_mask = atoi(row[19]);
|
e.optional_info_mask = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e._can_duplicate = atoi(row[20]);
|
e._can_duplicate = static_cast<int8_t>(atoi(row[20]));
|
||||||
e._crash_bug = atoi(row[21]);
|
e._crash_bug = static_cast<int8_t>(atoi(row[21]));
|
||||||
e._target_info = atoi(row[22]);
|
e._target_info = static_cast<int8_t>(atoi(row[22]));
|
||||||
e._character_flags = atoi(row[23]);
|
e._character_flags = static_cast<int8_t>(atoi(row[23]));
|
||||||
e._unknown_value = atoi(row[24]);
|
e._unknown_value = static_cast<int8_t>(atoi(row[24]));
|
||||||
e.bug_report = row[25] ? row[25] : "";
|
e.bug_report = row[25] ? row[25] : "";
|
||||||
e.system_info = row[26] ? row[26] : "";
|
e.system_info = row[26] ? row[26] : "";
|
||||||
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
||||||
e.bug_status = atoi(row[28]);
|
e.bug_status = static_cast<uint8_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.last_review = strtoll(row[29] ? row[29] : "-1", nullptr, 10);
|
e.last_review = strtoll(row[29] ? row[29] : "-1", nullptr, 10);
|
||||||
e.last_reviewer = row[30] ? row[30] : "";
|
e.last_reviewer = row[30] ? row[30] : "";
|
||||||
e.reviewer_notes = row[31] ? row[31] : "";
|
e.reviewer_notes = row[31] ? row[31] : "";
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
class BaseBugsRepository {
|
class BaseBugsRepository {
|
||||||
public:
|
public:
|
||||||
struct Bugs {
|
struct Bugs {
|
||||||
int id;
|
uint32_t id;
|
||||||
std::string zone;
|
std::string zone;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string ui;
|
std::string ui;
|
||||||
@ -27,11 +27,11 @@ public:
|
|||||||
float y;
|
float y;
|
||||||
float z;
|
float z;
|
||||||
std::string type;
|
std::string type;
|
||||||
int flag;
|
uint8_t flag;
|
||||||
std::string target;
|
std::string target;
|
||||||
std::string bug;
|
std::string bug;
|
||||||
std::string date;
|
std::string date;
|
||||||
int status;
|
uint8_t status;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -162,19 +162,19 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Bugs e{};
|
Bugs e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.ui = row[3] ? row[3] : "";
|
e.ui = row[3] ? row[3] : "";
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.type = row[7] ? row[7] : "";
|
e.type = row[7] ? row[7] : "";
|
||||||
e.flag = atoi(row[8]);
|
e.flag = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.target = row[9] ? row[9] : "";
|
e.target = row[9] ? row[9] : "";
|
||||||
e.bug = row[10] ? row[10] : "";
|
e.bug = row[10] ? row[10] : "";
|
||||||
e.date = row[11] ? row[11] : "";
|
e.date = row[11] ? row[11] : "";
|
||||||
e.status = atoi(row[12]);
|
e.status = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -329,19 +329,19 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Bugs e{};
|
Bugs e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.ui = row[3] ? row[3] : "";
|
e.ui = row[3] ? row[3] : "";
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.type = row[7] ? row[7] : "";
|
e.type = row[7] ? row[7] : "";
|
||||||
e.flag = atoi(row[8]);
|
e.flag = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.target = row[9] ? row[9] : "";
|
e.target = row[9] ? row[9] : "";
|
||||||
e.bug = row[10] ? row[10] : "";
|
e.bug = row[10] ? row[10] : "";
|
||||||
e.date = row[11] ? row[11] : "";
|
e.date = row[11] ? row[11] : "";
|
||||||
e.status = atoi(row[12]);
|
e.status = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -366,19 +366,19 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Bugs e{};
|
Bugs e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone = row[1] ? row[1] : "";
|
e.zone = row[1] ? row[1] : "";
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.ui = row[3] ? row[3] : "";
|
e.ui = row[3] ? row[3] : "";
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.type = row[7] ? row[7] : "";
|
e.type = row[7] ? row[7] : "";
|
||||||
e.flag = atoi(row[8]);
|
e.flag = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.target = row[9] ? row[9] : "";
|
e.target = row[9] ? row[9] : "";
|
||||||
e.bug = row[10] ? row[10] : "";
|
e.bug = row[10] ? row[10] : "";
|
||||||
e.date = row[11] ? row[11] : "";
|
e.date = row[11] ? row[11] : "";
|
||||||
e.status = atoi(row[12]);
|
e.status = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
class BaseBuyerRepository {
|
class BaseBuyerRepository {
|
||||||
public:
|
public:
|
||||||
struct Buyer {
|
struct Buyer {
|
||||||
int charid;
|
int32_t charid;
|
||||||
int buyslot;
|
int32_t buyslot;
|
||||||
int itemid;
|
int32_t itemid;
|
||||||
std::string itemname;
|
std::string itemname;
|
||||||
int quantity;
|
int32_t quantity;
|
||||||
int price;
|
int32_t price;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -134,12 +134,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Buyer e{};
|
Buyer e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.buyslot = atoi(row[1]);
|
e.buyslot = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.itemid = atoi(row[2]);
|
e.itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.itemname = row[3] ? row[3] : "";
|
e.itemname = row[3] ? row[3] : "";
|
||||||
e.quantity = atoi(row[4]);
|
e.quantity = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.price = atoi(row[5]);
|
e.price = static_cast<int32_t>(atoi(row[5]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -274,12 +274,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Buyer e{};
|
Buyer e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.buyslot = atoi(row[1]);
|
e.buyslot = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.itemid = atoi(row[2]);
|
e.itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.itemname = row[3] ? row[3] : "";
|
e.itemname = row[3] ? row[3] : "";
|
||||||
e.quantity = atoi(row[4]);
|
e.quantity = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.price = atoi(row[5]);
|
e.price = static_cast<int32_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -304,12 +304,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Buyer e{};
|
Buyer e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.buyslot = atoi(row[1]);
|
e.buyslot = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.itemid = atoi(row[2]);
|
e.itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.itemname = row[3] ? row[3] : "";
|
e.itemname = row[3] ? row[3] : "";
|
||||||
e.quantity = atoi(row[4]);
|
e.quantity = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.price = atoi(row[5]);
|
e.price = static_cast<int32_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
class BaseCharCreateCombinationsRepository {
|
class BaseCharCreateCombinationsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharCreateCombinations {
|
struct CharCreateCombinations {
|
||||||
int allocation_id;
|
uint32_t allocation_id;
|
||||||
int race;
|
uint32_t race;
|
||||||
int class_;
|
uint32_t class_;
|
||||||
int deity;
|
uint32_t deity;
|
||||||
int start_zone;
|
uint32_t start_zone;
|
||||||
int expansions_req;
|
uint32_t expansions_req;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -134,12 +134,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharCreateCombinations e{};
|
CharCreateCombinations e{};
|
||||||
|
|
||||||
e.allocation_id = atoi(row[0]);
|
e.allocation_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.race = atoi(row[1]);
|
e.race = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.class_ = atoi(row[2]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.deity = atoi(row[3]);
|
e.deity = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.start_zone = atoi(row[4]);
|
e.start_zone = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.expansions_req = atoi(row[5]);
|
e.expansions_req = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -274,12 +274,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharCreateCombinations e{};
|
CharCreateCombinations e{};
|
||||||
|
|
||||||
e.allocation_id = atoi(row[0]);
|
e.allocation_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.race = atoi(row[1]);
|
e.race = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.class_ = atoi(row[2]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.deity = atoi(row[3]);
|
e.deity = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.start_zone = atoi(row[4]);
|
e.start_zone = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.expansions_req = atoi(row[5]);
|
e.expansions_req = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -304,12 +304,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharCreateCombinations e{};
|
CharCreateCombinations e{};
|
||||||
|
|
||||||
e.allocation_id = atoi(row[0]);
|
e.allocation_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.race = atoi(row[1]);
|
e.race = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.class_ = atoi(row[2]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.deity = atoi(row[3]);
|
e.deity = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.start_zone = atoi(row[4]);
|
e.start_zone = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.expansions_req = atoi(row[5]);
|
e.expansions_req = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,21 +19,21 @@
|
|||||||
class BaseCharCreatePointAllocationsRepository {
|
class BaseCharCreatePointAllocationsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharCreatePointAllocations {
|
struct CharCreatePointAllocations {
|
||||||
int id;
|
uint32_t id;
|
||||||
int base_str;
|
uint32_t base_str;
|
||||||
int base_sta;
|
uint32_t base_sta;
|
||||||
int base_dex;
|
uint32_t base_dex;
|
||||||
int base_agi;
|
uint32_t base_agi;
|
||||||
int base_int;
|
uint32_t base_int;
|
||||||
int base_wis;
|
uint32_t base_wis;
|
||||||
int base_cha;
|
uint32_t base_cha;
|
||||||
int alloc_str;
|
uint32_t alloc_str;
|
||||||
int alloc_sta;
|
uint32_t alloc_sta;
|
||||||
int alloc_dex;
|
uint32_t alloc_dex;
|
||||||
int alloc_agi;
|
uint32_t alloc_agi;
|
||||||
int alloc_int;
|
uint32_t alloc_int;
|
||||||
int alloc_wis;
|
uint32_t alloc_wis;
|
||||||
int alloc_cha;
|
uint32_t alloc_cha;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -170,21 +170,21 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharCreatePointAllocations e{};
|
CharCreatePointAllocations e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.base_str = atoi(row[1]);
|
e.base_str = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.base_sta = atoi(row[2]);
|
e.base_sta = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.base_dex = atoi(row[3]);
|
e.base_dex = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.base_agi = atoi(row[4]);
|
e.base_agi = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.base_int = atoi(row[5]);
|
e.base_int = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.base_wis = atoi(row[6]);
|
e.base_wis = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.base_cha = atoi(row[7]);
|
e.base_cha = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.alloc_str = atoi(row[8]);
|
e.alloc_str = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.alloc_sta = atoi(row[9]);
|
e.alloc_sta = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.alloc_dex = atoi(row[10]);
|
e.alloc_dex = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.alloc_agi = atoi(row[11]);
|
e.alloc_agi = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.alloc_int = atoi(row[12]);
|
e.alloc_int = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.alloc_wis = atoi(row[13]);
|
e.alloc_wis = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.alloc_cha = atoi(row[14]);
|
e.alloc_cha = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -346,21 +346,21 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharCreatePointAllocations e{};
|
CharCreatePointAllocations e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.base_str = atoi(row[1]);
|
e.base_str = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.base_sta = atoi(row[2]);
|
e.base_sta = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.base_dex = atoi(row[3]);
|
e.base_dex = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.base_agi = atoi(row[4]);
|
e.base_agi = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.base_int = atoi(row[5]);
|
e.base_int = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.base_wis = atoi(row[6]);
|
e.base_wis = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.base_cha = atoi(row[7]);
|
e.base_cha = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.alloc_str = atoi(row[8]);
|
e.alloc_str = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.alloc_sta = atoi(row[9]);
|
e.alloc_sta = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.alloc_dex = atoi(row[10]);
|
e.alloc_dex = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.alloc_agi = atoi(row[11]);
|
e.alloc_agi = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.alloc_int = atoi(row[12]);
|
e.alloc_int = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.alloc_wis = atoi(row[13]);
|
e.alloc_wis = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.alloc_cha = atoi(row[14]);
|
e.alloc_cha = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -385,21 +385,21 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharCreatePointAllocations e{};
|
CharCreatePointAllocations e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.base_str = atoi(row[1]);
|
e.base_str = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.base_sta = atoi(row[2]);
|
e.base_sta = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.base_dex = atoi(row[3]);
|
e.base_dex = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.base_agi = atoi(row[4]);
|
e.base_agi = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.base_int = atoi(row[5]);
|
e.base_int = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.base_wis = atoi(row[6]);
|
e.base_wis = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.base_cha = atoi(row[7]);
|
e.base_cha = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.alloc_str = atoi(row[8]);
|
e.alloc_str = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.alloc_sta = atoi(row[9]);
|
e.alloc_sta = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.alloc_dex = atoi(row[10]);
|
e.alloc_dex = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.alloc_agi = atoi(row[11]);
|
e.alloc_agi = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.alloc_int = atoi(row[12]);
|
e.alloc_int = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.alloc_wis = atoi(row[13]);
|
e.alloc_wis = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.alloc_cha = atoi(row[14]);
|
e.alloc_cha = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharRecipeListRepository {
|
class BaseCharRecipeListRepository {
|
||||||
public:
|
public:
|
||||||
struct CharRecipeList {
|
struct CharRecipeList {
|
||||||
int char_id;
|
int32_t char_id;
|
||||||
int recipe_id;
|
int32_t recipe_id;
|
||||||
int madecount;
|
int32_t madecount;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharRecipeList e{};
|
CharRecipeList e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.recipe_id = atoi(row[1]);
|
e.recipe_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.madecount = atoi(row[2]);
|
e.madecount = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharRecipeList e{};
|
CharRecipeList e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.recipe_id = atoi(row[1]);
|
e.recipe_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.madecount = atoi(row[2]);
|
e.madecount = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharRecipeList e{};
|
CharRecipeList e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.recipe_id = atoi(row[1]);
|
e.recipe_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.madecount = atoi(row[2]);
|
e.madecount = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
class BaseCharacterActivitiesRepository {
|
class BaseCharacterActivitiesRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterActivities {
|
struct CharacterActivities {
|
||||||
int charid;
|
uint32_t charid;
|
||||||
int taskid;
|
uint32_t taskid;
|
||||||
int activityid;
|
uint32_t activityid;
|
||||||
int donecount;
|
uint32_t donecount;
|
||||||
int completed;
|
int8_t completed;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -130,11 +130,11 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterActivities e{};
|
CharacterActivities e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.taskid = atoi(row[1]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.activityid = atoi(row[2]);
|
e.activityid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.donecount = atoi(row[3]);
|
e.donecount = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.completed = atoi(row[4]);
|
e.completed = static_cast<int8_t>(atoi(row[4]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -266,11 +266,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterActivities e{};
|
CharacterActivities e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.taskid = atoi(row[1]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.activityid = atoi(row[2]);
|
e.activityid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.donecount = atoi(row[3]);
|
e.donecount = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.completed = atoi(row[4]);
|
e.completed = static_cast<int8_t>(atoi(row[4]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -295,11 +295,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterActivities e{};
|
CharacterActivities e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.taskid = atoi(row[1]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.activityid = atoi(row[2]);
|
e.activityid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.donecount = atoi(row[3]);
|
e.donecount = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.completed = atoi(row[4]);
|
e.completed = static_cast<int8_t>(atoi(row[4]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterAltCurrencyRepository {
|
class BaseCharacterAltCurrencyRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterAltCurrency {
|
struct CharacterAltCurrency {
|
||||||
int char_id;
|
uint32_t char_id;
|
||||||
int currency_id;
|
uint32_t currency_id;
|
||||||
int amount;
|
uint32_t amount;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterAltCurrency e{};
|
CharacterAltCurrency e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.currency_id = atoi(row[1]);
|
e.currency_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.amount = atoi(row[2]);
|
e.amount = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterAltCurrency e{};
|
CharacterAltCurrency e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.currency_id = atoi(row[1]);
|
e.currency_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.amount = atoi(row[2]);
|
e.amount = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterAltCurrency e{};
|
CharacterAltCurrency e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.currency_id = atoi(row[1]);
|
e.currency_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.amount = atoi(row[2]);
|
e.amount = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseCharacterAlternateAbilitiesRepository {
|
class BaseCharacterAlternateAbilitiesRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterAlternateAbilities {
|
struct CharacterAlternateAbilities {
|
||||||
int id;
|
uint32_t id;
|
||||||
int aa_id;
|
uint16_t aa_id;
|
||||||
int aa_value;
|
uint16_t aa_value;
|
||||||
int charges;
|
uint16_t charges;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterAlternateAbilities e{};
|
CharacterAlternateAbilities e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.aa_id = atoi(row[1]);
|
e.aa_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.aa_value = atoi(row[2]);
|
e.aa_value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterAlternateAbilities e{};
|
CharacterAlternateAbilities e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.aa_id = atoi(row[1]);
|
e.aa_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.aa_value = atoi(row[2]);
|
e.aa_value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterAlternateAbilities e{};
|
CharacterAlternateAbilities e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.aa_id = atoi(row[1]);
|
e.aa_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.aa_value = atoi(row[2]);
|
e.aa_value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterAurasRepository {
|
class BaseCharacterAurasRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterAuras {
|
struct CharacterAuras {
|
||||||
int id;
|
int32_t id;
|
||||||
int slot;
|
int8_t slot;
|
||||||
int spell_id;
|
int32_t spell_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterAuras e{};
|
CharacterAuras e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<int8_t>(atoi(row[1]));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterAuras e{};
|
CharacterAuras e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<int8_t>(atoi(row[1]));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterAuras e{};
|
CharacterAuras e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<int8_t>(atoi(row[1]));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
class BaseCharacterBandolierRepository {
|
class BaseCharacterBandolierRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterBandolier {
|
struct CharacterBandolier {
|
||||||
int id;
|
uint32_t id;
|
||||||
int bandolier_id;
|
uint8_t bandolier_id;
|
||||||
int bandolier_slot;
|
uint8_t bandolier_slot;
|
||||||
int item_id;
|
uint32_t item_id;
|
||||||
int icon;
|
uint32_t icon;
|
||||||
std::string bandolier_name;
|
std::string bandolier_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -134,11 +134,11 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterBandolier e{};
|
CharacterBandolier e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.bandolier_id = atoi(row[1]);
|
e.bandolier_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.bandolier_slot = atoi(row[2]);
|
e.bandolier_slot = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.item_id = atoi(row[3]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.icon = atoi(row[4]);
|
e.icon = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.bandolier_name = row[5] ? row[5] : "";
|
e.bandolier_name = row[5] ? row[5] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -274,11 +274,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterBandolier e{};
|
CharacterBandolier e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.bandolier_id = atoi(row[1]);
|
e.bandolier_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.bandolier_slot = atoi(row[2]);
|
e.bandolier_slot = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.item_id = atoi(row[3]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.icon = atoi(row[4]);
|
e.icon = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.bandolier_name = row[5] ? row[5] : "";
|
e.bandolier_name = row[5] ? row[5] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -304,11 +304,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterBandolier e{};
|
CharacterBandolier e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.bandolier_id = atoi(row[1]);
|
e.bandolier_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.bandolier_slot = atoi(row[2]);
|
e.bandolier_slot = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.item_id = atoi(row[3]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.icon = atoi(row[4]);
|
e.icon = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.bandolier_name = row[5] ? row[5] : "";
|
e.bandolier_name = row[5] ? row[5] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseCharacterBindRepository {
|
class BaseCharacterBindRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterBind {
|
struct CharacterBind {
|
||||||
int id;
|
uint32_t id;
|
||||||
int slot;
|
int32_t slot;
|
||||||
int zone_id;
|
uint16_t zone_id;
|
||||||
int instance_id;
|
uint32_t instance_id;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
float z;
|
float z;
|
||||||
@ -142,14 +142,14 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterBind e{};
|
CharacterBind e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.zone_id = atoi(row[2]);
|
e.zone_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.instance_id = atoi(row[3]);
|
e.instance_id = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[7]));
|
e.heading = strtof(row[7], nullptr);
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -289,14 +289,14 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterBind e{};
|
CharacterBind e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.zone_id = atoi(row[2]);
|
e.zone_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.instance_id = atoi(row[3]);
|
e.instance_id = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[7]));
|
e.heading = strtof(row[7], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -321,14 +321,14 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterBind e{};
|
CharacterBind e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.zone_id = atoi(row[2]);
|
e.zone_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.instance_id = atoi(row[3]);
|
e.instance_id = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.x = static_cast<float>(atof(row[4]));
|
e.x = strtof(row[4], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[5]));
|
e.y = strtof(row[5], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[6]));
|
e.z = strtof(row[6], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[7]));
|
e.heading = strtof(row[7], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,23 +19,23 @@
|
|||||||
class BaseCharacterBuffsRepository {
|
class BaseCharacterBuffsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterBuffs {
|
struct CharacterBuffs {
|
||||||
int character_id;
|
uint32_t character_id;
|
||||||
int slot_id;
|
uint8_t slot_id;
|
||||||
int spell_id;
|
uint16_t spell_id;
|
||||||
int caster_level;
|
uint8_t caster_level;
|
||||||
std::string caster_name;
|
std::string caster_name;
|
||||||
int ticsremaining;
|
int32_t ticsremaining;
|
||||||
int counters;
|
uint32_t counters;
|
||||||
int numhits;
|
uint32_t numhits;
|
||||||
int melee_rune;
|
uint32_t melee_rune;
|
||||||
int magic_rune;
|
uint32_t magic_rune;
|
||||||
int persistent;
|
uint8_t persistent;
|
||||||
int dot_rune;
|
int32_t dot_rune;
|
||||||
int caston_x;
|
int32_t caston_x;
|
||||||
int caston_y;
|
int32_t caston_y;
|
||||||
int caston_z;
|
int32_t caston_z;
|
||||||
int ExtraDIChance;
|
int32_t ExtraDIChance;
|
||||||
int instrument_mod;
|
int32_t instrument_mod;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -178,23 +178,23 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterBuffs e{};
|
CharacterBuffs e{};
|
||||||
|
|
||||||
e.character_id = atoi(row[0]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.caster_level = atoi(row[3]);
|
e.caster_level = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.caster_name = row[4] ? row[4] : "";
|
e.caster_name = row[4] ? row[4] : "";
|
||||||
e.ticsremaining = atoi(row[5]);
|
e.ticsremaining = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.counters = atoi(row[6]);
|
e.counters = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.numhits = atoi(row[7]);
|
e.numhits = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.melee_rune = atoi(row[8]);
|
e.melee_rune = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.magic_rune = atoi(row[9]);
|
e.magic_rune = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.persistent = atoi(row[10]);
|
e.persistent = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.dot_rune = atoi(row[11]);
|
e.dot_rune = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.caston_x = atoi(row[12]);
|
e.caston_x = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.caston_y = atoi(row[13]);
|
e.caston_y = static_cast<int32_t>(atoi(row[13]));
|
||||||
e.caston_z = atoi(row[14]);
|
e.caston_z = static_cast<int32_t>(atoi(row[14]));
|
||||||
e.ExtraDIChance = atoi(row[15]);
|
e.ExtraDIChance = static_cast<int32_t>(atoi(row[15]));
|
||||||
e.instrument_mod = atoi(row[16]);
|
e.instrument_mod = static_cast<int32_t>(atoi(row[16]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -362,23 +362,23 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterBuffs e{};
|
CharacterBuffs e{};
|
||||||
|
|
||||||
e.character_id = atoi(row[0]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.caster_level = atoi(row[3]);
|
e.caster_level = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.caster_name = row[4] ? row[4] : "";
|
e.caster_name = row[4] ? row[4] : "";
|
||||||
e.ticsremaining = atoi(row[5]);
|
e.ticsremaining = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.counters = atoi(row[6]);
|
e.counters = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.numhits = atoi(row[7]);
|
e.numhits = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.melee_rune = atoi(row[8]);
|
e.melee_rune = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.magic_rune = atoi(row[9]);
|
e.magic_rune = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.persistent = atoi(row[10]);
|
e.persistent = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.dot_rune = atoi(row[11]);
|
e.dot_rune = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.caston_x = atoi(row[12]);
|
e.caston_x = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.caston_y = atoi(row[13]);
|
e.caston_y = static_cast<int32_t>(atoi(row[13]));
|
||||||
e.caston_z = atoi(row[14]);
|
e.caston_z = static_cast<int32_t>(atoi(row[14]));
|
||||||
e.ExtraDIChance = atoi(row[15]);
|
e.ExtraDIChance = static_cast<int32_t>(atoi(row[15]));
|
||||||
e.instrument_mod = atoi(row[16]);
|
e.instrument_mod = static_cast<int32_t>(atoi(row[16]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -403,23 +403,23 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterBuffs e{};
|
CharacterBuffs e{};
|
||||||
|
|
||||||
e.character_id = atoi(row[0]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.caster_level = atoi(row[3]);
|
e.caster_level = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.caster_name = row[4] ? row[4] : "";
|
e.caster_name = row[4] ? row[4] : "";
|
||||||
e.ticsremaining = atoi(row[5]);
|
e.ticsremaining = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.counters = atoi(row[6]);
|
e.counters = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.numhits = atoi(row[7]);
|
e.numhits = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.melee_rune = atoi(row[8]);
|
e.melee_rune = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.magic_rune = atoi(row[9]);
|
e.magic_rune = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.persistent = atoi(row[10]);
|
e.persistent = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.dot_rune = atoi(row[11]);
|
e.dot_rune = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.caston_x = atoi(row[12]);
|
e.caston_x = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.caston_y = atoi(row[13]);
|
e.caston_y = static_cast<int32_t>(atoi(row[13]));
|
||||||
e.caston_z = atoi(row[14]);
|
e.caston_z = static_cast<int32_t>(atoi(row[14]));
|
||||||
e.ExtraDIChance = atoi(row[15]);
|
e.ExtraDIChance = static_cast<int32_t>(atoi(row[15]));
|
||||||
e.instrument_mod = atoi(row[16]);
|
e.instrument_mod = static_cast<int32_t>(atoi(row[16]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,17 +19,17 @@
|
|||||||
class BaseCharacterCorpseItemsRepository {
|
class BaseCharacterCorpseItemsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterCorpseItems {
|
struct CharacterCorpseItems {
|
||||||
int corpse_id;
|
uint32_t corpse_id;
|
||||||
int equip_slot;
|
uint32_t equip_slot;
|
||||||
int item_id;
|
uint32_t item_id;
|
||||||
int charges;
|
uint32_t charges;
|
||||||
int aug_1;
|
uint32_t aug_1;
|
||||||
int aug_2;
|
uint32_t aug_2;
|
||||||
int aug_3;
|
uint32_t aug_3;
|
||||||
int aug_4;
|
uint32_t aug_4;
|
||||||
int aug_5;
|
uint32_t aug_5;
|
||||||
int aug_6;
|
int32_t aug_6;
|
||||||
int attuned;
|
int16_t attuned;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -154,17 +154,17 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterCorpseItems e{};
|
CharacterCorpseItems e{};
|
||||||
|
|
||||||
e.corpse_id = atoi(row[0]);
|
e.corpse_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.equip_slot = atoi(row[1]);
|
e.equip_slot = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.item_id = atoi(row[2]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.aug_1 = atoi(row[4]);
|
e.aug_1 = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.aug_2 = atoi(row[5]);
|
e.aug_2 = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.aug_3 = atoi(row[6]);
|
e.aug_3 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.aug_4 = atoi(row[7]);
|
e.aug_4 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.aug_5 = atoi(row[8]);
|
e.aug_5 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.aug_6 = atoi(row[9]);
|
e.aug_6 = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.attuned = atoi(row[10]);
|
e.attuned = static_cast<int16_t>(atoi(row[10]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -314,17 +314,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterCorpseItems e{};
|
CharacterCorpseItems e{};
|
||||||
|
|
||||||
e.corpse_id = atoi(row[0]);
|
e.corpse_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.equip_slot = atoi(row[1]);
|
e.equip_slot = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.item_id = atoi(row[2]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.aug_1 = atoi(row[4]);
|
e.aug_1 = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.aug_2 = atoi(row[5]);
|
e.aug_2 = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.aug_3 = atoi(row[6]);
|
e.aug_3 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.aug_4 = atoi(row[7]);
|
e.aug_4 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.aug_5 = atoi(row[8]);
|
e.aug_5 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.aug_6 = atoi(row[9]);
|
e.aug_6 = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.attuned = atoi(row[10]);
|
e.attuned = static_cast<int16_t>(atoi(row[10]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -349,17 +349,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterCorpseItems e{};
|
CharacterCorpseItems e{};
|
||||||
|
|
||||||
e.corpse_id = atoi(row[0]);
|
e.corpse_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.equip_slot = atoi(row[1]);
|
e.equip_slot = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.item_id = atoi(row[2]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.aug_1 = atoi(row[4]);
|
e.aug_1 = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.aug_2 = atoi(row[5]);
|
e.aug_2 = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.aug_3 = atoi(row[6]);
|
e.aug_3 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.aug_4 = atoi(row[7]);
|
e.aug_4 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.aug_5 = atoi(row[8]);
|
e.aug_5 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.aug_6 = atoi(row[9]);
|
e.aug_6 = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.attuned = atoi(row[10]);
|
e.attuned = static_cast<int16_t>(atoi(row[10]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,53 +19,53 @@
|
|||||||
class BaseCharacterCorpsesRepository {
|
class BaseCharacterCorpsesRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterCorpses {
|
struct CharacterCorpses {
|
||||||
int id;
|
uint32_t id;
|
||||||
int charid;
|
uint32_t charid;
|
||||||
std::string charname;
|
std::string charname;
|
||||||
int zone_id;
|
int16_t zone_id;
|
||||||
int instance_id;
|
uint16_t instance_id;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
float z;
|
float z;
|
||||||
float heading;
|
float heading;
|
||||||
time_t time_of_death;
|
time_t time_of_death;
|
||||||
int guild_consent_id;
|
uint32_t guild_consent_id;
|
||||||
int is_rezzed;
|
uint8_t is_rezzed;
|
||||||
int is_buried;
|
int8_t is_buried;
|
||||||
int was_at_graveyard;
|
int8_t was_at_graveyard;
|
||||||
int is_locked;
|
int8_t is_locked;
|
||||||
int exp;
|
uint32_t exp;
|
||||||
int size;
|
uint32_t size;
|
||||||
int level;
|
uint32_t level;
|
||||||
int race;
|
uint32_t race;
|
||||||
int gender;
|
uint32_t gender;
|
||||||
int class_;
|
uint32_t class_;
|
||||||
int deity;
|
uint32_t deity;
|
||||||
int texture;
|
uint32_t texture;
|
||||||
int helm_texture;
|
uint32_t helm_texture;
|
||||||
int copper;
|
uint32_t copper;
|
||||||
int silver;
|
uint32_t silver;
|
||||||
int gold;
|
uint32_t gold;
|
||||||
int platinum;
|
uint32_t platinum;
|
||||||
int hair_color;
|
uint32_t hair_color;
|
||||||
int beard_color;
|
uint32_t beard_color;
|
||||||
int eye_color_1;
|
uint32_t eye_color_1;
|
||||||
int eye_color_2;
|
uint32_t eye_color_2;
|
||||||
int hair_style;
|
uint32_t hair_style;
|
||||||
int face;
|
uint32_t face;
|
||||||
int beard;
|
uint32_t beard;
|
||||||
int drakkin_heritage;
|
uint32_t drakkin_heritage;
|
||||||
int drakkin_tattoo;
|
uint32_t drakkin_tattoo;
|
||||||
int drakkin_details;
|
uint32_t drakkin_details;
|
||||||
int wc_1;
|
uint32_t wc_1;
|
||||||
int wc_2;
|
uint32_t wc_2;
|
||||||
int wc_3;
|
uint32_t wc_3;
|
||||||
int wc_4;
|
uint32_t wc_4;
|
||||||
int wc_5;
|
uint32_t wc_5;
|
||||||
int wc_6;
|
uint32_t wc_6;
|
||||||
int wc_7;
|
uint32_t wc_7;
|
||||||
int wc_8;
|
uint32_t wc_8;
|
||||||
int wc_9;
|
uint32_t wc_9;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -298,53 +298,53 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterCorpses e{};
|
CharacterCorpses e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.charname = row[2] ? row[2] : "";
|
e.charname = row[2] ? row[2] : "";
|
||||||
e.zone_id = atoi(row[3]);
|
e.zone_id = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.instance_id = atoi(row[4]);
|
e.instance_id = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.x = static_cast<float>(atof(row[5]));
|
e.x = strtof(row[5], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[6]));
|
e.y = strtof(row[6], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[7]));
|
e.z = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
||||||
e.guild_consent_id = atoi(row[10]);
|
e.guild_consent_id = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.is_rezzed = atoi(row[11]);
|
e.is_rezzed = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.is_buried = atoi(row[12]);
|
e.is_buried = static_cast<int8_t>(atoi(row[12]));
|
||||||
e.was_at_graveyard = atoi(row[13]);
|
e.was_at_graveyard = static_cast<int8_t>(atoi(row[13]));
|
||||||
e.is_locked = atoi(row[14]);
|
e.is_locked = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.exp = atoi(row[15]);
|
e.exp = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.size = atoi(row[16]);
|
e.size = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.level = atoi(row[17]);
|
e.level = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.race = atoi(row[18]);
|
e.race = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.gender = atoi(row[19]);
|
e.gender = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.class_ = atoi(row[20]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.deity = atoi(row[21]);
|
e.deity = static_cast<uint32_t>(strtoul(row[21], nullptr, 10));
|
||||||
e.texture = atoi(row[22]);
|
e.texture = static_cast<uint32_t>(strtoul(row[22], nullptr, 10));
|
||||||
e.helm_texture = atoi(row[23]);
|
e.helm_texture = static_cast<uint32_t>(strtoul(row[23], nullptr, 10));
|
||||||
e.copper = atoi(row[24]);
|
e.copper = static_cast<uint32_t>(strtoul(row[24], nullptr, 10));
|
||||||
e.silver = atoi(row[25]);
|
e.silver = static_cast<uint32_t>(strtoul(row[25], nullptr, 10));
|
||||||
e.gold = atoi(row[26]);
|
e.gold = static_cast<uint32_t>(strtoul(row[26], nullptr, 10));
|
||||||
e.platinum = atoi(row[27]);
|
e.platinum = static_cast<uint32_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.hair_color = atoi(row[28]);
|
e.hair_color = static_cast<uint32_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.beard_color = atoi(row[29]);
|
e.beard_color = static_cast<uint32_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.eye_color_1 = atoi(row[30]);
|
e.eye_color_1 = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
e.eye_color_2 = atoi(row[31]);
|
e.eye_color_2 = static_cast<uint32_t>(strtoul(row[31], nullptr, 10));
|
||||||
e.hair_style = atoi(row[32]);
|
e.hair_style = static_cast<uint32_t>(strtoul(row[32], nullptr, 10));
|
||||||
e.face = atoi(row[33]);
|
e.face = static_cast<uint32_t>(strtoul(row[33], nullptr, 10));
|
||||||
e.beard = atoi(row[34]);
|
e.beard = static_cast<uint32_t>(strtoul(row[34], nullptr, 10));
|
||||||
e.drakkin_heritage = atoi(row[35]);
|
e.drakkin_heritage = static_cast<uint32_t>(strtoul(row[35], nullptr, 10));
|
||||||
e.drakkin_tattoo = atoi(row[36]);
|
e.drakkin_tattoo = static_cast<uint32_t>(strtoul(row[36], nullptr, 10));
|
||||||
e.drakkin_details = atoi(row[37]);
|
e.drakkin_details = static_cast<uint32_t>(strtoul(row[37], nullptr, 10));
|
||||||
e.wc_1 = atoi(row[38]);
|
e.wc_1 = static_cast<uint32_t>(strtoul(row[38], nullptr, 10));
|
||||||
e.wc_2 = atoi(row[39]);
|
e.wc_2 = static_cast<uint32_t>(strtoul(row[39], nullptr, 10));
|
||||||
e.wc_3 = atoi(row[40]);
|
e.wc_3 = static_cast<uint32_t>(strtoul(row[40], nullptr, 10));
|
||||||
e.wc_4 = atoi(row[41]);
|
e.wc_4 = static_cast<uint32_t>(strtoul(row[41], nullptr, 10));
|
||||||
e.wc_5 = atoi(row[42]);
|
e.wc_5 = static_cast<uint32_t>(strtoul(row[42], nullptr, 10));
|
||||||
e.wc_6 = atoi(row[43]);
|
e.wc_6 = static_cast<uint32_t>(strtoul(row[43], nullptr, 10));
|
||||||
e.wc_7 = atoi(row[44]);
|
e.wc_7 = static_cast<uint32_t>(strtoul(row[44], nullptr, 10));
|
||||||
e.wc_8 = atoi(row[45]);
|
e.wc_8 = static_cast<uint32_t>(strtoul(row[45], nullptr, 10));
|
||||||
e.wc_9 = atoi(row[46]);
|
e.wc_9 = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -601,53 +601,53 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterCorpses e{};
|
CharacterCorpses e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.charname = row[2] ? row[2] : "";
|
e.charname = row[2] ? row[2] : "";
|
||||||
e.zone_id = atoi(row[3]);
|
e.zone_id = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.instance_id = atoi(row[4]);
|
e.instance_id = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.x = static_cast<float>(atof(row[5]));
|
e.x = strtof(row[5], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[6]));
|
e.y = strtof(row[6], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[7]));
|
e.z = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
||||||
e.guild_consent_id = atoi(row[10]);
|
e.guild_consent_id = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.is_rezzed = atoi(row[11]);
|
e.is_rezzed = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.is_buried = atoi(row[12]);
|
e.is_buried = static_cast<int8_t>(atoi(row[12]));
|
||||||
e.was_at_graveyard = atoi(row[13]);
|
e.was_at_graveyard = static_cast<int8_t>(atoi(row[13]));
|
||||||
e.is_locked = atoi(row[14]);
|
e.is_locked = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.exp = atoi(row[15]);
|
e.exp = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.size = atoi(row[16]);
|
e.size = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.level = atoi(row[17]);
|
e.level = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.race = atoi(row[18]);
|
e.race = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.gender = atoi(row[19]);
|
e.gender = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.class_ = atoi(row[20]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.deity = atoi(row[21]);
|
e.deity = static_cast<uint32_t>(strtoul(row[21], nullptr, 10));
|
||||||
e.texture = atoi(row[22]);
|
e.texture = static_cast<uint32_t>(strtoul(row[22], nullptr, 10));
|
||||||
e.helm_texture = atoi(row[23]);
|
e.helm_texture = static_cast<uint32_t>(strtoul(row[23], nullptr, 10));
|
||||||
e.copper = atoi(row[24]);
|
e.copper = static_cast<uint32_t>(strtoul(row[24], nullptr, 10));
|
||||||
e.silver = atoi(row[25]);
|
e.silver = static_cast<uint32_t>(strtoul(row[25], nullptr, 10));
|
||||||
e.gold = atoi(row[26]);
|
e.gold = static_cast<uint32_t>(strtoul(row[26], nullptr, 10));
|
||||||
e.platinum = atoi(row[27]);
|
e.platinum = static_cast<uint32_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.hair_color = atoi(row[28]);
|
e.hair_color = static_cast<uint32_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.beard_color = atoi(row[29]);
|
e.beard_color = static_cast<uint32_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.eye_color_1 = atoi(row[30]);
|
e.eye_color_1 = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
e.eye_color_2 = atoi(row[31]);
|
e.eye_color_2 = static_cast<uint32_t>(strtoul(row[31], nullptr, 10));
|
||||||
e.hair_style = atoi(row[32]);
|
e.hair_style = static_cast<uint32_t>(strtoul(row[32], nullptr, 10));
|
||||||
e.face = atoi(row[33]);
|
e.face = static_cast<uint32_t>(strtoul(row[33], nullptr, 10));
|
||||||
e.beard = atoi(row[34]);
|
e.beard = static_cast<uint32_t>(strtoul(row[34], nullptr, 10));
|
||||||
e.drakkin_heritage = atoi(row[35]);
|
e.drakkin_heritage = static_cast<uint32_t>(strtoul(row[35], nullptr, 10));
|
||||||
e.drakkin_tattoo = atoi(row[36]);
|
e.drakkin_tattoo = static_cast<uint32_t>(strtoul(row[36], nullptr, 10));
|
||||||
e.drakkin_details = atoi(row[37]);
|
e.drakkin_details = static_cast<uint32_t>(strtoul(row[37], nullptr, 10));
|
||||||
e.wc_1 = atoi(row[38]);
|
e.wc_1 = static_cast<uint32_t>(strtoul(row[38], nullptr, 10));
|
||||||
e.wc_2 = atoi(row[39]);
|
e.wc_2 = static_cast<uint32_t>(strtoul(row[39], nullptr, 10));
|
||||||
e.wc_3 = atoi(row[40]);
|
e.wc_3 = static_cast<uint32_t>(strtoul(row[40], nullptr, 10));
|
||||||
e.wc_4 = atoi(row[41]);
|
e.wc_4 = static_cast<uint32_t>(strtoul(row[41], nullptr, 10));
|
||||||
e.wc_5 = atoi(row[42]);
|
e.wc_5 = static_cast<uint32_t>(strtoul(row[42], nullptr, 10));
|
||||||
e.wc_6 = atoi(row[43]);
|
e.wc_6 = static_cast<uint32_t>(strtoul(row[43], nullptr, 10));
|
||||||
e.wc_7 = atoi(row[44]);
|
e.wc_7 = static_cast<uint32_t>(strtoul(row[44], nullptr, 10));
|
||||||
e.wc_8 = atoi(row[45]);
|
e.wc_8 = static_cast<uint32_t>(strtoul(row[45], nullptr, 10));
|
||||||
e.wc_9 = atoi(row[46]);
|
e.wc_9 = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -672,53 +672,53 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterCorpses e{};
|
CharacterCorpses e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.charname = row[2] ? row[2] : "";
|
e.charname = row[2] ? row[2] : "";
|
||||||
e.zone_id = atoi(row[3]);
|
e.zone_id = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.instance_id = atoi(row[4]);
|
e.instance_id = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.x = static_cast<float>(atof(row[5]));
|
e.x = strtof(row[5], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[6]));
|
e.y = strtof(row[6], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[7]));
|
e.z = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
||||||
e.guild_consent_id = atoi(row[10]);
|
e.guild_consent_id = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.is_rezzed = atoi(row[11]);
|
e.is_rezzed = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.is_buried = atoi(row[12]);
|
e.is_buried = static_cast<int8_t>(atoi(row[12]));
|
||||||
e.was_at_graveyard = atoi(row[13]);
|
e.was_at_graveyard = static_cast<int8_t>(atoi(row[13]));
|
||||||
e.is_locked = atoi(row[14]);
|
e.is_locked = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.exp = atoi(row[15]);
|
e.exp = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.size = atoi(row[16]);
|
e.size = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.level = atoi(row[17]);
|
e.level = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.race = atoi(row[18]);
|
e.race = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.gender = atoi(row[19]);
|
e.gender = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.class_ = atoi(row[20]);
|
e.class_ = static_cast<uint32_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.deity = atoi(row[21]);
|
e.deity = static_cast<uint32_t>(strtoul(row[21], nullptr, 10));
|
||||||
e.texture = atoi(row[22]);
|
e.texture = static_cast<uint32_t>(strtoul(row[22], nullptr, 10));
|
||||||
e.helm_texture = atoi(row[23]);
|
e.helm_texture = static_cast<uint32_t>(strtoul(row[23], nullptr, 10));
|
||||||
e.copper = atoi(row[24]);
|
e.copper = static_cast<uint32_t>(strtoul(row[24], nullptr, 10));
|
||||||
e.silver = atoi(row[25]);
|
e.silver = static_cast<uint32_t>(strtoul(row[25], nullptr, 10));
|
||||||
e.gold = atoi(row[26]);
|
e.gold = static_cast<uint32_t>(strtoul(row[26], nullptr, 10));
|
||||||
e.platinum = atoi(row[27]);
|
e.platinum = static_cast<uint32_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.hair_color = atoi(row[28]);
|
e.hair_color = static_cast<uint32_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.beard_color = atoi(row[29]);
|
e.beard_color = static_cast<uint32_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.eye_color_1 = atoi(row[30]);
|
e.eye_color_1 = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
e.eye_color_2 = atoi(row[31]);
|
e.eye_color_2 = static_cast<uint32_t>(strtoul(row[31], nullptr, 10));
|
||||||
e.hair_style = atoi(row[32]);
|
e.hair_style = static_cast<uint32_t>(strtoul(row[32], nullptr, 10));
|
||||||
e.face = atoi(row[33]);
|
e.face = static_cast<uint32_t>(strtoul(row[33], nullptr, 10));
|
||||||
e.beard = atoi(row[34]);
|
e.beard = static_cast<uint32_t>(strtoul(row[34], nullptr, 10));
|
||||||
e.drakkin_heritage = atoi(row[35]);
|
e.drakkin_heritage = static_cast<uint32_t>(strtoul(row[35], nullptr, 10));
|
||||||
e.drakkin_tattoo = atoi(row[36]);
|
e.drakkin_tattoo = static_cast<uint32_t>(strtoul(row[36], nullptr, 10));
|
||||||
e.drakkin_details = atoi(row[37]);
|
e.drakkin_details = static_cast<uint32_t>(strtoul(row[37], nullptr, 10));
|
||||||
e.wc_1 = atoi(row[38]);
|
e.wc_1 = static_cast<uint32_t>(strtoul(row[38], nullptr, 10));
|
||||||
e.wc_2 = atoi(row[39]);
|
e.wc_2 = static_cast<uint32_t>(strtoul(row[39], nullptr, 10));
|
||||||
e.wc_3 = atoi(row[40]);
|
e.wc_3 = static_cast<uint32_t>(strtoul(row[40], nullptr, 10));
|
||||||
e.wc_4 = atoi(row[41]);
|
e.wc_4 = static_cast<uint32_t>(strtoul(row[41], nullptr, 10));
|
||||||
e.wc_5 = atoi(row[42]);
|
e.wc_5 = static_cast<uint32_t>(strtoul(row[42], nullptr, 10));
|
||||||
e.wc_6 = atoi(row[43]);
|
e.wc_6 = static_cast<uint32_t>(strtoul(row[43], nullptr, 10));
|
||||||
e.wc_7 = atoi(row[44]);
|
e.wc_7 = static_cast<uint32_t>(strtoul(row[44], nullptr, 10));
|
||||||
e.wc_8 = atoi(row[45]);
|
e.wc_8 = static_cast<uint32_t>(strtoul(row[45], nullptr, 10));
|
||||||
e.wc_9 = atoi(row[46]);
|
e.wc_9 = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,23 +19,23 @@
|
|||||||
class BaseCharacterCurrencyRepository {
|
class BaseCharacterCurrencyRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterCurrency {
|
struct CharacterCurrency {
|
||||||
int id;
|
uint32_t id;
|
||||||
int platinum;
|
uint32_t platinum;
|
||||||
int gold;
|
uint32_t gold;
|
||||||
int silver;
|
uint32_t silver;
|
||||||
int copper;
|
uint32_t copper;
|
||||||
int platinum_bank;
|
uint32_t platinum_bank;
|
||||||
int gold_bank;
|
uint32_t gold_bank;
|
||||||
int silver_bank;
|
uint32_t silver_bank;
|
||||||
int copper_bank;
|
uint32_t copper_bank;
|
||||||
int platinum_cursor;
|
uint32_t platinum_cursor;
|
||||||
int gold_cursor;
|
uint32_t gold_cursor;
|
||||||
int silver_cursor;
|
uint32_t silver_cursor;
|
||||||
int copper_cursor;
|
uint32_t copper_cursor;
|
||||||
int radiant_crystals;
|
uint32_t radiant_crystals;
|
||||||
int career_radiant_crystals;
|
uint32_t career_radiant_crystals;
|
||||||
int ebon_crystals;
|
uint32_t ebon_crystals;
|
||||||
int career_ebon_crystals;
|
uint32_t career_ebon_crystals;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -178,23 +178,23 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterCurrency e{};
|
CharacterCurrency e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.platinum = atoi(row[1]);
|
e.platinum = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.gold = atoi(row[2]);
|
e.gold = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.silver = atoi(row[3]);
|
e.silver = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.copper = atoi(row[4]);
|
e.copper = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.platinum_bank = atoi(row[5]);
|
e.platinum_bank = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.gold_bank = atoi(row[6]);
|
e.gold_bank = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.silver_bank = atoi(row[7]);
|
e.silver_bank = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.copper_bank = atoi(row[8]);
|
e.copper_bank = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.platinum_cursor = atoi(row[9]);
|
e.platinum_cursor = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.gold_cursor = atoi(row[10]);
|
e.gold_cursor = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.silver_cursor = atoi(row[11]);
|
e.silver_cursor = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.copper_cursor = atoi(row[12]);
|
e.copper_cursor = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.radiant_crystals = atoi(row[13]);
|
e.radiant_crystals = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.career_radiant_crystals = atoi(row[14]);
|
e.career_radiant_crystals = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ebon_crystals = atoi(row[15]);
|
e.ebon_crystals = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.career_ebon_crystals = atoi(row[16]);
|
e.career_ebon_crystals = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -362,23 +362,23 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterCurrency e{};
|
CharacterCurrency e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.platinum = atoi(row[1]);
|
e.platinum = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.gold = atoi(row[2]);
|
e.gold = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.silver = atoi(row[3]);
|
e.silver = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.copper = atoi(row[4]);
|
e.copper = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.platinum_bank = atoi(row[5]);
|
e.platinum_bank = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.gold_bank = atoi(row[6]);
|
e.gold_bank = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.silver_bank = atoi(row[7]);
|
e.silver_bank = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.copper_bank = atoi(row[8]);
|
e.copper_bank = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.platinum_cursor = atoi(row[9]);
|
e.platinum_cursor = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.gold_cursor = atoi(row[10]);
|
e.gold_cursor = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.silver_cursor = atoi(row[11]);
|
e.silver_cursor = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.copper_cursor = atoi(row[12]);
|
e.copper_cursor = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.radiant_crystals = atoi(row[13]);
|
e.radiant_crystals = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.career_radiant_crystals = atoi(row[14]);
|
e.career_radiant_crystals = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ebon_crystals = atoi(row[15]);
|
e.ebon_crystals = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.career_ebon_crystals = atoi(row[16]);
|
e.career_ebon_crystals = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -403,23 +403,23 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterCurrency e{};
|
CharacterCurrency e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.platinum = atoi(row[1]);
|
e.platinum = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.gold = atoi(row[2]);
|
e.gold = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.silver = atoi(row[3]);
|
e.silver = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.copper = atoi(row[4]);
|
e.copper = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.platinum_bank = atoi(row[5]);
|
e.platinum_bank = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.gold_bank = atoi(row[6]);
|
e.gold_bank = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.silver_bank = atoi(row[7]);
|
e.silver_bank = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.copper_bank = atoi(row[8]);
|
e.copper_bank = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.platinum_cursor = atoi(row[9]);
|
e.platinum_cursor = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.gold_cursor = atoi(row[10]);
|
e.gold_cursor = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.silver_cursor = atoi(row[11]);
|
e.silver_cursor = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.copper_cursor = atoi(row[12]);
|
e.copper_cursor = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.radiant_crystals = atoi(row[13]);
|
e.radiant_crystals = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.career_radiant_crystals = atoi(row[14]);
|
e.career_radiant_crystals = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ebon_crystals = atoi(row[15]);
|
e.ebon_crystals = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.career_ebon_crystals = atoi(row[16]);
|
e.career_ebon_crystals = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,107 +19,107 @@
|
|||||||
class BaseCharacterDataRepository {
|
class BaseCharacterDataRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterData {
|
struct CharacterData {
|
||||||
int id;
|
uint32_t id;
|
||||||
int account_id;
|
int32_t account_id;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string last_name;
|
std::string last_name;
|
||||||
std::string title;
|
std::string title;
|
||||||
std::string suffix;
|
std::string suffix;
|
||||||
int zone_id;
|
uint32_t zone_id;
|
||||||
int zone_instance;
|
uint32_t zone_instance;
|
||||||
float y;
|
float y;
|
||||||
float x;
|
float x;
|
||||||
float z;
|
float z;
|
||||||
float heading;
|
float heading;
|
||||||
int gender;
|
uint8_t gender;
|
||||||
int race;
|
uint16_t race;
|
||||||
int class_;
|
uint8_t class_;
|
||||||
int level;
|
uint32_t level;
|
||||||
int deity;
|
uint32_t deity;
|
||||||
int birthday;
|
uint32_t birthday;
|
||||||
int last_login;
|
uint32_t last_login;
|
||||||
int time_played;
|
uint32_t time_played;
|
||||||
int level2;
|
uint8_t level2;
|
||||||
int anon;
|
uint8_t anon;
|
||||||
int gm;
|
uint8_t gm;
|
||||||
int face;
|
uint32_t face;
|
||||||
int hair_color;
|
uint8_t hair_color;
|
||||||
int hair_style;
|
uint8_t hair_style;
|
||||||
int beard;
|
uint8_t beard;
|
||||||
int beard_color;
|
uint8_t beard_color;
|
||||||
int eye_color_1;
|
uint8_t eye_color_1;
|
||||||
int eye_color_2;
|
uint8_t eye_color_2;
|
||||||
int drakkin_heritage;
|
uint32_t drakkin_heritage;
|
||||||
int drakkin_tattoo;
|
uint32_t drakkin_tattoo;
|
||||||
int drakkin_details;
|
uint32_t drakkin_details;
|
||||||
int ability_time_seconds;
|
uint8_t ability_time_seconds;
|
||||||
int ability_number;
|
uint8_t ability_number;
|
||||||
int ability_time_minutes;
|
uint8_t ability_time_minutes;
|
||||||
int ability_time_hours;
|
uint8_t ability_time_hours;
|
||||||
int exp;
|
uint32_t exp;
|
||||||
int aa_points_spent;
|
uint32_t aa_points_spent;
|
||||||
int aa_exp;
|
uint32_t aa_exp;
|
||||||
int aa_points;
|
uint32_t aa_points;
|
||||||
int group_leadership_exp;
|
uint32_t group_leadership_exp;
|
||||||
int raid_leadership_exp;
|
uint32_t raid_leadership_exp;
|
||||||
int group_leadership_points;
|
uint32_t group_leadership_points;
|
||||||
int raid_leadership_points;
|
uint32_t raid_leadership_points;
|
||||||
int points;
|
uint32_t points;
|
||||||
int cur_hp;
|
uint32_t cur_hp;
|
||||||
int mana;
|
uint32_t mana;
|
||||||
int endurance;
|
uint32_t endurance;
|
||||||
int intoxication;
|
uint32_t intoxication;
|
||||||
int str;
|
uint32_t str;
|
||||||
int sta;
|
uint32_t sta;
|
||||||
int cha;
|
uint32_t cha;
|
||||||
int dex;
|
uint32_t dex;
|
||||||
int int_;
|
uint32_t int_;
|
||||||
int agi;
|
uint32_t agi;
|
||||||
int wis;
|
uint32_t wis;
|
||||||
int zone_change_count;
|
uint32_t zone_change_count;
|
||||||
int toxicity;
|
uint32_t toxicity;
|
||||||
int hunger_level;
|
uint32_t hunger_level;
|
||||||
int thirst_level;
|
uint32_t thirst_level;
|
||||||
int ability_up;
|
uint32_t ability_up;
|
||||||
int ldon_points_guk;
|
uint32_t ldon_points_guk;
|
||||||
int ldon_points_mir;
|
uint32_t ldon_points_mir;
|
||||||
int ldon_points_mmc;
|
uint32_t ldon_points_mmc;
|
||||||
int ldon_points_ruj;
|
uint32_t ldon_points_ruj;
|
||||||
int ldon_points_tak;
|
uint32_t ldon_points_tak;
|
||||||
int ldon_points_available;
|
uint32_t ldon_points_available;
|
||||||
int tribute_time_remaining;
|
uint32_t tribute_time_remaining;
|
||||||
int career_tribute_points;
|
uint32_t career_tribute_points;
|
||||||
int tribute_points;
|
uint32_t tribute_points;
|
||||||
int tribute_active;
|
uint32_t tribute_active;
|
||||||
int pvp_status;
|
uint8_t pvp_status;
|
||||||
int pvp_kills;
|
uint32_t pvp_kills;
|
||||||
int pvp_deaths;
|
uint32_t pvp_deaths;
|
||||||
int pvp_current_points;
|
uint32_t pvp_current_points;
|
||||||
int pvp_career_points;
|
uint32_t pvp_career_points;
|
||||||
int pvp_best_kill_streak;
|
uint32_t pvp_best_kill_streak;
|
||||||
int pvp_worst_death_streak;
|
uint32_t pvp_worst_death_streak;
|
||||||
int pvp_current_kill_streak;
|
uint32_t pvp_current_kill_streak;
|
||||||
int pvp2;
|
uint32_t pvp2;
|
||||||
int pvp_type;
|
uint32_t pvp_type;
|
||||||
int show_helm;
|
uint32_t show_helm;
|
||||||
int group_auto_consent;
|
uint8_t group_auto_consent;
|
||||||
int raid_auto_consent;
|
uint8_t raid_auto_consent;
|
||||||
int guild_auto_consent;
|
uint8_t guild_auto_consent;
|
||||||
int leadership_exp_on;
|
uint8_t leadership_exp_on;
|
||||||
int RestTimer;
|
uint32_t RestTimer;
|
||||||
int air_remaining;
|
uint32_t air_remaining;
|
||||||
int autosplit_enabled;
|
uint32_t autosplit_enabled;
|
||||||
int lfp;
|
uint8_t lfp;
|
||||||
int lfg;
|
uint8_t lfg;
|
||||||
std::string mailkey;
|
std::string mailkey;
|
||||||
int xtargets;
|
uint8_t xtargets;
|
||||||
int firstlogon;
|
int8_t firstlogon;
|
||||||
int e_aa_effects;
|
uint32_t e_aa_effects;
|
||||||
int e_percent_to_aa;
|
uint32_t e_percent_to_aa;
|
||||||
int e_expended_aa_spent;
|
uint32_t e_expended_aa_spent;
|
||||||
int aa_points_spent_old;
|
uint32_t aa_points_spent_old;
|
||||||
int aa_points_old;
|
uint32_t aa_points_old;
|
||||||
int e_last_invsnapshot;
|
uint32_t e_last_invsnapshot;
|
||||||
time_t deleted_at;
|
time_t deleted_at;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -518,107 +518,107 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterData e{};
|
CharacterData e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.account_id = atoi(row[1]);
|
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.last_name = row[3] ? row[3] : "";
|
e.last_name = row[3] ? row[3] : "";
|
||||||
e.title = row[4] ? row[4] : "";
|
e.title = row[4] ? row[4] : "";
|
||||||
e.suffix = row[5] ? row[5] : "";
|
e.suffix = row[5] ? row[5] : "";
|
||||||
e.zone_id = atoi(row[6]);
|
e.zone_id = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.zone_instance = atoi(row[7]);
|
e.zone_instance = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.y = static_cast<float>(atof(row[8]));
|
e.y = strtof(row[8], nullptr);
|
||||||
e.x = static_cast<float>(atof(row[9]));
|
e.x = strtof(row[9], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[10]));
|
e.z = strtof(row[10], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[11]));
|
e.heading = strtof(row[11], nullptr);
|
||||||
e.gender = atoi(row[12]);
|
e.gender = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.race = atoi(row[13]);
|
e.race = static_cast<uint16_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.class_ = atoi(row[14]);
|
e.class_ = static_cast<uint8_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.level = atoi(row[15]);
|
e.level = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.deity = atoi(row[16]);
|
e.deity = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.birthday = atoi(row[17]);
|
e.birthday = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.last_login = atoi(row[18]);
|
e.last_login = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.time_played = atoi(row[19]);
|
e.time_played = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.level2 = atoi(row[20]);
|
e.level2 = static_cast<uint8_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.anon = atoi(row[21]);
|
e.anon = static_cast<uint8_t>(strtoul(row[21], nullptr, 10));
|
||||||
e.gm = atoi(row[22]);
|
e.gm = static_cast<uint8_t>(strtoul(row[22], nullptr, 10));
|
||||||
e.face = atoi(row[23]);
|
e.face = static_cast<uint32_t>(strtoul(row[23], nullptr, 10));
|
||||||
e.hair_color = atoi(row[24]);
|
e.hair_color = static_cast<uint8_t>(strtoul(row[24], nullptr, 10));
|
||||||
e.hair_style = atoi(row[25]);
|
e.hair_style = static_cast<uint8_t>(strtoul(row[25], nullptr, 10));
|
||||||
e.beard = atoi(row[26]);
|
e.beard = static_cast<uint8_t>(strtoul(row[26], nullptr, 10));
|
||||||
e.beard_color = atoi(row[27]);
|
e.beard_color = static_cast<uint8_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.eye_color_1 = atoi(row[28]);
|
e.eye_color_1 = static_cast<uint8_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.eye_color_2 = atoi(row[29]);
|
e.eye_color_2 = static_cast<uint8_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.drakkin_heritage = atoi(row[30]);
|
e.drakkin_heritage = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
e.drakkin_tattoo = atoi(row[31]);
|
e.drakkin_tattoo = static_cast<uint32_t>(strtoul(row[31], nullptr, 10));
|
||||||
e.drakkin_details = atoi(row[32]);
|
e.drakkin_details = static_cast<uint32_t>(strtoul(row[32], nullptr, 10));
|
||||||
e.ability_time_seconds = atoi(row[33]);
|
e.ability_time_seconds = static_cast<uint8_t>(strtoul(row[33], nullptr, 10));
|
||||||
e.ability_number = atoi(row[34]);
|
e.ability_number = static_cast<uint8_t>(strtoul(row[34], nullptr, 10));
|
||||||
e.ability_time_minutes = atoi(row[35]);
|
e.ability_time_minutes = static_cast<uint8_t>(strtoul(row[35], nullptr, 10));
|
||||||
e.ability_time_hours = atoi(row[36]);
|
e.ability_time_hours = static_cast<uint8_t>(strtoul(row[36], nullptr, 10));
|
||||||
e.exp = atoi(row[37]);
|
e.exp = static_cast<uint32_t>(strtoul(row[37], nullptr, 10));
|
||||||
e.aa_points_spent = atoi(row[38]);
|
e.aa_points_spent = static_cast<uint32_t>(strtoul(row[38], nullptr, 10));
|
||||||
e.aa_exp = atoi(row[39]);
|
e.aa_exp = static_cast<uint32_t>(strtoul(row[39], nullptr, 10));
|
||||||
e.aa_points = atoi(row[40]);
|
e.aa_points = static_cast<uint32_t>(strtoul(row[40], nullptr, 10));
|
||||||
e.group_leadership_exp = atoi(row[41]);
|
e.group_leadership_exp = static_cast<uint32_t>(strtoul(row[41], nullptr, 10));
|
||||||
e.raid_leadership_exp = atoi(row[42]);
|
e.raid_leadership_exp = static_cast<uint32_t>(strtoul(row[42], nullptr, 10));
|
||||||
e.group_leadership_points = atoi(row[43]);
|
e.group_leadership_points = static_cast<uint32_t>(strtoul(row[43], nullptr, 10));
|
||||||
e.raid_leadership_points = atoi(row[44]);
|
e.raid_leadership_points = static_cast<uint32_t>(strtoul(row[44], nullptr, 10));
|
||||||
e.points = atoi(row[45]);
|
e.points = static_cast<uint32_t>(strtoul(row[45], nullptr, 10));
|
||||||
e.cur_hp = atoi(row[46]);
|
e.cur_hp = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||||
e.mana = atoi(row[47]);
|
e.mana = static_cast<uint32_t>(strtoul(row[47], nullptr, 10));
|
||||||
e.endurance = atoi(row[48]);
|
e.endurance = static_cast<uint32_t>(strtoul(row[48], nullptr, 10));
|
||||||
e.intoxication = atoi(row[49]);
|
e.intoxication = static_cast<uint32_t>(strtoul(row[49], nullptr, 10));
|
||||||
e.str = atoi(row[50]);
|
e.str = static_cast<uint32_t>(strtoul(row[50], nullptr, 10));
|
||||||
e.sta = atoi(row[51]);
|
e.sta = static_cast<uint32_t>(strtoul(row[51], nullptr, 10));
|
||||||
e.cha = atoi(row[52]);
|
e.cha = static_cast<uint32_t>(strtoul(row[52], nullptr, 10));
|
||||||
e.dex = atoi(row[53]);
|
e.dex = static_cast<uint32_t>(strtoul(row[53], nullptr, 10));
|
||||||
e.int_ = atoi(row[54]);
|
e.int_ = static_cast<uint32_t>(strtoul(row[54], nullptr, 10));
|
||||||
e.agi = atoi(row[55]);
|
e.agi = static_cast<uint32_t>(strtoul(row[55], nullptr, 10));
|
||||||
e.wis = atoi(row[56]);
|
e.wis = static_cast<uint32_t>(strtoul(row[56], nullptr, 10));
|
||||||
e.zone_change_count = atoi(row[57]);
|
e.zone_change_count = static_cast<uint32_t>(strtoul(row[57], nullptr, 10));
|
||||||
e.toxicity = atoi(row[58]);
|
e.toxicity = static_cast<uint32_t>(strtoul(row[58], nullptr, 10));
|
||||||
e.hunger_level = atoi(row[59]);
|
e.hunger_level = static_cast<uint32_t>(strtoul(row[59], nullptr, 10));
|
||||||
e.thirst_level = atoi(row[60]);
|
e.thirst_level = static_cast<uint32_t>(strtoul(row[60], nullptr, 10));
|
||||||
e.ability_up = atoi(row[61]);
|
e.ability_up = static_cast<uint32_t>(strtoul(row[61], nullptr, 10));
|
||||||
e.ldon_points_guk = atoi(row[62]);
|
e.ldon_points_guk = static_cast<uint32_t>(strtoul(row[62], nullptr, 10));
|
||||||
e.ldon_points_mir = atoi(row[63]);
|
e.ldon_points_mir = static_cast<uint32_t>(strtoul(row[63], nullptr, 10));
|
||||||
e.ldon_points_mmc = atoi(row[64]);
|
e.ldon_points_mmc = static_cast<uint32_t>(strtoul(row[64], nullptr, 10));
|
||||||
e.ldon_points_ruj = atoi(row[65]);
|
e.ldon_points_ruj = static_cast<uint32_t>(strtoul(row[65], nullptr, 10));
|
||||||
e.ldon_points_tak = atoi(row[66]);
|
e.ldon_points_tak = static_cast<uint32_t>(strtoul(row[66], nullptr, 10));
|
||||||
e.ldon_points_available = atoi(row[67]);
|
e.ldon_points_available = static_cast<uint32_t>(strtoul(row[67], nullptr, 10));
|
||||||
e.tribute_time_remaining = atoi(row[68]);
|
e.tribute_time_remaining = static_cast<uint32_t>(strtoul(row[68], nullptr, 10));
|
||||||
e.career_tribute_points = atoi(row[69]);
|
e.career_tribute_points = static_cast<uint32_t>(strtoul(row[69], nullptr, 10));
|
||||||
e.tribute_points = atoi(row[70]);
|
e.tribute_points = static_cast<uint32_t>(strtoul(row[70], nullptr, 10));
|
||||||
e.tribute_active = atoi(row[71]);
|
e.tribute_active = static_cast<uint32_t>(strtoul(row[71], nullptr, 10));
|
||||||
e.pvp_status = atoi(row[72]);
|
e.pvp_status = static_cast<uint8_t>(strtoul(row[72], nullptr, 10));
|
||||||
e.pvp_kills = atoi(row[73]);
|
e.pvp_kills = static_cast<uint32_t>(strtoul(row[73], nullptr, 10));
|
||||||
e.pvp_deaths = atoi(row[74]);
|
e.pvp_deaths = static_cast<uint32_t>(strtoul(row[74], nullptr, 10));
|
||||||
e.pvp_current_points = atoi(row[75]);
|
e.pvp_current_points = static_cast<uint32_t>(strtoul(row[75], nullptr, 10));
|
||||||
e.pvp_career_points = atoi(row[76]);
|
e.pvp_career_points = static_cast<uint32_t>(strtoul(row[76], nullptr, 10));
|
||||||
e.pvp_best_kill_streak = atoi(row[77]);
|
e.pvp_best_kill_streak = static_cast<uint32_t>(strtoul(row[77], nullptr, 10));
|
||||||
e.pvp_worst_death_streak = atoi(row[78]);
|
e.pvp_worst_death_streak = static_cast<uint32_t>(strtoul(row[78], nullptr, 10));
|
||||||
e.pvp_current_kill_streak = atoi(row[79]);
|
e.pvp_current_kill_streak = static_cast<uint32_t>(strtoul(row[79], nullptr, 10));
|
||||||
e.pvp2 = atoi(row[80]);
|
e.pvp2 = static_cast<uint32_t>(strtoul(row[80], nullptr, 10));
|
||||||
e.pvp_type = atoi(row[81]);
|
e.pvp_type = static_cast<uint32_t>(strtoul(row[81], nullptr, 10));
|
||||||
e.show_helm = atoi(row[82]);
|
e.show_helm = static_cast<uint32_t>(strtoul(row[82], nullptr, 10));
|
||||||
e.group_auto_consent = atoi(row[83]);
|
e.group_auto_consent = static_cast<uint8_t>(strtoul(row[83], nullptr, 10));
|
||||||
e.raid_auto_consent = atoi(row[84]);
|
e.raid_auto_consent = static_cast<uint8_t>(strtoul(row[84], nullptr, 10));
|
||||||
e.guild_auto_consent = atoi(row[85]);
|
e.guild_auto_consent = static_cast<uint8_t>(strtoul(row[85], nullptr, 10));
|
||||||
e.leadership_exp_on = atoi(row[86]);
|
e.leadership_exp_on = static_cast<uint8_t>(strtoul(row[86], nullptr, 10));
|
||||||
e.RestTimer = atoi(row[87]);
|
e.RestTimer = static_cast<uint32_t>(strtoul(row[87], nullptr, 10));
|
||||||
e.air_remaining = atoi(row[88]);
|
e.air_remaining = static_cast<uint32_t>(strtoul(row[88], nullptr, 10));
|
||||||
e.autosplit_enabled = atoi(row[89]);
|
e.autosplit_enabled = static_cast<uint32_t>(strtoul(row[89], nullptr, 10));
|
||||||
e.lfp = atoi(row[90]);
|
e.lfp = static_cast<uint8_t>(strtoul(row[90], nullptr, 10));
|
||||||
e.lfg = atoi(row[91]);
|
e.lfg = static_cast<uint8_t>(strtoul(row[91], nullptr, 10));
|
||||||
e.mailkey = row[92] ? row[92] : "";
|
e.mailkey = row[92] ? row[92] : "";
|
||||||
e.xtargets = atoi(row[93]);
|
e.xtargets = static_cast<uint8_t>(strtoul(row[93], nullptr, 10));
|
||||||
e.firstlogon = atoi(row[94]);
|
e.firstlogon = static_cast<int8_t>(atoi(row[94]));
|
||||||
e.e_aa_effects = atoi(row[95]);
|
e.e_aa_effects = static_cast<uint32_t>(strtoul(row[95], nullptr, 10));
|
||||||
e.e_percent_to_aa = atoi(row[96]);
|
e.e_percent_to_aa = static_cast<uint32_t>(strtoul(row[96], nullptr, 10));
|
||||||
e.e_expended_aa_spent = atoi(row[97]);
|
e.e_expended_aa_spent = static_cast<uint32_t>(strtoul(row[97], nullptr, 10));
|
||||||
e.aa_points_spent_old = atoi(row[98]);
|
e.aa_points_spent_old = static_cast<uint32_t>(strtoul(row[98], nullptr, 10));
|
||||||
e.aa_points_old = atoi(row[99]);
|
e.aa_points_old = static_cast<uint32_t>(strtoul(row[99], nullptr, 10));
|
||||||
e.e_last_invsnapshot = atoi(row[100]);
|
e.e_last_invsnapshot = static_cast<uint32_t>(strtoul(row[100], nullptr, 10));
|
||||||
e.deleted_at = strtoll(row[101] ? row[101] : "-1", nullptr, 10);
|
e.deleted_at = strtoll(row[101] ? row[101] : "-1", nullptr, 10);
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -1041,107 +1041,107 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterData e{};
|
CharacterData e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.account_id = atoi(row[1]);
|
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.last_name = row[3] ? row[3] : "";
|
e.last_name = row[3] ? row[3] : "";
|
||||||
e.title = row[4] ? row[4] : "";
|
e.title = row[4] ? row[4] : "";
|
||||||
e.suffix = row[5] ? row[5] : "";
|
e.suffix = row[5] ? row[5] : "";
|
||||||
e.zone_id = atoi(row[6]);
|
e.zone_id = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.zone_instance = atoi(row[7]);
|
e.zone_instance = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.y = static_cast<float>(atof(row[8]));
|
e.y = strtof(row[8], nullptr);
|
||||||
e.x = static_cast<float>(atof(row[9]));
|
e.x = strtof(row[9], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[10]));
|
e.z = strtof(row[10], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[11]));
|
e.heading = strtof(row[11], nullptr);
|
||||||
e.gender = atoi(row[12]);
|
e.gender = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.race = atoi(row[13]);
|
e.race = static_cast<uint16_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.class_ = atoi(row[14]);
|
e.class_ = static_cast<uint8_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.level = atoi(row[15]);
|
e.level = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.deity = atoi(row[16]);
|
e.deity = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.birthday = atoi(row[17]);
|
e.birthday = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.last_login = atoi(row[18]);
|
e.last_login = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.time_played = atoi(row[19]);
|
e.time_played = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.level2 = atoi(row[20]);
|
e.level2 = static_cast<uint8_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.anon = atoi(row[21]);
|
e.anon = static_cast<uint8_t>(strtoul(row[21], nullptr, 10));
|
||||||
e.gm = atoi(row[22]);
|
e.gm = static_cast<uint8_t>(strtoul(row[22], nullptr, 10));
|
||||||
e.face = atoi(row[23]);
|
e.face = static_cast<uint32_t>(strtoul(row[23], nullptr, 10));
|
||||||
e.hair_color = atoi(row[24]);
|
e.hair_color = static_cast<uint8_t>(strtoul(row[24], nullptr, 10));
|
||||||
e.hair_style = atoi(row[25]);
|
e.hair_style = static_cast<uint8_t>(strtoul(row[25], nullptr, 10));
|
||||||
e.beard = atoi(row[26]);
|
e.beard = static_cast<uint8_t>(strtoul(row[26], nullptr, 10));
|
||||||
e.beard_color = atoi(row[27]);
|
e.beard_color = static_cast<uint8_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.eye_color_1 = atoi(row[28]);
|
e.eye_color_1 = static_cast<uint8_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.eye_color_2 = atoi(row[29]);
|
e.eye_color_2 = static_cast<uint8_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.drakkin_heritage = atoi(row[30]);
|
e.drakkin_heritage = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
e.drakkin_tattoo = atoi(row[31]);
|
e.drakkin_tattoo = static_cast<uint32_t>(strtoul(row[31], nullptr, 10));
|
||||||
e.drakkin_details = atoi(row[32]);
|
e.drakkin_details = static_cast<uint32_t>(strtoul(row[32], nullptr, 10));
|
||||||
e.ability_time_seconds = atoi(row[33]);
|
e.ability_time_seconds = static_cast<uint8_t>(strtoul(row[33], nullptr, 10));
|
||||||
e.ability_number = atoi(row[34]);
|
e.ability_number = static_cast<uint8_t>(strtoul(row[34], nullptr, 10));
|
||||||
e.ability_time_minutes = atoi(row[35]);
|
e.ability_time_minutes = static_cast<uint8_t>(strtoul(row[35], nullptr, 10));
|
||||||
e.ability_time_hours = atoi(row[36]);
|
e.ability_time_hours = static_cast<uint8_t>(strtoul(row[36], nullptr, 10));
|
||||||
e.exp = atoi(row[37]);
|
e.exp = static_cast<uint32_t>(strtoul(row[37], nullptr, 10));
|
||||||
e.aa_points_spent = atoi(row[38]);
|
e.aa_points_spent = static_cast<uint32_t>(strtoul(row[38], nullptr, 10));
|
||||||
e.aa_exp = atoi(row[39]);
|
e.aa_exp = static_cast<uint32_t>(strtoul(row[39], nullptr, 10));
|
||||||
e.aa_points = atoi(row[40]);
|
e.aa_points = static_cast<uint32_t>(strtoul(row[40], nullptr, 10));
|
||||||
e.group_leadership_exp = atoi(row[41]);
|
e.group_leadership_exp = static_cast<uint32_t>(strtoul(row[41], nullptr, 10));
|
||||||
e.raid_leadership_exp = atoi(row[42]);
|
e.raid_leadership_exp = static_cast<uint32_t>(strtoul(row[42], nullptr, 10));
|
||||||
e.group_leadership_points = atoi(row[43]);
|
e.group_leadership_points = static_cast<uint32_t>(strtoul(row[43], nullptr, 10));
|
||||||
e.raid_leadership_points = atoi(row[44]);
|
e.raid_leadership_points = static_cast<uint32_t>(strtoul(row[44], nullptr, 10));
|
||||||
e.points = atoi(row[45]);
|
e.points = static_cast<uint32_t>(strtoul(row[45], nullptr, 10));
|
||||||
e.cur_hp = atoi(row[46]);
|
e.cur_hp = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||||
e.mana = atoi(row[47]);
|
e.mana = static_cast<uint32_t>(strtoul(row[47], nullptr, 10));
|
||||||
e.endurance = atoi(row[48]);
|
e.endurance = static_cast<uint32_t>(strtoul(row[48], nullptr, 10));
|
||||||
e.intoxication = atoi(row[49]);
|
e.intoxication = static_cast<uint32_t>(strtoul(row[49], nullptr, 10));
|
||||||
e.str = atoi(row[50]);
|
e.str = static_cast<uint32_t>(strtoul(row[50], nullptr, 10));
|
||||||
e.sta = atoi(row[51]);
|
e.sta = static_cast<uint32_t>(strtoul(row[51], nullptr, 10));
|
||||||
e.cha = atoi(row[52]);
|
e.cha = static_cast<uint32_t>(strtoul(row[52], nullptr, 10));
|
||||||
e.dex = atoi(row[53]);
|
e.dex = static_cast<uint32_t>(strtoul(row[53], nullptr, 10));
|
||||||
e.int_ = atoi(row[54]);
|
e.int_ = static_cast<uint32_t>(strtoul(row[54], nullptr, 10));
|
||||||
e.agi = atoi(row[55]);
|
e.agi = static_cast<uint32_t>(strtoul(row[55], nullptr, 10));
|
||||||
e.wis = atoi(row[56]);
|
e.wis = static_cast<uint32_t>(strtoul(row[56], nullptr, 10));
|
||||||
e.zone_change_count = atoi(row[57]);
|
e.zone_change_count = static_cast<uint32_t>(strtoul(row[57], nullptr, 10));
|
||||||
e.toxicity = atoi(row[58]);
|
e.toxicity = static_cast<uint32_t>(strtoul(row[58], nullptr, 10));
|
||||||
e.hunger_level = atoi(row[59]);
|
e.hunger_level = static_cast<uint32_t>(strtoul(row[59], nullptr, 10));
|
||||||
e.thirst_level = atoi(row[60]);
|
e.thirst_level = static_cast<uint32_t>(strtoul(row[60], nullptr, 10));
|
||||||
e.ability_up = atoi(row[61]);
|
e.ability_up = static_cast<uint32_t>(strtoul(row[61], nullptr, 10));
|
||||||
e.ldon_points_guk = atoi(row[62]);
|
e.ldon_points_guk = static_cast<uint32_t>(strtoul(row[62], nullptr, 10));
|
||||||
e.ldon_points_mir = atoi(row[63]);
|
e.ldon_points_mir = static_cast<uint32_t>(strtoul(row[63], nullptr, 10));
|
||||||
e.ldon_points_mmc = atoi(row[64]);
|
e.ldon_points_mmc = static_cast<uint32_t>(strtoul(row[64], nullptr, 10));
|
||||||
e.ldon_points_ruj = atoi(row[65]);
|
e.ldon_points_ruj = static_cast<uint32_t>(strtoul(row[65], nullptr, 10));
|
||||||
e.ldon_points_tak = atoi(row[66]);
|
e.ldon_points_tak = static_cast<uint32_t>(strtoul(row[66], nullptr, 10));
|
||||||
e.ldon_points_available = atoi(row[67]);
|
e.ldon_points_available = static_cast<uint32_t>(strtoul(row[67], nullptr, 10));
|
||||||
e.tribute_time_remaining = atoi(row[68]);
|
e.tribute_time_remaining = static_cast<uint32_t>(strtoul(row[68], nullptr, 10));
|
||||||
e.career_tribute_points = atoi(row[69]);
|
e.career_tribute_points = static_cast<uint32_t>(strtoul(row[69], nullptr, 10));
|
||||||
e.tribute_points = atoi(row[70]);
|
e.tribute_points = static_cast<uint32_t>(strtoul(row[70], nullptr, 10));
|
||||||
e.tribute_active = atoi(row[71]);
|
e.tribute_active = static_cast<uint32_t>(strtoul(row[71], nullptr, 10));
|
||||||
e.pvp_status = atoi(row[72]);
|
e.pvp_status = static_cast<uint8_t>(strtoul(row[72], nullptr, 10));
|
||||||
e.pvp_kills = atoi(row[73]);
|
e.pvp_kills = static_cast<uint32_t>(strtoul(row[73], nullptr, 10));
|
||||||
e.pvp_deaths = atoi(row[74]);
|
e.pvp_deaths = static_cast<uint32_t>(strtoul(row[74], nullptr, 10));
|
||||||
e.pvp_current_points = atoi(row[75]);
|
e.pvp_current_points = static_cast<uint32_t>(strtoul(row[75], nullptr, 10));
|
||||||
e.pvp_career_points = atoi(row[76]);
|
e.pvp_career_points = static_cast<uint32_t>(strtoul(row[76], nullptr, 10));
|
||||||
e.pvp_best_kill_streak = atoi(row[77]);
|
e.pvp_best_kill_streak = static_cast<uint32_t>(strtoul(row[77], nullptr, 10));
|
||||||
e.pvp_worst_death_streak = atoi(row[78]);
|
e.pvp_worst_death_streak = static_cast<uint32_t>(strtoul(row[78], nullptr, 10));
|
||||||
e.pvp_current_kill_streak = atoi(row[79]);
|
e.pvp_current_kill_streak = static_cast<uint32_t>(strtoul(row[79], nullptr, 10));
|
||||||
e.pvp2 = atoi(row[80]);
|
e.pvp2 = static_cast<uint32_t>(strtoul(row[80], nullptr, 10));
|
||||||
e.pvp_type = atoi(row[81]);
|
e.pvp_type = static_cast<uint32_t>(strtoul(row[81], nullptr, 10));
|
||||||
e.show_helm = atoi(row[82]);
|
e.show_helm = static_cast<uint32_t>(strtoul(row[82], nullptr, 10));
|
||||||
e.group_auto_consent = atoi(row[83]);
|
e.group_auto_consent = static_cast<uint8_t>(strtoul(row[83], nullptr, 10));
|
||||||
e.raid_auto_consent = atoi(row[84]);
|
e.raid_auto_consent = static_cast<uint8_t>(strtoul(row[84], nullptr, 10));
|
||||||
e.guild_auto_consent = atoi(row[85]);
|
e.guild_auto_consent = static_cast<uint8_t>(strtoul(row[85], nullptr, 10));
|
||||||
e.leadership_exp_on = atoi(row[86]);
|
e.leadership_exp_on = static_cast<uint8_t>(strtoul(row[86], nullptr, 10));
|
||||||
e.RestTimer = atoi(row[87]);
|
e.RestTimer = static_cast<uint32_t>(strtoul(row[87], nullptr, 10));
|
||||||
e.air_remaining = atoi(row[88]);
|
e.air_remaining = static_cast<uint32_t>(strtoul(row[88], nullptr, 10));
|
||||||
e.autosplit_enabled = atoi(row[89]);
|
e.autosplit_enabled = static_cast<uint32_t>(strtoul(row[89], nullptr, 10));
|
||||||
e.lfp = atoi(row[90]);
|
e.lfp = static_cast<uint8_t>(strtoul(row[90], nullptr, 10));
|
||||||
e.lfg = atoi(row[91]);
|
e.lfg = static_cast<uint8_t>(strtoul(row[91], nullptr, 10));
|
||||||
e.mailkey = row[92] ? row[92] : "";
|
e.mailkey = row[92] ? row[92] : "";
|
||||||
e.xtargets = atoi(row[93]);
|
e.xtargets = static_cast<uint8_t>(strtoul(row[93], nullptr, 10));
|
||||||
e.firstlogon = atoi(row[94]);
|
e.firstlogon = static_cast<int8_t>(atoi(row[94]));
|
||||||
e.e_aa_effects = atoi(row[95]);
|
e.e_aa_effects = static_cast<uint32_t>(strtoul(row[95], nullptr, 10));
|
||||||
e.e_percent_to_aa = atoi(row[96]);
|
e.e_percent_to_aa = static_cast<uint32_t>(strtoul(row[96], nullptr, 10));
|
||||||
e.e_expended_aa_spent = atoi(row[97]);
|
e.e_expended_aa_spent = static_cast<uint32_t>(strtoul(row[97], nullptr, 10));
|
||||||
e.aa_points_spent_old = atoi(row[98]);
|
e.aa_points_spent_old = static_cast<uint32_t>(strtoul(row[98], nullptr, 10));
|
||||||
e.aa_points_old = atoi(row[99]);
|
e.aa_points_old = static_cast<uint32_t>(strtoul(row[99], nullptr, 10));
|
||||||
e.e_last_invsnapshot = atoi(row[100]);
|
e.e_last_invsnapshot = static_cast<uint32_t>(strtoul(row[100], nullptr, 10));
|
||||||
e.deleted_at = strtoll(row[101] ? row[101] : "-1", nullptr, 10);
|
e.deleted_at = strtoll(row[101] ? row[101] : "-1", nullptr, 10);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -1167,107 +1167,107 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterData e{};
|
CharacterData e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.account_id = atoi(row[1]);
|
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.last_name = row[3] ? row[3] : "";
|
e.last_name = row[3] ? row[3] : "";
|
||||||
e.title = row[4] ? row[4] : "";
|
e.title = row[4] ? row[4] : "";
|
||||||
e.suffix = row[5] ? row[5] : "";
|
e.suffix = row[5] ? row[5] : "";
|
||||||
e.zone_id = atoi(row[6]);
|
e.zone_id = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.zone_instance = atoi(row[7]);
|
e.zone_instance = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.y = static_cast<float>(atof(row[8]));
|
e.y = strtof(row[8], nullptr);
|
||||||
e.x = static_cast<float>(atof(row[9]));
|
e.x = strtof(row[9], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[10]));
|
e.z = strtof(row[10], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[11]));
|
e.heading = strtof(row[11], nullptr);
|
||||||
e.gender = atoi(row[12]);
|
e.gender = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.race = atoi(row[13]);
|
e.race = static_cast<uint16_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.class_ = atoi(row[14]);
|
e.class_ = static_cast<uint8_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.level = atoi(row[15]);
|
e.level = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.deity = atoi(row[16]);
|
e.deity = static_cast<uint32_t>(strtoul(row[16], nullptr, 10));
|
||||||
e.birthday = atoi(row[17]);
|
e.birthday = static_cast<uint32_t>(strtoul(row[17], nullptr, 10));
|
||||||
e.last_login = atoi(row[18]);
|
e.last_login = static_cast<uint32_t>(strtoul(row[18], nullptr, 10));
|
||||||
e.time_played = atoi(row[19]);
|
e.time_played = static_cast<uint32_t>(strtoul(row[19], nullptr, 10));
|
||||||
e.level2 = atoi(row[20]);
|
e.level2 = static_cast<uint8_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.anon = atoi(row[21]);
|
e.anon = static_cast<uint8_t>(strtoul(row[21], nullptr, 10));
|
||||||
e.gm = atoi(row[22]);
|
e.gm = static_cast<uint8_t>(strtoul(row[22], nullptr, 10));
|
||||||
e.face = atoi(row[23]);
|
e.face = static_cast<uint32_t>(strtoul(row[23], nullptr, 10));
|
||||||
e.hair_color = atoi(row[24]);
|
e.hair_color = static_cast<uint8_t>(strtoul(row[24], nullptr, 10));
|
||||||
e.hair_style = atoi(row[25]);
|
e.hair_style = static_cast<uint8_t>(strtoul(row[25], nullptr, 10));
|
||||||
e.beard = atoi(row[26]);
|
e.beard = static_cast<uint8_t>(strtoul(row[26], nullptr, 10));
|
||||||
e.beard_color = atoi(row[27]);
|
e.beard_color = static_cast<uint8_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.eye_color_1 = atoi(row[28]);
|
e.eye_color_1 = static_cast<uint8_t>(strtoul(row[28], nullptr, 10));
|
||||||
e.eye_color_2 = atoi(row[29]);
|
e.eye_color_2 = static_cast<uint8_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.drakkin_heritage = atoi(row[30]);
|
e.drakkin_heritage = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
e.drakkin_tattoo = atoi(row[31]);
|
e.drakkin_tattoo = static_cast<uint32_t>(strtoul(row[31], nullptr, 10));
|
||||||
e.drakkin_details = atoi(row[32]);
|
e.drakkin_details = static_cast<uint32_t>(strtoul(row[32], nullptr, 10));
|
||||||
e.ability_time_seconds = atoi(row[33]);
|
e.ability_time_seconds = static_cast<uint8_t>(strtoul(row[33], nullptr, 10));
|
||||||
e.ability_number = atoi(row[34]);
|
e.ability_number = static_cast<uint8_t>(strtoul(row[34], nullptr, 10));
|
||||||
e.ability_time_minutes = atoi(row[35]);
|
e.ability_time_minutes = static_cast<uint8_t>(strtoul(row[35], nullptr, 10));
|
||||||
e.ability_time_hours = atoi(row[36]);
|
e.ability_time_hours = static_cast<uint8_t>(strtoul(row[36], nullptr, 10));
|
||||||
e.exp = atoi(row[37]);
|
e.exp = static_cast<uint32_t>(strtoul(row[37], nullptr, 10));
|
||||||
e.aa_points_spent = atoi(row[38]);
|
e.aa_points_spent = static_cast<uint32_t>(strtoul(row[38], nullptr, 10));
|
||||||
e.aa_exp = atoi(row[39]);
|
e.aa_exp = static_cast<uint32_t>(strtoul(row[39], nullptr, 10));
|
||||||
e.aa_points = atoi(row[40]);
|
e.aa_points = static_cast<uint32_t>(strtoul(row[40], nullptr, 10));
|
||||||
e.group_leadership_exp = atoi(row[41]);
|
e.group_leadership_exp = static_cast<uint32_t>(strtoul(row[41], nullptr, 10));
|
||||||
e.raid_leadership_exp = atoi(row[42]);
|
e.raid_leadership_exp = static_cast<uint32_t>(strtoul(row[42], nullptr, 10));
|
||||||
e.group_leadership_points = atoi(row[43]);
|
e.group_leadership_points = static_cast<uint32_t>(strtoul(row[43], nullptr, 10));
|
||||||
e.raid_leadership_points = atoi(row[44]);
|
e.raid_leadership_points = static_cast<uint32_t>(strtoul(row[44], nullptr, 10));
|
||||||
e.points = atoi(row[45]);
|
e.points = static_cast<uint32_t>(strtoul(row[45], nullptr, 10));
|
||||||
e.cur_hp = atoi(row[46]);
|
e.cur_hp = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||||
e.mana = atoi(row[47]);
|
e.mana = static_cast<uint32_t>(strtoul(row[47], nullptr, 10));
|
||||||
e.endurance = atoi(row[48]);
|
e.endurance = static_cast<uint32_t>(strtoul(row[48], nullptr, 10));
|
||||||
e.intoxication = atoi(row[49]);
|
e.intoxication = static_cast<uint32_t>(strtoul(row[49], nullptr, 10));
|
||||||
e.str = atoi(row[50]);
|
e.str = static_cast<uint32_t>(strtoul(row[50], nullptr, 10));
|
||||||
e.sta = atoi(row[51]);
|
e.sta = static_cast<uint32_t>(strtoul(row[51], nullptr, 10));
|
||||||
e.cha = atoi(row[52]);
|
e.cha = static_cast<uint32_t>(strtoul(row[52], nullptr, 10));
|
||||||
e.dex = atoi(row[53]);
|
e.dex = static_cast<uint32_t>(strtoul(row[53], nullptr, 10));
|
||||||
e.int_ = atoi(row[54]);
|
e.int_ = static_cast<uint32_t>(strtoul(row[54], nullptr, 10));
|
||||||
e.agi = atoi(row[55]);
|
e.agi = static_cast<uint32_t>(strtoul(row[55], nullptr, 10));
|
||||||
e.wis = atoi(row[56]);
|
e.wis = static_cast<uint32_t>(strtoul(row[56], nullptr, 10));
|
||||||
e.zone_change_count = atoi(row[57]);
|
e.zone_change_count = static_cast<uint32_t>(strtoul(row[57], nullptr, 10));
|
||||||
e.toxicity = atoi(row[58]);
|
e.toxicity = static_cast<uint32_t>(strtoul(row[58], nullptr, 10));
|
||||||
e.hunger_level = atoi(row[59]);
|
e.hunger_level = static_cast<uint32_t>(strtoul(row[59], nullptr, 10));
|
||||||
e.thirst_level = atoi(row[60]);
|
e.thirst_level = static_cast<uint32_t>(strtoul(row[60], nullptr, 10));
|
||||||
e.ability_up = atoi(row[61]);
|
e.ability_up = static_cast<uint32_t>(strtoul(row[61], nullptr, 10));
|
||||||
e.ldon_points_guk = atoi(row[62]);
|
e.ldon_points_guk = static_cast<uint32_t>(strtoul(row[62], nullptr, 10));
|
||||||
e.ldon_points_mir = atoi(row[63]);
|
e.ldon_points_mir = static_cast<uint32_t>(strtoul(row[63], nullptr, 10));
|
||||||
e.ldon_points_mmc = atoi(row[64]);
|
e.ldon_points_mmc = static_cast<uint32_t>(strtoul(row[64], nullptr, 10));
|
||||||
e.ldon_points_ruj = atoi(row[65]);
|
e.ldon_points_ruj = static_cast<uint32_t>(strtoul(row[65], nullptr, 10));
|
||||||
e.ldon_points_tak = atoi(row[66]);
|
e.ldon_points_tak = static_cast<uint32_t>(strtoul(row[66], nullptr, 10));
|
||||||
e.ldon_points_available = atoi(row[67]);
|
e.ldon_points_available = static_cast<uint32_t>(strtoul(row[67], nullptr, 10));
|
||||||
e.tribute_time_remaining = atoi(row[68]);
|
e.tribute_time_remaining = static_cast<uint32_t>(strtoul(row[68], nullptr, 10));
|
||||||
e.career_tribute_points = atoi(row[69]);
|
e.career_tribute_points = static_cast<uint32_t>(strtoul(row[69], nullptr, 10));
|
||||||
e.tribute_points = atoi(row[70]);
|
e.tribute_points = static_cast<uint32_t>(strtoul(row[70], nullptr, 10));
|
||||||
e.tribute_active = atoi(row[71]);
|
e.tribute_active = static_cast<uint32_t>(strtoul(row[71], nullptr, 10));
|
||||||
e.pvp_status = atoi(row[72]);
|
e.pvp_status = static_cast<uint8_t>(strtoul(row[72], nullptr, 10));
|
||||||
e.pvp_kills = atoi(row[73]);
|
e.pvp_kills = static_cast<uint32_t>(strtoul(row[73], nullptr, 10));
|
||||||
e.pvp_deaths = atoi(row[74]);
|
e.pvp_deaths = static_cast<uint32_t>(strtoul(row[74], nullptr, 10));
|
||||||
e.pvp_current_points = atoi(row[75]);
|
e.pvp_current_points = static_cast<uint32_t>(strtoul(row[75], nullptr, 10));
|
||||||
e.pvp_career_points = atoi(row[76]);
|
e.pvp_career_points = static_cast<uint32_t>(strtoul(row[76], nullptr, 10));
|
||||||
e.pvp_best_kill_streak = atoi(row[77]);
|
e.pvp_best_kill_streak = static_cast<uint32_t>(strtoul(row[77], nullptr, 10));
|
||||||
e.pvp_worst_death_streak = atoi(row[78]);
|
e.pvp_worst_death_streak = static_cast<uint32_t>(strtoul(row[78], nullptr, 10));
|
||||||
e.pvp_current_kill_streak = atoi(row[79]);
|
e.pvp_current_kill_streak = static_cast<uint32_t>(strtoul(row[79], nullptr, 10));
|
||||||
e.pvp2 = atoi(row[80]);
|
e.pvp2 = static_cast<uint32_t>(strtoul(row[80], nullptr, 10));
|
||||||
e.pvp_type = atoi(row[81]);
|
e.pvp_type = static_cast<uint32_t>(strtoul(row[81], nullptr, 10));
|
||||||
e.show_helm = atoi(row[82]);
|
e.show_helm = static_cast<uint32_t>(strtoul(row[82], nullptr, 10));
|
||||||
e.group_auto_consent = atoi(row[83]);
|
e.group_auto_consent = static_cast<uint8_t>(strtoul(row[83], nullptr, 10));
|
||||||
e.raid_auto_consent = atoi(row[84]);
|
e.raid_auto_consent = static_cast<uint8_t>(strtoul(row[84], nullptr, 10));
|
||||||
e.guild_auto_consent = atoi(row[85]);
|
e.guild_auto_consent = static_cast<uint8_t>(strtoul(row[85], nullptr, 10));
|
||||||
e.leadership_exp_on = atoi(row[86]);
|
e.leadership_exp_on = static_cast<uint8_t>(strtoul(row[86], nullptr, 10));
|
||||||
e.RestTimer = atoi(row[87]);
|
e.RestTimer = static_cast<uint32_t>(strtoul(row[87], nullptr, 10));
|
||||||
e.air_remaining = atoi(row[88]);
|
e.air_remaining = static_cast<uint32_t>(strtoul(row[88], nullptr, 10));
|
||||||
e.autosplit_enabled = atoi(row[89]);
|
e.autosplit_enabled = static_cast<uint32_t>(strtoul(row[89], nullptr, 10));
|
||||||
e.lfp = atoi(row[90]);
|
e.lfp = static_cast<uint8_t>(strtoul(row[90], nullptr, 10));
|
||||||
e.lfg = atoi(row[91]);
|
e.lfg = static_cast<uint8_t>(strtoul(row[91], nullptr, 10));
|
||||||
e.mailkey = row[92] ? row[92] : "";
|
e.mailkey = row[92] ? row[92] : "";
|
||||||
e.xtargets = atoi(row[93]);
|
e.xtargets = static_cast<uint8_t>(strtoul(row[93], nullptr, 10));
|
||||||
e.firstlogon = atoi(row[94]);
|
e.firstlogon = static_cast<int8_t>(atoi(row[94]));
|
||||||
e.e_aa_effects = atoi(row[95]);
|
e.e_aa_effects = static_cast<uint32_t>(strtoul(row[95], nullptr, 10));
|
||||||
e.e_percent_to_aa = atoi(row[96]);
|
e.e_percent_to_aa = static_cast<uint32_t>(strtoul(row[96], nullptr, 10));
|
||||||
e.e_expended_aa_spent = atoi(row[97]);
|
e.e_expended_aa_spent = static_cast<uint32_t>(strtoul(row[97], nullptr, 10));
|
||||||
e.aa_points_spent_old = atoi(row[98]);
|
e.aa_points_spent_old = static_cast<uint32_t>(strtoul(row[98], nullptr, 10));
|
||||||
e.aa_points_old = atoi(row[99]);
|
e.aa_points_old = static_cast<uint32_t>(strtoul(row[99], nullptr, 10));
|
||||||
e.e_last_invsnapshot = atoi(row[100]);
|
e.e_last_invsnapshot = static_cast<uint32_t>(strtoul(row[100], nullptr, 10));
|
||||||
e.deleted_at = strtoll(row[101] ? row[101] : "-1", nullptr, 10);
|
e.deleted_at = strtoll(row[101] ? row[101] : "-1", nullptr, 10);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterDisciplinesRepository {
|
class BaseCharacterDisciplinesRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterDisciplines {
|
struct CharacterDisciplines {
|
||||||
int id;
|
uint32_t id;
|
||||||
int slot_id;
|
uint16_t slot_id;
|
||||||
int disc_id;
|
uint16_t disc_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterDisciplines e{};
|
CharacterDisciplines e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.disc_id = atoi(row[2]);
|
e.disc_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterDisciplines e{};
|
CharacterDisciplines e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.disc_id = atoi(row[2]);
|
e.disc_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterDisciplines e{};
|
CharacterDisciplines e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.disc_id = atoi(row[2]);
|
e.disc_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseCharacterExpModifiersRepository {
|
class BaseCharacterExpModifiersRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterExpModifiers {
|
struct CharacterExpModifiers {
|
||||||
int character_id;
|
int32_t character_id;
|
||||||
int zone_id;
|
int32_t zone_id;
|
||||||
float aa_modifier;
|
float aa_modifier;
|
||||||
float exp_modifier;
|
float exp_modifier;
|
||||||
};
|
};
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterExpModifiers e{};
|
CharacterExpModifiers e{};
|
||||||
|
|
||||||
e.character_id = atoi(row[0]);
|
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.aa_modifier = static_cast<float>(atof(row[2]));
|
e.aa_modifier = strtof(row[2], nullptr);
|
||||||
e.exp_modifier = static_cast<float>(atof(row[3]));
|
e.exp_modifier = strtof(row[3], nullptr);
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterExpModifiers e{};
|
CharacterExpModifiers e{};
|
||||||
|
|
||||||
e.character_id = atoi(row[0]);
|
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.aa_modifier = static_cast<float>(atof(row[2]));
|
e.aa_modifier = strtof(row[2], nullptr);
|
||||||
e.exp_modifier = static_cast<float>(atof(row[3]));
|
e.exp_modifier = strtof(row[3], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterExpModifiers e{};
|
CharacterExpModifiers e{};
|
||||||
|
|
||||||
e.character_id = atoi(row[0]);
|
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.aa_modifier = static_cast<float>(atof(row[2]));
|
e.aa_modifier = strtof(row[2], nullptr);
|
||||||
e.exp_modifier = static_cast<float>(atof(row[3]));
|
e.exp_modifier = strtof(row[3], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
class BaseCharacterExpeditionLockoutsRepository {
|
class BaseCharacterExpeditionLockoutsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterExpeditionLockouts {
|
struct CharacterExpeditionLockouts {
|
||||||
int id;
|
uint32_t id;
|
||||||
int character_id;
|
uint32_t character_id;
|
||||||
std::string expedition_name;
|
std::string expedition_name;
|
||||||
std::string event_name;
|
std::string event_name;
|
||||||
time_t expire_time;
|
time_t expire_time;
|
||||||
int duration;
|
uint32_t duration;
|
||||||
std::string from_expedition_uuid;
|
std::string from_expedition_uuid;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -138,12 +138,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterExpeditionLockouts e{};
|
CharacterExpeditionLockouts e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.expedition_name = row[2] ? row[2] : "";
|
e.expedition_name = row[2] ? row[2] : "";
|
||||||
e.event_name = row[3] ? row[3] : "";
|
e.event_name = row[3] ? row[3] : "";
|
||||||
e.expire_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
e.duration = atoi(row[5]);
|
e.duration = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.from_expedition_uuid = row[6] ? row[6] : "";
|
e.from_expedition_uuid = row[6] ? row[6] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -281,12 +281,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterExpeditionLockouts e{};
|
CharacterExpeditionLockouts e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.expedition_name = row[2] ? row[2] : "";
|
e.expedition_name = row[2] ? row[2] : "";
|
||||||
e.event_name = row[3] ? row[3] : "";
|
e.event_name = row[3] ? row[3] : "";
|
||||||
e.expire_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
e.duration = atoi(row[5]);
|
e.duration = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.from_expedition_uuid = row[6] ? row[6] : "";
|
e.from_expedition_uuid = row[6] ? row[6] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -312,12 +312,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterExpeditionLockouts e{};
|
CharacterExpeditionLockouts e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.expedition_name = row[2] ? row[2] : "";
|
e.expedition_name = row[2] ? row[2] : "";
|
||||||
e.event_name = row[3] ? row[3] : "";
|
e.event_name = row[3] ? row[3] : "";
|
||||||
e.expire_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
e.duration = atoi(row[5]);
|
e.duration = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.from_expedition_uuid = row[6] ? row[6] : "";
|
e.from_expedition_uuid = row[6] ? row[6] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
class BaseCharacterInspectMessagesRepository {
|
class BaseCharacterInspectMessagesRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterInspectMessages {
|
struct CharacterInspectMessages {
|
||||||
int id;
|
uint32_t id;
|
||||||
std::string inspect_message;
|
std::string inspect_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterInspectMessages e{};
|
CharacterInspectMessages e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.inspect_message = row[1] ? row[1] : "";
|
e.inspect_message = row[1] ? row[1] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -242,7 +242,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterInspectMessages e{};
|
CharacterInspectMessages e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.inspect_message = row[1] ? row[1] : "";
|
e.inspect_message = row[1] ? row[1] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -268,7 +268,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterInspectMessages e{};
|
CharacterInspectMessages e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.inspect_message = row[1] ? row[1] : "";
|
e.inspect_message = row[1] ? row[1] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
class BaseCharacterInstanceSafereturnsRepository {
|
class BaseCharacterInstanceSafereturnsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterInstanceSafereturns {
|
struct CharacterInstanceSafereturns {
|
||||||
int id;
|
uint32_t id;
|
||||||
int character_id;
|
uint32_t character_id;
|
||||||
int instance_zone_id;
|
int32_t instance_zone_id;
|
||||||
int instance_id;
|
int32_t instance_id;
|
||||||
int safe_zone_id;
|
int32_t safe_zone_id;
|
||||||
float safe_x;
|
float safe_x;
|
||||||
float safe_y;
|
float safe_y;
|
||||||
float safe_z;
|
float safe_z;
|
||||||
@ -146,15 +146,15 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterInstanceSafereturns e{};
|
CharacterInstanceSafereturns e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.instance_zone_id = atoi(row[2]);
|
e.instance_zone_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.instance_id = atoi(row[3]);
|
e.instance_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.safe_zone_id = atoi(row[4]);
|
e.safe_zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.safe_x = static_cast<float>(atof(row[5]));
|
e.safe_x = strtof(row[5], nullptr);
|
||||||
e.safe_y = static_cast<float>(atof(row[6]));
|
e.safe_y = strtof(row[6], nullptr);
|
||||||
e.safe_z = static_cast<float>(atof(row[7]));
|
e.safe_z = strtof(row[7], nullptr);
|
||||||
e.safe_heading = static_cast<float>(atof(row[8]));
|
e.safe_heading = strtof(row[8], nullptr);
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -297,15 +297,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterInstanceSafereturns e{};
|
CharacterInstanceSafereturns e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.instance_zone_id = atoi(row[2]);
|
e.instance_zone_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.instance_id = atoi(row[3]);
|
e.instance_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.safe_zone_id = atoi(row[4]);
|
e.safe_zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.safe_x = static_cast<float>(atof(row[5]));
|
e.safe_x = strtof(row[5], nullptr);
|
||||||
e.safe_y = static_cast<float>(atof(row[6]));
|
e.safe_y = strtof(row[6], nullptr);
|
||||||
e.safe_z = static_cast<float>(atof(row[7]));
|
e.safe_z = strtof(row[7], nullptr);
|
||||||
e.safe_heading = static_cast<float>(atof(row[8]));
|
e.safe_heading = strtof(row[8], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -330,15 +330,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterInstanceSafereturns e{};
|
CharacterInstanceSafereturns e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.instance_zone_id = atoi(row[2]);
|
e.instance_zone_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.instance_id = atoi(row[3]);
|
e.instance_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.safe_zone_id = atoi(row[4]);
|
e.safe_zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.safe_x = static_cast<float>(atof(row[5]));
|
e.safe_x = strtof(row[5], nullptr);
|
||||||
e.safe_y = static_cast<float>(atof(row[6]));
|
e.safe_y = strtof(row[6], nullptr);
|
||||||
e.safe_z = static_cast<float>(atof(row[7]));
|
e.safe_z = strtof(row[7], nullptr);
|
||||||
e.safe_heading = static_cast<float>(atof(row[8]));
|
e.safe_heading = strtof(row[8], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterItemRecastRepository {
|
class BaseCharacterItemRecastRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterItemRecast {
|
struct CharacterItemRecast {
|
||||||
int id;
|
uint32_t id;
|
||||||
int recast_type;
|
uint16_t recast_type;
|
||||||
int timestamp;
|
uint32_t timestamp;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterItemRecast e{};
|
CharacterItemRecast e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.recast_type = atoi(row[1]);
|
e.recast_type = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.timestamp = atoi(row[2]);
|
e.timestamp = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterItemRecast e{};
|
CharacterItemRecast e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.recast_type = atoi(row[1]);
|
e.recast_type = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.timestamp = atoi(row[2]);
|
e.timestamp = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterItemRecast e{};
|
CharacterItemRecast e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.recast_type = atoi(row[1]);
|
e.recast_type = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.timestamp = atoi(row[2]);
|
e.timestamp = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterLanguagesRepository {
|
class BaseCharacterLanguagesRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterLanguages {
|
struct CharacterLanguages {
|
||||||
int id;
|
uint32_t id;
|
||||||
int lang_id;
|
uint16_t lang_id;
|
||||||
int value;
|
uint16_t value;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterLanguages e{};
|
CharacterLanguages e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.lang_id = atoi(row[1]);
|
e.lang_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.value = atoi(row[2]);
|
e.value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -249,9 +249,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterLanguages e{};
|
CharacterLanguages e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.lang_id = atoi(row[1]);
|
e.lang_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.value = atoi(row[2]);
|
e.value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -276,9 +276,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterLanguages e{};
|
CharacterLanguages e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.lang_id = atoi(row[1]);
|
e.lang_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.value = atoi(row[2]);
|
e.value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterLeadershipAbilitiesRepository {
|
class BaseCharacterLeadershipAbilitiesRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterLeadershipAbilities {
|
struct CharacterLeadershipAbilities {
|
||||||
int id;
|
uint32_t id;
|
||||||
int slot;
|
uint16_t slot;
|
||||||
int rank;
|
uint16_t rank;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterLeadershipAbilities e{};
|
CharacterLeadershipAbilities e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.rank = atoi(row[2]);
|
e.rank = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterLeadershipAbilities e{};
|
CharacterLeadershipAbilities e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.rank = atoi(row[2]);
|
e.rank = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterLeadershipAbilities e{};
|
CharacterLeadershipAbilities e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.rank = atoi(row[2]);
|
e.rank = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,13 +19,13 @@
|
|||||||
class BaseCharacterMaterialRepository {
|
class BaseCharacterMaterialRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterMaterial {
|
struct CharacterMaterial {
|
||||||
int id;
|
uint32_t id;
|
||||||
int slot;
|
uint8_t slot;
|
||||||
int blue;
|
uint8_t blue;
|
||||||
int green;
|
uint8_t green;
|
||||||
int red;
|
uint8_t red;
|
||||||
int use_tint;
|
uint8_t use_tint;
|
||||||
int color;
|
uint32_t color;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -138,13 +138,13 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterMaterial e{};
|
CharacterMaterial e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.blue = atoi(row[2]);
|
e.blue = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.green = atoi(row[3]);
|
e.green = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.red = atoi(row[4]);
|
e.red = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.use_tint = atoi(row[5]);
|
e.use_tint = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.color = atoi(row[6]);
|
e.color = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -281,13 +281,13 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterMaterial e{};
|
CharacterMaterial e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.blue = atoi(row[2]);
|
e.blue = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.green = atoi(row[3]);
|
e.green = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.red = atoi(row[4]);
|
e.red = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.use_tint = atoi(row[5]);
|
e.use_tint = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.color = atoi(row[6]);
|
e.color = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -312,13 +312,13 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterMaterial e{};
|
CharacterMaterial e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot = atoi(row[1]);
|
e.slot = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.blue = atoi(row[2]);
|
e.blue = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.green = atoi(row[3]);
|
e.green = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.red = atoi(row[4]);
|
e.red = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.use_tint = atoi(row[5]);
|
e.use_tint = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.color = atoi(row[6]);
|
e.color = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterMemmedSpellsRepository {
|
class BaseCharacterMemmedSpellsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterMemmedSpells {
|
struct CharacterMemmedSpells {
|
||||||
int id;
|
uint32_t id;
|
||||||
int slot_id;
|
uint16_t slot_id;
|
||||||
int spell_id;
|
uint16_t spell_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterMemmedSpells e{};
|
CharacterMemmedSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterMemmedSpells e{};
|
CharacterMemmedSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterMemmedSpells e{};
|
CharacterMemmedSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseCharacterPeqzoneFlagsRepository {
|
class BaseCharacterPeqzoneFlagsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterPeqzoneFlags {
|
struct CharacterPeqzoneFlags {
|
||||||
int id;
|
int32_t id;
|
||||||
int zone_id;
|
int32_t zone_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -118,8 +118,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterPeqzoneFlags e{};
|
CharacterPeqzoneFlags e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPeqzoneFlags e{};
|
CharacterPeqzoneFlags e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -268,8 +268,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPeqzoneFlags e{};
|
CharacterPeqzoneFlags e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,17 +19,17 @@
|
|||||||
class BaseCharacterPetBuffsRepository {
|
class BaseCharacterPetBuffsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterPetBuffs {
|
struct CharacterPetBuffs {
|
||||||
int char_id;
|
int32_t char_id;
|
||||||
int pet;
|
int32_t pet;
|
||||||
int slot;
|
int32_t slot;
|
||||||
int spell_id;
|
int32_t spell_id;
|
||||||
int caster_level;
|
int8_t caster_level;
|
||||||
std::string castername;
|
std::string castername;
|
||||||
int ticsremaining;
|
int32_t ticsremaining;
|
||||||
int counters;
|
int32_t counters;
|
||||||
int numhits;
|
int32_t numhits;
|
||||||
int rune;
|
int32_t rune;
|
||||||
int instrument_mod;
|
uint8_t instrument_mod;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -154,17 +154,17 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterPetBuffs e{};
|
CharacterPetBuffs e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.spell_id = atoi(row[3]);
|
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.caster_level = atoi(row[4]);
|
e.caster_level = static_cast<int8_t>(atoi(row[4]));
|
||||||
e.castername = row[5] ? row[5] : "";
|
e.castername = row[5] ? row[5] : "";
|
||||||
e.ticsremaining = atoi(row[6]);
|
e.ticsremaining = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.counters = atoi(row[7]);
|
e.counters = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.numhits = atoi(row[8]);
|
e.numhits = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.rune = atoi(row[9]);
|
e.rune = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.instrument_mod = atoi(row[10]);
|
e.instrument_mod = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -314,17 +314,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPetBuffs e{};
|
CharacterPetBuffs e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.spell_id = atoi(row[3]);
|
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.caster_level = atoi(row[4]);
|
e.caster_level = static_cast<int8_t>(atoi(row[4]));
|
||||||
e.castername = row[5] ? row[5] : "";
|
e.castername = row[5] ? row[5] : "";
|
||||||
e.ticsremaining = atoi(row[6]);
|
e.ticsremaining = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.counters = atoi(row[7]);
|
e.counters = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.numhits = atoi(row[8]);
|
e.numhits = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.rune = atoi(row[9]);
|
e.rune = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.instrument_mod = atoi(row[10]);
|
e.instrument_mod = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -349,17 +349,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPetBuffs e{};
|
CharacterPetBuffs e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.spell_id = atoi(row[3]);
|
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.caster_level = atoi(row[4]);
|
e.caster_level = static_cast<int8_t>(atoi(row[4]));
|
||||||
e.castername = row[5] ? row[5] : "";
|
e.castername = row[5] ? row[5] : "";
|
||||||
e.ticsremaining = atoi(row[6]);
|
e.ticsremaining = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.counters = atoi(row[7]);
|
e.counters = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.numhits = atoi(row[8]);
|
e.numhits = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.rune = atoi(row[9]);
|
e.rune = static_cast<int32_t>(atoi(row[9]));
|
||||||
e.instrument_mod = atoi(row[10]);
|
e.instrument_mod = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,15 +19,15 @@
|
|||||||
class BaseCharacterPetInfoRepository {
|
class BaseCharacterPetInfoRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterPetInfo {
|
struct CharacterPetInfo {
|
||||||
int char_id;
|
int32_t char_id;
|
||||||
int pet;
|
int32_t pet;
|
||||||
std::string petname;
|
std::string petname;
|
||||||
int petpower;
|
int32_t petpower;
|
||||||
int spell_id;
|
int32_t spell_id;
|
||||||
int hp;
|
int32_t hp;
|
||||||
int mana;
|
int32_t mana;
|
||||||
float size;
|
float size;
|
||||||
int taunting;
|
int8_t taunting;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -146,15 +146,15 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterPetInfo e{};
|
CharacterPetInfo e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.petname = row[2] ? row[2] : "";
|
e.petname = row[2] ? row[2] : "";
|
||||||
e.petpower = atoi(row[3]);
|
e.petpower = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.spell_id = atoi(row[4]);
|
e.spell_id = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.hp = atoi(row[5]);
|
e.hp = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.mana = atoi(row[6]);
|
e.mana = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.size = static_cast<float>(atof(row[7]));
|
e.size = strtof(row[7], nullptr);
|
||||||
e.taunting = atoi(row[8]);
|
e.taunting = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -298,15 +298,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPetInfo e{};
|
CharacterPetInfo e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.petname = row[2] ? row[2] : "";
|
e.petname = row[2] ? row[2] : "";
|
||||||
e.petpower = atoi(row[3]);
|
e.petpower = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.spell_id = atoi(row[4]);
|
e.spell_id = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.hp = atoi(row[5]);
|
e.hp = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.mana = atoi(row[6]);
|
e.mana = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.size = static_cast<float>(atof(row[7]));
|
e.size = strtof(row[7], nullptr);
|
||||||
e.taunting = atoi(row[8]);
|
e.taunting = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -331,15 +331,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPetInfo e{};
|
CharacterPetInfo e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.petname = row[2] ? row[2] : "";
|
e.petname = row[2] ? row[2] : "";
|
||||||
e.petpower = atoi(row[3]);
|
e.petpower = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.spell_id = atoi(row[4]);
|
e.spell_id = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.hp = atoi(row[5]);
|
e.hp = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.mana = atoi(row[6]);
|
e.mana = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.size = static_cast<float>(atof(row[7]));
|
e.size = strtof(row[7], nullptr);
|
||||||
e.taunting = atoi(row[8]);
|
e.taunting = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseCharacterPetInventoryRepository {
|
class BaseCharacterPetInventoryRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterPetInventory {
|
struct CharacterPetInventory {
|
||||||
int char_id;
|
int32_t char_id;
|
||||||
int pet;
|
int32_t pet;
|
||||||
int slot;
|
int32_t slot;
|
||||||
int item_id;
|
int32_t item_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterPetInventory e{};
|
CharacterPetInventory e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.item_id = atoi(row[3]);
|
e.item_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPetInventory e{};
|
CharacterPetInventory e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.item_id = atoi(row[3]);
|
e.item_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPetInventory e{};
|
CharacterPetInventory e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.pet = atoi(row[1]);
|
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.item_id = atoi(row[3]);
|
e.item_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseCharacterPotionbeltRepository {
|
class BaseCharacterPotionbeltRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterPotionbelt {
|
struct CharacterPotionbelt {
|
||||||
int id;
|
uint32_t id;
|
||||||
int potion_id;
|
uint8_t potion_id;
|
||||||
int item_id;
|
uint32_t item_id;
|
||||||
int icon;
|
uint32_t icon;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterPotionbelt e{};
|
CharacterPotionbelt e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.potion_id = atoi(row[1]);
|
e.potion_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.item_id = atoi(row[2]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.icon = atoi(row[3]);
|
e.icon = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPotionbelt e{};
|
CharacterPotionbelt e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.potion_id = atoi(row[1]);
|
e.potion_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.item_id = atoi(row[2]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.icon = atoi(row[3]);
|
e.icon = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterPotionbelt e{};
|
CharacterPotionbelt e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.potion_id = atoi(row[1]);
|
e.potion_id = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.item_id = atoi(row[2]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.icon = atoi(row[3]);
|
e.icon = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterSkillsRepository {
|
class BaseCharacterSkillsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterSkills {
|
struct CharacterSkills {
|
||||||
int id;
|
uint32_t id;
|
||||||
int skill_id;
|
uint16_t skill_id;
|
||||||
int value;
|
uint16_t value;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterSkills e{};
|
CharacterSkills e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.skill_id = atoi(row[1]);
|
e.skill_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.value = atoi(row[2]);
|
e.value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -249,9 +249,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterSkills e{};
|
CharacterSkills e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.skill_id = atoi(row[1]);
|
e.skill_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.value = atoi(row[2]);
|
e.value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -276,9 +276,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterSkills e{};
|
CharacterSkills e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.skill_id = atoi(row[1]);
|
e.skill_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.value = atoi(row[2]);
|
e.value = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCharacterSpellsRepository {
|
class BaseCharacterSpellsRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterSpells {
|
struct CharacterSpells {
|
||||||
int id;
|
uint32_t id;
|
||||||
int slot_id;
|
uint16_t slot_id;
|
||||||
int spell_id;
|
uint16_t spell_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterSpells e{};
|
CharacterSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -249,9 +249,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterSpells e{};
|
CharacterSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -276,9 +276,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterSpells e{};
|
CharacterSpells e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slot_id = atoi(row[1]);
|
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.spell_id = atoi(row[2]);
|
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
class BaseCharacterTaskTimersRepository {
|
class BaseCharacterTaskTimersRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterTaskTimers {
|
struct CharacterTaskTimers {
|
||||||
int id;
|
uint32_t id;
|
||||||
int character_id;
|
uint32_t character_id;
|
||||||
int task_id;
|
uint32_t task_id;
|
||||||
int timer_type;
|
int32_t timer_type;
|
||||||
int timer_group;
|
int32_t timer_group;
|
||||||
time_t expire_time;
|
time_t expire_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -134,11 +134,11 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterTaskTimers e{};
|
CharacterTaskTimers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.task_id = atoi(row[2]);
|
e.task_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.timer_type = atoi(row[3]);
|
e.timer_type = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.timer_group = atoi(row[4]);
|
e.timer_group = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -273,11 +273,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterTaskTimers e{};
|
CharacterTaskTimers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.task_id = atoi(row[2]);
|
e.task_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.timer_type = atoi(row[3]);
|
e.timer_type = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.timer_group = atoi(row[4]);
|
e.timer_group = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -303,11 +303,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterTaskTimers e{};
|
CharacterTaskTimers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.character_id = atoi(row[1]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.task_id = atoi(row[2]);
|
e.task_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.timer_type = atoi(row[3]);
|
e.timer_type = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.timer_group = atoi(row[4]);
|
e.timer_group = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
class BaseCharacterTasksRepository {
|
class BaseCharacterTasksRepository {
|
||||||
public:
|
public:
|
||||||
struct CharacterTasks {
|
struct CharacterTasks {
|
||||||
int charid;
|
uint32_t charid;
|
||||||
int taskid;
|
uint32_t taskid;
|
||||||
int slot;
|
uint32_t slot;
|
||||||
int type;
|
int8_t type;
|
||||||
int acceptedtime;
|
uint32_t acceptedtime;
|
||||||
int was_rewarded;
|
int8_t was_rewarded;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -134,12 +134,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterTasks e{};
|
CharacterTasks e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.taskid = atoi(row[1]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.type = atoi(row[3]);
|
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.acceptedtime = atoi(row[4]);
|
e.acceptedtime = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.was_rewarded = atoi(row[5]);
|
e.was_rewarded = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -274,12 +274,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterTasks e{};
|
CharacterTasks e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.taskid = atoi(row[1]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.type = atoi(row[3]);
|
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.acceptedtime = atoi(row[4]);
|
e.acceptedtime = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.was_rewarded = atoi(row[5]);
|
e.was_rewarded = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -304,12 +304,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterTasks e{};
|
CharacterTasks e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.taskid = atoi(row[1]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.slot = atoi(row[2]);
|
e.slot = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.type = atoi(row[3]);
|
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.acceptedtime = atoi(row[4]);
|
e.acceptedtime = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.was_rewarded = atoi(row[5]);
|
e.was_rewarded = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCompletedSharedTaskActivityStateRepository {
|
class BaseCompletedSharedTaskActivityStateRepository {
|
||||||
public:
|
public:
|
||||||
struct CompletedSharedTaskActivityState {
|
struct CompletedSharedTaskActivityState {
|
||||||
int64 shared_task_id;
|
int64_t shared_task_id;
|
||||||
int activity_id;
|
int32_t activity_id;
|
||||||
int done_count;
|
int32_t done_count;
|
||||||
time_t updated_time;
|
time_t updated_time;
|
||||||
time_t completed_time;
|
time_t completed_time;
|
||||||
};
|
};
|
||||||
@ -131,8 +131,8 @@ public:
|
|||||||
CompletedSharedTaskActivityState e{};
|
CompletedSharedTaskActivityState e{};
|
||||||
|
|
||||||
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
||||||
e.activity_id = atoi(row[1]);
|
e.activity_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.done_count = atoi(row[2]);
|
e.done_count = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
|
|
||||||
@ -267,8 +267,8 @@ public:
|
|||||||
CompletedSharedTaskActivityState e{};
|
CompletedSharedTaskActivityState e{};
|
||||||
|
|
||||||
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
||||||
e.activity_id = atoi(row[1]);
|
e.activity_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.done_count = atoi(row[2]);
|
e.done_count = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
|
|
||||||
@ -296,8 +296,8 @@ public:
|
|||||||
CompletedSharedTaskActivityState e{};
|
CompletedSharedTaskActivityState e{};
|
||||||
|
|
||||||
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
||||||
e.activity_id = atoi(row[1]);
|
e.activity_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.done_count = atoi(row[2]);
|
e.done_count = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
|
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseCompletedSharedTaskMembersRepository {
|
class BaseCompletedSharedTaskMembersRepository {
|
||||||
public:
|
public:
|
||||||
struct CompletedSharedTaskMembers {
|
struct CompletedSharedTaskMembers {
|
||||||
int64 shared_task_id;
|
int64_t shared_task_id;
|
||||||
int64 character_id;
|
int64_t character_id;
|
||||||
int is_leader;
|
int8_t is_leader;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
|
|
||||||
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
||||||
e.character_id = strtoll(row[1], nullptr, 10);
|
e.character_id = strtoll(row[1], nullptr, 10);
|
||||||
e.is_leader = atoi(row[2]);
|
e.is_leader = static_cast<int8_t>(atoi(row[2]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -252,7 +252,7 @@ public:
|
|||||||
|
|
||||||
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
||||||
e.character_id = strtoll(row[1], nullptr, 10);
|
e.character_id = strtoll(row[1], nullptr, 10);
|
||||||
e.is_leader = atoi(row[2]);
|
e.is_leader = static_cast<int8_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -279,7 +279,7 @@ public:
|
|||||||
|
|
||||||
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
e.shared_task_id = strtoll(row[0], nullptr, 10);
|
||||||
e.character_id = strtoll(row[1], nullptr, 10);
|
e.character_id = strtoll(row[1], nullptr, 10);
|
||||||
e.is_leader = atoi(row[2]);
|
e.is_leader = static_cast<int8_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
class BaseCompletedSharedTasksRepository {
|
class BaseCompletedSharedTasksRepository {
|
||||||
public:
|
public:
|
||||||
struct CompletedSharedTasks {
|
struct CompletedSharedTasks {
|
||||||
int64 id;
|
int64_t id;
|
||||||
int task_id;
|
int32_t task_id;
|
||||||
time_t accepted_time;
|
time_t accepted_time;
|
||||||
time_t expire_time;
|
time_t expire_time;
|
||||||
time_t completion_time;
|
time_t completion_time;
|
||||||
int is_locked;
|
int8_t is_locked;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -135,11 +135,11 @@ public:
|
|||||||
CompletedSharedTasks e{};
|
CompletedSharedTasks e{};
|
||||||
|
|
||||||
e.id = strtoll(row[0], nullptr, 10);
|
e.id = strtoll(row[0], nullptr, 10);
|
||||||
e.task_id = atoi(row[1]);
|
e.task_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
|
e.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
|
||||||
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
e.is_locked = atoi(row[5]);
|
e.is_locked = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -275,11 +275,11 @@ public:
|
|||||||
CompletedSharedTasks e{};
|
CompletedSharedTasks e{};
|
||||||
|
|
||||||
e.id = strtoll(row[0], nullptr, 10);
|
e.id = strtoll(row[0], nullptr, 10);
|
||||||
e.task_id = atoi(row[1]);
|
e.task_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
|
e.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
|
||||||
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
e.is_locked = atoi(row[5]);
|
e.is_locked = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -305,11 +305,11 @@ public:
|
|||||||
CompletedSharedTasks e{};
|
CompletedSharedTasks e{};
|
||||||
|
|
||||||
e.id = strtoll(row[0], nullptr, 10);
|
e.id = strtoll(row[0], nullptr, 10);
|
||||||
e.task_id = atoi(row[1]);
|
e.task_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
|
e.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
|
||||||
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
e.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||||
e.is_locked = atoi(row[5]);
|
e.is_locked = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseCompletedTasksRepository {
|
class BaseCompletedTasksRepository {
|
||||||
public:
|
public:
|
||||||
struct CompletedTasks {
|
struct CompletedTasks {
|
||||||
int charid;
|
uint32_t charid;
|
||||||
int completedtime;
|
uint32_t completedtime;
|
||||||
int taskid;
|
uint32_t taskid;
|
||||||
int activityid;
|
int32_t activityid;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CompletedTasks e{};
|
CompletedTasks e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.completedtime = atoi(row[1]);
|
e.completedtime = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.taskid = atoi(row[2]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.activityid = atoi(row[3]);
|
e.activityid = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CompletedTasks e{};
|
CompletedTasks e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.completedtime = atoi(row[1]);
|
e.completedtime = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.taskid = atoi(row[2]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.activityid = atoi(row[3]);
|
e.activityid = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CompletedTasks e{};
|
CompletedTasks e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.completedtime = atoi(row[1]);
|
e.completedtime = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.taskid = atoi(row[2]);
|
e.taskid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.activityid = atoi(row[3]);
|
e.activityid = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseContentFlagsRepository {
|
class BaseContentFlagsRepository {
|
||||||
public:
|
public:
|
||||||
struct ContentFlags {
|
struct ContentFlags {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string flag_name;
|
std::string flag_name;
|
||||||
int enabled;
|
int8_t enabled;
|
||||||
std::string notes;
|
std::string notes;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -126,9 +126,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
ContentFlags e{};
|
ContentFlags e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.flag_name = row[1] ? row[1] : "";
|
e.flag_name = row[1] ? row[1] : "";
|
||||||
e.enabled = atoi(row[2]);
|
e.enabled = static_cast<int8_t>(atoi(row[2]));
|
||||||
e.notes = row[3] ? row[3] : "";
|
e.notes = row[3] ? row[3] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -257,9 +257,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
ContentFlags e{};
|
ContentFlags e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.flag_name = row[1] ? row[1] : "";
|
e.flag_name = row[1] ? row[1] : "";
|
||||||
e.enabled = atoi(row[2]);
|
e.enabled = static_cast<int8_t>(atoi(row[2]));
|
||||||
e.notes = row[3] ? row[3] : "";
|
e.notes = row[3] ? row[3] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -285,9 +285,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
ContentFlags e{};
|
ContentFlags e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.flag_name = row[1] ? row[1] : "";
|
e.flag_name = row[1] ? row[1] : "";
|
||||||
e.enabled = atoi(row[2]);
|
e.enabled = static_cast<int8_t>(atoi(row[2]));
|
||||||
e.notes = row[3] ? row[3] : "";
|
e.notes = row[3] ? row[3] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseDamageshieldtypesRepository {
|
class BaseDamageshieldtypesRepository {
|
||||||
public:
|
public:
|
||||||
struct Damageshieldtypes {
|
struct Damageshieldtypes {
|
||||||
int spellid;
|
uint32_t spellid;
|
||||||
int type;
|
uint8_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -118,8 +118,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Damageshieldtypes e{};
|
Damageshieldtypes e{};
|
||||||
|
|
||||||
e.spellid = atoi(row[0]);
|
e.spellid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Damageshieldtypes e{};
|
Damageshieldtypes e{};
|
||||||
|
|
||||||
e.spellid = atoi(row[0]);
|
e.spellid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -268,8 +268,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Damageshieldtypes e{};
|
Damageshieldtypes e{};
|
||||||
|
|
||||||
e.spellid = atoi(row[0]);
|
e.spellid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseDataBucketsRepository {
|
class BaseDataBucketsRepository {
|
||||||
public:
|
public:
|
||||||
struct DataBuckets {
|
struct DataBuckets {
|
||||||
int64 id;
|
uint64_t id;
|
||||||
std::string key;
|
std::string key;
|
||||||
std::string value;
|
std::string value;
|
||||||
int expires;
|
uint32_t expires;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
DataBuckets e{};
|
DataBuckets e{};
|
||||||
|
|
||||||
e.id = strtoll(row[0], nullptr, 10);
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.key = row[1] ? row[1] : "";
|
e.key = row[1] ? row[1] : "";
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
e.expires = atoi(row[3]);
|
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -257,10 +257,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DataBuckets e{};
|
DataBuckets e{};
|
||||||
|
|
||||||
e.id = strtoll(row[0], nullptr, 10);
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.key = row[1] ? row[1] : "";
|
e.key = row[1] ? row[1] : "";
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
e.expires = atoi(row[3]);
|
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -285,10 +285,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DataBuckets e{};
|
DataBuckets e{};
|
||||||
|
|
||||||
e.id = strtoll(row[0], nullptr, 10);
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.key = row[1] ? row[1] : "";
|
e.key = row[1] ? row[1] : "";
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
e.expires = atoi(row[3]);
|
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseDbStrRepository {
|
class BaseDbStrRepository {
|
||||||
public:
|
public:
|
||||||
struct DbStr {
|
struct DbStr {
|
||||||
int id;
|
int32_t id;
|
||||||
int type;
|
int32_t type;
|
||||||
std::string value;
|
std::string value;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -122,8 +122,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
DbStr e{};
|
DbStr e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -250,8 +250,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DbStr e{};
|
DbStr e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -277,8 +277,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DbStr e{};
|
DbStr e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
class BaseDiscordWebhooksRepository {
|
class BaseDiscordWebhooksRepository {
|
||||||
public:
|
public:
|
||||||
struct DiscordWebhooks {
|
struct DiscordWebhooks {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string webhook_name;
|
std::string webhook_name;
|
||||||
std::string webhook_url;
|
std::string webhook_url;
|
||||||
time_t created_at;
|
time_t created_at;
|
||||||
@ -130,7 +130,7 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
DiscordWebhooks e{};
|
DiscordWebhooks e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.webhook_name = row[1] ? row[1] : "";
|
e.webhook_name = row[1] ? row[1] : "";
|
||||||
e.webhook_url = row[2] ? row[2] : "";
|
e.webhook_url = row[2] ? row[2] : "";
|
||||||
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
@ -265,7 +265,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DiscordWebhooks e{};
|
DiscordWebhooks e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.webhook_name = row[1] ? row[1] : "";
|
e.webhook_name = row[1] ? row[1] : "";
|
||||||
e.webhook_url = row[2] ? row[2] : "";
|
e.webhook_url = row[2] ? row[2] : "";
|
||||||
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
@ -294,7 +294,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DiscordWebhooks e{};
|
DiscordWebhooks e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.webhook_name = row[1] ? row[1] : "";
|
e.webhook_name = row[1] ? row[1] : "";
|
||||||
e.webhook_url = row[2] ? row[2] : "";
|
e.webhook_url = row[2] ? row[2] : "";
|
||||||
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseDiscoveredItemsRepository {
|
class BaseDiscoveredItemsRepository {
|
||||||
public:
|
public:
|
||||||
struct DiscoveredItems {
|
struct DiscoveredItems {
|
||||||
int item_id;
|
uint32_t item_id;
|
||||||
std::string char_name;
|
std::string char_name;
|
||||||
int discovered_date;
|
uint32_t discovered_date;
|
||||||
int account_status;
|
int32_t account_status;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
DiscoveredItems e{};
|
DiscoveredItems e{};
|
||||||
|
|
||||||
e.item_id = atoi(row[0]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.char_name = row[1] ? row[1] : "";
|
e.char_name = row[1] ? row[1] : "";
|
||||||
e.discovered_date = atoi(row[2]);
|
e.discovered_date = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.account_status = atoi(row[3]);
|
e.account_status = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DiscoveredItems e{};
|
DiscoveredItems e{};
|
||||||
|
|
||||||
e.item_id = atoi(row[0]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.char_name = row[1] ? row[1] : "";
|
e.char_name = row[1] ? row[1] : "";
|
||||||
e.discovered_date = atoi(row[2]);
|
e.discovered_date = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.account_status = atoi(row[3]);
|
e.account_status = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DiscoveredItems e{};
|
DiscoveredItems e{};
|
||||||
|
|
||||||
e.item_id = atoi(row[0]);
|
e.item_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.char_name = row[1] ? row[1] : "";
|
e.char_name = row[1] ? row[1] : "";
|
||||||
e.discovered_date = atoi(row[2]);
|
e.discovered_date = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.account_status = atoi(row[3]);
|
e.account_status = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,40 +19,40 @@
|
|||||||
class BaseDoorsRepository {
|
class BaseDoorsRepository {
|
||||||
public:
|
public:
|
||||||
struct Doors {
|
struct Doors {
|
||||||
int id;
|
int32_t id;
|
||||||
int doorid;
|
int16_t doorid;
|
||||||
std::string zone;
|
std::string zone;
|
||||||
int version;
|
int16_t version;
|
||||||
std::string name;
|
std::string name;
|
||||||
float pos_y;
|
float pos_y;
|
||||||
float pos_x;
|
float pos_x;
|
||||||
float pos_z;
|
float pos_z;
|
||||||
float heading;
|
float heading;
|
||||||
int opentype;
|
int16_t opentype;
|
||||||
int guild;
|
int16_t guild;
|
||||||
int lockpick;
|
int16_t lockpick;
|
||||||
int keyitem;
|
int32_t keyitem;
|
||||||
int nokeyring;
|
uint8_t nokeyring;
|
||||||
int triggerdoor;
|
int16_t triggerdoor;
|
||||||
int triggertype;
|
int16_t triggertype;
|
||||||
int disable_timer;
|
int8_t disable_timer;
|
||||||
int doorisopen;
|
int16_t doorisopen;
|
||||||
int door_param;
|
int32_t door_param;
|
||||||
std::string dest_zone;
|
std::string dest_zone;
|
||||||
int dest_instance;
|
uint32_t dest_instance;
|
||||||
float dest_x;
|
float dest_x;
|
||||||
float dest_y;
|
float dest_y;
|
||||||
float dest_z;
|
float dest_z;
|
||||||
float dest_heading;
|
float dest_heading;
|
||||||
int invert_state;
|
int32_t invert_state;
|
||||||
int incline;
|
int32_t incline;
|
||||||
int size;
|
uint16_t size;
|
||||||
float buffer;
|
float buffer;
|
||||||
int client_version_mask;
|
uint32_t client_version_mask;
|
||||||
int is_ldon_door;
|
int16_t is_ldon_door;
|
||||||
int dz_switch_id;
|
int32_t dz_switch_id;
|
||||||
int min_expansion;
|
int8_t min_expansion;
|
||||||
int max_expansion;
|
int8_t max_expansion;
|
||||||
std::string content_flags;
|
std::string content_flags;
|
||||||
std::string content_flags_disabled;
|
std::string content_flags_disabled;
|
||||||
};
|
};
|
||||||
@ -254,40 +254,40 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Doors e{};
|
Doors e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.doorid = atoi(row[1]);
|
e.doorid = static_cast<int16_t>(atoi(row[1]));
|
||||||
e.zone = row[2] ? row[2] : "";
|
e.zone = row[2] ? row[2] : "";
|
||||||
e.version = atoi(row[3]);
|
e.version = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.name = row[4] ? row[4] : "";
|
e.name = row[4] ? row[4] : "";
|
||||||
e.pos_y = static_cast<float>(atof(row[5]));
|
e.pos_y = strtof(row[5], nullptr);
|
||||||
e.pos_x = static_cast<float>(atof(row[6]));
|
e.pos_x = strtof(row[6], nullptr);
|
||||||
e.pos_z = static_cast<float>(atof(row[7]));
|
e.pos_z = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.opentype = atoi(row[9]);
|
e.opentype = static_cast<int16_t>(atoi(row[9]));
|
||||||
e.guild = atoi(row[10]);
|
e.guild = static_cast<int16_t>(atoi(row[10]));
|
||||||
e.lockpick = atoi(row[11]);
|
e.lockpick = static_cast<int16_t>(atoi(row[11]));
|
||||||
e.keyitem = atoi(row[12]);
|
e.keyitem = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.nokeyring = atoi(row[13]);
|
e.nokeyring = static_cast<uint8_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.triggerdoor = atoi(row[14]);
|
e.triggerdoor = static_cast<int16_t>(atoi(row[14]));
|
||||||
e.triggertype = atoi(row[15]);
|
e.triggertype = static_cast<int16_t>(atoi(row[15]));
|
||||||
e.disable_timer = atoi(row[16]);
|
e.disable_timer = static_cast<int8_t>(atoi(row[16]));
|
||||||
e.doorisopen = atoi(row[17]);
|
e.doorisopen = static_cast<int16_t>(atoi(row[17]));
|
||||||
e.door_param = atoi(row[18]);
|
e.door_param = static_cast<int32_t>(atoi(row[18]));
|
||||||
e.dest_zone = row[19] ? row[19] : "";
|
e.dest_zone = row[19] ? row[19] : "";
|
||||||
e.dest_instance = atoi(row[20]);
|
e.dest_instance = static_cast<uint32_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.dest_x = static_cast<float>(atof(row[21]));
|
e.dest_x = strtof(row[21], nullptr);
|
||||||
e.dest_y = static_cast<float>(atof(row[22]));
|
e.dest_y = strtof(row[22], nullptr);
|
||||||
e.dest_z = static_cast<float>(atof(row[23]));
|
e.dest_z = strtof(row[23], nullptr);
|
||||||
e.dest_heading = static_cast<float>(atof(row[24]));
|
e.dest_heading = strtof(row[24], nullptr);
|
||||||
e.invert_state = atoi(row[25]);
|
e.invert_state = static_cast<int32_t>(atoi(row[25]));
|
||||||
e.incline = atoi(row[26]);
|
e.incline = static_cast<int32_t>(atoi(row[26]));
|
||||||
e.size = atoi(row[27]);
|
e.size = static_cast<uint16_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.buffer = static_cast<float>(atof(row[28]));
|
e.buffer = strtof(row[28], nullptr);
|
||||||
e.client_version_mask = atoi(row[29]);
|
e.client_version_mask = static_cast<uint32_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.is_ldon_door = atoi(row[30]);
|
e.is_ldon_door = static_cast<int16_t>(atoi(row[30]));
|
||||||
e.dz_switch_id = atoi(row[31]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[31]));
|
||||||
e.min_expansion = atoi(row[32]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[32]));
|
||||||
e.max_expansion = atoi(row[33]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[33]));
|
||||||
e.content_flags = row[34] ? row[34] : "";
|
e.content_flags = row[34] ? row[34] : "";
|
||||||
e.content_flags_disabled = row[35] ? row[35] : "";
|
e.content_flags_disabled = row[35] ? row[35] : "";
|
||||||
|
|
||||||
@ -513,40 +513,40 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Doors e{};
|
Doors e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.doorid = atoi(row[1]);
|
e.doorid = static_cast<int16_t>(atoi(row[1]));
|
||||||
e.zone = row[2] ? row[2] : "";
|
e.zone = row[2] ? row[2] : "";
|
||||||
e.version = atoi(row[3]);
|
e.version = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.name = row[4] ? row[4] : "";
|
e.name = row[4] ? row[4] : "";
|
||||||
e.pos_y = static_cast<float>(atof(row[5]));
|
e.pos_y = strtof(row[5], nullptr);
|
||||||
e.pos_x = static_cast<float>(atof(row[6]));
|
e.pos_x = strtof(row[6], nullptr);
|
||||||
e.pos_z = static_cast<float>(atof(row[7]));
|
e.pos_z = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.opentype = atoi(row[9]);
|
e.opentype = static_cast<int16_t>(atoi(row[9]));
|
||||||
e.guild = atoi(row[10]);
|
e.guild = static_cast<int16_t>(atoi(row[10]));
|
||||||
e.lockpick = atoi(row[11]);
|
e.lockpick = static_cast<int16_t>(atoi(row[11]));
|
||||||
e.keyitem = atoi(row[12]);
|
e.keyitem = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.nokeyring = atoi(row[13]);
|
e.nokeyring = static_cast<uint8_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.triggerdoor = atoi(row[14]);
|
e.triggerdoor = static_cast<int16_t>(atoi(row[14]));
|
||||||
e.triggertype = atoi(row[15]);
|
e.triggertype = static_cast<int16_t>(atoi(row[15]));
|
||||||
e.disable_timer = atoi(row[16]);
|
e.disable_timer = static_cast<int8_t>(atoi(row[16]));
|
||||||
e.doorisopen = atoi(row[17]);
|
e.doorisopen = static_cast<int16_t>(atoi(row[17]));
|
||||||
e.door_param = atoi(row[18]);
|
e.door_param = static_cast<int32_t>(atoi(row[18]));
|
||||||
e.dest_zone = row[19] ? row[19] : "";
|
e.dest_zone = row[19] ? row[19] : "";
|
||||||
e.dest_instance = atoi(row[20]);
|
e.dest_instance = static_cast<uint32_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.dest_x = static_cast<float>(atof(row[21]));
|
e.dest_x = strtof(row[21], nullptr);
|
||||||
e.dest_y = static_cast<float>(atof(row[22]));
|
e.dest_y = strtof(row[22], nullptr);
|
||||||
e.dest_z = static_cast<float>(atof(row[23]));
|
e.dest_z = strtof(row[23], nullptr);
|
||||||
e.dest_heading = static_cast<float>(atof(row[24]));
|
e.dest_heading = strtof(row[24], nullptr);
|
||||||
e.invert_state = atoi(row[25]);
|
e.invert_state = static_cast<int32_t>(atoi(row[25]));
|
||||||
e.incline = atoi(row[26]);
|
e.incline = static_cast<int32_t>(atoi(row[26]));
|
||||||
e.size = atoi(row[27]);
|
e.size = static_cast<uint16_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.buffer = static_cast<float>(atof(row[28]));
|
e.buffer = strtof(row[28], nullptr);
|
||||||
e.client_version_mask = atoi(row[29]);
|
e.client_version_mask = static_cast<uint32_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.is_ldon_door = atoi(row[30]);
|
e.is_ldon_door = static_cast<int16_t>(atoi(row[30]));
|
||||||
e.dz_switch_id = atoi(row[31]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[31]));
|
||||||
e.min_expansion = atoi(row[32]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[32]));
|
||||||
e.max_expansion = atoi(row[33]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[33]));
|
||||||
e.content_flags = row[34] ? row[34] : "";
|
e.content_flags = row[34] ? row[34] : "";
|
||||||
e.content_flags_disabled = row[35] ? row[35] : "";
|
e.content_flags_disabled = row[35] ? row[35] : "";
|
||||||
|
|
||||||
@ -573,40 +573,40 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Doors e{};
|
Doors e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.doorid = atoi(row[1]);
|
e.doorid = static_cast<int16_t>(atoi(row[1]));
|
||||||
e.zone = row[2] ? row[2] : "";
|
e.zone = row[2] ? row[2] : "";
|
||||||
e.version = atoi(row[3]);
|
e.version = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.name = row[4] ? row[4] : "";
|
e.name = row[4] ? row[4] : "";
|
||||||
e.pos_y = static_cast<float>(atof(row[5]));
|
e.pos_y = strtof(row[5], nullptr);
|
||||||
e.pos_x = static_cast<float>(atof(row[6]));
|
e.pos_x = strtof(row[6], nullptr);
|
||||||
e.pos_z = static_cast<float>(atof(row[7]));
|
e.pos_z = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.opentype = atoi(row[9]);
|
e.opentype = static_cast<int16_t>(atoi(row[9]));
|
||||||
e.guild = atoi(row[10]);
|
e.guild = static_cast<int16_t>(atoi(row[10]));
|
||||||
e.lockpick = atoi(row[11]);
|
e.lockpick = static_cast<int16_t>(atoi(row[11]));
|
||||||
e.keyitem = atoi(row[12]);
|
e.keyitem = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.nokeyring = atoi(row[13]);
|
e.nokeyring = static_cast<uint8_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.triggerdoor = atoi(row[14]);
|
e.triggerdoor = static_cast<int16_t>(atoi(row[14]));
|
||||||
e.triggertype = atoi(row[15]);
|
e.triggertype = static_cast<int16_t>(atoi(row[15]));
|
||||||
e.disable_timer = atoi(row[16]);
|
e.disable_timer = static_cast<int8_t>(atoi(row[16]));
|
||||||
e.doorisopen = atoi(row[17]);
|
e.doorisopen = static_cast<int16_t>(atoi(row[17]));
|
||||||
e.door_param = atoi(row[18]);
|
e.door_param = static_cast<int32_t>(atoi(row[18]));
|
||||||
e.dest_zone = row[19] ? row[19] : "";
|
e.dest_zone = row[19] ? row[19] : "";
|
||||||
e.dest_instance = atoi(row[20]);
|
e.dest_instance = static_cast<uint32_t>(strtoul(row[20], nullptr, 10));
|
||||||
e.dest_x = static_cast<float>(atof(row[21]));
|
e.dest_x = strtof(row[21], nullptr);
|
||||||
e.dest_y = static_cast<float>(atof(row[22]));
|
e.dest_y = strtof(row[22], nullptr);
|
||||||
e.dest_z = static_cast<float>(atof(row[23]));
|
e.dest_z = strtof(row[23], nullptr);
|
||||||
e.dest_heading = static_cast<float>(atof(row[24]));
|
e.dest_heading = strtof(row[24], nullptr);
|
||||||
e.invert_state = atoi(row[25]);
|
e.invert_state = static_cast<int32_t>(atoi(row[25]));
|
||||||
e.incline = atoi(row[26]);
|
e.incline = static_cast<int32_t>(atoi(row[26]));
|
||||||
e.size = atoi(row[27]);
|
e.size = static_cast<uint16_t>(strtoul(row[27], nullptr, 10));
|
||||||
e.buffer = static_cast<float>(atof(row[28]));
|
e.buffer = strtof(row[28], nullptr);
|
||||||
e.client_version_mask = atoi(row[29]);
|
e.client_version_mask = static_cast<uint32_t>(strtoul(row[29], nullptr, 10));
|
||||||
e.is_ldon_door = atoi(row[30]);
|
e.is_ldon_door = static_cast<int16_t>(atoi(row[30]));
|
||||||
e.dz_switch_id = atoi(row[31]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[31]));
|
||||||
e.min_expansion = atoi(row[32]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[32]));
|
||||||
e.max_expansion = atoi(row[33]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[33]));
|
||||||
e.content_flags = row[34] ? row[34] : "";
|
e.content_flags = row[34] ? row[34] : "";
|
||||||
e.content_flags_disabled = row[35] ? row[35] : "";
|
e.content_flags_disabled = row[35] ? row[35] : "";
|
||||||
|
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseDynamicZoneMembersRepository {
|
class BaseDynamicZoneMembersRepository {
|
||||||
public:
|
public:
|
||||||
struct DynamicZoneMembers {
|
struct DynamicZoneMembers {
|
||||||
int id;
|
uint32_t id;
|
||||||
int dynamic_zone_id;
|
uint32_t dynamic_zone_id;
|
||||||
int character_id;
|
uint32_t character_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
DynamicZoneMembers e{};
|
DynamicZoneMembers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.dynamic_zone_id = atoi(row[1]);
|
e.dynamic_zone_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.character_id = atoi(row[2]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -249,9 +249,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DynamicZoneMembers e{};
|
DynamicZoneMembers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.dynamic_zone_id = atoi(row[1]);
|
e.dynamic_zone_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.character_id = atoi(row[2]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -276,9 +276,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DynamicZoneMembers e{};
|
DynamicZoneMembers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.dynamic_zone_id = atoi(row[1]);
|
e.dynamic_zone_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.character_id = atoi(row[2]);
|
e.character_id = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,24 +19,24 @@
|
|||||||
class BaseDynamicZoneTemplatesRepository {
|
class BaseDynamicZoneTemplatesRepository {
|
||||||
public:
|
public:
|
||||||
struct DynamicZoneTemplates {
|
struct DynamicZoneTemplates {
|
||||||
int id;
|
uint32_t id;
|
||||||
int zone_id;
|
int32_t zone_id;
|
||||||
int zone_version;
|
int32_t zone_version;
|
||||||
std::string name;
|
std::string name;
|
||||||
int min_players;
|
int32_t min_players;
|
||||||
int max_players;
|
int32_t max_players;
|
||||||
int duration_seconds;
|
int32_t duration_seconds;
|
||||||
int dz_switch_id;
|
int32_t dz_switch_id;
|
||||||
int compass_zone_id;
|
int32_t compass_zone_id;
|
||||||
float compass_x;
|
float compass_x;
|
||||||
float compass_y;
|
float compass_y;
|
||||||
float compass_z;
|
float compass_z;
|
||||||
int return_zone_id;
|
int32_t return_zone_id;
|
||||||
float return_x;
|
float return_x;
|
||||||
float return_y;
|
float return_y;
|
||||||
float return_z;
|
float return_z;
|
||||||
float return_h;
|
float return_h;
|
||||||
int override_zone_in;
|
int8_t override_zone_in;
|
||||||
float zone_in_x;
|
float zone_in_x;
|
||||||
float zone_in_y;
|
float zone_in_y;
|
||||||
float zone_in_z;
|
float zone_in_z;
|
||||||
@ -198,28 +198,28 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
DynamicZoneTemplates e{};
|
DynamicZoneTemplates e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.zone_version = atoi(row[2]);
|
e.zone_version = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.name = row[3] ? row[3] : "";
|
e.name = row[3] ? row[3] : "";
|
||||||
e.min_players = atoi(row[4]);
|
e.min_players = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.max_players = atoi(row[5]);
|
e.max_players = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.duration_seconds = atoi(row[6]);
|
e.duration_seconds = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.dz_switch_id = atoi(row[7]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.compass_zone_id = atoi(row[8]);
|
e.compass_zone_id = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.compass_x = static_cast<float>(atof(row[9]));
|
e.compass_x = strtof(row[9], nullptr);
|
||||||
e.compass_y = static_cast<float>(atof(row[10]));
|
e.compass_y = strtof(row[10], nullptr);
|
||||||
e.compass_z = static_cast<float>(atof(row[11]));
|
e.compass_z = strtof(row[11], nullptr);
|
||||||
e.return_zone_id = atoi(row[12]);
|
e.return_zone_id = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.return_x = static_cast<float>(atof(row[13]));
|
e.return_x = strtof(row[13], nullptr);
|
||||||
e.return_y = static_cast<float>(atof(row[14]));
|
e.return_y = strtof(row[14], nullptr);
|
||||||
e.return_z = static_cast<float>(atof(row[15]));
|
e.return_z = strtof(row[15], nullptr);
|
||||||
e.return_h = static_cast<float>(atof(row[16]));
|
e.return_h = strtof(row[16], nullptr);
|
||||||
e.override_zone_in = atoi(row[17]);
|
e.override_zone_in = static_cast<int8_t>(atoi(row[17]));
|
||||||
e.zone_in_x = static_cast<float>(atof(row[18]));
|
e.zone_in_x = strtof(row[18], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[19]));
|
e.zone_in_y = strtof(row[19], nullptr);
|
||||||
e.zone_in_z = static_cast<float>(atof(row[20]));
|
e.zone_in_z = strtof(row[20], nullptr);
|
||||||
e.zone_in_h = static_cast<float>(atof(row[21]));
|
e.zone_in_h = strtof(row[21], nullptr);
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -401,28 +401,28 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DynamicZoneTemplates e{};
|
DynamicZoneTemplates e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.zone_version = atoi(row[2]);
|
e.zone_version = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.name = row[3] ? row[3] : "";
|
e.name = row[3] ? row[3] : "";
|
||||||
e.min_players = atoi(row[4]);
|
e.min_players = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.max_players = atoi(row[5]);
|
e.max_players = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.duration_seconds = atoi(row[6]);
|
e.duration_seconds = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.dz_switch_id = atoi(row[7]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.compass_zone_id = atoi(row[8]);
|
e.compass_zone_id = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.compass_x = static_cast<float>(atof(row[9]));
|
e.compass_x = strtof(row[9], nullptr);
|
||||||
e.compass_y = static_cast<float>(atof(row[10]));
|
e.compass_y = strtof(row[10], nullptr);
|
||||||
e.compass_z = static_cast<float>(atof(row[11]));
|
e.compass_z = strtof(row[11], nullptr);
|
||||||
e.return_zone_id = atoi(row[12]);
|
e.return_zone_id = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.return_x = static_cast<float>(atof(row[13]));
|
e.return_x = strtof(row[13], nullptr);
|
||||||
e.return_y = static_cast<float>(atof(row[14]));
|
e.return_y = strtof(row[14], nullptr);
|
||||||
e.return_z = static_cast<float>(atof(row[15]));
|
e.return_z = strtof(row[15], nullptr);
|
||||||
e.return_h = static_cast<float>(atof(row[16]));
|
e.return_h = strtof(row[16], nullptr);
|
||||||
e.override_zone_in = atoi(row[17]);
|
e.override_zone_in = static_cast<int8_t>(atoi(row[17]));
|
||||||
e.zone_in_x = static_cast<float>(atof(row[18]));
|
e.zone_in_x = strtof(row[18], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[19]));
|
e.zone_in_y = strtof(row[19], nullptr);
|
||||||
e.zone_in_z = static_cast<float>(atof(row[20]));
|
e.zone_in_z = strtof(row[20], nullptr);
|
||||||
e.zone_in_h = static_cast<float>(atof(row[21]));
|
e.zone_in_h = strtof(row[21], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -447,28 +447,28 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DynamicZoneTemplates e{};
|
DynamicZoneTemplates e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.zone_version = atoi(row[2]);
|
e.zone_version = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.name = row[3] ? row[3] : "";
|
e.name = row[3] ? row[3] : "";
|
||||||
e.min_players = atoi(row[4]);
|
e.min_players = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.max_players = atoi(row[5]);
|
e.max_players = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.duration_seconds = atoi(row[6]);
|
e.duration_seconds = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.dz_switch_id = atoi(row[7]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.compass_zone_id = atoi(row[8]);
|
e.compass_zone_id = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.compass_x = static_cast<float>(atof(row[9]));
|
e.compass_x = strtof(row[9], nullptr);
|
||||||
e.compass_y = static_cast<float>(atof(row[10]));
|
e.compass_y = strtof(row[10], nullptr);
|
||||||
e.compass_z = static_cast<float>(atof(row[11]));
|
e.compass_z = strtof(row[11], nullptr);
|
||||||
e.return_zone_id = atoi(row[12]);
|
e.return_zone_id = static_cast<int32_t>(atoi(row[12]));
|
||||||
e.return_x = static_cast<float>(atof(row[13]));
|
e.return_x = strtof(row[13], nullptr);
|
||||||
e.return_y = static_cast<float>(atof(row[14]));
|
e.return_y = strtof(row[14], nullptr);
|
||||||
e.return_z = static_cast<float>(atof(row[15]));
|
e.return_z = strtof(row[15], nullptr);
|
||||||
e.return_h = static_cast<float>(atof(row[16]));
|
e.return_h = strtof(row[16], nullptr);
|
||||||
e.override_zone_in = atoi(row[17]);
|
e.override_zone_in = static_cast<int8_t>(atoi(row[17]));
|
||||||
e.zone_in_x = static_cast<float>(atof(row[18]));
|
e.zone_in_x = strtof(row[18], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[19]));
|
e.zone_in_y = strtof(row[19], nullptr);
|
||||||
e.zone_in_z = static_cast<float>(atof(row[20]));
|
e.zone_in_z = strtof(row[20], nullptr);
|
||||||
e.zone_in_h = static_cast<float>(atof(row[21]));
|
e.zone_in_h = strtof(row[21], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,20 +19,20 @@
|
|||||||
class BaseDynamicZonesRepository {
|
class BaseDynamicZonesRepository {
|
||||||
public:
|
public:
|
||||||
struct DynamicZones {
|
struct DynamicZones {
|
||||||
int id;
|
uint32_t id;
|
||||||
int instance_id;
|
int32_t instance_id;
|
||||||
int type;
|
uint8_t type;
|
||||||
std::string uuid;
|
std::string uuid;
|
||||||
std::string name;
|
std::string name;
|
||||||
int leader_id;
|
uint32_t leader_id;
|
||||||
int min_players;
|
uint32_t min_players;
|
||||||
int max_players;
|
uint32_t max_players;
|
||||||
int dz_switch_id;
|
int32_t dz_switch_id;
|
||||||
int compass_zone_id;
|
uint32_t compass_zone_id;
|
||||||
float compass_x;
|
float compass_x;
|
||||||
float compass_y;
|
float compass_y;
|
||||||
float compass_z;
|
float compass_z;
|
||||||
int safe_return_zone_id;
|
uint32_t safe_return_zone_id;
|
||||||
float safe_return_x;
|
float safe_return_x;
|
||||||
float safe_return_y;
|
float safe_return_y;
|
||||||
float safe_return_z;
|
float safe_return_z;
|
||||||
@ -41,7 +41,7 @@ public:
|
|||||||
float zone_in_y;
|
float zone_in_y;
|
||||||
float zone_in_z;
|
float zone_in_z;
|
||||||
float zone_in_heading;
|
float zone_in_heading;
|
||||||
int has_zone_in;
|
uint8_t has_zone_in;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -202,29 +202,29 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
DynamicZones e{};
|
DynamicZones e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.instance_id = atoi(row[1]);
|
e.instance_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.uuid = row[3] ? row[3] : "";
|
e.uuid = row[3] ? row[3] : "";
|
||||||
e.name = row[4] ? row[4] : "";
|
e.name = row[4] ? row[4] : "";
|
||||||
e.leader_id = atoi(row[5]);
|
e.leader_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.min_players = atoi(row[6]);
|
e.min_players = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.max_players = atoi(row[7]);
|
e.max_players = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.dz_switch_id = atoi(row[8]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.compass_zone_id = atoi(row[9]);
|
e.compass_zone_id = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.compass_x = static_cast<float>(atof(row[10]));
|
e.compass_x = strtof(row[10], nullptr);
|
||||||
e.compass_y = static_cast<float>(atof(row[11]));
|
e.compass_y = strtof(row[11], nullptr);
|
||||||
e.compass_z = static_cast<float>(atof(row[12]));
|
e.compass_z = strtof(row[12], nullptr);
|
||||||
e.safe_return_zone_id = atoi(row[13]);
|
e.safe_return_zone_id = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.safe_return_x = static_cast<float>(atof(row[14]));
|
e.safe_return_x = strtof(row[14], nullptr);
|
||||||
e.safe_return_y = static_cast<float>(atof(row[15]));
|
e.safe_return_y = strtof(row[15], nullptr);
|
||||||
e.safe_return_z = static_cast<float>(atof(row[16]));
|
e.safe_return_z = strtof(row[16], nullptr);
|
||||||
e.safe_return_heading = static_cast<float>(atof(row[17]));
|
e.safe_return_heading = strtof(row[17], nullptr);
|
||||||
e.zone_in_x = static_cast<float>(atof(row[18]));
|
e.zone_in_x = strtof(row[18], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[19]));
|
e.zone_in_y = strtof(row[19], nullptr);
|
||||||
e.zone_in_z = static_cast<float>(atof(row[20]));
|
e.zone_in_z = strtof(row[20], nullptr);
|
||||||
e.zone_in_heading = static_cast<float>(atof(row[21]));
|
e.zone_in_heading = strtof(row[21], nullptr);
|
||||||
e.has_zone_in = atoi(row[22]);
|
e.has_zone_in = static_cast<uint8_t>(strtoul(row[22], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -409,29 +409,29 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DynamicZones e{};
|
DynamicZones e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.instance_id = atoi(row[1]);
|
e.instance_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.uuid = row[3] ? row[3] : "";
|
e.uuid = row[3] ? row[3] : "";
|
||||||
e.name = row[4] ? row[4] : "";
|
e.name = row[4] ? row[4] : "";
|
||||||
e.leader_id = atoi(row[5]);
|
e.leader_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.min_players = atoi(row[6]);
|
e.min_players = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.max_players = atoi(row[7]);
|
e.max_players = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.dz_switch_id = atoi(row[8]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.compass_zone_id = atoi(row[9]);
|
e.compass_zone_id = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.compass_x = static_cast<float>(atof(row[10]));
|
e.compass_x = strtof(row[10], nullptr);
|
||||||
e.compass_y = static_cast<float>(atof(row[11]));
|
e.compass_y = strtof(row[11], nullptr);
|
||||||
e.compass_z = static_cast<float>(atof(row[12]));
|
e.compass_z = strtof(row[12], nullptr);
|
||||||
e.safe_return_zone_id = atoi(row[13]);
|
e.safe_return_zone_id = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.safe_return_x = static_cast<float>(atof(row[14]));
|
e.safe_return_x = strtof(row[14], nullptr);
|
||||||
e.safe_return_y = static_cast<float>(atof(row[15]));
|
e.safe_return_y = strtof(row[15], nullptr);
|
||||||
e.safe_return_z = static_cast<float>(atof(row[16]));
|
e.safe_return_z = strtof(row[16], nullptr);
|
||||||
e.safe_return_heading = static_cast<float>(atof(row[17]));
|
e.safe_return_heading = strtof(row[17], nullptr);
|
||||||
e.zone_in_x = static_cast<float>(atof(row[18]));
|
e.zone_in_x = strtof(row[18], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[19]));
|
e.zone_in_y = strtof(row[19], nullptr);
|
||||||
e.zone_in_z = static_cast<float>(atof(row[20]));
|
e.zone_in_z = strtof(row[20], nullptr);
|
||||||
e.zone_in_heading = static_cast<float>(atof(row[21]));
|
e.zone_in_heading = strtof(row[21], nullptr);
|
||||||
e.has_zone_in = atoi(row[22]);
|
e.has_zone_in = static_cast<uint8_t>(strtoul(row[22], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -456,29 +456,29 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
DynamicZones e{};
|
DynamicZones e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.instance_id = atoi(row[1]);
|
e.instance_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.uuid = row[3] ? row[3] : "";
|
e.uuid = row[3] ? row[3] : "";
|
||||||
e.name = row[4] ? row[4] : "";
|
e.name = row[4] ? row[4] : "";
|
||||||
e.leader_id = atoi(row[5]);
|
e.leader_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.min_players = atoi(row[6]);
|
e.min_players = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.max_players = atoi(row[7]);
|
e.max_players = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.dz_switch_id = atoi(row[8]);
|
e.dz_switch_id = static_cast<int32_t>(atoi(row[8]));
|
||||||
e.compass_zone_id = atoi(row[9]);
|
e.compass_zone_id = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.compass_x = static_cast<float>(atof(row[10]));
|
e.compass_x = strtof(row[10], nullptr);
|
||||||
e.compass_y = static_cast<float>(atof(row[11]));
|
e.compass_y = strtof(row[11], nullptr);
|
||||||
e.compass_z = static_cast<float>(atof(row[12]));
|
e.compass_z = strtof(row[12], nullptr);
|
||||||
e.safe_return_zone_id = atoi(row[13]);
|
e.safe_return_zone_id = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.safe_return_x = static_cast<float>(atof(row[14]));
|
e.safe_return_x = strtof(row[14], nullptr);
|
||||||
e.safe_return_y = static_cast<float>(atof(row[15]));
|
e.safe_return_y = strtof(row[15], nullptr);
|
||||||
e.safe_return_z = static_cast<float>(atof(row[16]));
|
e.safe_return_z = strtof(row[16], nullptr);
|
||||||
e.safe_return_heading = static_cast<float>(atof(row[17]));
|
e.safe_return_heading = strtof(row[17], nullptr);
|
||||||
e.zone_in_x = static_cast<float>(atof(row[18]));
|
e.zone_in_x = strtof(row[18], nullptr);
|
||||||
e.zone_in_y = static_cast<float>(atof(row[19]));
|
e.zone_in_y = strtof(row[19], nullptr);
|
||||||
e.zone_in_z = static_cast<float>(atof(row[20]));
|
e.zone_in_z = strtof(row[20], nullptr);
|
||||||
e.zone_in_heading = static_cast<float>(atof(row[21]));
|
e.zone_in_heading = strtof(row[21], nullptr);
|
||||||
e.has_zone_in = atoi(row[22]);
|
e.has_zone_in = static_cast<uint8_t>(strtoul(row[22], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,16 +19,16 @@
|
|||||||
class BaseEventlogRepository {
|
class BaseEventlogRepository {
|
||||||
public:
|
public:
|
||||||
struct Eventlog {
|
struct Eventlog {
|
||||||
int id;
|
uint32_t id;
|
||||||
std::string accountname;
|
std::string accountname;
|
||||||
int accountid;
|
uint32_t accountid;
|
||||||
int status;
|
int32_t status;
|
||||||
std::string charname;
|
std::string charname;
|
||||||
std::string target;
|
std::string target;
|
||||||
std::string time;
|
std::string time;
|
||||||
std::string descriptiontype;
|
std::string descriptiontype;
|
||||||
std::string description;
|
std::string description;
|
||||||
int event_nid;
|
int32_t event_nid;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -150,16 +150,16 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Eventlog e{};
|
Eventlog e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.accountname = row[1] ? row[1] : "";
|
e.accountname = row[1] ? row[1] : "";
|
||||||
e.accountid = atoi(row[2]);
|
e.accountid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.status = atoi(row[3]);
|
e.status = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.charname = row[4] ? row[4] : "";
|
e.charname = row[4] ? row[4] : "";
|
||||||
e.target = row[5] ? row[5] : "";
|
e.target = row[5] ? row[5] : "";
|
||||||
e.time = row[6] ? row[6] : "";
|
e.time = row[6] ? row[6] : "";
|
||||||
e.descriptiontype = row[7] ? row[7] : "";
|
e.descriptiontype = row[7] ? row[7] : "";
|
||||||
e.description = row[8] ? row[8] : "";
|
e.description = row[8] ? row[8] : "";
|
||||||
e.event_nid = atoi(row[9]);
|
e.event_nid = static_cast<int32_t>(atoi(row[9]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -305,16 +305,16 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Eventlog e{};
|
Eventlog e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.accountname = row[1] ? row[1] : "";
|
e.accountname = row[1] ? row[1] : "";
|
||||||
e.accountid = atoi(row[2]);
|
e.accountid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.status = atoi(row[3]);
|
e.status = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.charname = row[4] ? row[4] : "";
|
e.charname = row[4] ? row[4] : "";
|
||||||
e.target = row[5] ? row[5] : "";
|
e.target = row[5] ? row[5] : "";
|
||||||
e.time = row[6] ? row[6] : "";
|
e.time = row[6] ? row[6] : "";
|
||||||
e.descriptiontype = row[7] ? row[7] : "";
|
e.descriptiontype = row[7] ? row[7] : "";
|
||||||
e.description = row[8] ? row[8] : "";
|
e.description = row[8] ? row[8] : "";
|
||||||
e.event_nid = atoi(row[9]);
|
e.event_nid = static_cast<int32_t>(atoi(row[9]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -339,16 +339,16 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Eventlog e{};
|
Eventlog e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.accountname = row[1] ? row[1] : "";
|
e.accountname = row[1] ? row[1] : "";
|
||||||
e.accountid = atoi(row[2]);
|
e.accountid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.status = atoi(row[3]);
|
e.status = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.charname = row[4] ? row[4] : "";
|
e.charname = row[4] ? row[4] : "";
|
||||||
e.target = row[5] ? row[5] : "";
|
e.target = row[5] ? row[5] : "";
|
||||||
e.time = row[6] ? row[6] : "";
|
e.time = row[6] ? row[6] : "";
|
||||||
e.descriptiontype = row[7] ? row[7] : "";
|
e.descriptiontype = row[7] ? row[7] : "";
|
||||||
e.description = row[8] ? row[8] : "";
|
e.description = row[8] ? row[8] : "";
|
||||||
e.event_nid = atoi(row[9]);
|
e.event_nid = static_cast<int32_t>(atoi(row[9]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
class BaseExpeditionLockoutsRepository {
|
class BaseExpeditionLockoutsRepository {
|
||||||
public:
|
public:
|
||||||
struct ExpeditionLockouts {
|
struct ExpeditionLockouts {
|
||||||
int id;
|
uint32_t id;
|
||||||
int expedition_id;
|
uint32_t expedition_id;
|
||||||
std::string event_name;
|
std::string event_name;
|
||||||
time_t expire_time;
|
time_t expire_time;
|
||||||
int duration;
|
uint32_t duration;
|
||||||
std::string from_expedition_uuid;
|
std::string from_expedition_uuid;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -134,11 +134,11 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
ExpeditionLockouts e{};
|
ExpeditionLockouts e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.expedition_id = atoi(row[1]);
|
e.expedition_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.event_name = row[2] ? row[2] : "";
|
e.event_name = row[2] ? row[2] : "";
|
||||||
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.duration = atoi(row[4]);
|
e.duration = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.from_expedition_uuid = row[5] ? row[5] : "";
|
e.from_expedition_uuid = row[5] ? row[5] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -273,11 +273,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
ExpeditionLockouts e{};
|
ExpeditionLockouts e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.expedition_id = atoi(row[1]);
|
e.expedition_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.event_name = row[2] ? row[2] : "";
|
e.event_name = row[2] ? row[2] : "";
|
||||||
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.duration = atoi(row[4]);
|
e.duration = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.from_expedition_uuid = row[5] ? row[5] : "";
|
e.from_expedition_uuid = row[5] ? row[5] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -303,11 +303,11 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
ExpeditionLockouts e{};
|
ExpeditionLockouts e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.expedition_id = atoi(row[1]);
|
e.expedition_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.event_name = row[2] ? row[2] : "";
|
e.event_name = row[2] ? row[2] : "";
|
||||||
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
e.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||||
e.duration = atoi(row[4]);
|
e.duration = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.from_expedition_uuid = row[5] ? row[5] : "";
|
e.from_expedition_uuid = row[5] ? row[5] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseExpeditionsRepository {
|
class BaseExpeditionsRepository {
|
||||||
public:
|
public:
|
||||||
struct Expeditions {
|
struct Expeditions {
|
||||||
int id;
|
uint32_t id;
|
||||||
int dynamic_zone_id;
|
uint32_t dynamic_zone_id;
|
||||||
int add_replay_on_join;
|
uint8_t add_replay_on_join;
|
||||||
int is_locked;
|
uint8_t is_locked;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Expeditions e{};
|
Expeditions e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.dynamic_zone_id = atoi(row[1]);
|
e.dynamic_zone_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.add_replay_on_join = atoi(row[2]);
|
e.add_replay_on_join = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_locked = atoi(row[3]);
|
e.is_locked = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -257,10 +257,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Expeditions e{};
|
Expeditions e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.dynamic_zone_id = atoi(row[1]);
|
e.dynamic_zone_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.add_replay_on_join = atoi(row[2]);
|
e.add_replay_on_join = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_locked = atoi(row[3]);
|
e.is_locked = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -285,10 +285,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Expeditions e{};
|
Expeditions e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.dynamic_zone_id = atoi(row[1]);
|
e.dynamic_zone_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.add_replay_on_join = atoi(row[2]);
|
e.add_replay_on_join = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_locked = atoi(row[3]);
|
e.is_locked = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
class BaseFactionBaseDataRepository {
|
class BaseFactionBaseDataRepository {
|
||||||
public:
|
public:
|
||||||
struct FactionBaseData {
|
struct FactionBaseData {
|
||||||
int client_faction_id;
|
int16_t client_faction_id;
|
||||||
int min;
|
int16_t min;
|
||||||
int max;
|
int16_t max;
|
||||||
int unk_hero1;
|
int16_t unk_hero1;
|
||||||
int unk_hero2;
|
int16_t unk_hero2;
|
||||||
int unk_hero3;
|
int16_t unk_hero3;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -134,12 +134,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
FactionBaseData e{};
|
FactionBaseData e{};
|
||||||
|
|
||||||
e.client_faction_id = atoi(row[0]);
|
e.client_faction_id = static_cast<int16_t>(atoi(row[0]));
|
||||||
e.min = atoi(row[1]);
|
e.min = static_cast<int16_t>(atoi(row[1]));
|
||||||
e.max = atoi(row[2]);
|
e.max = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.unk_hero1 = atoi(row[3]);
|
e.unk_hero1 = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.unk_hero2 = atoi(row[4]);
|
e.unk_hero2 = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.unk_hero3 = atoi(row[5]);
|
e.unk_hero3 = static_cast<int16_t>(atoi(row[5]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -274,12 +274,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
FactionBaseData e{};
|
FactionBaseData e{};
|
||||||
|
|
||||||
e.client_faction_id = atoi(row[0]);
|
e.client_faction_id = static_cast<int16_t>(atoi(row[0]));
|
||||||
e.min = atoi(row[1]);
|
e.min = static_cast<int16_t>(atoi(row[1]));
|
||||||
e.max = atoi(row[2]);
|
e.max = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.unk_hero1 = atoi(row[3]);
|
e.unk_hero1 = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.unk_hero2 = atoi(row[4]);
|
e.unk_hero2 = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.unk_hero3 = atoi(row[5]);
|
e.unk_hero3 = static_cast<int16_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -304,12 +304,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
FactionBaseData e{};
|
FactionBaseData e{};
|
||||||
|
|
||||||
e.client_faction_id = atoi(row[0]);
|
e.client_faction_id = static_cast<int16_t>(atoi(row[0]));
|
||||||
e.min = atoi(row[1]);
|
e.min = static_cast<int16_t>(atoi(row[1]));
|
||||||
e.max = atoi(row[2]);
|
e.max = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.unk_hero1 = atoi(row[3]);
|
e.unk_hero1 = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.unk_hero2 = atoi(row[4]);
|
e.unk_hero2 = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.unk_hero3 = atoi(row[5]);
|
e.unk_hero3 = static_cast<int16_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseFactionListModRepository {
|
class BaseFactionListModRepository {
|
||||||
public:
|
public:
|
||||||
struct FactionListMod {
|
struct FactionListMod {
|
||||||
int id;
|
uint32_t id;
|
||||||
int faction_id;
|
uint32_t faction_id;
|
||||||
int mod;
|
int16_t mod;
|
||||||
std::string mod_name;
|
std::string mod_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -126,9 +126,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
FactionListMod e{};
|
FactionListMod e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.faction_id = atoi(row[1]);
|
e.faction_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.mod = atoi(row[2]);
|
e.mod = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.mod_name = row[3] ? row[3] : "";
|
e.mod_name = row[3] ? row[3] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -257,9 +257,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
FactionListMod e{};
|
FactionListMod e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.faction_id = atoi(row[1]);
|
e.faction_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.mod = atoi(row[2]);
|
e.mod = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.mod_name = row[3] ? row[3] : "";
|
e.mod_name = row[3] ? row[3] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -285,9 +285,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
FactionListMod e{};
|
FactionListMod e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.faction_id = atoi(row[1]);
|
e.faction_id = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.mod = atoi(row[2]);
|
e.mod = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.mod_name = row[3] ? row[3] : "";
|
e.mod_name = row[3] ? row[3] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseFactionListRepository {
|
class BaseFactionListRepository {
|
||||||
public:
|
public:
|
||||||
struct FactionList {
|
struct FactionList {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string name;
|
std::string name;
|
||||||
int base;
|
int16_t base;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
FactionList e{};
|
FactionList e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.base = atoi(row[2]);
|
e.base = static_cast<int16_t>(atoi(row[2]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
FactionList e{};
|
FactionList e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.base = atoi(row[2]);
|
e.base = static_cast<int16_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
FactionList e{};
|
FactionList e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.base = atoi(row[2]);
|
e.base = static_cast<int16_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseFactionValuesRepository {
|
class BaseFactionValuesRepository {
|
||||||
public:
|
public:
|
||||||
struct FactionValues {
|
struct FactionValues {
|
||||||
int char_id;
|
int32_t char_id;
|
||||||
int faction_id;
|
int32_t faction_id;
|
||||||
int current_value;
|
int16_t current_value;
|
||||||
int temp;
|
int8_t temp;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
FactionValues e{};
|
FactionValues e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.faction_id = atoi(row[1]);
|
e.faction_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.current_value = atoi(row[2]);
|
e.current_value = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.temp = atoi(row[3]);
|
e.temp = static_cast<int8_t>(atoi(row[3]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
FactionValues e{};
|
FactionValues e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.faction_id = atoi(row[1]);
|
e.faction_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.current_value = atoi(row[2]);
|
e.current_value = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.temp = atoi(row[3]);
|
e.temp = static_cast<int8_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
FactionValues e{};
|
FactionValues e{};
|
||||||
|
|
||||||
e.char_id = atoi(row[0]);
|
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.faction_id = atoi(row[1]);
|
e.faction_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.current_value = atoi(row[2]);
|
e.current_value = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.temp = atoi(row[3]);
|
e.temp = static_cast<int8_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,15 +19,15 @@
|
|||||||
class BaseFishingRepository {
|
class BaseFishingRepository {
|
||||||
public:
|
public:
|
||||||
struct Fishing {
|
struct Fishing {
|
||||||
int id;
|
int32_t id;
|
||||||
int zoneid;
|
int32_t zoneid;
|
||||||
int Itemid;
|
int32_t Itemid;
|
||||||
int skill_level;
|
int16_t skill_level;
|
||||||
int chance;
|
int16_t chance;
|
||||||
int npc_id;
|
int32_t npc_id;
|
||||||
int npc_chance;
|
int32_t npc_chance;
|
||||||
int min_expansion;
|
int8_t min_expansion;
|
||||||
int max_expansion;
|
int8_t max_expansion;
|
||||||
std::string content_flags;
|
std::string content_flags;
|
||||||
std::string content_flags_disabled;
|
std::string content_flags_disabled;
|
||||||
};
|
};
|
||||||
@ -154,15 +154,15 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Fishing e{};
|
Fishing e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.Itemid = atoi(row[2]);
|
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.skill_level = atoi(row[3]);
|
e.skill_level = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.chance = atoi(row[4]);
|
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.npc_id = atoi(row[5]);
|
e.npc_id = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.npc_chance = atoi(row[6]);
|
e.npc_chance = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.min_expansion = atoi(row[7]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.max_expansion = atoi(row[8]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[8]));
|
||||||
e.content_flags = row[9] ? row[9] : "";
|
e.content_flags = row[9] ? row[9] : "";
|
||||||
e.content_flags_disabled = row[10] ? row[10] : "";
|
e.content_flags_disabled = row[10] ? row[10] : "";
|
||||||
|
|
||||||
@ -313,15 +313,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Fishing e{};
|
Fishing e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.Itemid = atoi(row[2]);
|
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.skill_level = atoi(row[3]);
|
e.skill_level = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.chance = atoi(row[4]);
|
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.npc_id = atoi(row[5]);
|
e.npc_id = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.npc_chance = atoi(row[6]);
|
e.npc_chance = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.min_expansion = atoi(row[7]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.max_expansion = atoi(row[8]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[8]));
|
||||||
e.content_flags = row[9] ? row[9] : "";
|
e.content_flags = row[9] ? row[9] : "";
|
||||||
e.content_flags_disabled = row[10] ? row[10] : "";
|
e.content_flags_disabled = row[10] ? row[10] : "";
|
||||||
|
|
||||||
@ -348,15 +348,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Fishing e{};
|
Fishing e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.Itemid = atoi(row[2]);
|
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.skill_level = atoi(row[3]);
|
e.skill_level = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.chance = atoi(row[4]);
|
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.npc_id = atoi(row[5]);
|
e.npc_id = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.npc_chance = atoi(row[6]);
|
e.npc_chance = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.min_expansion = atoi(row[7]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.max_expansion = atoi(row[8]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[8]));
|
||||||
e.content_flags = row[9] ? row[9] : "";
|
e.content_flags = row[9] ? row[9] : "";
|
||||||
e.content_flags_disabled = row[10] ? row[10] : "";
|
e.content_flags_disabled = row[10] ? row[10] : "";
|
||||||
|
|
||||||
|
|||||||
@ -19,13 +19,13 @@
|
|||||||
class BaseForageRepository {
|
class BaseForageRepository {
|
||||||
public:
|
public:
|
||||||
struct Forage {
|
struct Forage {
|
||||||
int id;
|
int32_t id;
|
||||||
int zoneid;
|
int32_t zoneid;
|
||||||
int Itemid;
|
int32_t Itemid;
|
||||||
int level;
|
int16_t level;
|
||||||
int chance;
|
int16_t chance;
|
||||||
int min_expansion;
|
int8_t min_expansion;
|
||||||
int max_expansion;
|
int8_t max_expansion;
|
||||||
std::string content_flags;
|
std::string content_flags;
|
||||||
std::string content_flags_disabled;
|
std::string content_flags_disabled;
|
||||||
};
|
};
|
||||||
@ -146,13 +146,13 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Forage e{};
|
Forage e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.Itemid = atoi(row[2]);
|
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.level = atoi(row[3]);
|
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.chance = atoi(row[4]);
|
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.min_expansion = atoi(row[5]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||||
e.max_expansion = atoi(row[6]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.content_flags = row[7] ? row[7] : "";
|
e.content_flags = row[7] ? row[7] : "";
|
||||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||||
|
|
||||||
@ -297,13 +297,13 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Forage e{};
|
Forage e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.Itemid = atoi(row[2]);
|
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.level = atoi(row[3]);
|
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.chance = atoi(row[4]);
|
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.min_expansion = atoi(row[5]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||||
e.max_expansion = atoi(row[6]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.content_flags = row[7] ? row[7] : "";
|
e.content_flags = row[7] ? row[7] : "";
|
||||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||||
|
|
||||||
@ -330,13 +330,13 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Forage e{};
|
Forage e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.Itemid = atoi(row[2]);
|
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.level = atoi(row[3]);
|
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.chance = atoi(row[4]);
|
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||||
e.min_expansion = atoi(row[5]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||||
e.max_expansion = atoi(row[6]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.content_flags = row[7] ? row[7] : "";
|
e.content_flags = row[7] ? row[7] : "";
|
||||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||||
|
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseFriendsRepository {
|
class BaseFriendsRepository {
|
||||||
public:
|
public:
|
||||||
struct Friends {
|
struct Friends {
|
||||||
int charid;
|
uint32_t charid;
|
||||||
int type;
|
uint8_t type;
|
||||||
std::string name;
|
std::string name;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -122,8 +122,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Friends e{};
|
Friends e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -250,8 +250,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Friends e{};
|
Friends e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -277,8 +277,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Friends e{};
|
Friends e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.type = atoi(row[1]);
|
e.type = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,21 +19,21 @@
|
|||||||
class BaseGlobalLootRepository {
|
class BaseGlobalLootRepository {
|
||||||
public:
|
public:
|
||||||
struct GlobalLoot {
|
struct GlobalLoot {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string description;
|
std::string description;
|
||||||
int loottable_id;
|
int32_t loottable_id;
|
||||||
int enabled;
|
int8_t enabled;
|
||||||
int min_level;
|
int32_t min_level;
|
||||||
int max_level;
|
int32_t max_level;
|
||||||
int rare;
|
int8_t rare;
|
||||||
int raid;
|
int8_t raid;
|
||||||
std::string race;
|
std::string race;
|
||||||
std::string class_;
|
std::string class_;
|
||||||
std::string bodytype;
|
std::string bodytype;
|
||||||
std::string zone;
|
std::string zone;
|
||||||
int hot_zone;
|
int8_t hot_zone;
|
||||||
int min_expansion;
|
int8_t min_expansion;
|
||||||
int max_expansion;
|
int8_t max_expansion;
|
||||||
std::string content_flags;
|
std::string content_flags;
|
||||||
std::string content_flags_disabled;
|
std::string content_flags_disabled;
|
||||||
};
|
};
|
||||||
@ -178,21 +178,21 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
GlobalLoot e{};
|
GlobalLoot e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.description = row[1] ? row[1] : "";
|
e.description = row[1] ? row[1] : "";
|
||||||
e.loottable_id = atoi(row[2]);
|
e.loottable_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.enabled = atoi(row[3]);
|
e.enabled = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.min_level = atoi(row[4]);
|
e.min_level = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.max_level = atoi(row[5]);
|
e.max_level = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.rare = atoi(row[6]);
|
e.rare = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.raid = atoi(row[7]);
|
e.raid = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.race = row[8] ? row[8] : "";
|
e.race = row[8] ? row[8] : "";
|
||||||
e.class_ = row[9] ? row[9] : "";
|
e.class_ = row[9] ? row[9] : "";
|
||||||
e.bodytype = row[10] ? row[10] : "";
|
e.bodytype = row[10] ? row[10] : "";
|
||||||
e.zone = row[11] ? row[11] : "";
|
e.zone = row[11] ? row[11] : "";
|
||||||
e.hot_zone = atoi(row[12]);
|
e.hot_zone = static_cast<int8_t>(atoi(row[12]));
|
||||||
e.min_expansion = atoi(row[13]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[13]));
|
||||||
e.max_expansion = atoi(row[14]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.content_flags = row[15] ? row[15] : "";
|
e.content_flags = row[15] ? row[15] : "";
|
||||||
e.content_flags_disabled = row[16] ? row[16] : "";
|
e.content_flags_disabled = row[16] ? row[16] : "";
|
||||||
|
|
||||||
@ -361,21 +361,21 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GlobalLoot e{};
|
GlobalLoot e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.description = row[1] ? row[1] : "";
|
e.description = row[1] ? row[1] : "";
|
||||||
e.loottable_id = atoi(row[2]);
|
e.loottable_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.enabled = atoi(row[3]);
|
e.enabled = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.min_level = atoi(row[4]);
|
e.min_level = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.max_level = atoi(row[5]);
|
e.max_level = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.rare = atoi(row[6]);
|
e.rare = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.raid = atoi(row[7]);
|
e.raid = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.race = row[8] ? row[8] : "";
|
e.race = row[8] ? row[8] : "";
|
||||||
e.class_ = row[9] ? row[9] : "";
|
e.class_ = row[9] ? row[9] : "";
|
||||||
e.bodytype = row[10] ? row[10] : "";
|
e.bodytype = row[10] ? row[10] : "";
|
||||||
e.zone = row[11] ? row[11] : "";
|
e.zone = row[11] ? row[11] : "";
|
||||||
e.hot_zone = atoi(row[12]);
|
e.hot_zone = static_cast<int8_t>(atoi(row[12]));
|
||||||
e.min_expansion = atoi(row[13]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[13]));
|
||||||
e.max_expansion = atoi(row[14]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.content_flags = row[15] ? row[15] : "";
|
e.content_flags = row[15] ? row[15] : "";
|
||||||
e.content_flags_disabled = row[16] ? row[16] : "";
|
e.content_flags_disabled = row[16] ? row[16] : "";
|
||||||
|
|
||||||
@ -402,21 +402,21 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GlobalLoot e{};
|
GlobalLoot e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.description = row[1] ? row[1] : "";
|
e.description = row[1] ? row[1] : "";
|
||||||
e.loottable_id = atoi(row[2]);
|
e.loottable_id = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.enabled = atoi(row[3]);
|
e.enabled = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.min_level = atoi(row[4]);
|
e.min_level = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.max_level = atoi(row[5]);
|
e.max_level = static_cast<int32_t>(atoi(row[5]));
|
||||||
e.rare = atoi(row[6]);
|
e.rare = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.raid = atoi(row[7]);
|
e.raid = static_cast<int8_t>(atoi(row[7]));
|
||||||
e.race = row[8] ? row[8] : "";
|
e.race = row[8] ? row[8] : "";
|
||||||
e.class_ = row[9] ? row[9] : "";
|
e.class_ = row[9] ? row[9] : "";
|
||||||
e.bodytype = row[10] ? row[10] : "";
|
e.bodytype = row[10] ? row[10] : "";
|
||||||
e.zone = row[11] ? row[11] : "";
|
e.zone = row[11] ? row[11] : "";
|
||||||
e.hot_zone = atoi(row[12]);
|
e.hot_zone = static_cast<int8_t>(atoi(row[12]));
|
||||||
e.min_expansion = atoi(row[13]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[13]));
|
||||||
e.max_expansion = atoi(row[14]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.content_flags = row[15] ? row[15] : "";
|
e.content_flags = row[15] ? row[15] : "";
|
||||||
e.content_flags_disabled = row[16] ? row[16] : "";
|
e.content_flags_disabled = row[16] ? row[16] : "";
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class BaseGmIpsRepository {
|
|||||||
public:
|
public:
|
||||||
struct GmIps {
|
struct GmIps {
|
||||||
std::string name;
|
std::string name;
|
||||||
int account_id;
|
int32_t account_id;
|
||||||
std::string ip_address;
|
std::string ip_address;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
GmIps e{};
|
GmIps e{};
|
||||||
|
|
||||||
e.name = row[0] ? row[0] : "";
|
e.name = row[0] ? row[0] : "";
|
||||||
e.account_id = atoi(row[1]);
|
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.ip_address = row[2] ? row[2] : "";
|
e.ip_address = row[2] ? row[2] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -251,7 +251,7 @@ public:
|
|||||||
GmIps e{};
|
GmIps e{};
|
||||||
|
|
||||||
e.name = row[0] ? row[0] : "";
|
e.name = row[0] ? row[0] : "";
|
||||||
e.account_id = atoi(row[1]);
|
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.ip_address = row[2] ? row[2] : "";
|
e.ip_address = row[2] ? row[2] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -278,7 +278,7 @@ public:
|
|||||||
GmIps e{};
|
GmIps e{};
|
||||||
|
|
||||||
e.name = row[0] ? row[0] : "";
|
e.name = row[0] ? row[0] : "";
|
||||||
e.account_id = atoi(row[1]);
|
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.ip_address = row[2] ? row[2] : "";
|
e.ip_address = row[2] ? row[2] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseGoallistsRepository {
|
class BaseGoallistsRepository {
|
||||||
public:
|
public:
|
||||||
struct Goallists {
|
struct Goallists {
|
||||||
int listid;
|
uint32_t listid;
|
||||||
int entry;
|
uint32_t entry;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -118,8 +118,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Goallists e{};
|
Goallists e{};
|
||||||
|
|
||||||
e.listid = atoi(row[0]);
|
e.listid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.entry = atoi(row[1]);
|
e.entry = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Goallists e{};
|
Goallists e{};
|
||||||
|
|
||||||
e.listid = atoi(row[0]);
|
e.listid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.entry = atoi(row[1]);
|
e.entry = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -268,8 +268,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Goallists e{};
|
Goallists e{};
|
||||||
|
|
||||||
e.listid = atoi(row[0]);
|
e.listid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.entry = atoi(row[1]);
|
e.entry = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseGraveyardRepository {
|
class BaseGraveyardRepository {
|
||||||
public:
|
public:
|
||||||
struct Graveyard {
|
struct Graveyard {
|
||||||
int id;
|
int32_t id;
|
||||||
int zone_id;
|
int32_t zone_id;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
float z;
|
float z;
|
||||||
@ -134,12 +134,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Graveyard e{};
|
Graveyard e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.x = static_cast<float>(atof(row[2]));
|
e.x = strtof(row[2], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[3]));
|
e.y = strtof(row[3], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[4]));
|
e.z = strtof(row[4], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[5]));
|
e.heading = strtof(row[5], nullptr);
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -273,12 +273,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Graveyard e{};
|
Graveyard e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.x = static_cast<float>(atof(row[2]));
|
e.x = strtof(row[2], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[3]));
|
e.y = strtof(row[3], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[4]));
|
e.z = strtof(row[4], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[5]));
|
e.heading = strtof(row[5], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -303,12 +303,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Graveyard e{};
|
Graveyard e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone_id = atoi(row[1]);
|
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.x = static_cast<float>(atof(row[2]));
|
e.x = strtof(row[2], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[3]));
|
e.y = strtof(row[3], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[4]));
|
e.z = strtof(row[4], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[5]));
|
e.heading = strtof(row[5], nullptr);
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,15 +19,15 @@
|
|||||||
class BaseGridEntriesRepository {
|
class BaseGridEntriesRepository {
|
||||||
public:
|
public:
|
||||||
struct GridEntries {
|
struct GridEntries {
|
||||||
int gridid;
|
int32_t gridid;
|
||||||
int zoneid;
|
int32_t zoneid;
|
||||||
int number;
|
int32_t number;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
float z;
|
float z;
|
||||||
float heading;
|
float heading;
|
||||||
int pause;
|
int32_t pause;
|
||||||
int centerpoint;
|
int8_t centerpoint;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -146,15 +146,15 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
GridEntries e{};
|
GridEntries e{};
|
||||||
|
|
||||||
e.gridid = atoi(row[0]);
|
e.gridid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.number = atoi(row[2]);
|
e.number = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.x = static_cast<float>(atof(row[3]));
|
e.x = strtof(row[3], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[4]));
|
e.y = strtof(row[4], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[5]));
|
e.z = strtof(row[5], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[6]));
|
e.heading = strtof(row[6], nullptr);
|
||||||
e.pause = atoi(row[7]);
|
e.pause = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.centerpoint = atoi(row[8]);
|
e.centerpoint = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -298,15 +298,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GridEntries e{};
|
GridEntries e{};
|
||||||
|
|
||||||
e.gridid = atoi(row[0]);
|
e.gridid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.number = atoi(row[2]);
|
e.number = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.x = static_cast<float>(atof(row[3]));
|
e.x = strtof(row[3], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[4]));
|
e.y = strtof(row[4], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[5]));
|
e.z = strtof(row[5], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[6]));
|
e.heading = strtof(row[6], nullptr);
|
||||||
e.pause = atoi(row[7]);
|
e.pause = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.centerpoint = atoi(row[8]);
|
e.centerpoint = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -331,15 +331,15 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GridEntries e{};
|
GridEntries e{};
|
||||||
|
|
||||||
e.gridid = atoi(row[0]);
|
e.gridid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.number = atoi(row[2]);
|
e.number = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.x = static_cast<float>(atof(row[3]));
|
e.x = strtof(row[3], nullptr);
|
||||||
e.y = static_cast<float>(atof(row[4]));
|
e.y = strtof(row[4], nullptr);
|
||||||
e.z = static_cast<float>(atof(row[5]));
|
e.z = strtof(row[5], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[6]));
|
e.heading = strtof(row[6], nullptr);
|
||||||
e.pause = atoi(row[7]);
|
e.pause = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.centerpoint = atoi(row[8]);
|
e.centerpoint = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseGridRepository {
|
class BaseGridRepository {
|
||||||
public:
|
public:
|
||||||
struct Grid {
|
struct Grid {
|
||||||
int id;
|
int32_t id;
|
||||||
int zoneid;
|
int32_t zoneid;
|
||||||
int type;
|
int32_t type;
|
||||||
int type2;
|
int32_t type2;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Grid e{};
|
Grid e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.type2 = atoi(row[3]);
|
e.type2 = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Grid e{};
|
Grid e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.type2 = atoi(row[3]);
|
e.type2 = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Grid e{};
|
Grid e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.type = atoi(row[2]);
|
e.type = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.type2 = atoi(row[3]);
|
e.type2 = static_cast<int32_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseGroundSpawnsRepository {
|
class BaseGroundSpawnsRepository {
|
||||||
public:
|
public:
|
||||||
struct GroundSpawns {
|
struct GroundSpawns {
|
||||||
int id;
|
uint32_t id;
|
||||||
int zoneid;
|
uint32_t zoneid;
|
||||||
int version;
|
int16_t version;
|
||||||
float max_x;
|
float max_x;
|
||||||
float max_y;
|
float max_y;
|
||||||
float max_z;
|
float max_z;
|
||||||
@ -29,12 +29,12 @@ public:
|
|||||||
float min_y;
|
float min_y;
|
||||||
float heading;
|
float heading;
|
||||||
std::string name;
|
std::string name;
|
||||||
int item;
|
uint32_t item;
|
||||||
int max_allowed;
|
uint32_t max_allowed;
|
||||||
std::string comment;
|
std::string comment;
|
||||||
int respawn_timer;
|
uint32_t respawn_timer;
|
||||||
int min_expansion;
|
int8_t min_expansion;
|
||||||
int max_expansion;
|
int8_t max_expansion;
|
||||||
std::string content_flags;
|
std::string content_flags;
|
||||||
std::string content_flags_disabled;
|
std::string content_flags_disabled;
|
||||||
};
|
};
|
||||||
@ -182,22 +182,22 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
GroundSpawns e{};
|
GroundSpawns e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.version = atoi(row[2]);
|
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.max_x = static_cast<float>(atof(row[3]));
|
e.max_x = strtof(row[3], nullptr);
|
||||||
e.max_y = static_cast<float>(atof(row[4]));
|
e.max_y = strtof(row[4], nullptr);
|
||||||
e.max_z = static_cast<float>(atof(row[5]));
|
e.max_z = strtof(row[5], nullptr);
|
||||||
e.min_x = static_cast<float>(atof(row[6]));
|
e.min_x = strtof(row[6], nullptr);
|
||||||
e.min_y = static_cast<float>(atof(row[7]));
|
e.min_y = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.name = row[9] ? row[9] : "";
|
e.name = row[9] ? row[9] : "";
|
||||||
e.item = atoi(row[10]);
|
e.item = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.max_allowed = atoi(row[11]);
|
e.max_allowed = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.comment = row[12] ? row[12] : "";
|
e.comment = row[12] ? row[12] : "";
|
||||||
e.respawn_timer = atoi(row[13]);
|
e.respawn_timer = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.min_expansion = atoi(row[14]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.max_expansion = atoi(row[15]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||||
e.content_flags = row[16] ? row[16] : "";
|
e.content_flags = row[16] ? row[16] : "";
|
||||||
e.content_flags_disabled = row[17] ? row[17] : "";
|
e.content_flags_disabled = row[17] ? row[17] : "";
|
||||||
|
|
||||||
@ -369,22 +369,22 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GroundSpawns e{};
|
GroundSpawns e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.version = atoi(row[2]);
|
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.max_x = static_cast<float>(atof(row[3]));
|
e.max_x = strtof(row[3], nullptr);
|
||||||
e.max_y = static_cast<float>(atof(row[4]));
|
e.max_y = strtof(row[4], nullptr);
|
||||||
e.max_z = static_cast<float>(atof(row[5]));
|
e.max_z = strtof(row[5], nullptr);
|
||||||
e.min_x = static_cast<float>(atof(row[6]));
|
e.min_x = strtof(row[6], nullptr);
|
||||||
e.min_y = static_cast<float>(atof(row[7]));
|
e.min_y = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.name = row[9] ? row[9] : "";
|
e.name = row[9] ? row[9] : "";
|
||||||
e.item = atoi(row[10]);
|
e.item = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.max_allowed = atoi(row[11]);
|
e.max_allowed = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.comment = row[12] ? row[12] : "";
|
e.comment = row[12] ? row[12] : "";
|
||||||
e.respawn_timer = atoi(row[13]);
|
e.respawn_timer = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.min_expansion = atoi(row[14]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.max_expansion = atoi(row[15]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||||
e.content_flags = row[16] ? row[16] : "";
|
e.content_flags = row[16] ? row[16] : "";
|
||||||
e.content_flags_disabled = row[17] ? row[17] : "";
|
e.content_flags_disabled = row[17] ? row[17] : "";
|
||||||
|
|
||||||
@ -411,22 +411,22 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GroundSpawns e{};
|
GroundSpawns e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.zoneid = atoi(row[1]);
|
e.zoneid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.version = atoi(row[2]);
|
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.max_x = static_cast<float>(atof(row[3]));
|
e.max_x = strtof(row[3], nullptr);
|
||||||
e.max_y = static_cast<float>(atof(row[4]));
|
e.max_y = strtof(row[4], nullptr);
|
||||||
e.max_z = static_cast<float>(atof(row[5]));
|
e.max_z = strtof(row[5], nullptr);
|
||||||
e.min_x = static_cast<float>(atof(row[6]));
|
e.min_x = strtof(row[6], nullptr);
|
||||||
e.min_y = static_cast<float>(atof(row[7]));
|
e.min_y = strtof(row[7], nullptr);
|
||||||
e.heading = static_cast<float>(atof(row[8]));
|
e.heading = strtof(row[8], nullptr);
|
||||||
e.name = row[9] ? row[9] : "";
|
e.name = row[9] ? row[9] : "";
|
||||||
e.item = atoi(row[10]);
|
e.item = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.max_allowed = atoi(row[11]);
|
e.max_allowed = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.comment = row[12] ? row[12] : "";
|
e.comment = row[12] ? row[12] : "";
|
||||||
e.respawn_timer = atoi(row[13]);
|
e.respawn_timer = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.min_expansion = atoi(row[14]);
|
e.min_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||||
e.max_expansion = atoi(row[15]);
|
e.max_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||||
e.content_flags = row[16] ? row[16] : "";
|
e.content_flags = row[16] ? row[16] : "";
|
||||||
e.content_flags_disabled = row[17] ? row[17] : "";
|
e.content_flags_disabled = row[17] ? row[17] : "";
|
||||||
|
|
||||||
|
|||||||
@ -19,10 +19,10 @@
|
|||||||
class BaseGroupIdRepository {
|
class BaseGroupIdRepository {
|
||||||
public:
|
public:
|
||||||
struct GroupId {
|
struct GroupId {
|
||||||
int groupid;
|
int32_t groupid;
|
||||||
int charid;
|
int32_t charid;
|
||||||
std::string name;
|
std::string name;
|
||||||
int ismerc;
|
int8_t ismerc;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -126,10 +126,10 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
GroupId e{};
|
GroupId e{};
|
||||||
|
|
||||||
e.groupid = atoi(row[0]);
|
e.groupid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.ismerc = atoi(row[3]);
|
e.ismerc = static_cast<int8_t>(atoi(row[3]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -258,10 +258,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GroupId e{};
|
GroupId e{};
|
||||||
|
|
||||||
e.groupid = atoi(row[0]);
|
e.groupid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.ismerc = atoi(row[3]);
|
e.ismerc = static_cast<int8_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -286,10 +286,10 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GroupId e{};
|
GroupId e{};
|
||||||
|
|
||||||
e.groupid = atoi(row[0]);
|
e.groupid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.ismerc = atoi(row[3]);
|
e.ismerc = static_cast<int8_t>(atoi(row[3]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
class BaseGroupLeadersRepository {
|
class BaseGroupLeadersRepository {
|
||||||
public:
|
public:
|
||||||
struct GroupLeaders {
|
struct GroupLeaders {
|
||||||
int gid;
|
int32_t gid;
|
||||||
std::string leadername;
|
std::string leadername;
|
||||||
std::string marknpc;
|
std::string marknpc;
|
||||||
std::string leadershipaa;
|
std::string leadershipaa;
|
||||||
@ -27,7 +27,7 @@ public:
|
|||||||
std::string assist;
|
std::string assist;
|
||||||
std::string puller;
|
std::string puller;
|
||||||
std::string mentoree;
|
std::string mentoree;
|
||||||
int mentor_percent;
|
int32_t mentor_percent;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -146,7 +146,7 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
GroupLeaders e{};
|
GroupLeaders e{};
|
||||||
|
|
||||||
e.gid = atoi(row[0]);
|
e.gid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.leadername = row[1] ? row[1] : "";
|
e.leadername = row[1] ? row[1] : "";
|
||||||
e.marknpc = row[2] ? row[2] : "";
|
e.marknpc = row[2] ? row[2] : "";
|
||||||
e.leadershipaa = row[3] ? row[3] : "";
|
e.leadershipaa = row[3] ? row[3] : "";
|
||||||
@ -154,7 +154,7 @@ public:
|
|||||||
e.assist = row[5] ? row[5] : "";
|
e.assist = row[5] ? row[5] : "";
|
||||||
e.puller = row[6] ? row[6] : "";
|
e.puller = row[6] ? row[6] : "";
|
||||||
e.mentoree = row[7] ? row[7] : "";
|
e.mentoree = row[7] ? row[7] : "";
|
||||||
e.mentor_percent = atoi(row[8]);
|
e.mentor_percent = static_cast<int32_t>(atoi(row[8]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -298,7 +298,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GroupLeaders e{};
|
GroupLeaders e{};
|
||||||
|
|
||||||
e.gid = atoi(row[0]);
|
e.gid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.leadername = row[1] ? row[1] : "";
|
e.leadername = row[1] ? row[1] : "";
|
||||||
e.marknpc = row[2] ? row[2] : "";
|
e.marknpc = row[2] ? row[2] : "";
|
||||||
e.leadershipaa = row[3] ? row[3] : "";
|
e.leadershipaa = row[3] ? row[3] : "";
|
||||||
@ -306,7 +306,7 @@ public:
|
|||||||
e.assist = row[5] ? row[5] : "";
|
e.assist = row[5] ? row[5] : "";
|
||||||
e.puller = row[6] ? row[6] : "";
|
e.puller = row[6] ? row[6] : "";
|
||||||
e.mentoree = row[7] ? row[7] : "";
|
e.mentoree = row[7] ? row[7] : "";
|
||||||
e.mentor_percent = atoi(row[8]);
|
e.mentor_percent = static_cast<int32_t>(atoi(row[8]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GroupLeaders e{};
|
GroupLeaders e{};
|
||||||
|
|
||||||
e.gid = atoi(row[0]);
|
e.gid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.leadername = row[1] ? row[1] : "";
|
e.leadername = row[1] ? row[1] : "";
|
||||||
e.marknpc = row[2] ? row[2] : "";
|
e.marknpc = row[2] ? row[2] : "";
|
||||||
e.leadershipaa = row[3] ? row[3] : "";
|
e.leadershipaa = row[3] ? row[3] : "";
|
||||||
@ -339,7 +339,7 @@ public:
|
|||||||
e.assist = row[5] ? row[5] : "";
|
e.assist = row[5] ? row[5] : "";
|
||||||
e.puller = row[6] ? row[6] : "";
|
e.puller = row[6] ? row[6] : "";
|
||||||
e.mentoree = row[7] ? row[7] : "";
|
e.mentoree = row[7] ? row[7] : "";
|
||||||
e.mentor_percent = atoi(row[8]);
|
e.mentor_percent = static_cast<int32_t>(atoi(row[8]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,17 +19,17 @@
|
|||||||
class BaseGuildRanksRepository {
|
class BaseGuildRanksRepository {
|
||||||
public:
|
public:
|
||||||
struct GuildRanks {
|
struct GuildRanks {
|
||||||
int guild_id;
|
uint32_t guild_id;
|
||||||
int rank;
|
uint8_t rank;
|
||||||
std::string title;
|
std::string title;
|
||||||
int can_hear;
|
uint8_t can_hear;
|
||||||
int can_speak;
|
uint8_t can_speak;
|
||||||
int can_invite;
|
uint8_t can_invite;
|
||||||
int can_remove;
|
uint8_t can_remove;
|
||||||
int can_promote;
|
uint8_t can_promote;
|
||||||
int can_demote;
|
uint8_t can_demote;
|
||||||
int can_motd;
|
uint8_t can_motd;
|
||||||
int can_warpeace;
|
uint8_t can_warpeace;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -154,17 +154,17 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
GuildRanks e{};
|
GuildRanks e{};
|
||||||
|
|
||||||
e.guild_id = atoi(row[0]);
|
e.guild_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.rank = atoi(row[1]);
|
e.rank = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.title = row[2] ? row[2] : "";
|
e.title = row[2] ? row[2] : "";
|
||||||
e.can_hear = atoi(row[3]);
|
e.can_hear = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.can_speak = atoi(row[4]);
|
e.can_speak = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.can_invite = atoi(row[5]);
|
e.can_invite = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.can_remove = atoi(row[6]);
|
e.can_remove = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.can_promote = atoi(row[7]);
|
e.can_promote = static_cast<uint8_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.can_demote = atoi(row[8]);
|
e.can_demote = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.can_motd = atoi(row[9]);
|
e.can_motd = static_cast<uint8_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.can_warpeace = atoi(row[10]);
|
e.can_warpeace = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -314,17 +314,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GuildRanks e{};
|
GuildRanks e{};
|
||||||
|
|
||||||
e.guild_id = atoi(row[0]);
|
e.guild_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.rank = atoi(row[1]);
|
e.rank = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.title = row[2] ? row[2] : "";
|
e.title = row[2] ? row[2] : "";
|
||||||
e.can_hear = atoi(row[3]);
|
e.can_hear = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.can_speak = atoi(row[4]);
|
e.can_speak = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.can_invite = atoi(row[5]);
|
e.can_invite = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.can_remove = atoi(row[6]);
|
e.can_remove = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.can_promote = atoi(row[7]);
|
e.can_promote = static_cast<uint8_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.can_demote = atoi(row[8]);
|
e.can_demote = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.can_motd = atoi(row[9]);
|
e.can_motd = static_cast<uint8_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.can_warpeace = atoi(row[10]);
|
e.can_warpeace = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -349,17 +349,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GuildRanks e{};
|
GuildRanks e{};
|
||||||
|
|
||||||
e.guild_id = atoi(row[0]);
|
e.guild_id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.rank = atoi(row[1]);
|
e.rank = static_cast<uint8_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.title = row[2] ? row[2] : "";
|
e.title = row[2] ? row[2] : "";
|
||||||
e.can_hear = atoi(row[3]);
|
e.can_hear = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.can_speak = atoi(row[4]);
|
e.can_speak = static_cast<uint8_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.can_invite = atoi(row[5]);
|
e.can_invite = static_cast<uint8_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.can_remove = atoi(row[6]);
|
e.can_remove = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.can_promote = atoi(row[7]);
|
e.can_promote = static_cast<uint8_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.can_demote = atoi(row[8]);
|
e.can_demote = static_cast<uint8_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.can_motd = atoi(row[9]);
|
e.can_motd = static_cast<uint8_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.can_warpeace = atoi(row[10]);
|
e.can_warpeace = static_cast<uint8_t>(strtoul(row[10], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseGuildRelationsRepository {
|
class BaseGuildRelationsRepository {
|
||||||
public:
|
public:
|
||||||
struct GuildRelations {
|
struct GuildRelations {
|
||||||
int guild1;
|
uint32_t guild1;
|
||||||
int guild2;
|
uint32_t guild2;
|
||||||
int relation;
|
int8_t relation;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
GuildRelations e{};
|
GuildRelations e{};
|
||||||
|
|
||||||
e.guild1 = atoi(row[0]);
|
e.guild1 = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.guild2 = atoi(row[1]);
|
e.guild2 = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.relation = atoi(row[2]);
|
e.relation = static_cast<int8_t>(atoi(row[2]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GuildRelations e{};
|
GuildRelations e{};
|
||||||
|
|
||||||
e.guild1 = atoi(row[0]);
|
e.guild1 = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.guild2 = atoi(row[1]);
|
e.guild2 = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.relation = atoi(row[2]);
|
e.relation = static_cast<int8_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -277,9 +277,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
GuildRelations e{};
|
GuildRelations e{};
|
||||||
|
|
||||||
e.guild1 = atoi(row[0]);
|
e.guild1 = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.guild2 = atoi(row[1]);
|
e.guild2 = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.relation = atoi(row[2]);
|
e.relation = static_cast<int8_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
class BaseGuildsRepository {
|
class BaseGuildsRepository {
|
||||||
public:
|
public:
|
||||||
struct Guilds {
|
struct Guilds {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string name;
|
std::string name;
|
||||||
int leader;
|
int32_t leader;
|
||||||
int minstatus;
|
int16_t minstatus;
|
||||||
std::string motd;
|
std::string motd;
|
||||||
int tribute;
|
uint32_t tribute;
|
||||||
std::string motd_setter;
|
std::string motd_setter;
|
||||||
std::string channel;
|
std::string channel;
|
||||||
std::string url;
|
std::string url;
|
||||||
@ -146,12 +146,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Guilds e{};
|
Guilds e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.leader = atoi(row[2]);
|
e.leader = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.minstatus = atoi(row[3]);
|
e.minstatus = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.motd = row[4] ? row[4] : "";
|
e.motd = row[4] ? row[4] : "";
|
||||||
e.tribute = atoi(row[5]);
|
e.tribute = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.motd_setter = row[6] ? row[6] : "";
|
e.motd_setter = row[6] ? row[6] : "";
|
||||||
e.channel = row[7] ? row[7] : "";
|
e.channel = row[7] ? row[7] : "";
|
||||||
e.url = row[8] ? row[8] : "";
|
e.url = row[8] ? row[8] : "";
|
||||||
@ -297,12 +297,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Guilds e{};
|
Guilds e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.leader = atoi(row[2]);
|
e.leader = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.minstatus = atoi(row[3]);
|
e.minstatus = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.motd = row[4] ? row[4] : "";
|
e.motd = row[4] ? row[4] : "";
|
||||||
e.tribute = atoi(row[5]);
|
e.tribute = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.motd_setter = row[6] ? row[6] : "";
|
e.motd_setter = row[6] ? row[6] : "";
|
||||||
e.channel = row[7] ? row[7] : "";
|
e.channel = row[7] ? row[7] : "";
|
||||||
e.url = row[8] ? row[8] : "";
|
e.url = row[8] ? row[8] : "";
|
||||||
@ -330,12 +330,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Guilds e{};
|
Guilds e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.name = row[1] ? row[1] : "";
|
e.name = row[1] ? row[1] : "";
|
||||||
e.leader = atoi(row[2]);
|
e.leader = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.minstatus = atoi(row[3]);
|
e.minstatus = static_cast<int16_t>(atoi(row[3]));
|
||||||
e.motd = row[4] ? row[4] : "";
|
e.motd = row[4] ? row[4] : "";
|
||||||
e.tribute = atoi(row[5]);
|
e.tribute = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.motd_setter = row[6] ? row[6] : "";
|
e.motd_setter = row[6] ? row[6] : "";
|
||||||
e.channel = row[7] ? row[7] : "";
|
e.channel = row[7] ? row[7] : "";
|
||||||
e.url = row[8] ? row[8] : "";
|
e.url = row[8] ? row[8] : "";
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
class BaseHackersRepository {
|
class BaseHackersRepository {
|
||||||
public:
|
public:
|
||||||
struct Hackers {
|
struct Hackers {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string account;
|
std::string account;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string hacked;
|
std::string hacked;
|
||||||
@ -134,7 +134,7 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Hackers e{};
|
Hackers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.account = row[1] ? row[1] : "";
|
e.account = row[1] ? row[1] : "";
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.hacked = row[3] ? row[3] : "";
|
e.hacked = row[3] ? row[3] : "";
|
||||||
@ -273,7 +273,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Hackers e{};
|
Hackers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.account = row[1] ? row[1] : "";
|
e.account = row[1] ? row[1] : "";
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.hacked = row[3] ? row[3] : "";
|
e.hacked = row[3] ? row[3] : "";
|
||||||
@ -303,7 +303,7 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Hackers e{};
|
Hackers e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.account = row[1] ? row[1] : "";
|
e.account = row[1] ? row[1] : "";
|
||||||
e.name = row[2] ? row[2] : "";
|
e.name = row[2] ? row[2] : "";
|
||||||
e.hacked = row[3] ? row[3] : "";
|
e.hacked = row[3] ? row[3] : "";
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
class BaseHorsesRepository {
|
class BaseHorsesRepository {
|
||||||
public:
|
public:
|
||||||
struct Horses {
|
struct Horses {
|
||||||
int id;
|
int32_t id;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
int race;
|
int16_t race;
|
||||||
int gender;
|
int8_t gender;
|
||||||
int texture;
|
int8_t texture;
|
||||||
float mountspeed;
|
float mountspeed;
|
||||||
std::string notes;
|
std::string notes;
|
||||||
};
|
};
|
||||||
@ -138,12 +138,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Horses e{};
|
Horses e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.filename = row[1] ? row[1] : "";
|
e.filename = row[1] ? row[1] : "";
|
||||||
e.race = atoi(row[2]);
|
e.race = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.gender = atoi(row[3]);
|
e.gender = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.texture = atoi(row[4]);
|
e.texture = static_cast<int8_t>(atoi(row[4]));
|
||||||
e.mountspeed = static_cast<float>(atof(row[5]));
|
e.mountspeed = strtof(row[5], nullptr);
|
||||||
e.notes = row[6] ? row[6] : "";
|
e.notes = row[6] ? row[6] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -281,12 +281,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Horses e{};
|
Horses e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.filename = row[1] ? row[1] : "";
|
e.filename = row[1] ? row[1] : "";
|
||||||
e.race = atoi(row[2]);
|
e.race = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.gender = atoi(row[3]);
|
e.gender = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.texture = atoi(row[4]);
|
e.texture = static_cast<int8_t>(atoi(row[4]));
|
||||||
e.mountspeed = static_cast<float>(atof(row[5]));
|
e.mountspeed = strtof(row[5], nullptr);
|
||||||
e.notes = row[6] ? row[6] : "";
|
e.notes = row[6] ? row[6] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -312,12 +312,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Horses e{};
|
Horses e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.filename = row[1] ? row[1] : "";
|
e.filename = row[1] ? row[1] : "";
|
||||||
e.race = atoi(row[2]);
|
e.race = static_cast<int16_t>(atoi(row[2]));
|
||||||
e.gender = atoi(row[3]);
|
e.gender = static_cast<int8_t>(atoi(row[3]));
|
||||||
e.texture = atoi(row[4]);
|
e.texture = static_cast<int8_t>(atoi(row[4]));
|
||||||
e.mountspeed = static_cast<float>(atof(row[5]));
|
e.mountspeed = strtof(row[5], nullptr);
|
||||||
e.notes = row[6] ? row[6] : "";
|
e.notes = row[6] ? row[6] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
class BaseInstanceListPlayerRepository {
|
class BaseInstanceListPlayerRepository {
|
||||||
public:
|
public:
|
||||||
struct InstanceListPlayer {
|
struct InstanceListPlayer {
|
||||||
int id;
|
uint32_t id;
|
||||||
int charid;
|
uint32_t charid;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -118,8 +118,8 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
InstanceListPlayer e{};
|
InstanceListPlayer e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -242,8 +242,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
InstanceListPlayer e{};
|
InstanceListPlayer e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -268,8 +268,8 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
InstanceListPlayer e{};
|
InstanceListPlayer e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,13 +19,13 @@
|
|||||||
class BaseInstanceListRepository {
|
class BaseInstanceListRepository {
|
||||||
public:
|
public:
|
||||||
struct InstanceList {
|
struct InstanceList {
|
||||||
int id;
|
int32_t id;
|
||||||
int zone;
|
uint32_t zone;
|
||||||
int version;
|
uint8_t version;
|
||||||
int is_global;
|
uint8_t is_global;
|
||||||
int start_time;
|
uint32_t start_time;
|
||||||
int duration;
|
uint32_t duration;
|
||||||
int never_expires;
|
uint8_t never_expires;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -138,13 +138,13 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
InstanceList e{};
|
InstanceList e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone = atoi(row[1]);
|
e.zone = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.version = atoi(row[2]);
|
e.version = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_global = atoi(row[3]);
|
e.is_global = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.start_time = atoi(row[4]);
|
e.start_time = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.duration = atoi(row[5]);
|
e.duration = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.never_expires = atoi(row[6]);
|
e.never_expires = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -281,13 +281,13 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
InstanceList e{};
|
InstanceList e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone = atoi(row[1]);
|
e.zone = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.version = atoi(row[2]);
|
e.version = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_global = atoi(row[3]);
|
e.is_global = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.start_time = atoi(row[4]);
|
e.start_time = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.duration = atoi(row[5]);
|
e.duration = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.never_expires = atoi(row[6]);
|
e.never_expires = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -312,13 +312,13 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
InstanceList e{};
|
InstanceList e{};
|
||||||
|
|
||||||
e.id = atoi(row[0]);
|
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.zone = atoi(row[1]);
|
e.zone = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.version = atoi(row[2]);
|
e.version = static_cast<uint8_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.is_global = atoi(row[3]);
|
e.is_global = static_cast<uint8_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.start_time = atoi(row[4]);
|
e.start_time = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.duration = atoi(row[5]);
|
e.duration = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.never_expires = atoi(row[6]);
|
e.never_expires = static_cast<uint8_t>(strtoul(row[6], nullptr, 10));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,22 +19,22 @@
|
|||||||
class BaseInventoryRepository {
|
class BaseInventoryRepository {
|
||||||
public:
|
public:
|
||||||
struct Inventory {
|
struct Inventory {
|
||||||
int charid;
|
uint32_t charid;
|
||||||
int slotid;
|
uint32_t slotid;
|
||||||
int itemid;
|
uint32_t itemid;
|
||||||
int charges;
|
uint16_t charges;
|
||||||
int color;
|
uint32_t color;
|
||||||
int augslot1;
|
uint32_t augslot1;
|
||||||
int augslot2;
|
uint32_t augslot2;
|
||||||
int augslot3;
|
uint32_t augslot3;
|
||||||
int augslot4;
|
uint32_t augslot4;
|
||||||
int augslot5;
|
uint32_t augslot5;
|
||||||
int augslot6;
|
int32_t augslot6;
|
||||||
int instnodrop;
|
uint8_t instnodrop;
|
||||||
std::string custom_data;
|
std::string custom_data;
|
||||||
int ornamenticon;
|
uint32_t ornamenticon;
|
||||||
int ornamentidfile;
|
uint32_t ornamentidfile;
|
||||||
int ornament_hero_model;
|
int32_t ornament_hero_model;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -174,22 +174,22 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
Inventory e{};
|
Inventory e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slotid = atoi(row[1]);
|
e.slotid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.itemid = atoi(row[2]);
|
e.itemid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.color = atoi(row[4]);
|
e.color = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.augslot1 = atoi(row[5]);
|
e.augslot1 = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.augslot2 = atoi(row[6]);
|
e.augslot2 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.augslot3 = atoi(row[7]);
|
e.augslot3 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.augslot4 = atoi(row[8]);
|
e.augslot4 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.augslot5 = atoi(row[9]);
|
e.augslot5 = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.augslot6 = atoi(row[10]);
|
e.augslot6 = static_cast<int32_t>(atoi(row[10]));
|
||||||
e.instnodrop = atoi(row[11]);
|
e.instnodrop = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.custom_data = row[12] ? row[12] : "";
|
e.custom_data = row[12] ? row[12] : "";
|
||||||
e.ornamenticon = atoi(row[13]);
|
e.ornamenticon = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.ornamentidfile = atoi(row[14]);
|
e.ornamentidfile = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ornament_hero_model = atoi(row[15]);
|
e.ornament_hero_model = static_cast<int32_t>(atoi(row[15]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -354,22 +354,22 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Inventory e{};
|
Inventory e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slotid = atoi(row[1]);
|
e.slotid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.itemid = atoi(row[2]);
|
e.itemid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.color = atoi(row[4]);
|
e.color = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.augslot1 = atoi(row[5]);
|
e.augslot1 = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.augslot2 = atoi(row[6]);
|
e.augslot2 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.augslot3 = atoi(row[7]);
|
e.augslot3 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.augslot4 = atoi(row[8]);
|
e.augslot4 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.augslot5 = atoi(row[9]);
|
e.augslot5 = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.augslot6 = atoi(row[10]);
|
e.augslot6 = static_cast<int32_t>(atoi(row[10]));
|
||||||
e.instnodrop = atoi(row[11]);
|
e.instnodrop = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.custom_data = row[12] ? row[12] : "";
|
e.custom_data = row[12] ? row[12] : "";
|
||||||
e.ornamenticon = atoi(row[13]);
|
e.ornamenticon = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.ornamentidfile = atoi(row[14]);
|
e.ornamentidfile = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ornament_hero_model = atoi(row[15]);
|
e.ornament_hero_model = static_cast<int32_t>(atoi(row[15]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -394,22 +394,22 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
Inventory e{};
|
Inventory e{};
|
||||||
|
|
||||||
e.charid = atoi(row[0]);
|
e.charid = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.slotid = atoi(row[1]);
|
e.slotid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.itemid = atoi(row[2]);
|
e.itemid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.charges = atoi(row[3]);
|
e.charges = static_cast<uint16_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.color = atoi(row[4]);
|
e.color = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.augslot1 = atoi(row[5]);
|
e.augslot1 = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.augslot2 = atoi(row[6]);
|
e.augslot2 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.augslot3 = atoi(row[7]);
|
e.augslot3 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.augslot4 = atoi(row[8]);
|
e.augslot4 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.augslot5 = atoi(row[9]);
|
e.augslot5 = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.augslot6 = atoi(row[10]);
|
e.augslot6 = static_cast<int32_t>(atoi(row[10]));
|
||||||
e.instnodrop = atoi(row[11]);
|
e.instnodrop = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||||
e.custom_data = row[12] ? row[12] : "";
|
e.custom_data = row[12] ? row[12] : "";
|
||||||
e.ornamenticon = atoi(row[13]);
|
e.ornamenticon = static_cast<uint32_t>(strtoul(row[13], nullptr, 10));
|
||||||
e.ornamentidfile = atoi(row[14]);
|
e.ornamentidfile = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ornament_hero_model = atoi(row[15]);
|
e.ornament_hero_model = static_cast<int32_t>(atoi(row[15]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,23 +19,23 @@
|
|||||||
class BaseInventorySnapshotsRepository {
|
class BaseInventorySnapshotsRepository {
|
||||||
public:
|
public:
|
||||||
struct InventorySnapshots {
|
struct InventorySnapshots {
|
||||||
int time_index;
|
uint32_t time_index;
|
||||||
int charid;
|
uint32_t charid;
|
||||||
int slotid;
|
uint32_t slotid;
|
||||||
int itemid;
|
uint32_t itemid;
|
||||||
int charges;
|
uint16_t charges;
|
||||||
int color;
|
uint32_t color;
|
||||||
int augslot1;
|
uint32_t augslot1;
|
||||||
int augslot2;
|
uint32_t augslot2;
|
||||||
int augslot3;
|
uint32_t augslot3;
|
||||||
int augslot4;
|
uint32_t augslot4;
|
||||||
int augslot5;
|
uint32_t augslot5;
|
||||||
int augslot6;
|
int32_t augslot6;
|
||||||
int instnodrop;
|
uint8_t instnodrop;
|
||||||
std::string custom_data;
|
std::string custom_data;
|
||||||
int ornamenticon;
|
uint32_t ornamenticon;
|
||||||
int ornamentidfile;
|
uint32_t ornamentidfile;
|
||||||
int ornament_hero_model;
|
int32_t ornament_hero_model;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -178,23 +178,23 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
InventorySnapshots e{};
|
InventorySnapshots e{};
|
||||||
|
|
||||||
e.time_index = atoi(row[0]);
|
e.time_index = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.slotid = atoi(row[2]);
|
e.slotid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.itemid = atoi(row[3]);
|
e.itemid = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.charges = atoi(row[4]);
|
e.charges = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.color = atoi(row[5]);
|
e.color = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.augslot1 = atoi(row[6]);
|
e.augslot1 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.augslot2 = atoi(row[7]);
|
e.augslot2 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.augslot3 = atoi(row[8]);
|
e.augslot3 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.augslot4 = atoi(row[9]);
|
e.augslot4 = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.augslot5 = atoi(row[10]);
|
e.augslot5 = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.augslot6 = atoi(row[11]);
|
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.instnodrop = atoi(row[12]);
|
e.instnodrop = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.custom_data = row[13] ? row[13] : "";
|
e.custom_data = row[13] ? row[13] : "";
|
||||||
e.ornamenticon = atoi(row[14]);
|
e.ornamenticon = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ornamentidfile = atoi(row[15]);
|
e.ornamentidfile = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.ornament_hero_model = atoi(row[16]);
|
e.ornament_hero_model = static_cast<int32_t>(atoi(row[16]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -362,23 +362,23 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
InventorySnapshots e{};
|
InventorySnapshots e{};
|
||||||
|
|
||||||
e.time_index = atoi(row[0]);
|
e.time_index = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.slotid = atoi(row[2]);
|
e.slotid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.itemid = atoi(row[3]);
|
e.itemid = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.charges = atoi(row[4]);
|
e.charges = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.color = atoi(row[5]);
|
e.color = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.augslot1 = atoi(row[6]);
|
e.augslot1 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.augslot2 = atoi(row[7]);
|
e.augslot2 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.augslot3 = atoi(row[8]);
|
e.augslot3 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.augslot4 = atoi(row[9]);
|
e.augslot4 = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.augslot5 = atoi(row[10]);
|
e.augslot5 = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.augslot6 = atoi(row[11]);
|
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.instnodrop = atoi(row[12]);
|
e.instnodrop = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.custom_data = row[13] ? row[13] : "";
|
e.custom_data = row[13] ? row[13] : "";
|
||||||
e.ornamenticon = atoi(row[14]);
|
e.ornamenticon = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ornamentidfile = atoi(row[15]);
|
e.ornamentidfile = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.ornament_hero_model = atoi(row[16]);
|
e.ornament_hero_model = static_cast<int32_t>(atoi(row[16]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -403,23 +403,23 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
InventorySnapshots e{};
|
InventorySnapshots e{};
|
||||||
|
|
||||||
e.time_index = atoi(row[0]);
|
e.time_index = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||||
e.charid = atoi(row[1]);
|
e.charid = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||||
e.slotid = atoi(row[2]);
|
e.slotid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
||||||
e.itemid = atoi(row[3]);
|
e.itemid = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
e.charges = atoi(row[4]);
|
e.charges = static_cast<uint16_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.color = atoi(row[5]);
|
e.color = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||||
e.augslot1 = atoi(row[6]);
|
e.augslot1 = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||||
e.augslot2 = atoi(row[7]);
|
e.augslot2 = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||||
e.augslot3 = atoi(row[8]);
|
e.augslot3 = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||||
e.augslot4 = atoi(row[9]);
|
e.augslot4 = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||||
e.augslot5 = atoi(row[10]);
|
e.augslot5 = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||||
e.augslot6 = atoi(row[11]);
|
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||||
e.instnodrop = atoi(row[12]);
|
e.instnodrop = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||||
e.custom_data = row[13] ? row[13] : "";
|
e.custom_data = row[13] ? row[13] : "";
|
||||||
e.ornamenticon = atoi(row[14]);
|
e.ornamenticon = static_cast<uint32_t>(strtoul(row[14], nullptr, 10));
|
||||||
e.ornamentidfile = atoi(row[15]);
|
e.ornamentidfile = static_cast<uint32_t>(strtoul(row[15], nullptr, 10));
|
||||||
e.ornament_hero_model = atoi(row[16]);
|
e.ornament_hero_model = static_cast<int32_t>(atoi(row[16]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
class BaseIpExemptionsRepository {
|
class BaseIpExemptionsRepository {
|
||||||
public:
|
public:
|
||||||
struct IpExemptions {
|
struct IpExemptions {
|
||||||
int exemption_id;
|
int32_t exemption_id;
|
||||||
std::string exemption_ip;
|
std::string exemption_ip;
|
||||||
int exemption_amount;
|
int32_t exemption_amount;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
IpExemptions e{};
|
IpExemptions e{};
|
||||||
|
|
||||||
e.exemption_id = atoi(row[0]);
|
e.exemption_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.exemption_ip = row[1] ? row[1] : "";
|
e.exemption_ip = row[1] ? row[1] : "";
|
||||||
e.exemption_amount = atoi(row[2]);
|
e.exemption_amount = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -249,9 +249,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
IpExemptions e{};
|
IpExemptions e{};
|
||||||
|
|
||||||
e.exemption_id = atoi(row[0]);
|
e.exemption_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.exemption_ip = row[1] ? row[1] : "";
|
e.exemption_ip = row[1] ? row[1] : "";
|
||||||
e.exemption_amount = atoi(row[2]);
|
e.exemption_amount = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -276,9 +276,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
IpExemptions e{};
|
IpExemptions e{};
|
||||||
|
|
||||||
e.exemption_id = atoi(row[0]);
|
e.exemption_id = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.exemption_ip = row[1] ? row[1] : "";
|
e.exemption_ip = row[1] ? row[1] : "";
|
||||||
e.exemption_amount = atoi(row[2]);
|
e.exemption_amount = static_cast<int32_t>(atoi(row[2]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,12 @@
|
|||||||
class BaseItemTickRepository {
|
class BaseItemTickRepository {
|
||||||
public:
|
public:
|
||||||
struct ItemTick {
|
struct ItemTick {
|
||||||
int it_itemid;
|
int32_t it_itemid;
|
||||||
int it_chance;
|
int32_t it_chance;
|
||||||
int it_level;
|
int32_t it_level;
|
||||||
int it_id;
|
int32_t it_id;
|
||||||
std::string it_qglobal;
|
std::string it_qglobal;
|
||||||
int it_bagslot;
|
int8_t it_bagslot;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -134,12 +134,12 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
ItemTick e{};
|
ItemTick e{};
|
||||||
|
|
||||||
e.it_itemid = atoi(row[0]);
|
e.it_itemid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.it_chance = atoi(row[1]);
|
e.it_chance = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.it_level = atoi(row[2]);
|
e.it_level = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.it_id = atoi(row[3]);
|
e.it_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.it_qglobal = row[4] ? row[4] : "";
|
e.it_qglobal = row[4] ? row[4] : "";
|
||||||
e.it_bagslot = atoi(row[5]);
|
e.it_bagslot = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -273,12 +273,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
ItemTick e{};
|
ItemTick e{};
|
||||||
|
|
||||||
e.it_itemid = atoi(row[0]);
|
e.it_itemid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.it_chance = atoi(row[1]);
|
e.it_chance = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.it_level = atoi(row[2]);
|
e.it_level = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.it_id = atoi(row[3]);
|
e.it_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.it_qglobal = row[4] ? row[4] : "";
|
e.it_qglobal = row[4] ? row[4] : "";
|
||||||
e.it_bagslot = atoi(row[5]);
|
e.it_bagslot = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -303,12 +303,12 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
ItemTick e{};
|
ItemTick e{};
|
||||||
|
|
||||||
e.it_itemid = atoi(row[0]);
|
e.it_itemid = static_cast<int32_t>(atoi(row[0]));
|
||||||
e.it_chance = atoi(row[1]);
|
e.it_chance = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.it_level = atoi(row[2]);
|
e.it_level = static_cast<int32_t>(atoi(row[2]));
|
||||||
e.it_id = atoi(row[3]);
|
e.it_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.it_qglobal = row[4] ? row[4] : "";
|
e.it_qglobal = row[4] ? row[4] : "";
|
||||||
e.it_bagslot = atoi(row[5]);
|
e.it_bagslot = static_cast<int8_t>(atoi(row[5]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user