mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Repositories] Fix datetime zero-value save behavior (#3976)
This commit is contained in:
parent
e40267b9b8
commit
14509fcc4e
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseAaAbilityRepository {
|
||||
public:
|
||||
struct AaAbility {
|
||||
@ -174,19 +173,19 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.category = static_cast<int32_t>(atoi(row[2]));
|
||||
e.classes = static_cast<int32_t>(atoi(row[3]));
|
||||
e.races = static_cast<int32_t>(atoi(row[4]));
|
||||
e.drakkin_heritage = static_cast<int32_t>(atoi(row[5]));
|
||||
e.deities = static_cast<int32_t>(atoi(row[6]));
|
||||
e.status = static_cast<int32_t>(atoi(row[7]));
|
||||
e.type = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charges = static_cast<int32_t>(atoi(row[9]));
|
||||
e.grant_only = static_cast<int8_t>(atoi(row[10]));
|
||||
e.first_rank_id = static_cast<int32_t>(atoi(row[11]));
|
||||
e.category = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.classes = row[3] ? static_cast<int32_t>(atoi(row[3])) : 131070;
|
||||
e.races = row[4] ? static_cast<int32_t>(atoi(row[4])) : 65535;
|
||||
e.drakkin_heritage = row[5] ? static_cast<int32_t>(atoi(row[5])) : 127;
|
||||
e.deities = row[6] ? static_cast<int32_t>(atoi(row[6])) : 131071;
|
||||
e.status = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.type = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charges = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.grant_only = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.first_rank_id = row[11] ? static_cast<int32_t>(atoi(row[11])) : -1;
|
||||
e.enabled = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 1;
|
||||
e.reset_on_death = static_cast<int8_t>(atoi(row[13]));
|
||||
e.auto_grant_enabled = static_cast<int8_t>(atoi(row[14]));
|
||||
e.reset_on_death = row[13] ? static_cast<int8_t>(atoi(row[13])) : 0;
|
||||
e.auto_grant_enabled = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -350,19 +349,19 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.category = static_cast<int32_t>(atoi(row[2]));
|
||||
e.classes = static_cast<int32_t>(atoi(row[3]));
|
||||
e.races = static_cast<int32_t>(atoi(row[4]));
|
||||
e.drakkin_heritage = static_cast<int32_t>(atoi(row[5]));
|
||||
e.deities = static_cast<int32_t>(atoi(row[6]));
|
||||
e.status = static_cast<int32_t>(atoi(row[7]));
|
||||
e.type = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charges = static_cast<int32_t>(atoi(row[9]));
|
||||
e.grant_only = static_cast<int8_t>(atoi(row[10]));
|
||||
e.first_rank_id = static_cast<int32_t>(atoi(row[11]));
|
||||
e.category = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.classes = row[3] ? static_cast<int32_t>(atoi(row[3])) : 131070;
|
||||
e.races = row[4] ? static_cast<int32_t>(atoi(row[4])) : 65535;
|
||||
e.drakkin_heritage = row[5] ? static_cast<int32_t>(atoi(row[5])) : 127;
|
||||
e.deities = row[6] ? static_cast<int32_t>(atoi(row[6])) : 131071;
|
||||
e.status = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.type = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charges = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.grant_only = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.first_rank_id = row[11] ? static_cast<int32_t>(atoi(row[11])) : -1;
|
||||
e.enabled = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 1;
|
||||
e.reset_on_death = static_cast<int8_t>(atoi(row[13]));
|
||||
e.auto_grant_enabled = static_cast<int8_t>(atoi(row[14]));
|
||||
e.reset_on_death = row[13] ? static_cast<int8_t>(atoi(row[13])) : 0;
|
||||
e.auto_grant_enabled = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -389,19 +388,19 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.category = static_cast<int32_t>(atoi(row[2]));
|
||||
e.classes = static_cast<int32_t>(atoi(row[3]));
|
||||
e.races = static_cast<int32_t>(atoi(row[4]));
|
||||
e.drakkin_heritage = static_cast<int32_t>(atoi(row[5]));
|
||||
e.deities = static_cast<int32_t>(atoi(row[6]));
|
||||
e.status = static_cast<int32_t>(atoi(row[7]));
|
||||
e.type = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charges = static_cast<int32_t>(atoi(row[9]));
|
||||
e.grant_only = static_cast<int8_t>(atoi(row[10]));
|
||||
e.first_rank_id = static_cast<int32_t>(atoi(row[11]));
|
||||
e.category = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.classes = row[3] ? static_cast<int32_t>(atoi(row[3])) : 131070;
|
||||
e.races = row[4] ? static_cast<int32_t>(atoi(row[4])) : 65535;
|
||||
e.drakkin_heritage = row[5] ? static_cast<int32_t>(atoi(row[5])) : 127;
|
||||
e.deities = row[6] ? static_cast<int32_t>(atoi(row[6])) : 131071;
|
||||
e.status = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.type = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charges = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.grant_only = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.first_rank_id = row[11] ? static_cast<int32_t>(atoi(row[11])) : -1;
|
||||
e.enabled = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 1;
|
||||
e.reset_on_death = static_cast<int8_t>(atoi(row[13]));
|
||||
e.auto_grant_enabled = static_cast<int8_t>(atoi(row[14]));
|
||||
e.reset_on_death = row[13] ? static_cast<int8_t>(atoi(row[13])) : 0;
|
||||
e.auto_grant_enabled = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseAaRankEffectsRepository {
|
||||
public:
|
||||
struct AaRankEffects {
|
||||
@ -134,9 +133,9 @@ public:
|
||||
|
||||
e.rank_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 1;
|
||||
e.effect_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.base1 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.base2 = static_cast<int32_t>(atoi(row[4]));
|
||||
e.effect_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.base1 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.base2 = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -270,9 +269,9 @@ public:
|
||||
|
||||
e.rank_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 1;
|
||||
e.effect_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.base1 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.base2 = static_cast<int32_t>(atoi(row[4]));
|
||||
e.effect_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.base1 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.base2 = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -299,9 +298,9 @@ public:
|
||||
|
||||
e.rank_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 1;
|
||||
e.effect_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.base1 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.base2 = static_cast<int32_t>(atoi(row[4]));
|
||||
e.effect_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.base1 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.base2 = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseAaRankPrereqsRepository {
|
||||
public:
|
||||
struct AaRankPrereqs {
|
||||
@ -125,8 +124,8 @@ public:
|
||||
AaRankPrereqs e{};
|
||||
|
||||
e.rank_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.aa_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.points = static_cast<int32_t>(atoi(row[2]));
|
||||
e.aa_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.points = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -253,8 +252,8 @@ public:
|
||||
AaRankPrereqs e{};
|
||||
|
||||
e.rank_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.aa_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.points = static_cast<int32_t>(atoi(row[2]));
|
||||
e.aa_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.points = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -280,8 +279,8 @@ public:
|
||||
AaRankPrereqs e{};
|
||||
|
||||
e.rank_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.aa_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.points = static_cast<int32_t>(atoi(row[2]));
|
||||
e.aa_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.points = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseAaRanksRepository {
|
||||
public:
|
||||
struct AaRanks {
|
||||
@ -165,18 +164,18 @@ public:
|
||||
AaRanks e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.upper_hotkey_sid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.lower_hotkey_sid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.title_sid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.desc_sid = static_cast<int32_t>(atoi(row[4]));
|
||||
e.cost = static_cast<int32_t>(atoi(row[5]));
|
||||
e.level_req = static_cast<int32_t>(atoi(row[6]));
|
||||
e.spell = static_cast<int32_t>(atoi(row[7]));
|
||||
e.spell_type = static_cast<int32_t>(atoi(row[8]));
|
||||
e.recast_time = static_cast<int32_t>(atoi(row[9]));
|
||||
e.expansion = static_cast<int32_t>(atoi(row[10]));
|
||||
e.prev_id = static_cast<int32_t>(atoi(row[11]));
|
||||
e.next_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.upper_hotkey_sid = row[1] ? static_cast<int32_t>(atoi(row[1])) : -1;
|
||||
e.lower_hotkey_sid = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.title_sid = row[3] ? static_cast<int32_t>(atoi(row[3])) : -1;
|
||||
e.desc_sid = row[4] ? static_cast<int32_t>(atoi(row[4])) : -1;
|
||||
e.cost = row[5] ? static_cast<int32_t>(atoi(row[5])) : 1;
|
||||
e.level_req = row[6] ? static_cast<int32_t>(atoi(row[6])) : 51;
|
||||
e.spell = row[7] ? static_cast<int32_t>(atoi(row[7])) : -1;
|
||||
e.spell_type = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.recast_time = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.expansion = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.prev_id = row[11] ? static_cast<int32_t>(atoi(row[11])) : -1;
|
||||
e.next_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : -1;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -333,18 +332,18 @@ public:
|
||||
AaRanks e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.upper_hotkey_sid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.lower_hotkey_sid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.title_sid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.desc_sid = static_cast<int32_t>(atoi(row[4]));
|
||||
e.cost = static_cast<int32_t>(atoi(row[5]));
|
||||
e.level_req = static_cast<int32_t>(atoi(row[6]));
|
||||
e.spell = static_cast<int32_t>(atoi(row[7]));
|
||||
e.spell_type = static_cast<int32_t>(atoi(row[8]));
|
||||
e.recast_time = static_cast<int32_t>(atoi(row[9]));
|
||||
e.expansion = static_cast<int32_t>(atoi(row[10]));
|
||||
e.prev_id = static_cast<int32_t>(atoi(row[11]));
|
||||
e.next_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.upper_hotkey_sid = row[1] ? static_cast<int32_t>(atoi(row[1])) : -1;
|
||||
e.lower_hotkey_sid = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.title_sid = row[3] ? static_cast<int32_t>(atoi(row[3])) : -1;
|
||||
e.desc_sid = row[4] ? static_cast<int32_t>(atoi(row[4])) : -1;
|
||||
e.cost = row[5] ? static_cast<int32_t>(atoi(row[5])) : 1;
|
||||
e.level_req = row[6] ? static_cast<int32_t>(atoi(row[6])) : 51;
|
||||
e.spell = row[7] ? static_cast<int32_t>(atoi(row[7])) : -1;
|
||||
e.spell_type = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.recast_time = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.expansion = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.prev_id = row[11] ? static_cast<int32_t>(atoi(row[11])) : -1;
|
||||
e.next_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : -1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -370,18 +369,18 @@ public:
|
||||
AaRanks e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.upper_hotkey_sid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.lower_hotkey_sid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.title_sid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.desc_sid = static_cast<int32_t>(atoi(row[4]));
|
||||
e.cost = static_cast<int32_t>(atoi(row[5]));
|
||||
e.level_req = static_cast<int32_t>(atoi(row[6]));
|
||||
e.spell = static_cast<int32_t>(atoi(row[7]));
|
||||
e.spell_type = static_cast<int32_t>(atoi(row[8]));
|
||||
e.recast_time = static_cast<int32_t>(atoi(row[9]));
|
||||
e.expansion = static_cast<int32_t>(atoi(row[10]));
|
||||
e.prev_id = static_cast<int32_t>(atoi(row[11]));
|
||||
e.next_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.upper_hotkey_sid = row[1] ? static_cast<int32_t>(atoi(row[1])) : -1;
|
||||
e.lower_hotkey_sid = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.title_sid = row[3] ? static_cast<int32_t>(atoi(row[3])) : -1;
|
||||
e.desc_sid = row[4] ? static_cast<int32_t>(atoi(row[4])) : -1;
|
||||
e.cost = row[5] ? static_cast<int32_t>(atoi(row[5])) : 1;
|
||||
e.level_req = row[6] ? static_cast<int32_t>(atoi(row[6])) : 51;
|
||||
e.spell = row[7] ? static_cast<int32_t>(atoi(row[7])) : -1;
|
||||
e.spell_type = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.recast_time = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.expansion = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.prev_id = row[11] ? static_cast<int32_t>(atoi(row[11])) : -1;
|
||||
e.next_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : -1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -127,10 +127,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
AccountIp e{};
|
||||
|
||||
e.accid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.accid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.ip = row[1] ? row[1] : "";
|
||||
e.count = static_cast<int32_t>(atoi(row[2]));
|
||||
e.lastused = row[3] ? row[3] : "";
|
||||
e.count = row[2] ? static_cast<int32_t>(atoi(row[2])) : 1;
|
||||
e.lastused = row[3] ? row[3] : std::time(nullptr);
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -259,10 +259,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
AccountIp e{};
|
||||
|
||||
e.accid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.accid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.ip = row[1] ? row[1] : "";
|
||||
e.count = static_cast<int32_t>(atoi(row[2]));
|
||||
e.lastused = row[3] ? row[3] : "";
|
||||
e.count = row[2] ? static_cast<int32_t>(atoi(row[2])) : 1;
|
||||
e.lastused = row[3] ? row[3] : std::time(nullptr);
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -287,10 +287,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
AccountIp e{};
|
||||
|
||||
e.accid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.accid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.ip = row[1] ? row[1] : "";
|
||||
e.count = static_cast<int32_t>(atoi(row[2]));
|
||||
e.lastused = row[3] ? row[3] : "";
|
||||
e.count = row[2] ? static_cast<int32_t>(atoi(row[2])) : 1;
|
||||
e.lastused = row[3] ? row[3] : std::time(nullptr);
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -207,22 +207,22 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Account e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.sharedplat = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.password = row[4] ? row[4] : "";
|
||||
e.status = static_cast<int32_t>(atoi(row[5]));
|
||||
e.ls_id = row[6] ? row[6] : "";
|
||||
e.status = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.ls_id = row[6] ? row[6] : "eqemu";
|
||||
e.lsaccount_id = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.invulnerable = static_cast<int8_t>(atoi(row[9]));
|
||||
e.flymode = static_cast<int8_t>(atoi(row[10]));
|
||||
e.ignore_tells = static_cast<int8_t>(atoi(row[11]));
|
||||
e.invulnerable = row[9] ? static_cast<int8_t>(atoi(row[9])) : 0;
|
||||
e.flymode = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.ignore_tells = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.revoked = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.karma = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[14] ? row[14] : "";
|
||||
e.hideme = static_cast<int8_t>(atoi(row[15]));
|
||||
e.hideme = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.rulesflag = row[16] ? static_cast<uint8_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||
e.time_creation = row[18] ? static_cast<uint32_t>(strtoul(row[18], nullptr, 10)) : 0;
|
||||
@ -280,7 +280,7 @@ public:
|
||||
v.push_back(columns[14] + " = '" + Strings::Escape(e.minilogin_ip) + "'");
|
||||
v.push_back(columns[15] + " = " + std::to_string(e.hideme));
|
||||
v.push_back(columns[16] + " = " + std::to_string(e.rulesflag));
|
||||
v.push_back(columns[17] + " = FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "null") + ")");
|
||||
v.push_back(columns[17] + " = FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[18] + " = " + std::to_string(e.time_creation));
|
||||
v.push_back(columns[19] + " = '" + Strings::Escape(e.ban_reason) + "'");
|
||||
v.push_back(columns[20] + " = '" + Strings::Escape(e.suspend_reason) + "'");
|
||||
@ -325,7 +325,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.minilogin_ip) + "'");
|
||||
v.push_back(std::to_string(e.hideme));
|
||||
v.push_back(std::to_string(e.rulesflag));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.time_creation));
|
||||
v.push_back("'" + Strings::Escape(e.ban_reason) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.suspend_reason) + "'");
|
||||
@ -378,7 +378,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.minilogin_ip) + "'");
|
||||
v.push_back(std::to_string(e.hideme));
|
||||
v.push_back(std::to_string(e.rulesflag));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.time_creation));
|
||||
v.push_back("'" + Strings::Escape(e.ban_reason) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.suspend_reason) + "'");
|
||||
@ -418,22 +418,22 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Account e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.sharedplat = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.password = row[4] ? row[4] : "";
|
||||
e.status = static_cast<int32_t>(atoi(row[5]));
|
||||
e.ls_id = row[6] ? row[6] : "";
|
||||
e.status = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.ls_id = row[6] ? row[6] : "eqemu";
|
||||
e.lsaccount_id = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.invulnerable = static_cast<int8_t>(atoi(row[9]));
|
||||
e.flymode = static_cast<int8_t>(atoi(row[10]));
|
||||
e.ignore_tells = static_cast<int8_t>(atoi(row[11]));
|
||||
e.invulnerable = row[9] ? static_cast<int8_t>(atoi(row[9])) : 0;
|
||||
e.flymode = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.ignore_tells = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.revoked = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.karma = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[14] ? row[14] : "";
|
||||
e.hideme = static_cast<int8_t>(atoi(row[15]));
|
||||
e.hideme = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.rulesflag = row[16] ? static_cast<uint8_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||
e.time_creation = row[18] ? static_cast<uint32_t>(strtoul(row[18], nullptr, 10)) : 0;
|
||||
@ -466,22 +466,22 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Account e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.sharedplat = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.password = row[4] ? row[4] : "";
|
||||
e.status = static_cast<int32_t>(atoi(row[5]));
|
||||
e.ls_id = row[6] ? row[6] : "";
|
||||
e.status = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.ls_id = row[6] ? row[6] : "eqemu";
|
||||
e.lsaccount_id = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.gmspeed = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.invulnerable = static_cast<int8_t>(atoi(row[9]));
|
||||
e.flymode = static_cast<int8_t>(atoi(row[10]));
|
||||
e.ignore_tells = static_cast<int8_t>(atoi(row[11]));
|
||||
e.invulnerable = row[9] ? static_cast<int8_t>(atoi(row[9])) : 0;
|
||||
e.flymode = row[10] ? static_cast<int8_t>(atoi(row[10])) : 0;
|
||||
e.ignore_tells = row[11] ? static_cast<int8_t>(atoi(row[11])) : 0;
|
||||
e.revoked = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.karma = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.minilogin_ip = row[14] ? row[14] : "";
|
||||
e.hideme = static_cast<int8_t>(atoi(row[15]));
|
||||
e.hideme = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.rulesflag = row[16] ? static_cast<uint8_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.suspendeduntil = strtoll(row[17] ? row[17] : "-1", nullptr, 10);
|
||||
e.time_creation = row[18] ? static_cast<uint32_t>(strtoul(row[18], nullptr, 10)) : 0;
|
||||
@ -581,7 +581,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.minilogin_ip) + "'");
|
||||
v.push_back(std::to_string(e.hideme));
|
||||
v.push_back(std::to_string(e.rulesflag));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.time_creation));
|
||||
v.push_back("'" + Strings::Escape(e.ban_reason) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.suspend_reason) + "'");
|
||||
@ -627,7 +627,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.minilogin_ip) + "'");
|
||||
v.push_back(std::to_string(e.hideme));
|
||||
v.push_back(std::to_string(e.rulesflag));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.suspendeduntil > 0 ? std::to_string(e.suspendeduntil) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.time_creation));
|
||||
v.push_back("'" + Strings::Escape(e.ban_reason) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.suspend_reason) + "'");
|
||||
|
||||
@ -149,7 +149,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.adventure_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.instance_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.count = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.assassinate_count = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.status = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
@ -300,7 +300,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.adventure_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.instance_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.count = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.assassinate_count = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.status = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
@ -333,7 +333,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.adventure_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.instance_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.count = row[3] ? static_cast<uint16_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.assassinate_count = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.status = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
|
||||
@ -266,7 +266,7 @@ public:
|
||||
e.zone_in_zone_id = row[20] ? static_cast<uint16_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.zone_in_x = row[21] ? strtof(row[21], nullptr) : 0;
|
||||
e.zone_in_y = row[22] ? strtof(row[22], nullptr) : 0;
|
||||
e.zone_in_object_id = static_cast<int16_t>(atoi(row[23]));
|
||||
e.zone_in_object_id = row[23] ? static_cast<int16_t>(atoi(row[23])) : 0;
|
||||
e.dest_x = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.dest_y = row[25] ? strtof(row[25], nullptr) : 0;
|
||||
e.dest_z = row[26] ? strtof(row[26], nullptr) : 0;
|
||||
@ -513,7 +513,7 @@ public:
|
||||
e.zone_in_zone_id = row[20] ? static_cast<uint16_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.zone_in_x = row[21] ? strtof(row[21], nullptr) : 0;
|
||||
e.zone_in_y = row[22] ? strtof(row[22], nullptr) : 0;
|
||||
e.zone_in_object_id = static_cast<int16_t>(atoi(row[23]));
|
||||
e.zone_in_object_id = row[23] ? static_cast<int16_t>(atoi(row[23])) : 0;
|
||||
e.dest_x = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.dest_y = row[25] ? strtof(row[25], nullptr) : 0;
|
||||
e.dest_z = row[26] ? strtof(row[26], nullptr) : 0;
|
||||
@ -569,7 +569,7 @@ public:
|
||||
e.zone_in_zone_id = row[20] ? static_cast<uint16_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.zone_in_x = row[21] ? strtof(row[21], nullptr) : 0;
|
||||
e.zone_in_y = row[22] ? strtof(row[22], nullptr) : 0;
|
||||
e.zone_in_object_id = static_cast<int16_t>(atoi(row[23]));
|
||||
e.zone_in_object_id = row[23] ? static_cast<int16_t>(atoi(row[23])) : 0;
|
||||
e.dest_x = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.dest_y = row[25] ? strtof(row[25], nullptr) : 0;
|
||||
e.dest_z = row[26] ? strtof(row[26], nullptr) : 0;
|
||||
|
||||
@ -119,8 +119,8 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
AlternateCurrency e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -243,8 +243,8 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
AlternateCurrency e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -269,8 +269,8 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
AlternateCurrency e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -155,17 +155,17 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Auras e{};
|
||||
|
||||
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||
e.npc_type = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.npc_type = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.distance = static_cast<int32_t>(atoi(row[4]));
|
||||
e.aura_type = static_cast<int32_t>(atoi(row[5]));
|
||||
e.spawn_type = static_cast<int32_t>(atoi(row[6]));
|
||||
e.movement = static_cast<int32_t>(atoi(row[7]));
|
||||
e.duration = static_cast<int32_t>(atoi(row[8]));
|
||||
e.icon = static_cast<int32_t>(atoi(row[9]));
|
||||
e.cast_time = static_cast<int32_t>(atoi(row[10]));
|
||||
e.spell_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.distance = row[4] ? static_cast<int32_t>(atoi(row[4])) : 60;
|
||||
e.aura_type = row[5] ? static_cast<int32_t>(atoi(row[5])) : 1;
|
||||
e.spawn_type = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.movement = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.duration = row[8] ? static_cast<int32_t>(atoi(row[8])) : 5400;
|
||||
e.icon = row[9] ? static_cast<int32_t>(atoi(row[9])) : -1;
|
||||
e.cast_time = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -315,17 +315,17 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Auras e{};
|
||||
|
||||
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||
e.npc_type = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.npc_type = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.distance = static_cast<int32_t>(atoi(row[4]));
|
||||
e.aura_type = static_cast<int32_t>(atoi(row[5]));
|
||||
e.spawn_type = static_cast<int32_t>(atoi(row[6]));
|
||||
e.movement = static_cast<int32_t>(atoi(row[7]));
|
||||
e.duration = static_cast<int32_t>(atoi(row[8]));
|
||||
e.icon = static_cast<int32_t>(atoi(row[9]));
|
||||
e.cast_time = static_cast<int32_t>(atoi(row[10]));
|
||||
e.spell_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.distance = row[4] ? static_cast<int32_t>(atoi(row[4])) : 60;
|
||||
e.aura_type = row[5] ? static_cast<int32_t>(atoi(row[5])) : 1;
|
||||
e.spawn_type = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.movement = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.duration = row[8] ? static_cast<int32_t>(atoi(row[8])) : 5400;
|
||||
e.icon = row[9] ? static_cast<int32_t>(atoi(row[9])) : -1;
|
||||
e.cast_time = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -350,17 +350,17 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Auras e{};
|
||||
|
||||
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||
e.npc_type = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.npc_type = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.distance = static_cast<int32_t>(atoi(row[4]));
|
||||
e.aura_type = static_cast<int32_t>(atoi(row[5]));
|
||||
e.spawn_type = static_cast<int32_t>(atoi(row[6]));
|
||||
e.movement = static_cast<int32_t>(atoi(row[7]));
|
||||
e.duration = static_cast<int32_t>(atoi(row[8]));
|
||||
e.icon = static_cast<int32_t>(atoi(row[9]));
|
||||
e.cast_time = static_cast<int32_t>(atoi(row[10]));
|
||||
e.spell_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.distance = row[4] ? static_cast<int32_t>(atoi(row[4])) : 60;
|
||||
e.aura_type = row[5] ? static_cast<int32_t>(atoi(row[5])) : 1;
|
||||
e.spawn_type = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.movement = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.duration = row[8] ? static_cast<int32_t>(atoi(row[8])) : 5400;
|
||||
e.icon = row[9] ? static_cast<int32_t>(atoi(row[9])) : -1;
|
||||
e.cast_time = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -175,10 +175,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
BlockedSpells e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.spellid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.type = static_cast<int8_t>(atoi(row[2]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.type = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.zoneid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.y = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.z = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
@ -187,8 +187,8 @@ public:
|
||||
e.z_diff = row[9] ? strtof(row[9], nullptr) : 0;
|
||||
e.message = row[10] ? row[10] : "";
|
||||
e.description = row[11] ? row[11] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[12]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[13]));
|
||||
e.min_expansion = row[12] ? static_cast<int8_t>(atoi(row[12])) : -1;
|
||||
e.max_expansion = row[13] ? static_cast<int8_t>(atoi(row[13])) : -1;
|
||||
e.content_flags = row[14] ? row[14] : "";
|
||||
e.content_flags_disabled = row[15] ? row[15] : "";
|
||||
|
||||
@ -354,10 +354,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
BlockedSpells e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.spellid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.type = static_cast<int8_t>(atoi(row[2]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.type = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.zoneid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.y = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.z = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
@ -366,8 +366,8 @@ public:
|
||||
e.z_diff = row[9] ? strtof(row[9], nullptr) : 0;
|
||||
e.message = row[10] ? row[10] : "";
|
||||
e.description = row[11] ? row[11] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[12]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[13]));
|
||||
e.min_expansion = row[12] ? static_cast<int8_t>(atoi(row[12])) : -1;
|
||||
e.max_expansion = row[13] ? static_cast<int8_t>(atoi(row[13])) : -1;
|
||||
e.content_flags = row[14] ? row[14] : "";
|
||||
e.content_flags_disabled = row[15] ? row[15] : "";
|
||||
|
||||
@ -394,10 +394,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
BlockedSpells e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.spellid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.type = static_cast<int8_t>(atoi(row[2]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.type = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.zoneid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.y = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.z = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
@ -406,8 +406,8 @@ public:
|
||||
e.z_diff = row[9] ? strtof(row[9], nullptr) : 0;
|
||||
e.message = row[10] ? row[10] : "";
|
||||
e.description = row[11] ? row[11] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[12]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[13]));
|
||||
e.min_expansion = row[12] ? static_cast<int8_t>(atoi(row[12])) : -1;
|
||||
e.max_expansion = row[13] ? static_cast<int8_t>(atoi(row[13])) : -1;
|
||||
e.content_flags = row[14] ? row[14] : "";
|
||||
e.content_flags_disabled = row[15] ? row[15] : "";
|
||||
|
||||
|
||||
@ -127,10 +127,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Books e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.txtfile = row[2] ? row[2] : "";
|
||||
e.language = static_cast<int32_t>(atoi(row[3]));
|
||||
e.language = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -258,10 +258,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Books e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.txtfile = row[2] ? row[2] : "";
|
||||
e.language = static_cast<int32_t>(atoi(row[3]));
|
||||
e.language = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -286,10 +286,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Books e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.txtfile = row[2] ? row[2] : "";
|
||||
e.language = static_cast<int32_t>(atoi(row[3]));
|
||||
e.language = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -240,36 +240,36 @@ public:
|
||||
BugReports e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zone = row[1] ? row[1] : "";
|
||||
e.zone = row[1] ? row[1] : "Unknown";
|
||||
e.client_version_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.client_version_name = row[3] ? row[3] : "";
|
||||
e.client_version_name = row[3] ? row[3] : "Unknown";
|
||||
e.account_id = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.character_id = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.character_name = row[6] ? row[6] : "";
|
||||
e.reporter_spoof = static_cast<int8_t>(atoi(row[7]));
|
||||
e.character_name = row[6] ? row[6] : "Unknown";
|
||||
e.reporter_spoof = row[7] ? static_cast<int8_t>(atoi(row[7])) : 1;
|
||||
e.category_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.category_name = row[9] ? row[9] : "";
|
||||
e.reporter_name = row[10] ? row[10] : "";
|
||||
e.ui_path = row[11] ? row[11] : "";
|
||||
e.category_name = row[9] ? row[9] : "Other";
|
||||
e.reporter_name = row[10] ? row[10] : "Unknown";
|
||||
e.ui_path = row[11] ? row[11] : "Unknown";
|
||||
e.pos_x = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.pos_y = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.pos_z = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.heading = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.time_played = row[16] ? static_cast<uint32_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.target_id = row[17] ? static_cast<uint32_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
e.target_name = row[18] ? row[18] : "";
|
||||
e.target_name = row[18] ? row[18] : "Unknown";
|
||||
e.optional_info_mask = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e._can_duplicate = static_cast<int8_t>(atoi(row[20]));
|
||||
e._crash_bug = static_cast<int8_t>(atoi(row[21]));
|
||||
e._target_info = static_cast<int8_t>(atoi(row[22]));
|
||||
e._character_flags = static_cast<int8_t>(atoi(row[23]));
|
||||
e._unknown_value = static_cast<int8_t>(atoi(row[24]));
|
||||
e._can_duplicate = row[20] ? static_cast<int8_t>(atoi(row[20])) : 0;
|
||||
e._crash_bug = row[21] ? static_cast<int8_t>(atoi(row[21])) : 0;
|
||||
e._target_info = row[22] ? static_cast<int8_t>(atoi(row[22])) : 0;
|
||||
e._character_flags = row[23] ? static_cast<int8_t>(atoi(row[23])) : 0;
|
||||
e._unknown_value = row[24] ? static_cast<int8_t>(atoi(row[24])) : 0;
|
||||
e.bug_report = row[25] ? row[25] : "";
|
||||
e.system_info = row[26] ? row[26] : "";
|
||||
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
||||
e.bug_status = row[28] ? static_cast<uint8_t>(strtoul(row[28], nullptr, 10)) : 0;
|
||||
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] : "None";
|
||||
e.reviewer_notes = row[31] ? row[31] : "";
|
||||
|
||||
return e;
|
||||
@ -330,9 +330,9 @@ public:
|
||||
v.push_back(columns[24] + " = " + std::to_string(e._unknown_value));
|
||||
v.push_back(columns[25] + " = '" + Strings::Escape(e.bug_report) + "'");
|
||||
v.push_back(columns[26] + " = '" + Strings::Escape(e.system_info) + "'");
|
||||
v.push_back(columns[27] + " = FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "null") + ")");
|
||||
v.push_back(columns[27] + " = FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[28] + " = " + std::to_string(e.bug_status));
|
||||
v.push_back(columns[29] + " = FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "null") + ")");
|
||||
v.push_back(columns[29] + " = FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[30] + " = '" + Strings::Escape(e.last_reviewer) + "'");
|
||||
v.push_back(columns[31] + " = '" + Strings::Escape(e.reviewer_notes) + "'");
|
||||
|
||||
@ -383,9 +383,9 @@ public:
|
||||
v.push_back(std::to_string(e._unknown_value));
|
||||
v.push_back("'" + Strings::Escape(e.bug_report) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.system_info) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.bug_status));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.last_reviewer) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.reviewer_notes) + "'");
|
||||
|
||||
@ -444,9 +444,9 @@ public:
|
||||
v.push_back(std::to_string(e._unknown_value));
|
||||
v.push_back("'" + Strings::Escape(e.bug_report) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.system_info) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.bug_status));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.last_reviewer) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.reviewer_notes) + "'");
|
||||
|
||||
@ -483,36 +483,36 @@ public:
|
||||
BugReports e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zone = row[1] ? row[1] : "";
|
||||
e.zone = row[1] ? row[1] : "Unknown";
|
||||
e.client_version_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.client_version_name = row[3] ? row[3] : "";
|
||||
e.client_version_name = row[3] ? row[3] : "Unknown";
|
||||
e.account_id = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.character_id = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.character_name = row[6] ? row[6] : "";
|
||||
e.reporter_spoof = static_cast<int8_t>(atoi(row[7]));
|
||||
e.character_name = row[6] ? row[6] : "Unknown";
|
||||
e.reporter_spoof = row[7] ? static_cast<int8_t>(atoi(row[7])) : 1;
|
||||
e.category_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.category_name = row[9] ? row[9] : "";
|
||||
e.reporter_name = row[10] ? row[10] : "";
|
||||
e.ui_path = row[11] ? row[11] : "";
|
||||
e.category_name = row[9] ? row[9] : "Other";
|
||||
e.reporter_name = row[10] ? row[10] : "Unknown";
|
||||
e.ui_path = row[11] ? row[11] : "Unknown";
|
||||
e.pos_x = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.pos_y = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.pos_z = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.heading = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.time_played = row[16] ? static_cast<uint32_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.target_id = row[17] ? static_cast<uint32_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
e.target_name = row[18] ? row[18] : "";
|
||||
e.target_name = row[18] ? row[18] : "Unknown";
|
||||
e.optional_info_mask = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e._can_duplicate = static_cast<int8_t>(atoi(row[20]));
|
||||
e._crash_bug = static_cast<int8_t>(atoi(row[21]));
|
||||
e._target_info = static_cast<int8_t>(atoi(row[22]));
|
||||
e._character_flags = static_cast<int8_t>(atoi(row[23]));
|
||||
e._unknown_value = static_cast<int8_t>(atoi(row[24]));
|
||||
e._can_duplicate = row[20] ? static_cast<int8_t>(atoi(row[20])) : 0;
|
||||
e._crash_bug = row[21] ? static_cast<int8_t>(atoi(row[21])) : 0;
|
||||
e._target_info = row[22] ? static_cast<int8_t>(atoi(row[22])) : 0;
|
||||
e._character_flags = row[23] ? static_cast<int8_t>(atoi(row[23])) : 0;
|
||||
e._unknown_value = row[24] ? static_cast<int8_t>(atoi(row[24])) : 0;
|
||||
e.bug_report = row[25] ? row[25] : "";
|
||||
e.system_info = row[26] ? row[26] : "";
|
||||
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
||||
e.bug_status = row[28] ? static_cast<uint8_t>(strtoul(row[28], nullptr, 10)) : 0;
|
||||
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] : "None";
|
||||
e.reviewer_notes = row[31] ? row[31] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -539,36 +539,36 @@ public:
|
||||
BugReports e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zone = row[1] ? row[1] : "";
|
||||
e.zone = row[1] ? row[1] : "Unknown";
|
||||
e.client_version_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.client_version_name = row[3] ? row[3] : "";
|
||||
e.client_version_name = row[3] ? row[3] : "Unknown";
|
||||
e.account_id = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.character_id = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.character_name = row[6] ? row[6] : "";
|
||||
e.reporter_spoof = static_cast<int8_t>(atoi(row[7]));
|
||||
e.character_name = row[6] ? row[6] : "Unknown";
|
||||
e.reporter_spoof = row[7] ? static_cast<int8_t>(atoi(row[7])) : 1;
|
||||
e.category_id = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.category_name = row[9] ? row[9] : "";
|
||||
e.reporter_name = row[10] ? row[10] : "";
|
||||
e.ui_path = row[11] ? row[11] : "";
|
||||
e.category_name = row[9] ? row[9] : "Other";
|
||||
e.reporter_name = row[10] ? row[10] : "Unknown";
|
||||
e.ui_path = row[11] ? row[11] : "Unknown";
|
||||
e.pos_x = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.pos_y = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.pos_z = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.heading = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.time_played = row[16] ? static_cast<uint32_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.target_id = row[17] ? static_cast<uint32_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
e.target_name = row[18] ? row[18] : "";
|
||||
e.target_name = row[18] ? row[18] : "Unknown";
|
||||
e.optional_info_mask = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e._can_duplicate = static_cast<int8_t>(atoi(row[20]));
|
||||
e._crash_bug = static_cast<int8_t>(atoi(row[21]));
|
||||
e._target_info = static_cast<int8_t>(atoi(row[22]));
|
||||
e._character_flags = static_cast<int8_t>(atoi(row[23]));
|
||||
e._unknown_value = static_cast<int8_t>(atoi(row[24]));
|
||||
e._can_duplicate = row[20] ? static_cast<int8_t>(atoi(row[20])) : 0;
|
||||
e._crash_bug = row[21] ? static_cast<int8_t>(atoi(row[21])) : 0;
|
||||
e._target_info = row[22] ? static_cast<int8_t>(atoi(row[22])) : 0;
|
||||
e._character_flags = row[23] ? static_cast<int8_t>(atoi(row[23])) : 0;
|
||||
e._unknown_value = row[24] ? static_cast<int8_t>(atoi(row[24])) : 0;
|
||||
e.bug_report = row[25] ? row[25] : "";
|
||||
e.system_info = row[26] ? row[26] : "";
|
||||
e.report_datetime = strtoll(row[27] ? row[27] : "-1", nullptr, 10);
|
||||
e.bug_status = row[28] ? static_cast<uint8_t>(strtoul(row[28], nullptr, 10)) : 0;
|
||||
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] : "None";
|
||||
e.reviewer_notes = row[31] ? row[31] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -671,9 +671,9 @@ public:
|
||||
v.push_back(std::to_string(e._unknown_value));
|
||||
v.push_back("'" + Strings::Escape(e.bug_report) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.system_info) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.bug_status));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.last_reviewer) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.reviewer_notes) + "'");
|
||||
|
||||
@ -725,9 +725,9 @@ public:
|
||||
v.push_back(std::to_string(e._unknown_value));
|
||||
v.push_back("'" + Strings::Escape(e.bug_report) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.system_info) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.report_datetime > 0 ? std::to_string(e.report_datetime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.bug_status));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_review > 0 ? std::to_string(e.last_review) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.last_reviewer) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.reviewer_notes) + "'");
|
||||
|
||||
|
||||
@ -174,7 +174,7 @@ public:
|
||||
e.flag = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.target = row[9] ? row[9] : "";
|
||||
e.bug = row[10] ? row[10] : "";
|
||||
e.date = row[11] ? row[11] : "";
|
||||
e.date = row[11] ? row[11] : 0;
|
||||
e.status = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
|
||||
return e;
|
||||
@ -341,7 +341,7 @@ public:
|
||||
e.flag = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.target = row[9] ? row[9] : "";
|
||||
e.bug = row[10] ? row[10] : "";
|
||||
e.date = row[11] ? row[11] : "";
|
||||
e.date = row[11] ? row[11] : 0;
|
||||
e.status = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -378,7 +378,7 @@ public:
|
||||
e.flag = row[8] ? static_cast<uint8_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.target = row[9] ? row[9] : "";
|
||||
e.bug = row[10] ? row[10] : "";
|
||||
e.date = row[11] ? row[11] : "";
|
||||
e.date = row[11] ? row[11] : 0;
|
||||
e.status = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -135,12 +135,12 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Buyer e{};
|
||||
|
||||
e.charid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.buyslot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.charid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.buyslot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.itemname = row[3] ? row[3] : "";
|
||||
e.quantity = static_cast<int32_t>(atoi(row[4]));
|
||||
e.price = static_cast<int32_t>(atoi(row[5]));
|
||||
e.quantity = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.price = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -275,12 +275,12 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Buyer e{};
|
||||
|
||||
e.charid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.buyslot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.charid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.buyslot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.itemname = row[3] ? row[3] : "";
|
||||
e.quantity = static_cast<int32_t>(atoi(row[4]));
|
||||
e.price = static_cast<int32_t>(atoi(row[5]));
|
||||
e.quantity = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.price = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -305,12 +305,12 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Buyer e{};
|
||||
|
||||
e.charid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.buyslot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.charid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.buyslot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.itemname = row[3] ? row[3] : "";
|
||||
e.quantity = static_cast<int32_t>(atoi(row[4]));
|
||||
e.price = static_cast<int32_t>(atoi(row[5]));
|
||||
e.quantity = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.price = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -123,9 +123,9 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharRecipeList e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.recipe_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.madecount = static_cast<int32_t>(atoi(row[2]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.recipe_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.madecount = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -251,9 +251,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharRecipeList e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.recipe_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.madecount = static_cast<int32_t>(atoi(row[2]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.recipe_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.madecount = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -278,9 +278,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharRecipeList e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.recipe_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.madecount = static_cast<int32_t>(atoi(row[2]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.recipe_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.madecount = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ public:
|
||||
e.taskid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.activityid = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.donecount = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.completed = static_cast<int8_t>(atoi(row[4]));
|
||||
e.completed = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -271,7 +271,7 @@ public:
|
||||
e.taskid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.activityid = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.donecount = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.completed = static_cast<int8_t>(atoi(row[4]));
|
||||
e.completed = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -300,7 +300,7 @@ public:
|
||||
e.taskid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.activityid = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.donecount = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.completed = static_cast<int8_t>(atoi(row[4]));
|
||||
e.completed = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -123,9 +123,9 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterAuras e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.slot = static_cast<int8_t>(atoi(row[1]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.slot = row[1] ? static_cast<int8_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -251,9 +251,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterAuras e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.slot = static_cast<int8_t>(atoi(row[1]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.slot = row[1] ? static_cast<int8_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -278,9 +278,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterAuras e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.slot = static_cast<int8_t>(atoi(row[1]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.slot = row[1] ? static_cast<int8_t>(atoi(row[1])) : 0;
|
||||
e.spell_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ public:
|
||||
e.bandolier_slot = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.item_id = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.icon = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.bandolier_name = row[5] ? row[5] : "";
|
||||
e.bandolier_name = row[5] ? row[5] : "0";
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -280,7 +280,7 @@ public:
|
||||
e.bandolier_slot = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.item_id = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.icon = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.bandolier_name = row[5] ? row[5] : "";
|
||||
e.bandolier_name = row[5] ? row[5] : "0";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -310,7 +310,7 @@ public:
|
||||
e.bandolier_slot = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.item_id = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.icon = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.bandolier_name = row[5] ? row[5] : "";
|
||||
e.bandolier_name = row[5] ? row[5] : "0";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ public:
|
||||
CharacterBind e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.instance_id = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
@ -291,7 +291,7 @@ public:
|
||||
CharacterBind e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.instance_id = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
@ -323,7 +323,7 @@ public:
|
||||
CharacterBind e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.instance_id = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.x = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
|
||||
@ -184,18 +184,18 @@ public:
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.caster_name = row[4] ? row[4] : "";
|
||||
e.ticsremaining = static_cast<int32_t>(atoi(row[5]));
|
||||
e.ticsremaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.counters = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.numhits = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.melee_rune = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.magic_rune = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.persistent = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.dot_rune = static_cast<int32_t>(atoi(row[11]));
|
||||
e.caston_x = static_cast<int32_t>(atoi(row[12]));
|
||||
e.caston_y = static_cast<int32_t>(atoi(row[13]));
|
||||
e.caston_z = static_cast<int32_t>(atoi(row[14]));
|
||||
e.ExtraDIChance = static_cast<int32_t>(atoi(row[15]));
|
||||
e.instrument_mod = static_cast<int32_t>(atoi(row[16]));
|
||||
e.dot_rune = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.caston_x = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.caston_y = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.caston_z = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.ExtraDIChance = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.instrument_mod = row[16] ? static_cast<int32_t>(atoi(row[16])) : 10;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -368,18 +368,18 @@ public:
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.caster_name = row[4] ? row[4] : "";
|
||||
e.ticsremaining = static_cast<int32_t>(atoi(row[5]));
|
||||
e.ticsremaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.counters = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.numhits = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.melee_rune = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.magic_rune = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.persistent = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.dot_rune = static_cast<int32_t>(atoi(row[11]));
|
||||
e.caston_x = static_cast<int32_t>(atoi(row[12]));
|
||||
e.caston_y = static_cast<int32_t>(atoi(row[13]));
|
||||
e.caston_z = static_cast<int32_t>(atoi(row[14]));
|
||||
e.ExtraDIChance = static_cast<int32_t>(atoi(row[15]));
|
||||
e.instrument_mod = static_cast<int32_t>(atoi(row[16]));
|
||||
e.dot_rune = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.caston_x = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.caston_y = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.caston_z = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.ExtraDIChance = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.instrument_mod = row[16] ? static_cast<int32_t>(atoi(row[16])) : 10;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -409,18 +409,18 @@ public:
|
||||
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.caster_level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.caster_name = row[4] ? row[4] : "";
|
||||
e.ticsremaining = static_cast<int32_t>(atoi(row[5]));
|
||||
e.ticsremaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.counters = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.numhits = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.melee_rune = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.magic_rune = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.persistent = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.dot_rune = static_cast<int32_t>(atoi(row[11]));
|
||||
e.caston_x = static_cast<int32_t>(atoi(row[12]));
|
||||
e.caston_y = static_cast<int32_t>(atoi(row[13]));
|
||||
e.caston_z = static_cast<int32_t>(atoi(row[14]));
|
||||
e.ExtraDIChance = static_cast<int32_t>(atoi(row[15]));
|
||||
e.instrument_mod = static_cast<int32_t>(atoi(row[16]));
|
||||
e.dot_rune = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.caston_x = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.caston_y = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.caston_z = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.ExtraDIChance = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.instrument_mod = row[16] ? static_cast<int32_t>(atoi(row[16])) : 10;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseCharacterCorpseItemsRepository {
|
||||
public:
|
||||
struct CharacterCorpseItems {
|
||||
@ -181,8 +180,8 @@ public:
|
||||
e.aug_3 = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.aug_4 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.aug_5 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.aug_6 = static_cast<int32_t>(atoi(row[9]));
|
||||
e.attuned = static_cast<int16_t>(atoi(row[10]));
|
||||
e.aug_6 = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.attuned = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.custom_data = row[11] ? row[11] : "";
|
||||
e.ornamenticon = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
@ -357,8 +356,8 @@ public:
|
||||
e.aug_3 = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.aug_4 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.aug_5 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.aug_6 = static_cast<int32_t>(atoi(row[9]));
|
||||
e.attuned = static_cast<int16_t>(atoi(row[10]));
|
||||
e.aug_6 = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.attuned = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.custom_data = row[11] ? row[11] : "";
|
||||
e.ornamenticon = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
@ -396,8 +395,8 @@ public:
|
||||
e.aug_3 = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.aug_4 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.aug_5 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.aug_6 = static_cast<int32_t>(atoi(row[9]));
|
||||
e.attuned = static_cast<int16_t>(atoi(row[10]));
|
||||
e.aug_6 = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.attuned = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.custom_data = row[11] ? row[11] : "";
|
||||
e.ornamenticon = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseCharacterCorpsesRepository {
|
||||
public:
|
||||
struct CharacterCorpses {
|
||||
@ -303,7 +302,7 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.charid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.zone_id = static_cast<int16_t>(atoi(row[3]));
|
||||
e.zone_id = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.instance_id = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.x = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.y = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
@ -312,9 +311,9 @@ public:
|
||||
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
||||
e.guild_consent_id = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.is_rezzed = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.is_buried = static_cast<int8_t>(atoi(row[12]));
|
||||
e.was_at_graveyard = static_cast<int8_t>(atoi(row[13]));
|
||||
e.is_locked = static_cast<int8_t>(atoi(row[14]));
|
||||
e.is_buried = row[12] ? static_cast<int8_t>(atoi(row[12])) : 0;
|
||||
e.was_at_graveyard = row[13] ? static_cast<int8_t>(atoi(row[13])) : 0;
|
||||
e.is_locked = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.exp = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.size = row[16] ? static_cast<uint32_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.level = row[17] ? static_cast<uint32_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
@ -388,7 +387,7 @@ public:
|
||||
v.push_back(columns[6] + " = " + std::to_string(e.y));
|
||||
v.push_back(columns[7] + " = " + std::to_string(e.z));
|
||||
v.push_back(columns[8] + " = " + std::to_string(e.heading));
|
||||
v.push_back(columns[9] + " = FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "null") + ")");
|
||||
v.push_back(columns[9] + " = FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[10] + " = " + std::to_string(e.guild_consent_id));
|
||||
v.push_back(columns[11] + " = " + std::to_string(e.is_rezzed));
|
||||
v.push_back(columns[12] + " = " + std::to_string(e.is_buried));
|
||||
@ -456,7 +455,7 @@ public:
|
||||
v.push_back(std::to_string(e.y));
|
||||
v.push_back(std::to_string(e.z));
|
||||
v.push_back(std::to_string(e.heading));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.guild_consent_id));
|
||||
v.push_back(std::to_string(e.is_rezzed));
|
||||
v.push_back(std::to_string(e.is_buried));
|
||||
@ -532,7 +531,7 @@ public:
|
||||
v.push_back(std::to_string(e.y));
|
||||
v.push_back(std::to_string(e.z));
|
||||
v.push_back(std::to_string(e.heading));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.guild_consent_id));
|
||||
v.push_back(std::to_string(e.is_rezzed));
|
||||
v.push_back(std::to_string(e.is_buried));
|
||||
@ -606,7 +605,7 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.charid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.zone_id = static_cast<int16_t>(atoi(row[3]));
|
||||
e.zone_id = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.instance_id = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.x = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.y = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
@ -615,9 +614,9 @@ public:
|
||||
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
||||
e.guild_consent_id = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.is_rezzed = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.is_buried = static_cast<int8_t>(atoi(row[12]));
|
||||
e.was_at_graveyard = static_cast<int8_t>(atoi(row[13]));
|
||||
e.is_locked = static_cast<int8_t>(atoi(row[14]));
|
||||
e.is_buried = row[12] ? static_cast<int8_t>(atoi(row[12])) : 0;
|
||||
e.was_at_graveyard = row[13] ? static_cast<int8_t>(atoi(row[13])) : 0;
|
||||
e.is_locked = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.exp = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.size = row[16] ? static_cast<uint32_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.level = row[17] ? static_cast<uint32_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
@ -677,7 +676,7 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.charid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.charname = row[2] ? row[2] : "";
|
||||
e.zone_id = static_cast<int16_t>(atoi(row[3]));
|
||||
e.zone_id = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.instance_id = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.x = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.y = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
@ -686,9 +685,9 @@ public:
|
||||
e.time_of_death = strtoll(row[9] ? row[9] : "-1", nullptr, 10);
|
||||
e.guild_consent_id = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.is_rezzed = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.is_buried = static_cast<int8_t>(atoi(row[12]));
|
||||
e.was_at_graveyard = static_cast<int8_t>(atoi(row[13]));
|
||||
e.is_locked = static_cast<int8_t>(atoi(row[14]));
|
||||
e.is_buried = row[12] ? static_cast<int8_t>(atoi(row[12])) : 0;
|
||||
e.was_at_graveyard = row[13] ? static_cast<int8_t>(atoi(row[13])) : 0;
|
||||
e.is_locked = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.exp = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.size = row[16] ? static_cast<uint32_t>(strtoul(row[16], nullptr, 10)) : 0;
|
||||
e.level = row[17] ? static_cast<uint32_t>(strtoul(row[17], nullptr, 10)) : 0;
|
||||
@ -804,7 +803,7 @@ public:
|
||||
v.push_back(std::to_string(e.y));
|
||||
v.push_back(std::to_string(e.z));
|
||||
v.push_back(std::to_string(e.heading));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.guild_consent_id));
|
||||
v.push_back(std::to_string(e.is_rezzed));
|
||||
v.push_back(std::to_string(e.is_buried));
|
||||
@ -873,7 +872,7 @@ public:
|
||||
v.push_back(std::to_string(e.y));
|
||||
v.push_back(std::to_string(e.z));
|
||||
v.push_back(std::to_string(e.heading));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.time_of_death > 0 ? std::to_string(e.time_of_death) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.guild_consent_id));
|
||||
v.push_back(std::to_string(e.is_rezzed));
|
||||
v.push_back(std::to_string(e.is_buried));
|
||||
|
||||
@ -524,7 +524,7 @@ public:
|
||||
CharacterData e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.account_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.last_name = row[3] ? row[3] : "";
|
||||
e.title = row[4] ? row[4] : "";
|
||||
@ -618,7 +618,7 @@ public:
|
||||
e.lfg = row[92] ? static_cast<uint8_t>(strtoul(row[92], nullptr, 10)) : 0;
|
||||
e.mailkey = row[93] ? row[93] : "";
|
||||
e.xtargets = row[94] ? static_cast<uint8_t>(strtoul(row[94], nullptr, 10)) : 5;
|
||||
e.firstlogon = static_cast<int8_t>(atoi(row[95]));
|
||||
e.firstlogon = row[95] ? static_cast<int8_t>(atoi(row[95])) : 0;
|
||||
e.e_aa_effects = row[96] ? static_cast<uint32_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.e_percent_to_aa = row[97] ? static_cast<uint32_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.e_expended_aa_spent = row[98] ? static_cast<uint32_t>(strtoul(row[98], nullptr, 10)) : 0;
|
||||
@ -760,7 +760,7 @@ public:
|
||||
v.push_back(columns[99] + " = " + std::to_string(e.aa_points_spent_old));
|
||||
v.push_back(columns[100] + " = " + std::to_string(e.aa_points_old));
|
||||
v.push_back(columns[101] + " = " + std::to_string(e.e_last_invsnapshot));
|
||||
v.push_back(columns[102] + " = FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back(columns[102] + " = FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -884,7 +884,7 @@ public:
|
||||
v.push_back(std::to_string(e.aa_points_spent_old));
|
||||
v.push_back(std::to_string(e.aa_points_old));
|
||||
v.push_back(std::to_string(e.e_last_invsnapshot));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -1016,7 +1016,7 @@ public:
|
||||
v.push_back(std::to_string(e.aa_points_spent_old));
|
||||
v.push_back(std::to_string(e.aa_points_old));
|
||||
v.push_back(std::to_string(e.e_last_invsnapshot));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@ -1051,7 +1051,7 @@ public:
|
||||
CharacterData e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.account_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.last_name = row[3] ? row[3] : "";
|
||||
e.title = row[4] ? row[4] : "";
|
||||
@ -1145,7 +1145,7 @@ public:
|
||||
e.lfg = row[92] ? static_cast<uint8_t>(strtoul(row[92], nullptr, 10)) : 0;
|
||||
e.mailkey = row[93] ? row[93] : "";
|
||||
e.xtargets = row[94] ? static_cast<uint8_t>(strtoul(row[94], nullptr, 10)) : 5;
|
||||
e.firstlogon = static_cast<int8_t>(atoi(row[95]));
|
||||
e.firstlogon = row[95] ? static_cast<int8_t>(atoi(row[95])) : 0;
|
||||
e.e_aa_effects = row[96] ? static_cast<uint32_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.e_percent_to_aa = row[97] ? static_cast<uint32_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.e_expended_aa_spent = row[98] ? static_cast<uint32_t>(strtoul(row[98], nullptr, 10)) : 0;
|
||||
@ -1178,7 +1178,7 @@ public:
|
||||
CharacterData e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.account_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.last_name = row[3] ? row[3] : "";
|
||||
e.title = row[4] ? row[4] : "";
|
||||
@ -1272,7 +1272,7 @@ public:
|
||||
e.lfg = row[92] ? static_cast<uint8_t>(strtoul(row[92], nullptr, 10)) : 0;
|
||||
e.mailkey = row[93] ? row[93] : "";
|
||||
e.xtargets = row[94] ? static_cast<uint8_t>(strtoul(row[94], nullptr, 10)) : 5;
|
||||
e.firstlogon = static_cast<int8_t>(atoi(row[95]));
|
||||
e.firstlogon = row[95] ? static_cast<int8_t>(atoi(row[95])) : 0;
|
||||
e.e_aa_effects = row[96] ? static_cast<uint32_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.e_percent_to_aa = row[97] ? static_cast<uint32_t>(strtoul(row[97], nullptr, 10)) : 0;
|
||||
e.e_expended_aa_spent = row[98] ? static_cast<uint32_t>(strtoul(row[98], nullptr, 10)) : 0;
|
||||
@ -1456,7 +1456,7 @@ public:
|
||||
v.push_back(std::to_string(e.aa_points_spent_old));
|
||||
v.push_back(std::to_string(e.aa_points_old));
|
||||
v.push_back(std::to_string(e.e_last_invsnapshot));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -1581,7 +1581,7 @@ public:
|
||||
v.push_back(std::to_string(e.aa_points_spent_old));
|
||||
v.push_back(std::to_string(e.aa_points_old));
|
||||
v.push_back(std::to_string(e.e_last_invsnapshot));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseCharacterExpModifiersRepository {
|
||||
public:
|
||||
struct CharacterExpModifiers {
|
||||
@ -132,9 +131,9 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterExpModifiers e{};
|
||||
|
||||
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.instance_version = static_cast<int32_t>(atoi(row[2]));
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.instance_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
|
||||
@ -268,9 +267,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterExpModifiers e{};
|
||||
|
||||
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.instance_version = static_cast<int32_t>(atoi(row[2]));
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.instance_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
|
||||
@ -297,9 +296,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterExpModifiers e{};
|
||||
|
||||
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.instance_version = static_cast<int32_t>(atoi(row[2]));
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.instance_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
e.aa_modifier = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.exp_modifier = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ public:
|
||||
v.push_back(columns[1] + " = " + std::to_string(e.character_id));
|
||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.expedition_name) + "'");
|
||||
v.push_back(columns[3] + " = '" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[5] + " = " + std::to_string(e.duration));
|
||||
v.push_back(columns[6] + " = '" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
@ -210,7 +210,7 @@ public:
|
||||
v.push_back(std::to_string(e.character_id));
|
||||
v.push_back("'" + Strings::Escape(e.expedition_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.duration));
|
||||
v.push_back("'" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
@ -246,7 +246,7 @@ public:
|
||||
v.push_back(std::to_string(e.character_id));
|
||||
v.push_back("'" + Strings::Escape(e.expedition_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.duration));
|
||||
v.push_back("'" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
@ -398,7 +398,7 @@ public:
|
||||
v.push_back(std::to_string(e.character_id));
|
||||
v.push_back("'" + Strings::Escape(e.expedition_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.duration));
|
||||
v.push_back("'" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
@ -427,7 +427,7 @@ public:
|
||||
v.push_back(std::to_string(e.character_id));
|
||||
v.push_back("'" + Strings::Escape(e.expedition_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.duration));
|
||||
v.push_back("'" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
|
||||
@ -149,9 +149,9 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.instance_zone_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.safe_zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.instance_zone_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.instance_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.safe_zone_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.safe_x = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.safe_y = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.safe_z = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
@ -300,9 +300,9 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.instance_zone_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.safe_zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.instance_zone_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.instance_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.safe_zone_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.safe_x = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.safe_y = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.safe_z = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
@ -333,9 +333,9 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.instance_zone_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.safe_zone_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.instance_zone_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.instance_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.safe_zone_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.safe_x = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.safe_y = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.safe_z = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
|
||||
@ -119,8 +119,8 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterPeqzoneFlags e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -243,8 +243,8 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterPeqzoneFlags e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -269,8 +269,8 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterPeqzoneFlags e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -155,16 +155,16 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterPetBuffs e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.caster_level = static_cast<int8_t>(atoi(row[4]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.slot = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.spell_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.caster_level = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.castername = row[5] ? row[5] : "";
|
||||
e.ticsremaining = static_cast<int32_t>(atoi(row[6]));
|
||||
e.counters = static_cast<int32_t>(atoi(row[7]));
|
||||
e.numhits = static_cast<int32_t>(atoi(row[8]));
|
||||
e.rune = static_cast<int32_t>(atoi(row[9]));
|
||||
e.ticsremaining = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.counters = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.numhits = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.rune = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.instrument_mod = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 10;
|
||||
|
||||
return e;
|
||||
@ -315,16 +315,16 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterPetBuffs e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.caster_level = static_cast<int8_t>(atoi(row[4]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.slot = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.spell_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.caster_level = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.castername = row[5] ? row[5] : "";
|
||||
e.ticsremaining = static_cast<int32_t>(atoi(row[6]));
|
||||
e.counters = static_cast<int32_t>(atoi(row[7]));
|
||||
e.numhits = static_cast<int32_t>(atoi(row[8]));
|
||||
e.rune = static_cast<int32_t>(atoi(row[9]));
|
||||
e.ticsremaining = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.counters = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.numhits = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.rune = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.instrument_mod = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 10;
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -350,16 +350,16 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterPetBuffs e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.caster_level = static_cast<int8_t>(atoi(row[4]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.slot = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.spell_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.caster_level = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.castername = row[5] ? row[5] : "";
|
||||
e.ticsremaining = static_cast<int32_t>(atoi(row[6]));
|
||||
e.counters = static_cast<int32_t>(atoi(row[7]));
|
||||
e.numhits = static_cast<int32_t>(atoi(row[8]));
|
||||
e.rune = static_cast<int32_t>(atoi(row[9]));
|
||||
e.ticsremaining = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.counters = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.numhits = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.rune = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.instrument_mod = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 10;
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -147,15 +147,15 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterPetInfo e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.petname = row[2] ? row[2] : "";
|
||||
e.petpower = static_cast<int32_t>(atoi(row[3]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.hp = static_cast<int32_t>(atoi(row[5]));
|
||||
e.mana = static_cast<int32_t>(atoi(row[6]));
|
||||
e.petpower = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.spell_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.hp = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.mana = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.size = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
e.taunting = static_cast<int8_t>(atoi(row[8]));
|
||||
e.taunting = row[8] ? static_cast<int8_t>(atoi(row[8])) : 1;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -299,15 +299,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterPetInfo e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.petname = row[2] ? row[2] : "";
|
||||
e.petpower = static_cast<int32_t>(atoi(row[3]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.hp = static_cast<int32_t>(atoi(row[5]));
|
||||
e.mana = static_cast<int32_t>(atoi(row[6]));
|
||||
e.petpower = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.spell_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.hp = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.mana = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.size = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
e.taunting = static_cast<int8_t>(atoi(row[8]));
|
||||
e.taunting = row[8] ? static_cast<int8_t>(atoi(row[8])) : 1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -332,15 +332,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterPetInfo e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.petname = row[2] ? row[2] : "";
|
||||
e.petpower = static_cast<int32_t>(atoi(row[3]));
|
||||
e.spell_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.hp = static_cast<int32_t>(atoi(row[5]));
|
||||
e.mana = static_cast<int32_t>(atoi(row[6]));
|
||||
e.petpower = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.spell_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.hp = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.mana = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.size = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
e.taunting = static_cast<int8_t>(atoi(row[8]));
|
||||
e.taunting = row[8] ? static_cast<int8_t>(atoi(row[8])) : 1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -127,10 +127,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterPetInventory e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.slot = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.item_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -259,10 +259,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterPetInventory e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.slot = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.item_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -287,10 +287,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterPetInventory e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.pet = static_cast<int32_t>(atoi(row[1]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[2]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[3]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.pet = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.slot = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.item_id = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -407,78 +407,78 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterStatsRecord e{};
|
||||
|
||||
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.status = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int32_t>(atoi(row[3]));
|
||||
e.class_ = static_cast<int32_t>(atoi(row[4]));
|
||||
e.race = static_cast<int32_t>(atoi(row[5]));
|
||||
e.aa_points = static_cast<int32_t>(atoi(row[6]));
|
||||
e.status = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.class_ = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.race = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.aa_points = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.hp = row[7] ? strtoll(row[7], nullptr, 10) : 0;
|
||||
e.mana = row[8] ? strtoll(row[8], nullptr, 10) : 0;
|
||||
e.endurance = row[9] ? strtoll(row[9], nullptr, 10) : 0;
|
||||
e.ac = static_cast<int32_t>(atoi(row[10]));
|
||||
e.strength = static_cast<int32_t>(atoi(row[11]));
|
||||
e.stamina = static_cast<int32_t>(atoi(row[12]));
|
||||
e.dexterity = static_cast<int32_t>(atoi(row[13]));
|
||||
e.agility = static_cast<int32_t>(atoi(row[14]));
|
||||
e.intelligence = static_cast<int32_t>(atoi(row[15]));
|
||||
e.wisdom = static_cast<int32_t>(atoi(row[16]));
|
||||
e.charisma = static_cast<int32_t>(atoi(row[17]));
|
||||
e.magic_resist = static_cast<int32_t>(atoi(row[18]));
|
||||
e.fire_resist = static_cast<int32_t>(atoi(row[19]));
|
||||
e.cold_resist = static_cast<int32_t>(atoi(row[20]));
|
||||
e.poison_resist = static_cast<int32_t>(atoi(row[21]));
|
||||
e.disease_resist = static_cast<int32_t>(atoi(row[22]));
|
||||
e.corruption_resist = static_cast<int32_t>(atoi(row[23]));
|
||||
e.heroic_strength = static_cast<int32_t>(atoi(row[24]));
|
||||
e.heroic_stamina = static_cast<int32_t>(atoi(row[25]));
|
||||
e.heroic_dexterity = static_cast<int32_t>(atoi(row[26]));
|
||||
e.heroic_agility = static_cast<int32_t>(atoi(row[27]));
|
||||
e.heroic_intelligence = static_cast<int32_t>(atoi(row[28]));
|
||||
e.heroic_wisdom = static_cast<int32_t>(atoi(row[29]));
|
||||
e.heroic_charisma = static_cast<int32_t>(atoi(row[30]));
|
||||
e.heroic_magic_resist = static_cast<int32_t>(atoi(row[31]));
|
||||
e.heroic_fire_resist = static_cast<int32_t>(atoi(row[32]));
|
||||
e.heroic_cold_resist = static_cast<int32_t>(atoi(row[33]));
|
||||
e.heroic_poison_resist = static_cast<int32_t>(atoi(row[34]));
|
||||
e.heroic_disease_resist = static_cast<int32_t>(atoi(row[35]));
|
||||
e.heroic_corruption_resist = static_cast<int32_t>(atoi(row[36]));
|
||||
e.haste = static_cast<int32_t>(atoi(row[37]));
|
||||
e.accuracy = static_cast<int32_t>(atoi(row[38]));
|
||||
e.attack = static_cast<int32_t>(atoi(row[39]));
|
||||
e.avoidance = static_cast<int32_t>(atoi(row[40]));
|
||||
e.clairvoyance = static_cast<int32_t>(atoi(row[41]));
|
||||
e.combat_effects = static_cast<int32_t>(atoi(row[42]));
|
||||
e.damage_shield_mitigation = static_cast<int32_t>(atoi(row[43]));
|
||||
e.damage_shield = static_cast<int32_t>(atoi(row[44]));
|
||||
e.dot_shielding = static_cast<int32_t>(atoi(row[45]));
|
||||
e.hp_regen = static_cast<int32_t>(atoi(row[46]));
|
||||
e.mana_regen = static_cast<int32_t>(atoi(row[47]));
|
||||
e.endurance_regen = static_cast<int32_t>(atoi(row[48]));
|
||||
e.shielding = static_cast<int32_t>(atoi(row[49]));
|
||||
e.spell_damage = static_cast<int32_t>(atoi(row[50]));
|
||||
e.spell_shielding = static_cast<int32_t>(atoi(row[51]));
|
||||
e.strikethrough = static_cast<int32_t>(atoi(row[52]));
|
||||
e.stun_resist = static_cast<int32_t>(atoi(row[53]));
|
||||
e.backstab = static_cast<int32_t>(atoi(row[54]));
|
||||
e.wind = static_cast<int32_t>(atoi(row[55]));
|
||||
e.brass = static_cast<int32_t>(atoi(row[56]));
|
||||
e.string = static_cast<int32_t>(atoi(row[57]));
|
||||
e.percussion = static_cast<int32_t>(atoi(row[58]));
|
||||
e.singing = static_cast<int32_t>(atoi(row[59]));
|
||||
e.baking = static_cast<int32_t>(atoi(row[60]));
|
||||
e.alchemy = static_cast<int32_t>(atoi(row[61]));
|
||||
e.tailoring = static_cast<int32_t>(atoi(row[62]));
|
||||
e.blacksmithing = static_cast<int32_t>(atoi(row[63]));
|
||||
e.fletching = static_cast<int32_t>(atoi(row[64]));
|
||||
e.brewing = static_cast<int32_t>(atoi(row[65]));
|
||||
e.jewelry = static_cast<int32_t>(atoi(row[66]));
|
||||
e.pottery = static_cast<int32_t>(atoi(row[67]));
|
||||
e.research = static_cast<int32_t>(atoi(row[68]));
|
||||
e.alcohol = static_cast<int32_t>(atoi(row[69]));
|
||||
e.fishing = static_cast<int32_t>(atoi(row[70]));
|
||||
e.tinkering = static_cast<int32_t>(atoi(row[71]));
|
||||
e.ac = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.strength = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.stamina = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.dexterity = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.agility = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.intelligence = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.wisdom = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.charisma = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.magic_resist = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.fire_resist = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.cold_resist = row[20] ? static_cast<int32_t>(atoi(row[20])) : 0;
|
||||
e.poison_resist = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.disease_resist = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.corruption_resist = row[23] ? static_cast<int32_t>(atoi(row[23])) : 0;
|
||||
e.heroic_strength = row[24] ? static_cast<int32_t>(atoi(row[24])) : 0;
|
||||
e.heroic_stamina = row[25] ? static_cast<int32_t>(atoi(row[25])) : 0;
|
||||
e.heroic_dexterity = row[26] ? static_cast<int32_t>(atoi(row[26])) : 0;
|
||||
e.heroic_agility = row[27] ? static_cast<int32_t>(atoi(row[27])) : 0;
|
||||
e.heroic_intelligence = row[28] ? static_cast<int32_t>(atoi(row[28])) : 0;
|
||||
e.heroic_wisdom = row[29] ? static_cast<int32_t>(atoi(row[29])) : 0;
|
||||
e.heroic_charisma = row[30] ? static_cast<int32_t>(atoi(row[30])) : 0;
|
||||
e.heroic_magic_resist = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.heroic_fire_resist = row[32] ? static_cast<int32_t>(atoi(row[32])) : 0;
|
||||
e.heroic_cold_resist = row[33] ? static_cast<int32_t>(atoi(row[33])) : 0;
|
||||
e.heroic_poison_resist = row[34] ? static_cast<int32_t>(atoi(row[34])) : 0;
|
||||
e.heroic_disease_resist = row[35] ? static_cast<int32_t>(atoi(row[35])) : 0;
|
||||
e.heroic_corruption_resist = row[36] ? static_cast<int32_t>(atoi(row[36])) : 0;
|
||||
e.haste = row[37] ? static_cast<int32_t>(atoi(row[37])) : 0;
|
||||
e.accuracy = row[38] ? static_cast<int32_t>(atoi(row[38])) : 0;
|
||||
e.attack = row[39] ? static_cast<int32_t>(atoi(row[39])) : 0;
|
||||
e.avoidance = row[40] ? static_cast<int32_t>(atoi(row[40])) : 0;
|
||||
e.clairvoyance = row[41] ? static_cast<int32_t>(atoi(row[41])) : 0;
|
||||
e.combat_effects = row[42] ? static_cast<int32_t>(atoi(row[42])) : 0;
|
||||
e.damage_shield_mitigation = row[43] ? static_cast<int32_t>(atoi(row[43])) : 0;
|
||||
e.damage_shield = row[44] ? static_cast<int32_t>(atoi(row[44])) : 0;
|
||||
e.dot_shielding = row[45] ? static_cast<int32_t>(atoi(row[45])) : 0;
|
||||
e.hp_regen = row[46] ? static_cast<int32_t>(atoi(row[46])) : 0;
|
||||
e.mana_regen = row[47] ? static_cast<int32_t>(atoi(row[47])) : 0;
|
||||
e.endurance_regen = row[48] ? static_cast<int32_t>(atoi(row[48])) : 0;
|
||||
e.shielding = row[49] ? static_cast<int32_t>(atoi(row[49])) : 0;
|
||||
e.spell_damage = row[50] ? static_cast<int32_t>(atoi(row[50])) : 0;
|
||||
e.spell_shielding = row[51] ? static_cast<int32_t>(atoi(row[51])) : 0;
|
||||
e.strikethrough = row[52] ? static_cast<int32_t>(atoi(row[52])) : 0;
|
||||
e.stun_resist = row[53] ? static_cast<int32_t>(atoi(row[53])) : 0;
|
||||
e.backstab = row[54] ? static_cast<int32_t>(atoi(row[54])) : 0;
|
||||
e.wind = row[55] ? static_cast<int32_t>(atoi(row[55])) : 0;
|
||||
e.brass = row[56] ? static_cast<int32_t>(atoi(row[56])) : 0;
|
||||
e.string = row[57] ? static_cast<int32_t>(atoi(row[57])) : 0;
|
||||
e.percussion = row[58] ? static_cast<int32_t>(atoi(row[58])) : 0;
|
||||
e.singing = row[59] ? static_cast<int32_t>(atoi(row[59])) : 0;
|
||||
e.baking = row[60] ? static_cast<int32_t>(atoi(row[60])) : 0;
|
||||
e.alchemy = row[61] ? static_cast<int32_t>(atoi(row[61])) : 0;
|
||||
e.tailoring = row[62] ? static_cast<int32_t>(atoi(row[62])) : 0;
|
||||
e.blacksmithing = row[63] ? static_cast<int32_t>(atoi(row[63])) : 0;
|
||||
e.fletching = row[64] ? static_cast<int32_t>(atoi(row[64])) : 0;
|
||||
e.brewing = row[65] ? static_cast<int32_t>(atoi(row[65])) : 0;
|
||||
e.jewelry = row[66] ? static_cast<int32_t>(atoi(row[66])) : 0;
|
||||
e.pottery = row[67] ? static_cast<int32_t>(atoi(row[67])) : 0;
|
||||
e.research = row[68] ? static_cast<int32_t>(atoi(row[68])) : 0;
|
||||
e.alcohol = row[69] ? static_cast<int32_t>(atoi(row[69])) : 0;
|
||||
e.fishing = row[70] ? static_cast<int32_t>(atoi(row[70])) : 0;
|
||||
e.tinkering = row[71] ? static_cast<int32_t>(atoi(row[71])) : 0;
|
||||
e.created_at = strtoll(row[72] ? row[72] : "-1", nullptr, 10);
|
||||
e.updated_at = strtoll(row[73] ? row[73] : "-1", nullptr, 10);
|
||||
|
||||
@ -586,8 +586,8 @@ public:
|
||||
v.push_back(columns[69] + " = " + std::to_string(e.alcohol));
|
||||
v.push_back(columns[70] + " = " + std::to_string(e.fishing));
|
||||
v.push_back(columns[71] + " = " + std::to_string(e.tinkering));
|
||||
v.push_back(columns[72] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back(columns[73] + " = FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back(columns[72] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[73] + " = FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -681,8 +681,8 @@ public:
|
||||
v.push_back(std::to_string(e.alcohol));
|
||||
v.push_back(std::to_string(e.fishing));
|
||||
v.push_back(std::to_string(e.tinkering));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -784,8 +784,8 @@ public:
|
||||
v.push_back(std::to_string(e.alcohol));
|
||||
v.push_back(std::to_string(e.fishing));
|
||||
v.push_back(std::to_string(e.tinkering));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@ -819,78 +819,78 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterStatsRecord e{};
|
||||
|
||||
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.status = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int32_t>(atoi(row[3]));
|
||||
e.class_ = static_cast<int32_t>(atoi(row[4]));
|
||||
e.race = static_cast<int32_t>(atoi(row[5]));
|
||||
e.aa_points = static_cast<int32_t>(atoi(row[6]));
|
||||
e.status = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.class_ = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.race = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.aa_points = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.hp = row[7] ? strtoll(row[7], nullptr, 10) : 0;
|
||||
e.mana = row[8] ? strtoll(row[8], nullptr, 10) : 0;
|
||||
e.endurance = row[9] ? strtoll(row[9], nullptr, 10) : 0;
|
||||
e.ac = static_cast<int32_t>(atoi(row[10]));
|
||||
e.strength = static_cast<int32_t>(atoi(row[11]));
|
||||
e.stamina = static_cast<int32_t>(atoi(row[12]));
|
||||
e.dexterity = static_cast<int32_t>(atoi(row[13]));
|
||||
e.agility = static_cast<int32_t>(atoi(row[14]));
|
||||
e.intelligence = static_cast<int32_t>(atoi(row[15]));
|
||||
e.wisdom = static_cast<int32_t>(atoi(row[16]));
|
||||
e.charisma = static_cast<int32_t>(atoi(row[17]));
|
||||
e.magic_resist = static_cast<int32_t>(atoi(row[18]));
|
||||
e.fire_resist = static_cast<int32_t>(atoi(row[19]));
|
||||
e.cold_resist = static_cast<int32_t>(atoi(row[20]));
|
||||
e.poison_resist = static_cast<int32_t>(atoi(row[21]));
|
||||
e.disease_resist = static_cast<int32_t>(atoi(row[22]));
|
||||
e.corruption_resist = static_cast<int32_t>(atoi(row[23]));
|
||||
e.heroic_strength = static_cast<int32_t>(atoi(row[24]));
|
||||
e.heroic_stamina = static_cast<int32_t>(atoi(row[25]));
|
||||
e.heroic_dexterity = static_cast<int32_t>(atoi(row[26]));
|
||||
e.heroic_agility = static_cast<int32_t>(atoi(row[27]));
|
||||
e.heroic_intelligence = static_cast<int32_t>(atoi(row[28]));
|
||||
e.heroic_wisdom = static_cast<int32_t>(atoi(row[29]));
|
||||
e.heroic_charisma = static_cast<int32_t>(atoi(row[30]));
|
||||
e.heroic_magic_resist = static_cast<int32_t>(atoi(row[31]));
|
||||
e.heroic_fire_resist = static_cast<int32_t>(atoi(row[32]));
|
||||
e.heroic_cold_resist = static_cast<int32_t>(atoi(row[33]));
|
||||
e.heroic_poison_resist = static_cast<int32_t>(atoi(row[34]));
|
||||
e.heroic_disease_resist = static_cast<int32_t>(atoi(row[35]));
|
||||
e.heroic_corruption_resist = static_cast<int32_t>(atoi(row[36]));
|
||||
e.haste = static_cast<int32_t>(atoi(row[37]));
|
||||
e.accuracy = static_cast<int32_t>(atoi(row[38]));
|
||||
e.attack = static_cast<int32_t>(atoi(row[39]));
|
||||
e.avoidance = static_cast<int32_t>(atoi(row[40]));
|
||||
e.clairvoyance = static_cast<int32_t>(atoi(row[41]));
|
||||
e.combat_effects = static_cast<int32_t>(atoi(row[42]));
|
||||
e.damage_shield_mitigation = static_cast<int32_t>(atoi(row[43]));
|
||||
e.damage_shield = static_cast<int32_t>(atoi(row[44]));
|
||||
e.dot_shielding = static_cast<int32_t>(atoi(row[45]));
|
||||
e.hp_regen = static_cast<int32_t>(atoi(row[46]));
|
||||
e.mana_regen = static_cast<int32_t>(atoi(row[47]));
|
||||
e.endurance_regen = static_cast<int32_t>(atoi(row[48]));
|
||||
e.shielding = static_cast<int32_t>(atoi(row[49]));
|
||||
e.spell_damage = static_cast<int32_t>(atoi(row[50]));
|
||||
e.spell_shielding = static_cast<int32_t>(atoi(row[51]));
|
||||
e.strikethrough = static_cast<int32_t>(atoi(row[52]));
|
||||
e.stun_resist = static_cast<int32_t>(atoi(row[53]));
|
||||
e.backstab = static_cast<int32_t>(atoi(row[54]));
|
||||
e.wind = static_cast<int32_t>(atoi(row[55]));
|
||||
e.brass = static_cast<int32_t>(atoi(row[56]));
|
||||
e.string = static_cast<int32_t>(atoi(row[57]));
|
||||
e.percussion = static_cast<int32_t>(atoi(row[58]));
|
||||
e.singing = static_cast<int32_t>(atoi(row[59]));
|
||||
e.baking = static_cast<int32_t>(atoi(row[60]));
|
||||
e.alchemy = static_cast<int32_t>(atoi(row[61]));
|
||||
e.tailoring = static_cast<int32_t>(atoi(row[62]));
|
||||
e.blacksmithing = static_cast<int32_t>(atoi(row[63]));
|
||||
e.fletching = static_cast<int32_t>(atoi(row[64]));
|
||||
e.brewing = static_cast<int32_t>(atoi(row[65]));
|
||||
e.jewelry = static_cast<int32_t>(atoi(row[66]));
|
||||
e.pottery = static_cast<int32_t>(atoi(row[67]));
|
||||
e.research = static_cast<int32_t>(atoi(row[68]));
|
||||
e.alcohol = static_cast<int32_t>(atoi(row[69]));
|
||||
e.fishing = static_cast<int32_t>(atoi(row[70]));
|
||||
e.tinkering = static_cast<int32_t>(atoi(row[71]));
|
||||
e.ac = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.strength = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.stamina = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.dexterity = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.agility = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.intelligence = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.wisdom = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.charisma = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.magic_resist = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.fire_resist = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.cold_resist = row[20] ? static_cast<int32_t>(atoi(row[20])) : 0;
|
||||
e.poison_resist = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.disease_resist = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.corruption_resist = row[23] ? static_cast<int32_t>(atoi(row[23])) : 0;
|
||||
e.heroic_strength = row[24] ? static_cast<int32_t>(atoi(row[24])) : 0;
|
||||
e.heroic_stamina = row[25] ? static_cast<int32_t>(atoi(row[25])) : 0;
|
||||
e.heroic_dexterity = row[26] ? static_cast<int32_t>(atoi(row[26])) : 0;
|
||||
e.heroic_agility = row[27] ? static_cast<int32_t>(atoi(row[27])) : 0;
|
||||
e.heroic_intelligence = row[28] ? static_cast<int32_t>(atoi(row[28])) : 0;
|
||||
e.heroic_wisdom = row[29] ? static_cast<int32_t>(atoi(row[29])) : 0;
|
||||
e.heroic_charisma = row[30] ? static_cast<int32_t>(atoi(row[30])) : 0;
|
||||
e.heroic_magic_resist = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.heroic_fire_resist = row[32] ? static_cast<int32_t>(atoi(row[32])) : 0;
|
||||
e.heroic_cold_resist = row[33] ? static_cast<int32_t>(atoi(row[33])) : 0;
|
||||
e.heroic_poison_resist = row[34] ? static_cast<int32_t>(atoi(row[34])) : 0;
|
||||
e.heroic_disease_resist = row[35] ? static_cast<int32_t>(atoi(row[35])) : 0;
|
||||
e.heroic_corruption_resist = row[36] ? static_cast<int32_t>(atoi(row[36])) : 0;
|
||||
e.haste = row[37] ? static_cast<int32_t>(atoi(row[37])) : 0;
|
||||
e.accuracy = row[38] ? static_cast<int32_t>(atoi(row[38])) : 0;
|
||||
e.attack = row[39] ? static_cast<int32_t>(atoi(row[39])) : 0;
|
||||
e.avoidance = row[40] ? static_cast<int32_t>(atoi(row[40])) : 0;
|
||||
e.clairvoyance = row[41] ? static_cast<int32_t>(atoi(row[41])) : 0;
|
||||
e.combat_effects = row[42] ? static_cast<int32_t>(atoi(row[42])) : 0;
|
||||
e.damage_shield_mitigation = row[43] ? static_cast<int32_t>(atoi(row[43])) : 0;
|
||||
e.damage_shield = row[44] ? static_cast<int32_t>(atoi(row[44])) : 0;
|
||||
e.dot_shielding = row[45] ? static_cast<int32_t>(atoi(row[45])) : 0;
|
||||
e.hp_regen = row[46] ? static_cast<int32_t>(atoi(row[46])) : 0;
|
||||
e.mana_regen = row[47] ? static_cast<int32_t>(atoi(row[47])) : 0;
|
||||
e.endurance_regen = row[48] ? static_cast<int32_t>(atoi(row[48])) : 0;
|
||||
e.shielding = row[49] ? static_cast<int32_t>(atoi(row[49])) : 0;
|
||||
e.spell_damage = row[50] ? static_cast<int32_t>(atoi(row[50])) : 0;
|
||||
e.spell_shielding = row[51] ? static_cast<int32_t>(atoi(row[51])) : 0;
|
||||
e.strikethrough = row[52] ? static_cast<int32_t>(atoi(row[52])) : 0;
|
||||
e.stun_resist = row[53] ? static_cast<int32_t>(atoi(row[53])) : 0;
|
||||
e.backstab = row[54] ? static_cast<int32_t>(atoi(row[54])) : 0;
|
||||
e.wind = row[55] ? static_cast<int32_t>(atoi(row[55])) : 0;
|
||||
e.brass = row[56] ? static_cast<int32_t>(atoi(row[56])) : 0;
|
||||
e.string = row[57] ? static_cast<int32_t>(atoi(row[57])) : 0;
|
||||
e.percussion = row[58] ? static_cast<int32_t>(atoi(row[58])) : 0;
|
||||
e.singing = row[59] ? static_cast<int32_t>(atoi(row[59])) : 0;
|
||||
e.baking = row[60] ? static_cast<int32_t>(atoi(row[60])) : 0;
|
||||
e.alchemy = row[61] ? static_cast<int32_t>(atoi(row[61])) : 0;
|
||||
e.tailoring = row[62] ? static_cast<int32_t>(atoi(row[62])) : 0;
|
||||
e.blacksmithing = row[63] ? static_cast<int32_t>(atoi(row[63])) : 0;
|
||||
e.fletching = row[64] ? static_cast<int32_t>(atoi(row[64])) : 0;
|
||||
e.brewing = row[65] ? static_cast<int32_t>(atoi(row[65])) : 0;
|
||||
e.jewelry = row[66] ? static_cast<int32_t>(atoi(row[66])) : 0;
|
||||
e.pottery = row[67] ? static_cast<int32_t>(atoi(row[67])) : 0;
|
||||
e.research = row[68] ? static_cast<int32_t>(atoi(row[68])) : 0;
|
||||
e.alcohol = row[69] ? static_cast<int32_t>(atoi(row[69])) : 0;
|
||||
e.fishing = row[70] ? static_cast<int32_t>(atoi(row[70])) : 0;
|
||||
e.tinkering = row[71] ? static_cast<int32_t>(atoi(row[71])) : 0;
|
||||
e.created_at = strtoll(row[72] ? row[72] : "-1", nullptr, 10);
|
||||
e.updated_at = strtoll(row[73] ? row[73] : "-1", nullptr, 10);
|
||||
|
||||
@ -917,78 +917,78 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterStatsRecord e{};
|
||||
|
||||
e.character_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.character_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.status = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int32_t>(atoi(row[3]));
|
||||
e.class_ = static_cast<int32_t>(atoi(row[4]));
|
||||
e.race = static_cast<int32_t>(atoi(row[5]));
|
||||
e.aa_points = static_cast<int32_t>(atoi(row[6]));
|
||||
e.status = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.class_ = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.race = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.aa_points = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.hp = row[7] ? strtoll(row[7], nullptr, 10) : 0;
|
||||
e.mana = row[8] ? strtoll(row[8], nullptr, 10) : 0;
|
||||
e.endurance = row[9] ? strtoll(row[9], nullptr, 10) : 0;
|
||||
e.ac = static_cast<int32_t>(atoi(row[10]));
|
||||
e.strength = static_cast<int32_t>(atoi(row[11]));
|
||||
e.stamina = static_cast<int32_t>(atoi(row[12]));
|
||||
e.dexterity = static_cast<int32_t>(atoi(row[13]));
|
||||
e.agility = static_cast<int32_t>(atoi(row[14]));
|
||||
e.intelligence = static_cast<int32_t>(atoi(row[15]));
|
||||
e.wisdom = static_cast<int32_t>(atoi(row[16]));
|
||||
e.charisma = static_cast<int32_t>(atoi(row[17]));
|
||||
e.magic_resist = static_cast<int32_t>(atoi(row[18]));
|
||||
e.fire_resist = static_cast<int32_t>(atoi(row[19]));
|
||||
e.cold_resist = static_cast<int32_t>(atoi(row[20]));
|
||||
e.poison_resist = static_cast<int32_t>(atoi(row[21]));
|
||||
e.disease_resist = static_cast<int32_t>(atoi(row[22]));
|
||||
e.corruption_resist = static_cast<int32_t>(atoi(row[23]));
|
||||
e.heroic_strength = static_cast<int32_t>(atoi(row[24]));
|
||||
e.heroic_stamina = static_cast<int32_t>(atoi(row[25]));
|
||||
e.heroic_dexterity = static_cast<int32_t>(atoi(row[26]));
|
||||
e.heroic_agility = static_cast<int32_t>(atoi(row[27]));
|
||||
e.heroic_intelligence = static_cast<int32_t>(atoi(row[28]));
|
||||
e.heroic_wisdom = static_cast<int32_t>(atoi(row[29]));
|
||||
e.heroic_charisma = static_cast<int32_t>(atoi(row[30]));
|
||||
e.heroic_magic_resist = static_cast<int32_t>(atoi(row[31]));
|
||||
e.heroic_fire_resist = static_cast<int32_t>(atoi(row[32]));
|
||||
e.heroic_cold_resist = static_cast<int32_t>(atoi(row[33]));
|
||||
e.heroic_poison_resist = static_cast<int32_t>(atoi(row[34]));
|
||||
e.heroic_disease_resist = static_cast<int32_t>(atoi(row[35]));
|
||||
e.heroic_corruption_resist = static_cast<int32_t>(atoi(row[36]));
|
||||
e.haste = static_cast<int32_t>(atoi(row[37]));
|
||||
e.accuracy = static_cast<int32_t>(atoi(row[38]));
|
||||
e.attack = static_cast<int32_t>(atoi(row[39]));
|
||||
e.avoidance = static_cast<int32_t>(atoi(row[40]));
|
||||
e.clairvoyance = static_cast<int32_t>(atoi(row[41]));
|
||||
e.combat_effects = static_cast<int32_t>(atoi(row[42]));
|
||||
e.damage_shield_mitigation = static_cast<int32_t>(atoi(row[43]));
|
||||
e.damage_shield = static_cast<int32_t>(atoi(row[44]));
|
||||
e.dot_shielding = static_cast<int32_t>(atoi(row[45]));
|
||||
e.hp_regen = static_cast<int32_t>(atoi(row[46]));
|
||||
e.mana_regen = static_cast<int32_t>(atoi(row[47]));
|
||||
e.endurance_regen = static_cast<int32_t>(atoi(row[48]));
|
||||
e.shielding = static_cast<int32_t>(atoi(row[49]));
|
||||
e.spell_damage = static_cast<int32_t>(atoi(row[50]));
|
||||
e.spell_shielding = static_cast<int32_t>(atoi(row[51]));
|
||||
e.strikethrough = static_cast<int32_t>(atoi(row[52]));
|
||||
e.stun_resist = static_cast<int32_t>(atoi(row[53]));
|
||||
e.backstab = static_cast<int32_t>(atoi(row[54]));
|
||||
e.wind = static_cast<int32_t>(atoi(row[55]));
|
||||
e.brass = static_cast<int32_t>(atoi(row[56]));
|
||||
e.string = static_cast<int32_t>(atoi(row[57]));
|
||||
e.percussion = static_cast<int32_t>(atoi(row[58]));
|
||||
e.singing = static_cast<int32_t>(atoi(row[59]));
|
||||
e.baking = static_cast<int32_t>(atoi(row[60]));
|
||||
e.alchemy = static_cast<int32_t>(atoi(row[61]));
|
||||
e.tailoring = static_cast<int32_t>(atoi(row[62]));
|
||||
e.blacksmithing = static_cast<int32_t>(atoi(row[63]));
|
||||
e.fletching = static_cast<int32_t>(atoi(row[64]));
|
||||
e.brewing = static_cast<int32_t>(atoi(row[65]));
|
||||
e.jewelry = static_cast<int32_t>(atoi(row[66]));
|
||||
e.pottery = static_cast<int32_t>(atoi(row[67]));
|
||||
e.research = static_cast<int32_t>(atoi(row[68]));
|
||||
e.alcohol = static_cast<int32_t>(atoi(row[69]));
|
||||
e.fishing = static_cast<int32_t>(atoi(row[70]));
|
||||
e.tinkering = static_cast<int32_t>(atoi(row[71]));
|
||||
e.ac = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.strength = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.stamina = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.dexterity = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.agility = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.intelligence = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.wisdom = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.charisma = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.magic_resist = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.fire_resist = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.cold_resist = row[20] ? static_cast<int32_t>(atoi(row[20])) : 0;
|
||||
e.poison_resist = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.disease_resist = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.corruption_resist = row[23] ? static_cast<int32_t>(atoi(row[23])) : 0;
|
||||
e.heroic_strength = row[24] ? static_cast<int32_t>(atoi(row[24])) : 0;
|
||||
e.heroic_stamina = row[25] ? static_cast<int32_t>(atoi(row[25])) : 0;
|
||||
e.heroic_dexterity = row[26] ? static_cast<int32_t>(atoi(row[26])) : 0;
|
||||
e.heroic_agility = row[27] ? static_cast<int32_t>(atoi(row[27])) : 0;
|
||||
e.heroic_intelligence = row[28] ? static_cast<int32_t>(atoi(row[28])) : 0;
|
||||
e.heroic_wisdom = row[29] ? static_cast<int32_t>(atoi(row[29])) : 0;
|
||||
e.heroic_charisma = row[30] ? static_cast<int32_t>(atoi(row[30])) : 0;
|
||||
e.heroic_magic_resist = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.heroic_fire_resist = row[32] ? static_cast<int32_t>(atoi(row[32])) : 0;
|
||||
e.heroic_cold_resist = row[33] ? static_cast<int32_t>(atoi(row[33])) : 0;
|
||||
e.heroic_poison_resist = row[34] ? static_cast<int32_t>(atoi(row[34])) : 0;
|
||||
e.heroic_disease_resist = row[35] ? static_cast<int32_t>(atoi(row[35])) : 0;
|
||||
e.heroic_corruption_resist = row[36] ? static_cast<int32_t>(atoi(row[36])) : 0;
|
||||
e.haste = row[37] ? static_cast<int32_t>(atoi(row[37])) : 0;
|
||||
e.accuracy = row[38] ? static_cast<int32_t>(atoi(row[38])) : 0;
|
||||
e.attack = row[39] ? static_cast<int32_t>(atoi(row[39])) : 0;
|
||||
e.avoidance = row[40] ? static_cast<int32_t>(atoi(row[40])) : 0;
|
||||
e.clairvoyance = row[41] ? static_cast<int32_t>(atoi(row[41])) : 0;
|
||||
e.combat_effects = row[42] ? static_cast<int32_t>(atoi(row[42])) : 0;
|
||||
e.damage_shield_mitigation = row[43] ? static_cast<int32_t>(atoi(row[43])) : 0;
|
||||
e.damage_shield = row[44] ? static_cast<int32_t>(atoi(row[44])) : 0;
|
||||
e.dot_shielding = row[45] ? static_cast<int32_t>(atoi(row[45])) : 0;
|
||||
e.hp_regen = row[46] ? static_cast<int32_t>(atoi(row[46])) : 0;
|
||||
e.mana_regen = row[47] ? static_cast<int32_t>(atoi(row[47])) : 0;
|
||||
e.endurance_regen = row[48] ? static_cast<int32_t>(atoi(row[48])) : 0;
|
||||
e.shielding = row[49] ? static_cast<int32_t>(atoi(row[49])) : 0;
|
||||
e.spell_damage = row[50] ? static_cast<int32_t>(atoi(row[50])) : 0;
|
||||
e.spell_shielding = row[51] ? static_cast<int32_t>(atoi(row[51])) : 0;
|
||||
e.strikethrough = row[52] ? static_cast<int32_t>(atoi(row[52])) : 0;
|
||||
e.stun_resist = row[53] ? static_cast<int32_t>(atoi(row[53])) : 0;
|
||||
e.backstab = row[54] ? static_cast<int32_t>(atoi(row[54])) : 0;
|
||||
e.wind = row[55] ? static_cast<int32_t>(atoi(row[55])) : 0;
|
||||
e.brass = row[56] ? static_cast<int32_t>(atoi(row[56])) : 0;
|
||||
e.string = row[57] ? static_cast<int32_t>(atoi(row[57])) : 0;
|
||||
e.percussion = row[58] ? static_cast<int32_t>(atoi(row[58])) : 0;
|
||||
e.singing = row[59] ? static_cast<int32_t>(atoi(row[59])) : 0;
|
||||
e.baking = row[60] ? static_cast<int32_t>(atoi(row[60])) : 0;
|
||||
e.alchemy = row[61] ? static_cast<int32_t>(atoi(row[61])) : 0;
|
||||
e.tailoring = row[62] ? static_cast<int32_t>(atoi(row[62])) : 0;
|
||||
e.blacksmithing = row[63] ? static_cast<int32_t>(atoi(row[63])) : 0;
|
||||
e.fletching = row[64] ? static_cast<int32_t>(atoi(row[64])) : 0;
|
||||
e.brewing = row[65] ? static_cast<int32_t>(atoi(row[65])) : 0;
|
||||
e.jewelry = row[66] ? static_cast<int32_t>(atoi(row[66])) : 0;
|
||||
e.pottery = row[67] ? static_cast<int32_t>(atoi(row[67])) : 0;
|
||||
e.research = row[68] ? static_cast<int32_t>(atoi(row[68])) : 0;
|
||||
e.alcohol = row[69] ? static_cast<int32_t>(atoi(row[69])) : 0;
|
||||
e.fishing = row[70] ? static_cast<int32_t>(atoi(row[70])) : 0;
|
||||
e.tinkering = row[71] ? static_cast<int32_t>(atoi(row[71])) : 0;
|
||||
e.created_at = strtoll(row[72] ? row[72] : "-1", nullptr, 10);
|
||||
e.updated_at = strtoll(row[73] ? row[73] : "-1", nullptr, 10);
|
||||
|
||||
@ -1137,8 +1137,8 @@ public:
|
||||
v.push_back(std::to_string(e.alcohol));
|
||||
v.push_back(std::to_string(e.fishing));
|
||||
v.push_back(std::to_string(e.tinkering));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -1233,8 +1233,8 @@ public:
|
||||
v.push_back(std::to_string(e.alcohol));
|
||||
v.push_back(std::to_string(e.fishing));
|
||||
v.push_back(std::to_string(e.tinkering));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@ -138,8 +138,8 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.task_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.timer_type = static_cast<int32_t>(atoi(row[3]));
|
||||
e.timer_group = static_cast<int32_t>(atoi(row[4]));
|
||||
e.timer_type = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.timer_group = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
|
||||
return e;
|
||||
@ -178,7 +178,7 @@ public:
|
||||
v.push_back(columns[2] + " = " + std::to_string(e.task_id));
|
||||
v.push_back(columns[3] + " = " + std::to_string(e.timer_type));
|
||||
v.push_back(columns[4] + " = " + std::to_string(e.timer_group));
|
||||
v.push_back(columns[5] + " = FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back(columns[5] + " = FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -205,7 +205,7 @@ public:
|
||||
v.push_back(std::to_string(e.task_id));
|
||||
v.push_back(std::to_string(e.timer_type));
|
||||
v.push_back(std::to_string(e.timer_group));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -240,7 +240,7 @@ public:
|
||||
v.push_back(std::to_string(e.task_id));
|
||||
v.push_back(std::to_string(e.timer_type));
|
||||
v.push_back(std::to_string(e.timer_group));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@ -277,8 +277,8 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.task_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.timer_type = static_cast<int32_t>(atoi(row[3]));
|
||||
e.timer_group = static_cast<int32_t>(atoi(row[4]));
|
||||
e.timer_type = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.timer_group = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -307,8 +307,8 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.task_id = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.timer_type = static_cast<int32_t>(atoi(row[3]));
|
||||
e.timer_group = static_cast<int32_t>(atoi(row[4]));
|
||||
e.timer_type = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.timer_group = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.expire_time = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -389,7 +389,7 @@ public:
|
||||
v.push_back(std::to_string(e.task_id));
|
||||
v.push_back(std::to_string(e.timer_type));
|
||||
v.push_back(std::to_string(e.timer_group));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -417,7 +417,7 @@ public:
|
||||
v.push_back(std::to_string(e.task_id));
|
||||
v.push_back(std::to_string(e.timer_type));
|
||||
v.push_back(std::to_string(e.timer_group));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@ -138,9 +138,9 @@ public:
|
||||
e.charid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.taskid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.slot = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||
e.type = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.acceptedtime = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.was_rewarded = static_cast<int8_t>(atoi(row[5]));
|
||||
e.was_rewarded = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -278,9 +278,9 @@ public:
|
||||
e.charid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.taskid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.slot = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||
e.type = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.acceptedtime = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.was_rewarded = static_cast<int8_t>(atoi(row[5]));
|
||||
e.was_rewarded = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -308,9 +308,9 @@ public:
|
||||
e.charid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.taskid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.slot = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||
e.type = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.acceptedtime = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.was_rewarded = static_cast<int8_t>(atoi(row[5]));
|
||||
e.was_rewarded = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterTribute e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.tier = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
@ -258,7 +258,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterTribute e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.tier = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
@ -286,7 +286,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterTribute e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.character_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.tier = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
|
||||
@ -119,7 +119,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
ChatchannelReservedNames e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
|
||||
return e;
|
||||
@ -242,7 +242,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
ChatchannelReservedNames e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -268,7 +268,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
ChatchannelReservedNames e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -131,11 +131,11 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Chatchannels e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.owner = row[2] ? row[2] : "";
|
||||
e.password = row[3] ? row[3] : "";
|
||||
e.minstatus = static_cast<int32_t>(atoi(row[4]));
|
||||
e.minstatus = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -266,11 +266,11 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Chatchannels e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.owner = row[2] ? row[2] : "";
|
||||
e.password = row[3] ? row[3] : "";
|
||||
e.minstatus = static_cast<int32_t>(atoi(row[4]));
|
||||
e.minstatus = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -295,11 +295,11 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Chatchannels e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.owner = row[2] ? row[2] : "";
|
||||
e.password = row[3] ? row[3] : "";
|
||||
e.minstatus = static_cast<int32_t>(atoi(row[4]));
|
||||
e.minstatus = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -132,8 +132,8 @@ public:
|
||||
CompletedSharedTaskActivityState e{};
|
||||
|
||||
e.shared_task_id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.activity_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.done_count = static_cast<int32_t>(atoi(row[2]));
|
||||
e.activity_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.done_count = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||
|
||||
@ -172,8 +172,8 @@ public:
|
||||
v.push_back(columns[0] + " = " + std::to_string(e.shared_task_id));
|
||||
v.push_back(columns[1] + " = " + std::to_string(e.activity_id));
|
||||
v.push_back(columns[2] + " = " + std::to_string(e.done_count));
|
||||
v.push_back(columns[3] + " = FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "null") + ")");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "null") + ")");
|
||||
v.push_back(columns[3] + " = FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -198,8 +198,8 @@ public:
|
||||
v.push_back(std::to_string(e.shared_task_id));
|
||||
v.push_back(std::to_string(e.activity_id));
|
||||
v.push_back(std::to_string(e.done_count));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -232,8 +232,8 @@ public:
|
||||
v.push_back(std::to_string(e.shared_task_id));
|
||||
v.push_back(std::to_string(e.activity_id));
|
||||
v.push_back(std::to_string(e.done_count));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@ -268,8 +268,8 @@ public:
|
||||
CompletedSharedTaskActivityState e{};
|
||||
|
||||
e.shared_task_id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.activity_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.done_count = static_cast<int32_t>(atoi(row[2]));
|
||||
e.activity_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.done_count = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||
|
||||
@ -297,8 +297,8 @@ public:
|
||||
CompletedSharedTaskActivityState e{};
|
||||
|
||||
e.shared_task_id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.activity_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.done_count = static_cast<int32_t>(atoi(row[2]));
|
||||
e.activity_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.done_count = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||
e.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||
|
||||
@ -378,8 +378,8 @@ public:
|
||||
v.push_back(std::to_string(e.shared_task_id));
|
||||
v.push_back(std::to_string(e.activity_id));
|
||||
v.push_back(std::to_string(e.done_count));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -405,8 +405,8 @@ public:
|
||||
v.push_back(std::to_string(e.shared_task_id));
|
||||
v.push_back(std::to_string(e.activity_id));
|
||||
v.push_back(std::to_string(e.done_count));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_time > 0 ? std::to_string(e.updated_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completed_time > 0 ? std::to_string(e.completed_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ public:
|
||||
|
||||
e.shared_task_id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.character_id = row[1] ? strtoll(row[1], nullptr, 10) : 0;
|
||||
e.is_leader = static_cast<int8_t>(atoi(row[2]));
|
||||
e.is_leader = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -253,7 +253,7 @@ public:
|
||||
|
||||
e.shared_task_id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.character_id = row[1] ? strtoll(row[1], nullptr, 10) : 0;
|
||||
e.is_leader = static_cast<int8_t>(atoi(row[2]));
|
||||
e.is_leader = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -280,7 +280,7 @@ public:
|
||||
|
||||
e.shared_task_id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.character_id = row[1] ? strtoll(row[1], nullptr, 10) : 0;
|
||||
e.is_leader = static_cast<int8_t>(atoi(row[2]));
|
||||
e.is_leader = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -136,11 +136,11 @@ public:
|
||||
CompletedSharedTasks e{};
|
||||
|
||||
e.id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.task_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.task_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.accepted_time = strtoll(row[2] ? row[2] : "-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.is_locked = static_cast<int8_t>(atoi(row[5]));
|
||||
e.is_locked = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -176,9 +176,9 @@ public:
|
||||
|
||||
v.push_back(columns[0] + " = " + std::to_string(e.id));
|
||||
v.push_back(columns[1] + " = " + std::to_string(e.task_id));
|
||||
v.push_back(columns[2] + " = FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "null") + ")");
|
||||
v.push_back(columns[3] + " = FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "null") + ")");
|
||||
v.push_back(columns[2] + " = FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[3] + " = FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[5] + " = " + std::to_string(e.is_locked));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
@ -203,9 +203,9 @@ public:
|
||||
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back(std::to_string(e.task_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.is_locked));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
@ -238,9 +238,9 @@ public:
|
||||
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back(std::to_string(e.task_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.is_locked));
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
@ -276,11 +276,11 @@ public:
|
||||
CompletedSharedTasks e{};
|
||||
|
||||
e.id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.task_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.task_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.accepted_time = strtoll(row[2] ? row[2] : "-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.is_locked = static_cast<int8_t>(atoi(row[5]));
|
||||
e.is_locked = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -306,11 +306,11 @@ public:
|
||||
CompletedSharedTasks e{};
|
||||
|
||||
e.id = row[0] ? strtoll(row[0], nullptr, 10) : 0;
|
||||
e.task_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.task_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.accepted_time = strtoll(row[2] ? row[2] : "-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.is_locked = static_cast<int8_t>(atoi(row[5]));
|
||||
e.is_locked = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -387,9 +387,9 @@ public:
|
||||
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back(std::to_string(e.task_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.is_locked));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
@ -415,9 +415,9 @@ public:
|
||||
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back(std::to_string(e.task_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.accepted_time > 0 ? std::to_string(e.accepted_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.completion_time > 0 ? std::to_string(e.completion_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.is_locked));
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
|
||||
@ -130,7 +130,7 @@ public:
|
||||
e.charid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.completedtime = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.taskid = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.activityid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.activityid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -262,7 +262,7 @@ public:
|
||||
e.charid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.completedtime = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.taskid = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.activityid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.activityid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -290,7 +290,7 @@ public:
|
||||
e.charid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.completedtime = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.taskid = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.activityid = static_cast<int32_t>(atoi(row[3]));
|
||||
e.activityid = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -127,9 +127,9 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
ContentFlags e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.flag_name = row[1] ? row[1] : "";
|
||||
e.enabled = static_cast<int8_t>(atoi(row[2]));
|
||||
e.enabled = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.notes = row[3] ? row[3] : "";
|
||||
|
||||
return e;
|
||||
@ -258,9 +258,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
ContentFlags e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.flag_name = row[1] ? row[1] : "";
|
||||
e.enabled = static_cast<int8_t>(atoi(row[2]));
|
||||
e.enabled = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.notes = row[3] ? row[3] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -286,9 +286,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
ContentFlags e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.flag_name = row[1] ? row[1] : "";
|
||||
e.enabled = static_cast<int8_t>(atoi(row[2]));
|
||||
e.enabled = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.notes = row[3] ? row[3] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -123,8 +123,8 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
DbStr e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.type = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.value = row[2] ? row[2] : "";
|
||||
|
||||
return e;
|
||||
@ -251,8 +251,8 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
DbStr e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.type = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.value = row[2] ? row[2] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -278,8 +278,8 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
DbStr e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.type = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.value = row[2] ? row[2] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -131,7 +131,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
DiscordWebhooks e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.webhook_name = row[1] ? row[1] : "";
|
||||
e.webhook_url = row[2] ? row[2] : "";
|
||||
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||
@ -171,8 +171,8 @@ public:
|
||||
|
||||
v.push_back(columns[1] + " = '" + Strings::Escape(e.webhook_name) + "'");
|
||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.webhook_url) + "'");
|
||||
v.push_back(columns[3] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back(columns[3] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -197,8 +197,8 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.webhook_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.webhook_url) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -231,8 +231,8 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.webhook_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.webhook_url) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@ -266,7 +266,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
DiscordWebhooks e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.webhook_name = row[1] ? row[1] : "";
|
||||
e.webhook_url = row[2] ? row[2] : "";
|
||||
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||
@ -295,7 +295,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
DiscordWebhooks e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.webhook_name = row[1] ? row[1] : "";
|
||||
e.webhook_url = row[2] ? row[2] : "";
|
||||
e.created_at = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
|
||||
@ -377,8 +377,8 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.webhook_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.webhook_url) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -404,8 +404,8 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.webhook_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.webhook_url) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.deleted_at > 0 ? std::to_string(e.deleted_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ public:
|
||||
e.item_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.char_name = row[1] ? row[1] : "";
|
||||
e.discovered_date = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.account_status = static_cast<int32_t>(atoi(row[3]));
|
||||
e.account_status = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -262,7 +262,7 @@ public:
|
||||
e.item_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.char_name = row[1] ? row[1] : "";
|
||||
e.discovered_date = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.account_status = static_cast<int32_t>(atoi(row[3]));
|
||||
e.account_status = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -290,7 +290,7 @@ public:
|
||||
e.item_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.char_name = row[1] ? row[1] : "";
|
||||
e.discovered_date = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.account_status = static_cast<int32_t>(atoi(row[3]));
|
||||
e.account_status = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -255,40 +255,40 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Doors e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.doorid = static_cast<int16_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.doorid = row[1] ? static_cast<int16_t>(atoi(row[1])) : 0;
|
||||
e.zone = row[2] ? row[2] : "";
|
||||
e.version = static_cast<int16_t>(atoi(row[3]));
|
||||
e.version = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.name = row[4] ? row[4] : "";
|
||||
e.pos_y = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.pos_x = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.pos_z = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
e.heading = row[8] ? strtof(row[8], nullptr) : 0;
|
||||
e.opentype = static_cast<int16_t>(atoi(row[9]));
|
||||
e.guild = static_cast<int16_t>(atoi(row[10]));
|
||||
e.lockpick = static_cast<int16_t>(atoi(row[11]));
|
||||
e.keyitem = static_cast<int32_t>(atoi(row[12]));
|
||||
e.opentype = row[9] ? static_cast<int16_t>(atoi(row[9])) : 0;
|
||||
e.guild = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.lockpick = row[11] ? static_cast<int16_t>(atoi(row[11])) : 0;
|
||||
e.keyitem = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.nokeyring = row[13] ? static_cast<uint8_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.triggerdoor = static_cast<int16_t>(atoi(row[14]));
|
||||
e.triggertype = static_cast<int16_t>(atoi(row[15]));
|
||||
e.disable_timer = static_cast<int8_t>(atoi(row[16]));
|
||||
e.doorisopen = static_cast<int16_t>(atoi(row[17]));
|
||||
e.door_param = static_cast<int32_t>(atoi(row[18]));
|
||||
e.dest_zone = row[19] ? row[19] : "";
|
||||
e.triggerdoor = row[14] ? static_cast<int16_t>(atoi(row[14])) : 0;
|
||||
e.triggertype = row[15] ? static_cast<int16_t>(atoi(row[15])) : 0;
|
||||
e.disable_timer = row[16] ? static_cast<int8_t>(atoi(row[16])) : 0;
|
||||
e.doorisopen = row[17] ? static_cast<int16_t>(atoi(row[17])) : 0;
|
||||
e.door_param = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.dest_zone = row[19] ? row[19] : "NONE";
|
||||
e.dest_instance = row[20] ? static_cast<uint32_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.dest_x = row[21] ? strtof(row[21], nullptr) : 0;
|
||||
e.dest_y = row[22] ? strtof(row[22], nullptr) : 0;
|
||||
e.dest_z = row[23] ? strtof(row[23], nullptr) : 0;
|
||||
e.dest_heading = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.invert_state = static_cast<int32_t>(atoi(row[25]));
|
||||
e.incline = static_cast<int32_t>(atoi(row[26]));
|
||||
e.invert_state = row[25] ? static_cast<int32_t>(atoi(row[25])) : 0;
|
||||
e.incline = row[26] ? static_cast<int32_t>(atoi(row[26])) : 0;
|
||||
e.size = row[27] ? static_cast<uint16_t>(strtoul(row[27], nullptr, 10)) : 100;
|
||||
e.buffer = row[28] ? strtof(row[28], nullptr) : 0;
|
||||
e.client_version_mask = row[29] ? static_cast<uint32_t>(strtoul(row[29], nullptr, 10)) : 4294967295;
|
||||
e.is_ldon_door = static_cast<int16_t>(atoi(row[30]));
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[31]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[32]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[33]));
|
||||
e.is_ldon_door = row[30] ? static_cast<int16_t>(atoi(row[30])) : 0;
|
||||
e.dz_switch_id = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.min_expansion = row[32] ? static_cast<int8_t>(atoi(row[32])) : -1;
|
||||
e.max_expansion = row[33] ? static_cast<int8_t>(atoi(row[33])) : -1;
|
||||
e.content_flags = row[34] ? row[34] : "";
|
||||
e.content_flags_disabled = row[35] ? row[35] : "";
|
||||
|
||||
@ -514,40 +514,40 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Doors e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.doorid = static_cast<int16_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.doorid = row[1] ? static_cast<int16_t>(atoi(row[1])) : 0;
|
||||
e.zone = row[2] ? row[2] : "";
|
||||
e.version = static_cast<int16_t>(atoi(row[3]));
|
||||
e.version = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.name = row[4] ? row[4] : "";
|
||||
e.pos_y = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.pos_x = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.pos_z = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
e.heading = row[8] ? strtof(row[8], nullptr) : 0;
|
||||
e.opentype = static_cast<int16_t>(atoi(row[9]));
|
||||
e.guild = static_cast<int16_t>(atoi(row[10]));
|
||||
e.lockpick = static_cast<int16_t>(atoi(row[11]));
|
||||
e.keyitem = static_cast<int32_t>(atoi(row[12]));
|
||||
e.opentype = row[9] ? static_cast<int16_t>(atoi(row[9])) : 0;
|
||||
e.guild = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.lockpick = row[11] ? static_cast<int16_t>(atoi(row[11])) : 0;
|
||||
e.keyitem = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.nokeyring = row[13] ? static_cast<uint8_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.triggerdoor = static_cast<int16_t>(atoi(row[14]));
|
||||
e.triggertype = static_cast<int16_t>(atoi(row[15]));
|
||||
e.disable_timer = static_cast<int8_t>(atoi(row[16]));
|
||||
e.doorisopen = static_cast<int16_t>(atoi(row[17]));
|
||||
e.door_param = static_cast<int32_t>(atoi(row[18]));
|
||||
e.dest_zone = row[19] ? row[19] : "";
|
||||
e.triggerdoor = row[14] ? static_cast<int16_t>(atoi(row[14])) : 0;
|
||||
e.triggertype = row[15] ? static_cast<int16_t>(atoi(row[15])) : 0;
|
||||
e.disable_timer = row[16] ? static_cast<int8_t>(atoi(row[16])) : 0;
|
||||
e.doorisopen = row[17] ? static_cast<int16_t>(atoi(row[17])) : 0;
|
||||
e.door_param = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.dest_zone = row[19] ? row[19] : "NONE";
|
||||
e.dest_instance = row[20] ? static_cast<uint32_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.dest_x = row[21] ? strtof(row[21], nullptr) : 0;
|
||||
e.dest_y = row[22] ? strtof(row[22], nullptr) : 0;
|
||||
e.dest_z = row[23] ? strtof(row[23], nullptr) : 0;
|
||||
e.dest_heading = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.invert_state = static_cast<int32_t>(atoi(row[25]));
|
||||
e.incline = static_cast<int32_t>(atoi(row[26]));
|
||||
e.invert_state = row[25] ? static_cast<int32_t>(atoi(row[25])) : 0;
|
||||
e.incline = row[26] ? static_cast<int32_t>(atoi(row[26])) : 0;
|
||||
e.size = row[27] ? static_cast<uint16_t>(strtoul(row[27], nullptr, 10)) : 100;
|
||||
e.buffer = row[28] ? strtof(row[28], nullptr) : 0;
|
||||
e.client_version_mask = row[29] ? static_cast<uint32_t>(strtoul(row[29], nullptr, 10)) : 4294967295;
|
||||
e.is_ldon_door = static_cast<int16_t>(atoi(row[30]));
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[31]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[32]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[33]));
|
||||
e.is_ldon_door = row[30] ? static_cast<int16_t>(atoi(row[30])) : 0;
|
||||
e.dz_switch_id = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.min_expansion = row[32] ? static_cast<int8_t>(atoi(row[32])) : -1;
|
||||
e.max_expansion = row[33] ? static_cast<int8_t>(atoi(row[33])) : -1;
|
||||
e.content_flags = row[34] ? row[34] : "";
|
||||
e.content_flags_disabled = row[35] ? row[35] : "";
|
||||
|
||||
@ -574,40 +574,40 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Doors e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.doorid = static_cast<int16_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.doorid = row[1] ? static_cast<int16_t>(atoi(row[1])) : 0;
|
||||
e.zone = row[2] ? row[2] : "";
|
||||
e.version = static_cast<int16_t>(atoi(row[3]));
|
||||
e.version = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.name = row[4] ? row[4] : "";
|
||||
e.pos_y = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.pos_x = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.pos_z = row[7] ? strtof(row[7], nullptr) : 0;
|
||||
e.heading = row[8] ? strtof(row[8], nullptr) : 0;
|
||||
e.opentype = static_cast<int16_t>(atoi(row[9]));
|
||||
e.guild = static_cast<int16_t>(atoi(row[10]));
|
||||
e.lockpick = static_cast<int16_t>(atoi(row[11]));
|
||||
e.keyitem = static_cast<int32_t>(atoi(row[12]));
|
||||
e.opentype = row[9] ? static_cast<int16_t>(atoi(row[9])) : 0;
|
||||
e.guild = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.lockpick = row[11] ? static_cast<int16_t>(atoi(row[11])) : 0;
|
||||
e.keyitem = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.nokeyring = row[13] ? static_cast<uint8_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.triggerdoor = static_cast<int16_t>(atoi(row[14]));
|
||||
e.triggertype = static_cast<int16_t>(atoi(row[15]));
|
||||
e.disable_timer = static_cast<int8_t>(atoi(row[16]));
|
||||
e.doorisopen = static_cast<int16_t>(atoi(row[17]));
|
||||
e.door_param = static_cast<int32_t>(atoi(row[18]));
|
||||
e.dest_zone = row[19] ? row[19] : "";
|
||||
e.triggerdoor = row[14] ? static_cast<int16_t>(atoi(row[14])) : 0;
|
||||
e.triggertype = row[15] ? static_cast<int16_t>(atoi(row[15])) : 0;
|
||||
e.disable_timer = row[16] ? static_cast<int8_t>(atoi(row[16])) : 0;
|
||||
e.doorisopen = row[17] ? static_cast<int16_t>(atoi(row[17])) : 0;
|
||||
e.door_param = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.dest_zone = row[19] ? row[19] : "NONE";
|
||||
e.dest_instance = row[20] ? static_cast<uint32_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.dest_x = row[21] ? strtof(row[21], nullptr) : 0;
|
||||
e.dest_y = row[22] ? strtof(row[22], nullptr) : 0;
|
||||
e.dest_z = row[23] ? strtof(row[23], nullptr) : 0;
|
||||
e.dest_heading = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.invert_state = static_cast<int32_t>(atoi(row[25]));
|
||||
e.incline = static_cast<int32_t>(atoi(row[26]));
|
||||
e.invert_state = row[25] ? static_cast<int32_t>(atoi(row[25])) : 0;
|
||||
e.incline = row[26] ? static_cast<int32_t>(atoi(row[26])) : 0;
|
||||
e.size = row[27] ? static_cast<uint16_t>(strtoul(row[27], nullptr, 10)) : 100;
|
||||
e.buffer = row[28] ? strtof(row[28], nullptr) : 0;
|
||||
e.client_version_mask = row[29] ? static_cast<uint32_t>(strtoul(row[29], nullptr, 10)) : 4294967295;
|
||||
e.is_ldon_door = static_cast<int16_t>(atoi(row[30]));
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[31]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[32]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[33]));
|
||||
e.is_ldon_door = row[30] ? static_cast<int16_t>(atoi(row[30])) : 0;
|
||||
e.dz_switch_id = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.min_expansion = row[32] ? static_cast<int8_t>(atoi(row[32])) : -1;
|
||||
e.max_expansion = row[33] ? static_cast<int8_t>(atoi(row[33])) : -1;
|
||||
e.content_flags = row[34] ? row[34] : "";
|
||||
e.content_flags_disabled = row[35] ? row[35] : "";
|
||||
|
||||
|
||||
@ -200,23 +200,23 @@ public:
|
||||
DynamicZoneTemplates e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.zone_version = static_cast<int32_t>(atoi(row[2]));
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.name = row[3] ? row[3] : "";
|
||||
e.min_players = static_cast<int32_t>(atoi(row[4]));
|
||||
e.max_players = static_cast<int32_t>(atoi(row[5]));
|
||||
e.duration_seconds = static_cast<int32_t>(atoi(row[6]));
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[7]));
|
||||
e.compass_zone_id = static_cast<int32_t>(atoi(row[8]));
|
||||
e.min_players = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.max_players = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.duration_seconds = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.dz_switch_id = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.compass_zone_id = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.compass_x = row[9] ? strtof(row[9], nullptr) : 0;
|
||||
e.compass_y = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.compass_z = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
e.return_zone_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.return_zone_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.return_x = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.return_y = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.return_z = row[15] ? strtof(row[15], nullptr) : 0;
|
||||
e.return_h = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.override_zone_in = static_cast<int8_t>(atoi(row[17]));
|
||||
e.override_zone_in = row[17] ? static_cast<int8_t>(atoi(row[17])) : 0;
|
||||
e.zone_in_x = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.zone_in_y = row[19] ? strtof(row[19], nullptr) : 0;
|
||||
e.zone_in_z = row[20] ? strtof(row[20], nullptr) : 0;
|
||||
@ -403,23 +403,23 @@ public:
|
||||
DynamicZoneTemplates e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.zone_version = static_cast<int32_t>(atoi(row[2]));
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.name = row[3] ? row[3] : "";
|
||||
e.min_players = static_cast<int32_t>(atoi(row[4]));
|
||||
e.max_players = static_cast<int32_t>(atoi(row[5]));
|
||||
e.duration_seconds = static_cast<int32_t>(atoi(row[6]));
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[7]));
|
||||
e.compass_zone_id = static_cast<int32_t>(atoi(row[8]));
|
||||
e.min_players = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.max_players = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.duration_seconds = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.dz_switch_id = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.compass_zone_id = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.compass_x = row[9] ? strtof(row[9], nullptr) : 0;
|
||||
e.compass_y = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.compass_z = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
e.return_zone_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.return_zone_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.return_x = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.return_y = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.return_z = row[15] ? strtof(row[15], nullptr) : 0;
|
||||
e.return_h = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.override_zone_in = static_cast<int8_t>(atoi(row[17]));
|
||||
e.override_zone_in = row[17] ? static_cast<int8_t>(atoi(row[17])) : 0;
|
||||
e.zone_in_x = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.zone_in_y = row[19] ? strtof(row[19], nullptr) : 0;
|
||||
e.zone_in_z = row[20] ? strtof(row[20], nullptr) : 0;
|
||||
@ -449,23 +449,23 @@ public:
|
||||
DynamicZoneTemplates e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.zone_version = static_cast<int32_t>(atoi(row[2]));
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_version = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.name = row[3] ? row[3] : "";
|
||||
e.min_players = static_cast<int32_t>(atoi(row[4]));
|
||||
e.max_players = static_cast<int32_t>(atoi(row[5]));
|
||||
e.duration_seconds = static_cast<int32_t>(atoi(row[6]));
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[7]));
|
||||
e.compass_zone_id = static_cast<int32_t>(atoi(row[8]));
|
||||
e.min_players = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.max_players = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.duration_seconds = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.dz_switch_id = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.compass_zone_id = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.compass_x = row[9] ? strtof(row[9], nullptr) : 0;
|
||||
e.compass_y = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.compass_z = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
e.return_zone_id = static_cast<int32_t>(atoi(row[12]));
|
||||
e.return_zone_id = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.return_x = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.return_y = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.return_z = row[15] ? strtof(row[15], nullptr) : 0;
|
||||
e.return_h = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.override_zone_in = static_cast<int8_t>(atoi(row[17]));
|
||||
e.override_zone_in = row[17] ? static_cast<int8_t>(atoi(row[17])) : 0;
|
||||
e.zone_in_x = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.zone_in_y = row[19] ? strtof(row[19], nullptr) : 0;
|
||||
e.zone_in_z = row[20] ? strtof(row[20], nullptr) : 0;
|
||||
|
||||
@ -204,14 +204,14 @@ public:
|
||||
DynamicZones e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.instance_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.uuid = row[3] ? row[3] : "";
|
||||
e.name = row[4] ? row[4] : "";
|
||||
e.leader_id = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.min_players = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.max_players = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[8]));
|
||||
e.dz_switch_id = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.compass_zone_id = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.compass_x = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.compass_y = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
@ -411,14 +411,14 @@ public:
|
||||
DynamicZones e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.instance_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.uuid = row[3] ? row[3] : "";
|
||||
e.name = row[4] ? row[4] : "";
|
||||
e.leader_id = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.min_players = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.max_players = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[8]));
|
||||
e.dz_switch_id = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.compass_zone_id = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.compass_x = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.compass_y = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
@ -458,14 +458,14 @@ public:
|
||||
DynamicZones e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.instance_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.instance_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.uuid = row[3] ? row[3] : "";
|
||||
e.name = row[4] ? row[4] : "";
|
||||
e.leader_id = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.min_players = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.max_players = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.dz_switch_id = static_cast<int32_t>(atoi(row[8]));
|
||||
e.dz_switch_id = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.compass_zone_id = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.compass_x = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.compass_y = row[11] ? strtof(row[11], nullptr) : 0;
|
||||
|
||||
@ -176,7 +176,7 @@ public:
|
||||
|
||||
v.push_back(columns[1] + " = " + std::to_string(e.expedition_id));
|
||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back(columns[3] + " = FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back(columns[3] + " = FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[4] + " = " + std::to_string(e.duration));
|
||||
v.push_back(columns[5] + " = '" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
@ -203,7 +203,7 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back(std::to_string(e.expedition_id));
|
||||
v.push_back("'" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.duration));
|
||||
v.push_back("'" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
@ -238,7 +238,7 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back(std::to_string(e.expedition_id));
|
||||
v.push_back("'" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.duration));
|
||||
v.push_back("'" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
@ -387,7 +387,7 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back(std::to_string(e.expedition_id));
|
||||
v.push_back("'" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.duration));
|
||||
v.push_back("'" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
@ -415,7 +415,7 @@ public:
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back(std::to_string(e.expedition_id));
|
||||
v.push_back("'" + Strings::Escape(e.event_name) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.expire_time > 0 ? std::to_string(e.expire_time) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.duration));
|
||||
v.push_back("'" + Strings::Escape(e.from_expedition_uuid) + "'");
|
||||
|
||||
|
||||
@ -195,26 +195,26 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
FactionAssociation e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id_1 = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.id_1 = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.mod_1 = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.id_2 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id_2 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.mod_2 = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.id_3 = static_cast<int32_t>(atoi(row[5]));
|
||||
e.id_3 = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.mod_3 = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.id_4 = static_cast<int32_t>(atoi(row[7]));
|
||||
e.id_4 = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.mod_4 = row[8] ? strtof(row[8], nullptr) : 0;
|
||||
e.id_5 = static_cast<int32_t>(atoi(row[9]));
|
||||
e.id_5 = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.mod_5 = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.id_6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.id_6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.mod_6 = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.id_7 = static_cast<int32_t>(atoi(row[13]));
|
||||
e.id_7 = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.mod_7 = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.id_8 = static_cast<int32_t>(atoi(row[15]));
|
||||
e.id_8 = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.mod_8 = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.id_9 = static_cast<int32_t>(atoi(row[17]));
|
||||
e.id_9 = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.mod_9 = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.id_10 = static_cast<int32_t>(atoi(row[19]));
|
||||
e.id_10 = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.mod_10 = row[20] ? strtof(row[20], nullptr) : 0;
|
||||
|
||||
return e;
|
||||
@ -395,26 +395,26 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
FactionAssociation e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id_1 = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.id_1 = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.mod_1 = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.id_2 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id_2 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.mod_2 = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.id_3 = static_cast<int32_t>(atoi(row[5]));
|
||||
e.id_3 = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.mod_3 = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.id_4 = static_cast<int32_t>(atoi(row[7]));
|
||||
e.id_4 = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.mod_4 = row[8] ? strtof(row[8], nullptr) : 0;
|
||||
e.id_5 = static_cast<int32_t>(atoi(row[9]));
|
||||
e.id_5 = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.mod_5 = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.id_6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.id_6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.mod_6 = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.id_7 = static_cast<int32_t>(atoi(row[13]));
|
||||
e.id_7 = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.mod_7 = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.id_8 = static_cast<int32_t>(atoi(row[15]));
|
||||
e.id_8 = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.mod_8 = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.id_9 = static_cast<int32_t>(atoi(row[17]));
|
||||
e.id_9 = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.mod_9 = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.id_10 = static_cast<int32_t>(atoi(row[19]));
|
||||
e.id_10 = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.mod_10 = row[20] ? strtof(row[20], nullptr) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -440,26 +440,26 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
FactionAssociation e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id_1 = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.id_1 = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.mod_1 = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.id_2 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id_2 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.mod_2 = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.id_3 = static_cast<int32_t>(atoi(row[5]));
|
||||
e.id_3 = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.mod_3 = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.id_4 = static_cast<int32_t>(atoi(row[7]));
|
||||
e.id_4 = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.mod_4 = row[8] ? strtof(row[8], nullptr) : 0;
|
||||
e.id_5 = static_cast<int32_t>(atoi(row[9]));
|
||||
e.id_5 = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.mod_5 = row[10] ? strtof(row[10], nullptr) : 0;
|
||||
e.id_6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.id_6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.mod_6 = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.id_7 = static_cast<int32_t>(atoi(row[13]));
|
||||
e.id_7 = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.mod_7 = row[14] ? strtof(row[14], nullptr) : 0;
|
||||
e.id_8 = static_cast<int32_t>(atoi(row[15]));
|
||||
e.id_8 = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.mod_8 = row[16] ? strtof(row[16], nullptr) : 0;
|
||||
e.id_9 = static_cast<int32_t>(atoi(row[17]));
|
||||
e.id_9 = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.mod_9 = row[18] ? strtof(row[18], nullptr) : 0;
|
||||
e.id_10 = static_cast<int32_t>(atoi(row[19]));
|
||||
e.id_10 = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.mod_10 = row[20] ? strtof(row[20], nullptr) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -135,12 +135,12 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
FactionBaseData e{};
|
||||
|
||||
e.client_faction_id = static_cast<int16_t>(atoi(row[0]));
|
||||
e.min = static_cast<int16_t>(atoi(row[1]));
|
||||
e.max = static_cast<int16_t>(atoi(row[2]));
|
||||
e.unk_hero1 = static_cast<int16_t>(atoi(row[3]));
|
||||
e.unk_hero2 = static_cast<int16_t>(atoi(row[4]));
|
||||
e.unk_hero3 = static_cast<int16_t>(atoi(row[5]));
|
||||
e.client_faction_id = row[0] ? static_cast<int16_t>(atoi(row[0])) : 0;
|
||||
e.min = row[1] ? static_cast<int16_t>(atoi(row[1])) : -2000;
|
||||
e.max = row[2] ? static_cast<int16_t>(atoi(row[2])) : 2000;
|
||||
e.unk_hero1 = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.unk_hero2 = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.unk_hero3 = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -275,12 +275,12 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
FactionBaseData e{};
|
||||
|
||||
e.client_faction_id = static_cast<int16_t>(atoi(row[0]));
|
||||
e.min = static_cast<int16_t>(atoi(row[1]));
|
||||
e.max = static_cast<int16_t>(atoi(row[2]));
|
||||
e.unk_hero1 = static_cast<int16_t>(atoi(row[3]));
|
||||
e.unk_hero2 = static_cast<int16_t>(atoi(row[4]));
|
||||
e.unk_hero3 = static_cast<int16_t>(atoi(row[5]));
|
||||
e.client_faction_id = row[0] ? static_cast<int16_t>(atoi(row[0])) : 0;
|
||||
e.min = row[1] ? static_cast<int16_t>(atoi(row[1])) : -2000;
|
||||
e.max = row[2] ? static_cast<int16_t>(atoi(row[2])) : 2000;
|
||||
e.unk_hero1 = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.unk_hero2 = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.unk_hero3 = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -305,12 +305,12 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
FactionBaseData e{};
|
||||
|
||||
e.client_faction_id = static_cast<int16_t>(atoi(row[0]));
|
||||
e.min = static_cast<int16_t>(atoi(row[1]));
|
||||
e.max = static_cast<int16_t>(atoi(row[2]));
|
||||
e.unk_hero1 = static_cast<int16_t>(atoi(row[3]));
|
||||
e.unk_hero2 = static_cast<int16_t>(atoi(row[4]));
|
||||
e.unk_hero3 = static_cast<int16_t>(atoi(row[5]));
|
||||
e.client_faction_id = row[0] ? static_cast<int16_t>(atoi(row[0])) : 0;
|
||||
e.min = row[1] ? static_cast<int16_t>(atoi(row[1])) : -2000;
|
||||
e.max = row[2] ? static_cast<int16_t>(atoi(row[2])) : 2000;
|
||||
e.unk_hero1 = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.unk_hero2 = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.unk_hero3 = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.faction_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.mod = static_cast<int16_t>(atoi(row[2]));
|
||||
e.mod = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.mod_name = row[3] ? row[3] : "";
|
||||
|
||||
return e;
|
||||
@ -260,7 +260,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.faction_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.mod = static_cast<int16_t>(atoi(row[2]));
|
||||
e.mod = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.mod_name = row[3] ? row[3] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -288,7 +288,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.faction_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.mod = static_cast<int16_t>(atoi(row[2]));
|
||||
e.mod = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.mod_name = row[3] ? row[3] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -123,9 +123,9 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
FactionList e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.base = static_cast<int16_t>(atoi(row[2]));
|
||||
e.base = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -251,9 +251,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
FactionList e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.base = static_cast<int16_t>(atoi(row[2]));
|
||||
e.base = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -278,9 +278,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
FactionList e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.base = static_cast<int16_t>(atoi(row[2]));
|
||||
e.base = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -127,10 +127,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
FactionValues e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.faction_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.current_value = static_cast<int16_t>(atoi(row[2]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[3]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.faction_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.current_value = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.temp = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -259,10 +259,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
FactionValues e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.faction_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.current_value = static_cast<int16_t>(atoi(row[2]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[3]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.faction_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.current_value = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.temp = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -287,10 +287,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
FactionValues e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.faction_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.current_value = static_cast<int16_t>(atoi(row[2]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[3]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.faction_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.current_value = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.temp = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -155,15 +155,15 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Fishing e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.skill_level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.npc_id = static_cast<int32_t>(atoi(row[5]));
|
||||
e.npc_chance = static_cast<int32_t>(atoi(row[6]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[8]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.skill_level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.npc_id = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.npc_chance = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.min_expansion = row[7] ? static_cast<int8_t>(atoi(row[7])) : -1;
|
||||
e.max_expansion = row[8] ? static_cast<int8_t>(atoi(row[8])) : -1;
|
||||
e.content_flags = row[9] ? row[9] : "";
|
||||
e.content_flags_disabled = row[10] ? row[10] : "";
|
||||
|
||||
@ -314,15 +314,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Fishing e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.skill_level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.npc_id = static_cast<int32_t>(atoi(row[5]));
|
||||
e.npc_chance = static_cast<int32_t>(atoi(row[6]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[8]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.skill_level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.npc_id = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.npc_chance = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.min_expansion = row[7] ? static_cast<int8_t>(atoi(row[7])) : -1;
|
||||
e.max_expansion = row[8] ? static_cast<int8_t>(atoi(row[8])) : -1;
|
||||
e.content_flags = row[9] ? row[9] : "";
|
||||
e.content_flags_disabled = row[10] ? row[10] : "";
|
||||
|
||||
@ -349,15 +349,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Fishing e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.skill_level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.npc_id = static_cast<int32_t>(atoi(row[5]));
|
||||
e.npc_chance = static_cast<int32_t>(atoi(row[6]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[8]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.skill_level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.npc_id = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.npc_chance = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.min_expansion = row[7] ? static_cast<int8_t>(atoi(row[7])) : -1;
|
||||
e.max_expansion = row[8] ? static_cast<int8_t>(atoi(row[8])) : -1;
|
||||
e.content_flags = row[9] ? row[9] : "";
|
||||
e.content_flags_disabled = row[10] ? row[10] : "";
|
||||
|
||||
|
||||
@ -147,13 +147,13 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Forage e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.min_expansion = row[5] ? static_cast<int8_t>(atoi(row[5])) : -1;
|
||||
e.max_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.content_flags = row[7] ? row[7] : "";
|
||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
@ -298,13 +298,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Forage e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.min_expansion = row[5] ? static_cast<int8_t>(atoi(row[5])) : -1;
|
||||
e.max_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.content_flags = row[7] ? row[7] : "";
|
||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
@ -331,13 +331,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Forage e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.Itemid = static_cast<int32_t>(atoi(row[2]));
|
||||
e.level = static_cast<int16_t>(atoi(row[3]));
|
||||
e.chance = static_cast<int16_t>(atoi(row[4]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[5]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.Itemid = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.level = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.chance = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.min_expansion = row[5] ? static_cast<int8_t>(atoi(row[5])) : -1;
|
||||
e.max_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.content_flags = row[7] ? row[7] : "";
|
||||
e.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseGlobalLootRepository {
|
||||
public:
|
||||
struct GlobalLoot {
|
||||
|
||||
@ -124,7 +124,7 @@ public:
|
||||
GmIps e{};
|
||||
|
||||
e.name = row[0] ? row[0] : "";
|
||||
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.account_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.ip_address = row[2] ? row[2] : "";
|
||||
|
||||
return e;
|
||||
@ -252,7 +252,7 @@ public:
|
||||
GmIps e{};
|
||||
|
||||
e.name = row[0] ? row[0] : "";
|
||||
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.account_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.ip_address = row[2] ? row[2] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -279,7 +279,7 @@ public:
|
||||
GmIps e{};
|
||||
|
||||
e.name = row[0] ? row[0] : "";
|
||||
e.account_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.account_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.ip_address = row[2] ? row[2] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -135,8 +135,8 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Graveyard e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.x = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.y = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.z = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
@ -274,8 +274,8 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Graveyard e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.x = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.y = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.z = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
@ -304,8 +304,8 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Graveyard e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zone_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.x = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
e.y = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.z = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
|
||||
@ -147,15 +147,15 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
GridEntries e{};
|
||||
|
||||
e.gridid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.number = static_cast<int32_t>(atoi(row[2]));
|
||||
e.gridid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.number = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.x = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.y = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.z = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.heading = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.pause = static_cast<int32_t>(atoi(row[7]));
|
||||
e.centerpoint = static_cast<int8_t>(atoi(row[8]));
|
||||
e.pause = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.centerpoint = row[8] ? static_cast<int8_t>(atoi(row[8])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -299,15 +299,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GridEntries e{};
|
||||
|
||||
e.gridid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.number = static_cast<int32_t>(atoi(row[2]));
|
||||
e.gridid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.number = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.x = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.y = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.z = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.heading = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.pause = static_cast<int32_t>(atoi(row[7]));
|
||||
e.centerpoint = static_cast<int8_t>(atoi(row[8]));
|
||||
e.pause = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.centerpoint = row[8] ? static_cast<int8_t>(atoi(row[8])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -332,15 +332,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GridEntries e{};
|
||||
|
||||
e.gridid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.number = static_cast<int32_t>(atoi(row[2]));
|
||||
e.gridid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.number = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.x = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.y = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.z = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.heading = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.pause = static_cast<int32_t>(atoi(row[7]));
|
||||
e.centerpoint = static_cast<int8_t>(atoi(row[8]));
|
||||
e.pause = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.centerpoint = row[8] ? static_cast<int8_t>(atoi(row[8])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -127,10 +127,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Grid e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = static_cast<int32_t>(atoi(row[2]));
|
||||
e.type2 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type2 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -259,10 +259,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Grid e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = static_cast<int32_t>(atoi(row[2]));
|
||||
e.type2 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type2 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -287,10 +287,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Grid e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.zoneid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = static_cast<int32_t>(atoi(row[2]));
|
||||
e.type2 = static_cast<int32_t>(atoi(row[3]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.type = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.type2 = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zoneid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||
e.version = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.max_x = row[3] ? strtof(row[3], nullptr) : 2000;
|
||||
e.max_y = row[4] ? strtof(row[4], nullptr) : 2000;
|
||||
e.max_z = row[5] ? strtof(row[5], nullptr) : 10000;
|
||||
@ -197,8 +197,8 @@ public:
|
||||
e.max_allowed = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 1;
|
||||
e.comment = row[12] ? row[12] : "";
|
||||
e.respawn_timer = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 300;
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||
e.min_expansion = row[14] ? static_cast<int8_t>(atoi(row[14])) : -1;
|
||||
e.max_expansion = row[15] ? static_cast<int8_t>(atoi(row[15])) : -1;
|
||||
e.content_flags = row[16] ? row[16] : "";
|
||||
e.content_flags_disabled = row[17] ? row[17] : "";
|
||||
|
||||
@ -372,7 +372,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zoneid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||
e.version = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.max_x = row[3] ? strtof(row[3], nullptr) : 2000;
|
||||
e.max_y = row[4] ? strtof(row[4], nullptr) : 2000;
|
||||
e.max_z = row[5] ? strtof(row[5], nullptr) : 10000;
|
||||
@ -384,8 +384,8 @@ public:
|
||||
e.max_allowed = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 1;
|
||||
e.comment = row[12] ? row[12] : "";
|
||||
e.respawn_timer = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 300;
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||
e.min_expansion = row[14] ? static_cast<int8_t>(atoi(row[14])) : -1;
|
||||
e.max_expansion = row[15] ? static_cast<int8_t>(atoi(row[15])) : -1;
|
||||
e.content_flags = row[16] ? row[16] : "";
|
||||
e.content_flags_disabled = row[17] ? row[17] : "";
|
||||
|
||||
@ -414,7 +414,7 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.zoneid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||
e.version = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.max_x = row[3] ? strtof(row[3], nullptr) : 2000;
|
||||
e.max_y = row[4] ? strtof(row[4], nullptr) : 2000;
|
||||
e.max_z = row[5] ? strtof(row[5], nullptr) : 10000;
|
||||
@ -426,8 +426,8 @@ public:
|
||||
e.max_allowed = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 1;
|
||||
e.comment = row[12] ? row[12] : "";
|
||||
e.respawn_timer = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 300;
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[14]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[15]));
|
||||
e.min_expansion = row[14] ? static_cast<int8_t>(atoi(row[14])) : -1;
|
||||
e.max_expansion = row[15] ? static_cast<int8_t>(atoi(row[15])) : -1;
|
||||
e.content_flags = row[16] ? row[16] : "";
|
||||
e.content_flags_disabled = row[17] ? row[17] : "";
|
||||
|
||||
|
||||
@ -127,10 +127,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
GroupId e{};
|
||||
|
||||
e.groupid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.charid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.groupid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.charid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.ismerc = static_cast<int8_t>(atoi(row[3]));
|
||||
e.ismerc = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -259,10 +259,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GroupId e{};
|
||||
|
||||
e.groupid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.charid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.groupid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.charid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.ismerc = static_cast<int8_t>(atoi(row[3]));
|
||||
e.ismerc = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -287,10 +287,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GroupId e{};
|
||||
|
||||
e.groupid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.charid = static_cast<int32_t>(atoi(row[1]));
|
||||
e.groupid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.charid = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.name = row[2] ? row[2] : "";
|
||||
e.ismerc = static_cast<int8_t>(atoi(row[3]));
|
||||
e.ismerc = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -147,15 +147,15 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
GroupLeaders e{};
|
||||
|
||||
e.gid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.gid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.leadername = row[1] ? row[1] : "";
|
||||
e.marknpc = row[2] ? row[2] : "";
|
||||
e.leadershipaa = row[3] ? row[3] : "";
|
||||
e.leadershipaa = row[3] ? row[3] : 0;
|
||||
e.maintank = row[4] ? row[4] : "";
|
||||
e.assist = row[5] ? row[5] : "";
|
||||
e.puller = row[6] ? row[6] : "";
|
||||
e.mentoree = row[7] ? row[7] : "";
|
||||
e.mentor_percent = static_cast<int32_t>(atoi(row[8]));
|
||||
e.mentor_percent = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -299,15 +299,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GroupLeaders e{};
|
||||
|
||||
e.gid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.gid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.leadername = row[1] ? row[1] : "";
|
||||
e.marknpc = row[2] ? row[2] : "";
|
||||
e.leadershipaa = row[3] ? row[3] : "";
|
||||
e.leadershipaa = row[3] ? row[3] : 0;
|
||||
e.maintank = row[4] ? row[4] : "";
|
||||
e.assist = row[5] ? row[5] : "";
|
||||
e.puller = row[6] ? row[6] : "";
|
||||
e.mentoree = row[7] ? row[7] : "";
|
||||
e.mentor_percent = static_cast<int32_t>(atoi(row[8]));
|
||||
e.mentor_percent = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -332,15 +332,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GroupLeaders e{};
|
||||
|
||||
e.gid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.gid = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.leadername = row[1] ? row[1] : "";
|
||||
e.marknpc = row[2] ? row[2] : "";
|
||||
e.leadershipaa = row[3] ? row[3] : "";
|
||||
e.leadershipaa = row[3] ? row[3] : 0;
|
||||
e.maintank = row[4] ? row[4] : "";
|
||||
e.assist = row[5] ? row[5] : "";
|
||||
e.puller = row[6] ? row[6] : "";
|
||||
e.mentoree = row[7] ? row[7] : "";
|
||||
e.mentor_percent = static_cast<int32_t>(atoi(row[8]));
|
||||
e.mentor_percent = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
GuildMembers e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.guild_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.rank = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute_enable = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
@ -307,7 +307,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GuildMembers e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.guild_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.rank = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute_enable = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
@ -341,7 +341,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GuildMembers e{};
|
||||
|
||||
e.char_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.guild_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.rank = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.tribute_enable = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
|
||||
@ -125,7 +125,7 @@ public:
|
||||
|
||||
e.guild1 = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.guild2 = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.relation = static_cast<int8_t>(atoi(row[2]));
|
||||
e.relation = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -253,7 +253,7 @@ public:
|
||||
|
||||
e.guild1 = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.guild2 = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.relation = static_cast<int8_t>(atoi(row[2]));
|
||||
e.relation = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -280,7 +280,7 @@ public:
|
||||
|
||||
e.guild1 = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.guild2 = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.relation = static_cast<int8_t>(atoi(row[2]));
|
||||
e.relation = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -151,10 +151,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Guilds e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.leader = static_cast<int32_t>(atoi(row[2]));
|
||||
e.minstatus = static_cast<int16_t>(atoi(row[3]));
|
||||
e.leader = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.minstatus = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.motd = row[4] ? row[4] : "";
|
||||
e.tribute = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.motd_setter = row[6] ? row[6] : "";
|
||||
@ -306,10 +306,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Guilds e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.leader = static_cast<int32_t>(atoi(row[2]));
|
||||
e.minstatus = static_cast<int16_t>(atoi(row[3]));
|
||||
e.leader = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.minstatus = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.motd = row[4] ? row[4] : "";
|
||||
e.tribute = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.motd_setter = row[6] ? row[6] : "";
|
||||
@ -340,10 +340,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Guilds e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.leader = static_cast<int32_t>(atoi(row[2]));
|
||||
e.minstatus = static_cast<int16_t>(atoi(row[3]));
|
||||
e.leader = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.minstatus = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.motd = row[4] ? row[4] : "";
|
||||
e.tribute = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.motd_setter = row[6] ? row[6] : "";
|
||||
|
||||
@ -139,13 +139,13 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Horses e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.filename = row[1] ? row[1] : "";
|
||||
e.race = static_cast<int16_t>(atoi(row[2]));
|
||||
e.gender = static_cast<int8_t>(atoi(row[3]));
|
||||
e.texture = static_cast<int8_t>(atoi(row[4]));
|
||||
e.race = row[2] ? static_cast<int16_t>(atoi(row[2])) : 216;
|
||||
e.gender = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.texture = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.mountspeed = row[5] ? strtof(row[5], nullptr) : 0.75;
|
||||
e.notes = row[6] ? row[6] : "";
|
||||
e.notes = row[6] ? row[6] : "Notes";
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -282,13 +282,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Horses e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.filename = row[1] ? row[1] : "";
|
||||
e.race = static_cast<int16_t>(atoi(row[2]));
|
||||
e.gender = static_cast<int8_t>(atoi(row[3]));
|
||||
e.texture = static_cast<int8_t>(atoi(row[4]));
|
||||
e.race = row[2] ? static_cast<int16_t>(atoi(row[2])) : 216;
|
||||
e.gender = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.texture = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.mountspeed = row[5] ? strtof(row[5], nullptr) : 0.75;
|
||||
e.notes = row[6] ? row[6] : "";
|
||||
e.notes = row[6] ? row[6] : "Notes";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -313,13 +313,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Horses e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.filename = row[1] ? row[1] : "";
|
||||
e.race = static_cast<int16_t>(atoi(row[2]));
|
||||
e.gender = static_cast<int8_t>(atoi(row[3]));
|
||||
e.texture = static_cast<int8_t>(atoi(row[4]));
|
||||
e.race = row[2] ? static_cast<int16_t>(atoi(row[2])) : 216;
|
||||
e.gender = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.texture = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.mountspeed = row[5] ? strtof(row[5], nullptr) : 0.75;
|
||||
e.notes = row[6] ? row[6] : "";
|
||||
e.notes = row[6] ? row[6] : "Notes";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
InstanceList e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.is_global = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
@ -290,7 +290,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
InstanceList e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.is_global = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
@ -322,7 +322,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
InstanceList e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zone = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.is_global = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
|
||||
@ -185,12 +185,12 @@ public:
|
||||
e.augslot3 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[10]));
|
||||
e.augslot6 = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.instnodrop = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.custom_data = row[12] ? row[12] : "";
|
||||
e.ornamenticon = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.ornament_hero_model = static_cast<int32_t>(atoi(row[15]));
|
||||
e.ornament_hero_model = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -365,12 +365,12 @@ public:
|
||||
e.augslot3 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[10]));
|
||||
e.augslot6 = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.instnodrop = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.custom_data = row[12] ? row[12] : "";
|
||||
e.ornamenticon = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.ornament_hero_model = static_cast<int32_t>(atoi(row[15]));
|
||||
e.ornament_hero_model = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -405,12 +405,12 @@ public:
|
||||
e.augslot3 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[10]));
|
||||
e.augslot6 = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.instnodrop = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.custom_data = row[12] ? row[12] : "";
|
||||
e.ornamenticon = row[13] ? static_cast<uint32_t>(strtoul(row[13], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.ornament_hero_model = static_cast<int32_t>(atoi(row[15]));
|
||||
e.ornament_hero_model = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -190,12 +190,12 @@ public:
|
||||
e.augslot3 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.augslot6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.instnodrop = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.custom_data = row[13] ? row[13] : "";
|
||||
e.ornamenticon = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.ornament_hero_model = static_cast<int32_t>(atoi(row[16]));
|
||||
e.ornament_hero_model = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -374,12 +374,12 @@ public:
|
||||
e.augslot3 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.augslot6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.instnodrop = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.custom_data = row[13] ? row[13] : "";
|
||||
e.ornamenticon = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.ornament_hero_model = static_cast<int32_t>(atoi(row[16]));
|
||||
e.ornament_hero_model = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -415,12 +415,12 @@ public:
|
||||
e.augslot3 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.augslot6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.instnodrop = row[12] ? static_cast<uint8_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.custom_data = row[13] ? row[13] : "";
|
||||
e.ornamenticon = row[14] ? static_cast<uint32_t>(strtoul(row[14], nullptr, 10)) : 0;
|
||||
e.ornamentidfile = row[15] ? static_cast<uint32_t>(strtoul(row[15], nullptr, 10)) : 0;
|
||||
e.ornament_hero_model = static_cast<int32_t>(atoi(row[16]));
|
||||
e.ornament_hero_model = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -123,9 +123,9 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
IpExemptions e{};
|
||||
|
||||
e.exemption_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.exemption_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.exemption_ip = row[1] ? row[1] : "";
|
||||
e.exemption_amount = static_cast<int32_t>(atoi(row[2]));
|
||||
e.exemption_amount = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -250,9 +250,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
IpExemptions e{};
|
||||
|
||||
e.exemption_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.exemption_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.exemption_ip = row[1] ? row[1] : "";
|
||||
e.exemption_amount = static_cast<int32_t>(atoi(row[2]));
|
||||
e.exemption_amount = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -277,9 +277,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
IpExemptions e{};
|
||||
|
||||
e.exemption_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.exemption_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.exemption_ip = row[1] ? row[1] : "";
|
||||
e.exemption_amount = static_cast<int32_t>(atoi(row[2]));
|
||||
e.exemption_amount = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -123,7 +123,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
LevelExpMods e{};
|
||||
|
||||
e.level = static_cast<int32_t>(atoi(row[0]));
|
||||
e.level = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.exp_mod = row[1] ? strtof(row[1], nullptr) : 0;
|
||||
e.aa_exp_mod = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
|
||||
@ -251,7 +251,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LevelExpMods e{};
|
||||
|
||||
e.level = static_cast<int32_t>(atoi(row[0]));
|
||||
e.level = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.exp_mod = row[1] ? strtof(row[1], nullptr) : 0;
|
||||
e.aa_exp_mod = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
|
||||
@ -278,7 +278,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LevelExpMods e{};
|
||||
|
||||
e.level = static_cast<int32_t>(atoi(row[0]));
|
||||
e.level = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.exp_mod = row[1] ? strtof(row[1], nullptr) : 0;
|
||||
e.aa_exp_mod = row[2] ? strtof(row[2], nullptr) : 0;
|
||||
|
||||
|
||||
@ -195,9 +195,9 @@ public:
|
||||
v.push_back(columns[3] + " = '" + Strings::Escape(e.account_email) + "'");
|
||||
v.push_back(columns[4] + " = '" + Strings::Escape(e.source_loginserver) + "'");
|
||||
v.push_back(columns[5] + " = '" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back(columns[6] + " = FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back(columns[7] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back(columns[8] + " = FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back(columns[6] + " = FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[7] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[8] + " = FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -225,9 +225,9 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.account_email) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.source_loginserver) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -263,9 +263,9 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.account_email) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.source_loginserver) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@ -421,9 +421,9 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.account_email) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.source_loginserver) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -452,9 +452,9 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.account_email) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.source_loginserver) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@ -135,10 +135,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
LoginApiTokens e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.token = row[1] ? row[1] : "";
|
||||
e.can_write = static_cast<int32_t>(atoi(row[2]));
|
||||
e.can_read = static_cast<int32_t>(atoi(row[3]));
|
||||
e.can_write = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.can_read = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.created_at = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||
e.updated_at = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
|
||||
@ -177,8 +177,8 @@ public:
|
||||
v.push_back(columns[1] + " = '" + Strings::Escape(e.token) + "'");
|
||||
v.push_back(columns[2] + " = " + std::to_string(e.can_write));
|
||||
v.push_back(columns[3] + " = " + std::to_string(e.can_read));
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back(columns[5] + " = FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back(columns[4] + " = FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[5] + " = FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -204,8 +204,8 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.token) + "'");
|
||||
v.push_back(std::to_string(e.can_write));
|
||||
v.push_back(std::to_string(e.can_read));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -239,8 +239,8 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.token) + "'");
|
||||
v.push_back(std::to_string(e.can_write));
|
||||
v.push_back(std::to_string(e.can_read));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@ -274,10 +274,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LoginApiTokens e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.token = row[1] ? row[1] : "";
|
||||
e.can_write = static_cast<int32_t>(atoi(row[2]));
|
||||
e.can_read = static_cast<int32_t>(atoi(row[3]));
|
||||
e.can_write = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.can_read = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.created_at = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||
e.updated_at = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
|
||||
@ -304,10 +304,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LoginApiTokens e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.token = row[1] ? row[1] : "";
|
||||
e.can_write = static_cast<int32_t>(atoi(row[2]));
|
||||
e.can_read = static_cast<int32_t>(atoi(row[3]));
|
||||
e.can_write = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.can_read = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.created_at = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
|
||||
e.updated_at = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
|
||||
@ -388,8 +388,8 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.token) + "'");
|
||||
v.push_back(std::to_string(e.can_write));
|
||||
v.push_back(std::to_string(e.can_read));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -416,8 +416,8 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.token) + "'");
|
||||
v.push_back(std::to_string(e.can_write));
|
||||
v.push_back(std::to_string(e.can_read));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.created_at > 0 ? std::to_string(e.created_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.updated_at > 0 ? std::to_string(e.updated_at) : "UNIX_TIMESTAMP()") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ public:
|
||||
v.push_back(columns[3] + " = '" + Strings::Escape(e.first_name) + "'");
|
||||
v.push_back(columns[4] + " = '" + Strings::Escape(e.last_name) + "'");
|
||||
v.push_back(columns[5] + " = '" + Strings::Escape(e.email) + "'");
|
||||
v.push_back(columns[6] + " = FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "null") + ")");
|
||||
v.push_back(columns[6] + " = FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[7] + " = '" + Strings::Escape(e.registration_ip_address) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
@ -218,7 +218,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.first_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.last_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.email) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.registration_ip_address) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
@ -255,7 +255,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.first_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.last_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.email) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.registration_ip_address) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
@ -410,7 +410,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.first_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.last_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.email) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.registration_ip_address) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
@ -440,7 +440,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.first_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.last_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.email) + "'");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.registration_date > 0 ? std::to_string(e.registration_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.registration_ip_address) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
|
||||
@ -155,11 +155,11 @@ public:
|
||||
e.long_name = row[1] ? row[1] : "";
|
||||
e.short_name = row[2] ? row[2] : "";
|
||||
e.tag_description = row[3] ? row[3] : "";
|
||||
e.login_server_list_type_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.login_server_list_type_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.last_login_date = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
e.last_ip_address = row[6] ? row[6] : "";
|
||||
e.login_server_admin_id = static_cast<int32_t>(atoi(row[7]));
|
||||
e.is_server_trusted = static_cast<int32_t>(atoi(row[8]));
|
||||
e.login_server_admin_id = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.is_server_trusted = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.note = row[9] ? row[9] : "";
|
||||
|
||||
return e;
|
||||
@ -198,7 +198,7 @@ public:
|
||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.short_name) + "'");
|
||||
v.push_back(columns[3] + " = '" + Strings::Escape(e.tag_description) + "'");
|
||||
v.push_back(columns[4] + " = " + std::to_string(e.login_server_list_type_id));
|
||||
v.push_back(columns[5] + " = FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back(columns[5] + " = FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[6] + " = '" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back(columns[7] + " = " + std::to_string(e.login_server_admin_id));
|
||||
v.push_back(columns[8] + " = " + std::to_string(e.is_server_trusted));
|
||||
@ -229,7 +229,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.short_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.tag_description) + "'");
|
||||
v.push_back(std::to_string(e.login_server_list_type_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back(std::to_string(e.login_server_admin_id));
|
||||
v.push_back(std::to_string(e.is_server_trusted));
|
||||
@ -268,7 +268,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.short_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.tag_description) + "'");
|
||||
v.push_back(std::to_string(e.login_server_list_type_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back(std::to_string(e.login_server_admin_id));
|
||||
v.push_back(std::to_string(e.is_server_trusted));
|
||||
@ -310,11 +310,11 @@ public:
|
||||
e.long_name = row[1] ? row[1] : "";
|
||||
e.short_name = row[2] ? row[2] : "";
|
||||
e.tag_description = row[3] ? row[3] : "";
|
||||
e.login_server_list_type_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.login_server_list_type_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.last_login_date = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
e.last_ip_address = row[6] ? row[6] : "";
|
||||
e.login_server_admin_id = static_cast<int32_t>(atoi(row[7]));
|
||||
e.is_server_trusted = static_cast<int32_t>(atoi(row[8]));
|
||||
e.login_server_admin_id = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.is_server_trusted = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.note = row[9] ? row[9] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -344,11 +344,11 @@ public:
|
||||
e.long_name = row[1] ? row[1] : "";
|
||||
e.short_name = row[2] ? row[2] : "";
|
||||
e.tag_description = row[3] ? row[3] : "";
|
||||
e.login_server_list_type_id = static_cast<int32_t>(atoi(row[4]));
|
||||
e.login_server_list_type_id = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.last_login_date = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
e.last_ip_address = row[6] ? row[6] : "";
|
||||
e.login_server_admin_id = static_cast<int32_t>(atoi(row[7]));
|
||||
e.is_server_trusted = static_cast<int32_t>(atoi(row[8]));
|
||||
e.login_server_admin_id = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.is_server_trusted = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.note = row[9] ? row[9] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -429,7 +429,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.short_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.tag_description) + "'");
|
||||
v.push_back(std::to_string(e.login_server_list_type_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back(std::to_string(e.login_server_admin_id));
|
||||
v.push_back(std::to_string(e.is_server_trusted));
|
||||
@ -461,7 +461,7 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.short_name) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.tag_description) + "'");
|
||||
v.push_back(std::to_string(e.login_server_list_type_id));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.last_login_date > 0 ? std::to_string(e.last_login_date) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back("'" + Strings::Escape(e.last_ip_address) + "'");
|
||||
v.push_back(std::to_string(e.login_server_admin_id));
|
||||
v.push_back(std::to_string(e.is_server_trusted));
|
||||
|
||||
@ -139,13 +139,13 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
LogsysCategories e{};
|
||||
|
||||
e.log_category_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.log_category_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.log_category_description = row[1] ? row[1] : "";
|
||||
e.log_to_console = static_cast<int16_t>(atoi(row[2]));
|
||||
e.log_to_file = static_cast<int16_t>(atoi(row[3]));
|
||||
e.log_to_gmsay = static_cast<int16_t>(atoi(row[4]));
|
||||
e.log_to_discord = static_cast<int16_t>(atoi(row[5]));
|
||||
e.discord_webhook_id = static_cast<int32_t>(atoi(row[6]));
|
||||
e.log_to_console = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.log_to_file = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.log_to_gmsay = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.log_to_discord = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
e.discord_webhook_id = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -283,13 +283,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LogsysCategories e{};
|
||||
|
||||
e.log_category_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.log_category_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.log_category_description = row[1] ? row[1] : "";
|
||||
e.log_to_console = static_cast<int16_t>(atoi(row[2]));
|
||||
e.log_to_file = static_cast<int16_t>(atoi(row[3]));
|
||||
e.log_to_gmsay = static_cast<int16_t>(atoi(row[4]));
|
||||
e.log_to_discord = static_cast<int16_t>(atoi(row[5]));
|
||||
e.discord_webhook_id = static_cast<int32_t>(atoi(row[6]));
|
||||
e.log_to_console = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.log_to_file = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.log_to_gmsay = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.log_to_discord = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
e.discord_webhook_id = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -314,13 +314,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LogsysCategories e{};
|
||||
|
||||
e.log_category_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.log_category_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.log_category_description = row[1] ? row[1] : "";
|
||||
e.log_to_console = static_cast<int16_t>(atoi(row[2]));
|
||||
e.log_to_file = static_cast<int16_t>(atoi(row[3]));
|
||||
e.log_to_gmsay = static_cast<int16_t>(atoi(row[4]));
|
||||
e.log_to_discord = static_cast<int16_t>(atoi(row[5]));
|
||||
e.discord_webhook_id = static_cast<int32_t>(atoi(row[6]));
|
||||
e.log_to_console = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.log_to_file = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.log_to_gmsay = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.log_to_discord = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
e.discord_webhook_id = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ public:
|
||||
LootdropEntries e{};
|
||||
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
@ -316,7 +316,7 @@ public:
|
||||
LootdropEntries e{};
|
||||
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
@ -351,7 +351,7 @@ public:
|
||||
LootdropEntries e{};
|
||||
|
||||
e.lootdrop_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.item_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.item_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_charges = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 1;
|
||||
e.equip_item = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.chance = row[4] ? strtof(row[4], nullptr) : 1;
|
||||
|
||||
@ -137,8 +137,8 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[2]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[3]));
|
||||
e.min_expansion = row[2] ? static_cast<int8_t>(atoi(row[2])) : -1;
|
||||
e.max_expansion = row[3] ? static_cast<int8_t>(atoi(row[3])) : -1;
|
||||
e.content_flags = row[4] ? row[4] : "";
|
||||
e.content_flags_disabled = row[5] ? row[5] : "";
|
||||
|
||||
@ -276,8 +276,8 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[2]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[3]));
|
||||
e.min_expansion = row[2] ? static_cast<int8_t>(atoi(row[2])) : -1;
|
||||
e.max_expansion = row[3] ? static_cast<int8_t>(atoi(row[3])) : -1;
|
||||
e.content_flags = row[4] ? row[4] : "";
|
||||
e.content_flags_disabled = row[5] ? row[5] : "";
|
||||
|
||||
@ -306,8 +306,8 @@ public:
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[2]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[3]));
|
||||
e.min_expansion = row[2] ? static_cast<int8_t>(atoi(row[2])) : -1;
|
||||
e.max_expansion = row[3] ? static_cast<int8_t>(atoi(row[3])) : -1;
|
||||
e.content_flags = row[4] ? row[4] : "";
|
||||
e.content_flags_disabled = row[5] ? row[5] : "";
|
||||
|
||||
|
||||
@ -156,9 +156,9 @@ public:
|
||||
e.mincash = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.maxcash = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.avgcoin = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.done = static_cast<int8_t>(atoi(row[5]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||
e.done = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
e.min_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.max_expansion = row[7] ? static_cast<int8_t>(atoi(row[7])) : -1;
|
||||
e.content_flags = row[8] ? row[8] : "";
|
||||
e.content_flags_disabled = row[9] ? row[9] : "";
|
||||
|
||||
@ -311,9 +311,9 @@ public:
|
||||
e.mincash = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.maxcash = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.avgcoin = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.done = static_cast<int8_t>(atoi(row[5]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||
e.done = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
e.min_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.max_expansion = row[7] ? static_cast<int8_t>(atoi(row[7])) : -1;
|
||||
e.content_flags = row[8] ? row[8] : "";
|
||||
e.content_flags_disabled = row[9] ? row[9] : "";
|
||||
|
||||
@ -345,9 +345,9 @@ public:
|
||||
e.mincash = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.maxcash = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.avgcoin = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.done = static_cast<int8_t>(atoi(row[5]));
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[6]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[7]));
|
||||
e.done = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
e.min_expansion = row[6] ? static_cast<int8_t>(atoi(row[6])) : -1;
|
||||
e.max_expansion = row[7] ? static_cast<int8_t>(atoi(row[7])) : -1;
|
||||
e.content_flags = row[8] ? row[8] : "";
|
||||
e.content_flags_disabled = row[9] ? row[9] : "";
|
||||
|
||||
|
||||
@ -145,12 +145,12 @@ public:
|
||||
|
||||
e.msgid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.charid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.timestamp = static_cast<int32_t>(atoi(row[2]));
|
||||
e.timestamp = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.from = row[3] ? row[3] : "";
|
||||
e.subject = row[4] ? row[4] : "";
|
||||
e.body = row[5] ? row[5] : "";
|
||||
e.to = row[6] ? row[6] : "";
|
||||
e.status = static_cast<int8_t>(atoi(row[7]));
|
||||
e.status = row[7] ? static_cast<int8_t>(atoi(row[7])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -292,12 +292,12 @@ public:
|
||||
|
||||
e.msgid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.charid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.timestamp = static_cast<int32_t>(atoi(row[2]));
|
||||
e.timestamp = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.from = row[3] ? row[3] : "";
|
||||
e.subject = row[4] ? row[4] : "";
|
||||
e.body = row[5] ? row[5] : "";
|
||||
e.to = row[6] ? row[6] : "";
|
||||
e.status = static_cast<int8_t>(atoi(row[7]));
|
||||
e.status = row[7] ? static_cast<int8_t>(atoi(row[7])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -324,12 +324,12 @@ public:
|
||||
|
||||
e.msgid = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.charid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.timestamp = static_cast<int32_t>(atoi(row[2]));
|
||||
e.timestamp = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.from = row[3] ? row[3] : "";
|
||||
e.subject = row[4] ? row[4] : "";
|
||||
e.body = row[5] ? row[5] : "";
|
||||
e.to = row[6] ? row[6] : "";
|
||||
e.status = static_cast<int8_t>(atoi(row[7]));
|
||||
e.status = row[7] ? static_cast<int8_t>(atoi(row[7])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ public:
|
||||
e.SpellId = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.CasterLevel = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.DurationFormula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.TicsRemaining = static_cast<int32_t>(atoi(row[5]));
|
||||
e.TicsRemaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.PoisonCounters = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.DiseaseCounters = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.CurseCounters = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
@ -200,12 +200,12 @@ public:
|
||||
e.HitCount = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.MeleeRune = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.MagicRune = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.dot_rune = static_cast<int32_t>(atoi(row[13]));
|
||||
e.caston_x = static_cast<int32_t>(atoi(row[14]));
|
||||
e.Persistent = static_cast<int8_t>(atoi(row[15]));
|
||||
e.caston_y = static_cast<int32_t>(atoi(row[16]));
|
||||
e.caston_z = static_cast<int32_t>(atoi(row[17]));
|
||||
e.ExtraDIChance = static_cast<int32_t>(atoi(row[18]));
|
||||
e.dot_rune = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.caston_x = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.Persistent = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.caston_y = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.caston_z = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.ExtraDIChance = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -383,7 +383,7 @@ public:
|
||||
e.SpellId = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.CasterLevel = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.DurationFormula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.TicsRemaining = static_cast<int32_t>(atoi(row[5]));
|
||||
e.TicsRemaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.PoisonCounters = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.DiseaseCounters = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.CurseCounters = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
@ -391,12 +391,12 @@ public:
|
||||
e.HitCount = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.MeleeRune = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.MagicRune = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.dot_rune = static_cast<int32_t>(atoi(row[13]));
|
||||
e.caston_x = static_cast<int32_t>(atoi(row[14]));
|
||||
e.Persistent = static_cast<int8_t>(atoi(row[15]));
|
||||
e.caston_y = static_cast<int32_t>(atoi(row[16]));
|
||||
e.caston_z = static_cast<int32_t>(atoi(row[17]));
|
||||
e.ExtraDIChance = static_cast<int32_t>(atoi(row[18]));
|
||||
e.dot_rune = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.caston_x = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.Persistent = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.caston_y = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.caston_z = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.ExtraDIChance = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -426,7 +426,7 @@ public:
|
||||
e.SpellId = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.CasterLevel = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.DurationFormula = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.TicsRemaining = static_cast<int32_t>(atoi(row[5]));
|
||||
e.TicsRemaining = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.PoisonCounters = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.DiseaseCounters = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.CurseCounters = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
@ -434,12 +434,12 @@ public:
|
||||
e.HitCount = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.MeleeRune = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.MagicRune = row[12] ? static_cast<uint32_t>(strtoul(row[12], nullptr, 10)) : 0;
|
||||
e.dot_rune = static_cast<int32_t>(atoi(row[13]));
|
||||
e.caston_x = static_cast<int32_t>(atoi(row[14]));
|
||||
e.Persistent = static_cast<int8_t>(atoi(row[15]));
|
||||
e.caston_y = static_cast<int32_t>(atoi(row[16]));
|
||||
e.caston_z = static_cast<int32_t>(atoi(row[17]));
|
||||
e.ExtraDIChance = static_cast<int32_t>(atoi(row[18]));
|
||||
e.dot_rune = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.caston_x = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.Persistent = row[15] ? static_cast<int8_t>(atoi(row[15])) : 0;
|
||||
e.caston_y = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.caston_z = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.ExtraDIChance = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
NameFilter e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
|
||||
return e;
|
||||
@ -242,7 +242,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NameFilter e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -268,7 +268,7 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NameFilter e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -131,10 +131,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
NpcEmotes e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.emoteid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.event_ = static_cast<int8_t>(atoi(row[2]));
|
||||
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||
e.event_ = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.text = row[4] ? row[4] : "";
|
||||
|
||||
return e;
|
||||
@ -266,10 +266,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcEmotes e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.emoteid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.event_ = static_cast<int8_t>(atoi(row[2]));
|
||||
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||
e.event_ = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.text = row[4] ? row[4] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -295,10 +295,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcEmotes e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.emoteid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.event_ = static_cast<int8_t>(atoi(row[2]));
|
||||
e.type = static_cast<int8_t>(atoi(row[3]));
|
||||
e.event_ = row[2] ? static_cast<int8_t>(atoi(row[2])) : 0;
|
||||
e.type = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.text = row[4] ? row[4] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -133,9 +133,9 @@ public:
|
||||
|
||||
e.npc_faction_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.faction_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.value = static_cast<int32_t>(atoi(row[2]));
|
||||
e.npc_value = static_cast<int8_t>(atoi(row[3]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[4]));
|
||||
e.value = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.npc_value = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.temp = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -269,9 +269,9 @@ public:
|
||||
|
||||
e.npc_faction_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.faction_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.value = static_cast<int32_t>(atoi(row[2]));
|
||||
e.npc_value = static_cast<int8_t>(atoi(row[3]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[4]));
|
||||
e.value = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.npc_value = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.temp = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -298,9 +298,9 @@ public:
|
||||
|
||||
e.npc_faction_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.faction_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.value = static_cast<int32_t>(atoi(row[2]));
|
||||
e.npc_value = static_cast<int8_t>(atoi(row[3]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[4]));
|
||||
e.value = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.npc_value = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
e.temp = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -127,10 +127,10 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
NpcFaction e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.primaryfaction = static_cast<int32_t>(atoi(row[2]));
|
||||
e.ignore_primary_assist = static_cast<int8_t>(atoi(row[3]));
|
||||
e.primaryfaction = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.ignore_primary_assist = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -258,10 +258,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcFaction e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.primaryfaction = static_cast<int32_t>(atoi(row[2]));
|
||||
e.ignore_primary_assist = static_cast<int8_t>(atoi(row[3]));
|
||||
e.primaryfaction = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.ignore_primary_assist = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -286,10 +286,10 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcFaction e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.primaryfaction = static_cast<int32_t>(atoi(row[2]));
|
||||
e.ignore_primary_assist = static_cast<int8_t>(atoi(row[3]));
|
||||
e.primaryfaction = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.ignore_primary_assist = row[3] ? static_cast<int8_t>(atoi(row[3])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -243,38 +243,38 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
NpcScaleGlobalBase e{};
|
||||
|
||||
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||
e.level = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.level = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_id_list = row[2] ? row[2] : "";
|
||||
e.instance_version_list = row[3] ? row[3] : "";
|
||||
e.ac = static_cast<int32_t>(atoi(row[4]));
|
||||
e.ac = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.hp = row[5] ? strtoll(row[5], nullptr, 10) : 0;
|
||||
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
||||
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
||||
e.attack = static_cast<int32_t>(atoi(row[8]));
|
||||
e.strength = static_cast<int32_t>(atoi(row[9]));
|
||||
e.stamina = static_cast<int32_t>(atoi(row[10]));
|
||||
e.dexterity = static_cast<int32_t>(atoi(row[11]));
|
||||
e.agility = static_cast<int32_t>(atoi(row[12]));
|
||||
e.intelligence = static_cast<int32_t>(atoi(row[13]));
|
||||
e.wisdom = static_cast<int32_t>(atoi(row[14]));
|
||||
e.charisma = static_cast<int32_t>(atoi(row[15]));
|
||||
e.magic_resist = static_cast<int32_t>(atoi(row[16]));
|
||||
e.cold_resist = static_cast<int32_t>(atoi(row[17]));
|
||||
e.fire_resist = static_cast<int32_t>(atoi(row[18]));
|
||||
e.poison_resist = static_cast<int32_t>(atoi(row[19]));
|
||||
e.disease_resist = static_cast<int32_t>(atoi(row[20]));
|
||||
e.corruption_resist = static_cast<int32_t>(atoi(row[21]));
|
||||
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
||||
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
||||
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
||||
e.accuracy = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.slow_mitigation = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.attack = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.strength = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.stamina = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.dexterity = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.agility = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.intelligence = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.wisdom = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.charisma = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.magic_resist = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.cold_resist = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.fire_resist = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.poison_resist = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.disease_resist = row[20] ? static_cast<int32_t>(atoi(row[20])) : 0;
|
||||
e.corruption_resist = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.physical_resist = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.min_dmg = row[23] ? static_cast<int32_t>(atoi(row[23])) : 0;
|
||||
e.max_dmg = row[24] ? static_cast<int32_t>(atoi(row[24])) : 0;
|
||||
e.hp_regen_rate = row[25] ? strtoll(row[25], nullptr, 10) : 0;
|
||||
e.hp_regen_per_second = row[26] ? strtoll(row[26], nullptr, 10) : 0;
|
||||
e.attack_delay = static_cast<int32_t>(atoi(row[27]));
|
||||
e.spell_scale = static_cast<int32_t>(atoi(row[28]));
|
||||
e.heal_scale = static_cast<int32_t>(atoi(row[29]));
|
||||
e.attack_delay = row[27] ? static_cast<int32_t>(atoi(row[27])) : 0;
|
||||
e.spell_scale = row[28] ? static_cast<int32_t>(atoi(row[28])) : 100;
|
||||
e.heal_scale = row[29] ? static_cast<int32_t>(atoi(row[29])) : 100;
|
||||
e.avoidance = row[30] ? static_cast<uint32_t>(strtoul(row[30], nullptr, 10)) : 0;
|
||||
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[31]));
|
||||
e.heroic_strikethrough = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.special_abilities = row[32] ? row[32] : "";
|
||||
|
||||
return e;
|
||||
@ -491,38 +491,38 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcScaleGlobalBase e{};
|
||||
|
||||
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||
e.level = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.level = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_id_list = row[2] ? row[2] : "";
|
||||
e.instance_version_list = row[3] ? row[3] : "";
|
||||
e.ac = static_cast<int32_t>(atoi(row[4]));
|
||||
e.ac = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.hp = row[5] ? strtoll(row[5], nullptr, 10) : 0;
|
||||
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
||||
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
||||
e.attack = static_cast<int32_t>(atoi(row[8]));
|
||||
e.strength = static_cast<int32_t>(atoi(row[9]));
|
||||
e.stamina = static_cast<int32_t>(atoi(row[10]));
|
||||
e.dexterity = static_cast<int32_t>(atoi(row[11]));
|
||||
e.agility = static_cast<int32_t>(atoi(row[12]));
|
||||
e.intelligence = static_cast<int32_t>(atoi(row[13]));
|
||||
e.wisdom = static_cast<int32_t>(atoi(row[14]));
|
||||
e.charisma = static_cast<int32_t>(atoi(row[15]));
|
||||
e.magic_resist = static_cast<int32_t>(atoi(row[16]));
|
||||
e.cold_resist = static_cast<int32_t>(atoi(row[17]));
|
||||
e.fire_resist = static_cast<int32_t>(atoi(row[18]));
|
||||
e.poison_resist = static_cast<int32_t>(atoi(row[19]));
|
||||
e.disease_resist = static_cast<int32_t>(atoi(row[20]));
|
||||
e.corruption_resist = static_cast<int32_t>(atoi(row[21]));
|
||||
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
||||
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
||||
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
||||
e.accuracy = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.slow_mitigation = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.attack = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.strength = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.stamina = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.dexterity = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.agility = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.intelligence = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.wisdom = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.charisma = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.magic_resist = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.cold_resist = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.fire_resist = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.poison_resist = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.disease_resist = row[20] ? static_cast<int32_t>(atoi(row[20])) : 0;
|
||||
e.corruption_resist = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.physical_resist = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.min_dmg = row[23] ? static_cast<int32_t>(atoi(row[23])) : 0;
|
||||
e.max_dmg = row[24] ? static_cast<int32_t>(atoi(row[24])) : 0;
|
||||
e.hp_regen_rate = row[25] ? strtoll(row[25], nullptr, 10) : 0;
|
||||
e.hp_regen_per_second = row[26] ? strtoll(row[26], nullptr, 10) : 0;
|
||||
e.attack_delay = static_cast<int32_t>(atoi(row[27]));
|
||||
e.spell_scale = static_cast<int32_t>(atoi(row[28]));
|
||||
e.heal_scale = static_cast<int32_t>(atoi(row[29]));
|
||||
e.attack_delay = row[27] ? static_cast<int32_t>(atoi(row[27])) : 0;
|
||||
e.spell_scale = row[28] ? static_cast<int32_t>(atoi(row[28])) : 100;
|
||||
e.heal_scale = row[29] ? static_cast<int32_t>(atoi(row[29])) : 100;
|
||||
e.avoidance = row[30] ? static_cast<uint32_t>(strtoul(row[30], nullptr, 10)) : 0;
|
||||
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[31]));
|
||||
e.heroic_strikethrough = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.special_abilities = row[32] ? row[32] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -548,38 +548,38 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcScaleGlobalBase e{};
|
||||
|
||||
e.type = static_cast<int32_t>(atoi(row[0]));
|
||||
e.level = static_cast<int32_t>(atoi(row[1]));
|
||||
e.type = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.level = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.zone_id_list = row[2] ? row[2] : "";
|
||||
e.instance_version_list = row[3] ? row[3] : "";
|
||||
e.ac = static_cast<int32_t>(atoi(row[4]));
|
||||
e.ac = row[4] ? static_cast<int32_t>(atoi(row[4])) : 0;
|
||||
e.hp = row[5] ? strtoll(row[5], nullptr, 10) : 0;
|
||||
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
||||
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
||||
e.attack = static_cast<int32_t>(atoi(row[8]));
|
||||
e.strength = static_cast<int32_t>(atoi(row[9]));
|
||||
e.stamina = static_cast<int32_t>(atoi(row[10]));
|
||||
e.dexterity = static_cast<int32_t>(atoi(row[11]));
|
||||
e.agility = static_cast<int32_t>(atoi(row[12]));
|
||||
e.intelligence = static_cast<int32_t>(atoi(row[13]));
|
||||
e.wisdom = static_cast<int32_t>(atoi(row[14]));
|
||||
e.charisma = static_cast<int32_t>(atoi(row[15]));
|
||||
e.magic_resist = static_cast<int32_t>(atoi(row[16]));
|
||||
e.cold_resist = static_cast<int32_t>(atoi(row[17]));
|
||||
e.fire_resist = static_cast<int32_t>(atoi(row[18]));
|
||||
e.poison_resist = static_cast<int32_t>(atoi(row[19]));
|
||||
e.disease_resist = static_cast<int32_t>(atoi(row[20]));
|
||||
e.corruption_resist = static_cast<int32_t>(atoi(row[21]));
|
||||
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
||||
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
||||
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
||||
e.accuracy = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.slow_mitigation = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.attack = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.strength = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.stamina = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.dexterity = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.agility = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.intelligence = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.wisdom = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.charisma = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.magic_resist = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.cold_resist = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.fire_resist = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.poison_resist = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.disease_resist = row[20] ? static_cast<int32_t>(atoi(row[20])) : 0;
|
||||
e.corruption_resist = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.physical_resist = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.min_dmg = row[23] ? static_cast<int32_t>(atoi(row[23])) : 0;
|
||||
e.max_dmg = row[24] ? static_cast<int32_t>(atoi(row[24])) : 0;
|
||||
e.hp_regen_rate = row[25] ? strtoll(row[25], nullptr, 10) : 0;
|
||||
e.hp_regen_per_second = row[26] ? strtoll(row[26], nullptr, 10) : 0;
|
||||
e.attack_delay = static_cast<int32_t>(atoi(row[27]));
|
||||
e.spell_scale = static_cast<int32_t>(atoi(row[28]));
|
||||
e.heal_scale = static_cast<int32_t>(atoi(row[29]));
|
||||
e.attack_delay = row[27] ? static_cast<int32_t>(atoi(row[27])) : 0;
|
||||
e.spell_scale = row[28] ? static_cast<int32_t>(atoi(row[28])) : 100;
|
||||
e.heal_scale = row[29] ? static_cast<int32_t>(atoi(row[29])) : 100;
|
||||
e.avoidance = row[30] ? static_cast<uint32_t>(strtoul(row[30], nullptr, 10)) : 0;
|
||||
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[31]));
|
||||
e.heroic_strikethrough = row[31] ? static_cast<int32_t>(atoi(row[31])) : 0;
|
||||
e.special_abilities = row[32] ? row[32] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -144,13 +144,13 @@ public:
|
||||
NpcSpellsEffectsEntries e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_effects_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.spell_effect_id = static_cast<int16_t>(atoi(row[2]));
|
||||
e.npc_spells_effects_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_effect_id = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.minlevel = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 255;
|
||||
e.se_base = static_cast<int32_t>(atoi(row[5]));
|
||||
e.se_limit = static_cast<int32_t>(atoi(row[6]));
|
||||
e.se_max = static_cast<int32_t>(atoi(row[7]));
|
||||
e.se_base = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.se_limit = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.se_max = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -291,13 +291,13 @@ public:
|
||||
NpcSpellsEffectsEntries e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_effects_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.spell_effect_id = static_cast<int16_t>(atoi(row[2]));
|
||||
e.npc_spells_effects_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_effect_id = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.minlevel = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 255;
|
||||
e.se_base = static_cast<int32_t>(atoi(row[5]));
|
||||
e.se_limit = static_cast<int32_t>(atoi(row[6]));
|
||||
e.se_max = static_cast<int32_t>(atoi(row[7]));
|
||||
e.se_base = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.se_limit = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.se_max = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -323,13 +323,13 @@ public:
|
||||
NpcSpellsEffectsEntries e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_effects_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.spell_effect_id = static_cast<int16_t>(atoi(row[2]));
|
||||
e.npc_spells_effects_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spell_effect_id = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.minlevel = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 255;
|
||||
e.se_base = static_cast<int32_t>(atoi(row[5]));
|
||||
e.se_limit = static_cast<int32_t>(atoi(row[6]));
|
||||
e.se_max = static_cast<int32_t>(atoi(row[7]));
|
||||
e.se_base = row[5] ? static_cast<int32_t>(atoi(row[5])) : 0;
|
||||
e.se_limit = row[6] ? static_cast<int32_t>(atoi(row[6])) : 0;
|
||||
e.se_max = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -160,17 +160,17 @@ public:
|
||||
NpcSpellsEntries e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spellid = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
e.manacost = static_cast<int16_t>(atoi(row[6]));
|
||||
e.recast_delay = static_cast<int32_t>(atoi(row[7]));
|
||||
e.priority = static_cast<int16_t>(atoi(row[8]));
|
||||
e.resist_adjust = static_cast<int32_t>(atoi(row[9]));
|
||||
e.min_hp = static_cast<int16_t>(atoi(row[10]));
|
||||
e.max_hp = static_cast<int16_t>(atoi(row[11]));
|
||||
e.manacost = row[6] ? static_cast<int16_t>(atoi(row[6])) : -1;
|
||||
e.recast_delay = row[7] ? static_cast<int32_t>(atoi(row[7])) : -1;
|
||||
e.priority = row[8] ? static_cast<int16_t>(atoi(row[8])) : 0;
|
||||
e.resist_adjust = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.min_hp = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.max_hp = row[11] ? static_cast<int16_t>(atoi(row[11])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -323,17 +323,17 @@ public:
|
||||
NpcSpellsEntries e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spellid = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
e.manacost = static_cast<int16_t>(atoi(row[6]));
|
||||
e.recast_delay = static_cast<int32_t>(atoi(row[7]));
|
||||
e.priority = static_cast<int16_t>(atoi(row[8]));
|
||||
e.resist_adjust = static_cast<int32_t>(atoi(row[9]));
|
||||
e.min_hp = static_cast<int16_t>(atoi(row[10]));
|
||||
e.max_hp = static_cast<int16_t>(atoi(row[11]));
|
||||
e.manacost = row[6] ? static_cast<int16_t>(atoi(row[6])) : -1;
|
||||
e.recast_delay = row[7] ? static_cast<int32_t>(atoi(row[7])) : -1;
|
||||
e.priority = row[8] ? static_cast<int16_t>(atoi(row[8])) : 0;
|
||||
e.resist_adjust = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.min_hp = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.max_hp = row[11] ? static_cast<int16_t>(atoi(row[11])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -359,17 +359,17 @@ public:
|
||||
NpcSpellsEntries e{};
|
||||
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = static_cast<int32_t>(atoi(row[1]));
|
||||
e.npc_spells_id = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.spellid = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.type = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.minlevel = row[4] ? static_cast<uint8_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.maxlevel = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 255;
|
||||
e.manacost = static_cast<int16_t>(atoi(row[6]));
|
||||
e.recast_delay = static_cast<int32_t>(atoi(row[7]));
|
||||
e.priority = static_cast<int16_t>(atoi(row[8]));
|
||||
e.resist_adjust = static_cast<int32_t>(atoi(row[9]));
|
||||
e.min_hp = static_cast<int16_t>(atoi(row[10]));
|
||||
e.max_hp = static_cast<int16_t>(atoi(row[11]));
|
||||
e.manacost = row[6] ? static_cast<int16_t>(atoi(row[6])) : -1;
|
||||
e.recast_delay = row[7] ? static_cast<int32_t>(atoi(row[7])) : -1;
|
||||
e.priority = row[8] ? static_cast<int16_t>(atoi(row[8])) : 0;
|
||||
e.resist_adjust = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.min_hp = row[10] ? static_cast<int16_t>(atoi(row[10])) : 0;
|
||||
e.max_hp = row[11] ? static_cast<int16_t>(atoi(row[11])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -198,12 +198,12 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.parent_list = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.attack_proc = static_cast<int16_t>(atoi(row[3]));
|
||||
e.proc_chance = static_cast<int8_t>(atoi(row[4]));
|
||||
e.range_proc = static_cast<int16_t>(atoi(row[5]));
|
||||
e.rproc_chance = static_cast<int16_t>(atoi(row[6]));
|
||||
e.defensive_proc = static_cast<int16_t>(atoi(row[7]));
|
||||
e.dproc_chance = static_cast<int16_t>(atoi(row[8]));
|
||||
e.attack_proc = row[3] ? static_cast<int16_t>(atoi(row[3])) : -1;
|
||||
e.proc_chance = row[4] ? static_cast<int8_t>(atoi(row[4])) : 3;
|
||||
e.range_proc = row[5] ? static_cast<int16_t>(atoi(row[5])) : -1;
|
||||
e.rproc_chance = row[6] ? static_cast<int16_t>(atoi(row[6])) : 0;
|
||||
e.defensive_proc = row[7] ? static_cast<int16_t>(atoi(row[7])) : -1;
|
||||
e.dproc_chance = row[8] ? static_cast<int16_t>(atoi(row[8])) : 0;
|
||||
e.fail_recast = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.engaged_no_sp_recast_min = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.engaged_no_sp_recast_max = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
@ -397,12 +397,12 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.parent_list = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.attack_proc = static_cast<int16_t>(atoi(row[3]));
|
||||
e.proc_chance = static_cast<int8_t>(atoi(row[4]));
|
||||
e.range_proc = static_cast<int16_t>(atoi(row[5]));
|
||||
e.rproc_chance = static_cast<int16_t>(atoi(row[6]));
|
||||
e.defensive_proc = static_cast<int16_t>(atoi(row[7]));
|
||||
e.dproc_chance = static_cast<int16_t>(atoi(row[8]));
|
||||
e.attack_proc = row[3] ? static_cast<int16_t>(atoi(row[3])) : -1;
|
||||
e.proc_chance = row[4] ? static_cast<int8_t>(atoi(row[4])) : 3;
|
||||
e.range_proc = row[5] ? static_cast<int16_t>(atoi(row[5])) : -1;
|
||||
e.rproc_chance = row[6] ? static_cast<int16_t>(atoi(row[6])) : 0;
|
||||
e.defensive_proc = row[7] ? static_cast<int16_t>(atoi(row[7])) : -1;
|
||||
e.dproc_chance = row[8] ? static_cast<int16_t>(atoi(row[8])) : 0;
|
||||
e.fail_recast = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.engaged_no_sp_recast_min = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.engaged_no_sp_recast_max = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
@ -442,12 +442,12 @@ public:
|
||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.parent_list = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.attack_proc = static_cast<int16_t>(atoi(row[3]));
|
||||
e.proc_chance = static_cast<int8_t>(atoi(row[4]));
|
||||
e.range_proc = static_cast<int16_t>(atoi(row[5]));
|
||||
e.rproc_chance = static_cast<int16_t>(atoi(row[6]));
|
||||
e.defensive_proc = static_cast<int16_t>(atoi(row[7]));
|
||||
e.dproc_chance = static_cast<int16_t>(atoi(row[8]));
|
||||
e.attack_proc = row[3] ? static_cast<int16_t>(atoi(row[3])) : -1;
|
||||
e.proc_chance = row[4] ? static_cast<int8_t>(atoi(row[4])) : 3;
|
||||
e.range_proc = row[5] ? static_cast<int16_t>(atoi(row[5])) : -1;
|
||||
e.rproc_chance = row[6] ? static_cast<int16_t>(atoi(row[6])) : 0;
|
||||
e.defensive_proc = row[7] ? static_cast<int16_t>(atoi(row[7])) : -1;
|
||||
e.dproc_chance = row[8] ? static_cast<int16_t>(atoi(row[8])) : 0;
|
||||
e.fail_recast = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.engaged_no_sp_recast_min = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.engaged_no_sp_recast_max = row[11] ? static_cast<uint32_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
|
||||
@ -619,19 +619,19 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
NpcTypes e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.lastname = row[2] ? row[2] : "";
|
||||
e.level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.race = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.class_ = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.bodytype = static_cast<int32_t>(atoi(row[6]));
|
||||
e.bodytype = row[6] ? static_cast<int32_t>(atoi(row[6])) : 1;
|
||||
e.hp = row[7] ? strtoll(row[7], nullptr, 10) : 0;
|
||||
e.mana = row[8] ? strtoll(row[8], nullptr, 10) : 0;
|
||||
e.gender = row[9] ? static_cast<uint8_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.texture = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.helmtexture = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.herosforgemodel = static_cast<int32_t>(atoi(row[12]));
|
||||
e.herosforgemodel = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.size = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.hp_regen_rate = row[14] ? strtoll(row[14], nullptr, 10) : 0;
|
||||
e.hp_regen_per_second = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
@ -641,12 +641,12 @@ public:
|
||||
e.alt_currency_id = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[20] ? static_cast<uint32_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.npc_spells_effects_id = row[21] ? static_cast<uint32_t>(strtoul(row[21], nullptr, 10)) : 0;
|
||||
e.npc_faction_id = static_cast<int32_t>(atoi(row[22]));
|
||||
e.npc_faction_id = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.adventure_template_id = row[23] ? static_cast<uint32_t>(strtoul(row[23], nullptr, 10)) : 0;
|
||||
e.trap_template = row[24] ? static_cast<uint32_t>(strtoul(row[24], nullptr, 10)) : 0;
|
||||
e.mindmg = row[25] ? static_cast<uint32_t>(strtoul(row[25], nullptr, 10)) : 0;
|
||||
e.maxdmg = row[26] ? static_cast<uint32_t>(strtoul(row[26], nullptr, 10)) : 0;
|
||||
e.attack_count = static_cast<int16_t>(atoi(row[27]));
|
||||
e.attack_count = row[27] ? static_cast<int16_t>(atoi(row[27])) : -1;
|
||||
e.npcspecialattks = row[28] ? row[28] : "";
|
||||
e.special_abilities = row[29] ? row[29] : "";
|
||||
e.aggroradius = row[30] ? static_cast<uint32_t>(strtoul(row[30], nullptr, 10)) : 0;
|
||||
@ -658,36 +658,36 @@ public:
|
||||
e.luclin_eyecolor2 = row[36] ? static_cast<uint32_t>(strtoul(row[36], nullptr, 10)) : 1;
|
||||
e.luclin_beardcolor = row[37] ? static_cast<uint32_t>(strtoul(row[37], nullptr, 10)) : 1;
|
||||
e.luclin_beard = row[38] ? static_cast<uint32_t>(strtoul(row[38], nullptr, 10)) : 0;
|
||||
e.drakkin_heritage = static_cast<int32_t>(atoi(row[39]));
|
||||
e.drakkin_tattoo = static_cast<int32_t>(atoi(row[40]));
|
||||
e.drakkin_details = static_cast<int32_t>(atoi(row[41]));
|
||||
e.drakkin_heritage = row[39] ? static_cast<int32_t>(atoi(row[39])) : 0;
|
||||
e.drakkin_tattoo = row[40] ? static_cast<int32_t>(atoi(row[40])) : 0;
|
||||
e.drakkin_details = row[41] ? static_cast<int32_t>(atoi(row[41])) : 0;
|
||||
e.armortint_id = row[42] ? static_cast<uint32_t>(strtoul(row[42], nullptr, 10)) : 0;
|
||||
e.armortint_red = row[43] ? static_cast<uint8_t>(strtoul(row[43], nullptr, 10)) : 0;
|
||||
e.armortint_green = row[44] ? static_cast<uint8_t>(strtoul(row[44], nullptr, 10)) : 0;
|
||||
e.armortint_blue = row[45] ? static_cast<uint8_t>(strtoul(row[45], nullptr, 10)) : 0;
|
||||
e.d_melee_texture1 = row[46] ? static_cast<uint32_t>(strtoul(row[46], nullptr, 10)) : 0;
|
||||
e.d_melee_texture2 = row[47] ? static_cast<uint32_t>(strtoul(row[47], nullptr, 10)) : 0;
|
||||
e.ammo_idfile = row[48] ? row[48] : "";
|
||||
e.ammo_idfile = row[48] ? row[48] : "IT10";
|
||||
e.prim_melee_type = row[49] ? static_cast<uint8_t>(strtoul(row[49], nullptr, 10)) : 28;
|
||||
e.sec_melee_type = row[50] ? static_cast<uint8_t>(strtoul(row[50], nullptr, 10)) : 28;
|
||||
e.ranged_type = row[51] ? static_cast<uint8_t>(strtoul(row[51], nullptr, 10)) : 7;
|
||||
e.runspeed = row[52] ? strtof(row[52], nullptr) : 0;
|
||||
e.MR = static_cast<int16_t>(atoi(row[53]));
|
||||
e.CR = static_cast<int16_t>(atoi(row[54]));
|
||||
e.DR = static_cast<int16_t>(atoi(row[55]));
|
||||
e.FR = static_cast<int16_t>(atoi(row[56]));
|
||||
e.PR = static_cast<int16_t>(atoi(row[57]));
|
||||
e.Corrup = static_cast<int16_t>(atoi(row[58]));
|
||||
e.MR = row[53] ? static_cast<int16_t>(atoi(row[53])) : 0;
|
||||
e.CR = row[54] ? static_cast<int16_t>(atoi(row[54])) : 0;
|
||||
e.DR = row[55] ? static_cast<int16_t>(atoi(row[55])) : 0;
|
||||
e.FR = row[56] ? static_cast<int16_t>(atoi(row[56])) : 0;
|
||||
e.PR = row[57] ? static_cast<int16_t>(atoi(row[57])) : 0;
|
||||
e.Corrup = row[58] ? static_cast<int16_t>(atoi(row[58])) : 0;
|
||||
e.PhR = row[59] ? static_cast<uint16_t>(strtoul(row[59], nullptr, 10)) : 0;
|
||||
e.see_invis = static_cast<int16_t>(atoi(row[60]));
|
||||
e.see_invis_undead = static_cast<int16_t>(atoi(row[61]));
|
||||
e.see_invis = row[60] ? static_cast<int16_t>(atoi(row[60])) : 0;
|
||||
e.see_invis_undead = row[61] ? static_cast<int16_t>(atoi(row[61])) : 0;
|
||||
e.qglobal = row[62] ? static_cast<uint32_t>(strtoul(row[62], nullptr, 10)) : 0;
|
||||
e.AC = static_cast<int16_t>(atoi(row[63]));
|
||||
e.npc_aggro = static_cast<int8_t>(atoi(row[64]));
|
||||
e.spawn_limit = static_cast<int8_t>(atoi(row[65]));
|
||||
e.AC = row[63] ? static_cast<int16_t>(atoi(row[63])) : 0;
|
||||
e.npc_aggro = row[64] ? static_cast<int8_t>(atoi(row[64])) : 0;
|
||||
e.spawn_limit = row[65] ? static_cast<int8_t>(atoi(row[65])) : 0;
|
||||
e.attack_speed = row[66] ? strtof(row[66], nullptr) : 0;
|
||||
e.attack_delay = row[67] ? static_cast<uint8_t>(strtoul(row[67], nullptr, 10)) : 30;
|
||||
e.findable = static_cast<int8_t>(atoi(row[68]));
|
||||
e.findable = row[68] ? static_cast<int8_t>(atoi(row[68])) : 0;
|
||||
e.STR = row[69] ? static_cast<uint32_t>(strtoul(row[69], nullptr, 10)) : 75;
|
||||
e.STA = row[70] ? static_cast<uint32_t>(strtoul(row[70], nullptr, 10)) : 75;
|
||||
e.DEX = row[71] ? static_cast<uint32_t>(strtoul(row[71], nullptr, 10)) : 75;
|
||||
@ -695,56 +695,56 @@ public:
|
||||
e._INT = row[73] ? static_cast<uint32_t>(strtoul(row[73], nullptr, 10)) : 80;
|
||||
e.WIS = row[74] ? static_cast<uint32_t>(strtoul(row[74], nullptr, 10)) : 75;
|
||||
e.CHA = row[75] ? static_cast<uint32_t>(strtoul(row[75], nullptr, 10)) : 75;
|
||||
e.see_hide = static_cast<int8_t>(atoi(row[76]));
|
||||
e.see_improved_hide = static_cast<int8_t>(atoi(row[77]));
|
||||
e.trackable = static_cast<int8_t>(atoi(row[78]));
|
||||
e.isbot = static_cast<int8_t>(atoi(row[79]));
|
||||
e.exclude = static_cast<int8_t>(atoi(row[80]));
|
||||
e.ATK = static_cast<int32_t>(atoi(row[81]));
|
||||
e.Accuracy = static_cast<int32_t>(atoi(row[82]));
|
||||
e.see_hide = row[76] ? static_cast<int8_t>(atoi(row[76])) : 0;
|
||||
e.see_improved_hide = row[77] ? static_cast<int8_t>(atoi(row[77])) : 0;
|
||||
e.trackable = row[78] ? static_cast<int8_t>(atoi(row[78])) : 1;
|
||||
e.isbot = row[79] ? static_cast<int8_t>(atoi(row[79])) : 0;
|
||||
e.exclude = row[80] ? static_cast<int8_t>(atoi(row[80])) : 1;
|
||||
e.ATK = row[81] ? static_cast<int32_t>(atoi(row[81])) : 0;
|
||||
e.Accuracy = row[82] ? static_cast<int32_t>(atoi(row[82])) : 0;
|
||||
e.Avoidance = row[83] ? static_cast<uint32_t>(strtoul(row[83], nullptr, 10)) : 0;
|
||||
e.slow_mitigation = static_cast<int16_t>(atoi(row[84]));
|
||||
e.slow_mitigation = row[84] ? static_cast<int16_t>(atoi(row[84])) : 0;
|
||||
e.version = row[85] ? static_cast<uint16_t>(strtoul(row[85], nullptr, 10)) : 0;
|
||||
e.maxlevel = static_cast<int8_t>(atoi(row[86]));
|
||||
e.scalerate = static_cast<int32_t>(atoi(row[87]));
|
||||
e.maxlevel = row[86] ? static_cast<int8_t>(atoi(row[86])) : 0;
|
||||
e.scalerate = row[87] ? static_cast<int32_t>(atoi(row[87])) : 100;
|
||||
e.private_corpse = row[88] ? static_cast<uint8_t>(strtoul(row[88], nullptr, 10)) : 0;
|
||||
e.unique_spawn_by_name = row[89] ? static_cast<uint8_t>(strtoul(row[89], nullptr, 10)) : 0;
|
||||
e.underwater = row[90] ? static_cast<uint8_t>(strtoul(row[90], nullptr, 10)) : 0;
|
||||
e.isquest = static_cast<int8_t>(atoi(row[91]));
|
||||
e.isquest = row[91] ? static_cast<int8_t>(atoi(row[91])) : 0;
|
||||
e.emoteid = row[92] ? static_cast<uint32_t>(strtoul(row[92], nullptr, 10)) : 0;
|
||||
e.spellscale = row[93] ? strtof(row[93], nullptr) : 100;
|
||||
e.healscale = row[94] ? strtof(row[94], nullptr) : 100;
|
||||
e.no_target_hotkey = row[95] ? static_cast<uint8_t>(strtoul(row[95], nullptr, 10)) : 0;
|
||||
e.raid_target = row[96] ? static_cast<uint8_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.armtexture = static_cast<int8_t>(atoi(row[97]));
|
||||
e.bracertexture = static_cast<int8_t>(atoi(row[98]));
|
||||
e.handtexture = static_cast<int8_t>(atoi(row[99]));
|
||||
e.legtexture = static_cast<int8_t>(atoi(row[100]));
|
||||
e.feettexture = static_cast<int8_t>(atoi(row[101]));
|
||||
e.light = static_cast<int8_t>(atoi(row[102]));
|
||||
e.walkspeed = static_cast<int8_t>(atoi(row[103]));
|
||||
e.peqid = static_cast<int32_t>(atoi(row[104]));
|
||||
e.unique_ = static_cast<int8_t>(atoi(row[105]));
|
||||
e.fixed = static_cast<int8_t>(atoi(row[106]));
|
||||
e.ignore_despawn = static_cast<int8_t>(atoi(row[107]));
|
||||
e.show_name = static_cast<int8_t>(atoi(row[108]));
|
||||
e.untargetable = static_cast<int8_t>(atoi(row[109]));
|
||||
e.charm_ac = static_cast<int16_t>(atoi(row[110]));
|
||||
e.charm_min_dmg = static_cast<int32_t>(atoi(row[111]));
|
||||
e.charm_max_dmg = static_cast<int32_t>(atoi(row[112]));
|
||||
e.charm_attack_delay = static_cast<int8_t>(atoi(row[113]));
|
||||
e.charm_accuracy_rating = static_cast<int32_t>(atoi(row[114]));
|
||||
e.charm_avoidance_rating = static_cast<int32_t>(atoi(row[115]));
|
||||
e.charm_atk = static_cast<int32_t>(atoi(row[116]));
|
||||
e.skip_global_loot = static_cast<int8_t>(atoi(row[117]));
|
||||
e.rare_spawn = static_cast<int8_t>(atoi(row[118]));
|
||||
e.stuck_behavior = static_cast<int8_t>(atoi(row[119]));
|
||||
e.model = static_cast<int16_t>(atoi(row[120]));
|
||||
e.flymode = static_cast<int8_t>(atoi(row[121]));
|
||||
e.always_aggro = static_cast<int8_t>(atoi(row[122]));
|
||||
e.exp_mod = static_cast<int32_t>(atoi(row[123]));
|
||||
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[124]));
|
||||
e.faction_amount = static_cast<int32_t>(atoi(row[125]));
|
||||
e.armtexture = row[97] ? static_cast<int8_t>(atoi(row[97])) : 0;
|
||||
e.bracertexture = row[98] ? static_cast<int8_t>(atoi(row[98])) : 0;
|
||||
e.handtexture = row[99] ? static_cast<int8_t>(atoi(row[99])) : 0;
|
||||
e.legtexture = row[100] ? static_cast<int8_t>(atoi(row[100])) : 0;
|
||||
e.feettexture = row[101] ? static_cast<int8_t>(atoi(row[101])) : 0;
|
||||
e.light = row[102] ? static_cast<int8_t>(atoi(row[102])) : 0;
|
||||
e.walkspeed = row[103] ? static_cast<int8_t>(atoi(row[103])) : 0;
|
||||
e.peqid = row[104] ? static_cast<int32_t>(atoi(row[104])) : 0;
|
||||
e.unique_ = row[105] ? static_cast<int8_t>(atoi(row[105])) : 0;
|
||||
e.fixed = row[106] ? static_cast<int8_t>(atoi(row[106])) : 0;
|
||||
e.ignore_despawn = row[107] ? static_cast<int8_t>(atoi(row[107])) : 0;
|
||||
e.show_name = row[108] ? static_cast<int8_t>(atoi(row[108])) : 1;
|
||||
e.untargetable = row[109] ? static_cast<int8_t>(atoi(row[109])) : 0;
|
||||
e.charm_ac = row[110] ? static_cast<int16_t>(atoi(row[110])) : 0;
|
||||
e.charm_min_dmg = row[111] ? static_cast<int32_t>(atoi(row[111])) : 0;
|
||||
e.charm_max_dmg = row[112] ? static_cast<int32_t>(atoi(row[112])) : 0;
|
||||
e.charm_attack_delay = row[113] ? static_cast<int8_t>(atoi(row[113])) : 0;
|
||||
e.charm_accuracy_rating = row[114] ? static_cast<int32_t>(atoi(row[114])) : 0;
|
||||
e.charm_avoidance_rating = row[115] ? static_cast<int32_t>(atoi(row[115])) : 0;
|
||||
e.charm_atk = row[116] ? static_cast<int32_t>(atoi(row[116])) : 0;
|
||||
e.skip_global_loot = row[117] ? static_cast<int8_t>(atoi(row[117])) : 0;
|
||||
e.rare_spawn = row[118] ? static_cast<int8_t>(atoi(row[118])) : 0;
|
||||
e.stuck_behavior = row[119] ? static_cast<int8_t>(atoi(row[119])) : 0;
|
||||
e.model = row[120] ? static_cast<int16_t>(atoi(row[120])) : 0;
|
||||
e.flymode = row[121] ? static_cast<int8_t>(atoi(row[121])) : -1;
|
||||
e.always_aggro = row[122] ? static_cast<int8_t>(atoi(row[122])) : 0;
|
||||
e.exp_mod = row[123] ? static_cast<int32_t>(atoi(row[123])) : 100;
|
||||
e.heroic_strikethrough = row[124] ? static_cast<int32_t>(atoi(row[124])) : 0;
|
||||
e.faction_amount = row[125] ? static_cast<int32_t>(atoi(row[125])) : 0;
|
||||
e.keeps_sold_items = row[126] ? static_cast<uint8_t>(strtoul(row[126], nullptr, 10)) : 1;
|
||||
|
||||
return e;
|
||||
@ -1242,19 +1242,19 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcTypes e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.lastname = row[2] ? row[2] : "";
|
||||
e.level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.race = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.class_ = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.bodytype = static_cast<int32_t>(atoi(row[6]));
|
||||
e.bodytype = row[6] ? static_cast<int32_t>(atoi(row[6])) : 1;
|
||||
e.hp = row[7] ? strtoll(row[7], nullptr, 10) : 0;
|
||||
e.mana = row[8] ? strtoll(row[8], nullptr, 10) : 0;
|
||||
e.gender = row[9] ? static_cast<uint8_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.texture = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.helmtexture = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.herosforgemodel = static_cast<int32_t>(atoi(row[12]));
|
||||
e.herosforgemodel = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.size = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.hp_regen_rate = row[14] ? strtoll(row[14], nullptr, 10) : 0;
|
||||
e.hp_regen_per_second = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
@ -1264,12 +1264,12 @@ public:
|
||||
e.alt_currency_id = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[20] ? static_cast<uint32_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.npc_spells_effects_id = row[21] ? static_cast<uint32_t>(strtoul(row[21], nullptr, 10)) : 0;
|
||||
e.npc_faction_id = static_cast<int32_t>(atoi(row[22]));
|
||||
e.npc_faction_id = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.adventure_template_id = row[23] ? static_cast<uint32_t>(strtoul(row[23], nullptr, 10)) : 0;
|
||||
e.trap_template = row[24] ? static_cast<uint32_t>(strtoul(row[24], nullptr, 10)) : 0;
|
||||
e.mindmg = row[25] ? static_cast<uint32_t>(strtoul(row[25], nullptr, 10)) : 0;
|
||||
e.maxdmg = row[26] ? static_cast<uint32_t>(strtoul(row[26], nullptr, 10)) : 0;
|
||||
e.attack_count = static_cast<int16_t>(atoi(row[27]));
|
||||
e.attack_count = row[27] ? static_cast<int16_t>(atoi(row[27])) : -1;
|
||||
e.npcspecialattks = row[28] ? row[28] : "";
|
||||
e.special_abilities = row[29] ? row[29] : "";
|
||||
e.aggroradius = row[30] ? static_cast<uint32_t>(strtoul(row[30], nullptr, 10)) : 0;
|
||||
@ -1281,36 +1281,36 @@ public:
|
||||
e.luclin_eyecolor2 = row[36] ? static_cast<uint32_t>(strtoul(row[36], nullptr, 10)) : 1;
|
||||
e.luclin_beardcolor = row[37] ? static_cast<uint32_t>(strtoul(row[37], nullptr, 10)) : 1;
|
||||
e.luclin_beard = row[38] ? static_cast<uint32_t>(strtoul(row[38], nullptr, 10)) : 0;
|
||||
e.drakkin_heritage = static_cast<int32_t>(atoi(row[39]));
|
||||
e.drakkin_tattoo = static_cast<int32_t>(atoi(row[40]));
|
||||
e.drakkin_details = static_cast<int32_t>(atoi(row[41]));
|
||||
e.drakkin_heritage = row[39] ? static_cast<int32_t>(atoi(row[39])) : 0;
|
||||
e.drakkin_tattoo = row[40] ? static_cast<int32_t>(atoi(row[40])) : 0;
|
||||
e.drakkin_details = row[41] ? static_cast<int32_t>(atoi(row[41])) : 0;
|
||||
e.armortint_id = row[42] ? static_cast<uint32_t>(strtoul(row[42], nullptr, 10)) : 0;
|
||||
e.armortint_red = row[43] ? static_cast<uint8_t>(strtoul(row[43], nullptr, 10)) : 0;
|
||||
e.armortint_green = row[44] ? static_cast<uint8_t>(strtoul(row[44], nullptr, 10)) : 0;
|
||||
e.armortint_blue = row[45] ? static_cast<uint8_t>(strtoul(row[45], nullptr, 10)) : 0;
|
||||
e.d_melee_texture1 = row[46] ? static_cast<uint32_t>(strtoul(row[46], nullptr, 10)) : 0;
|
||||
e.d_melee_texture2 = row[47] ? static_cast<uint32_t>(strtoul(row[47], nullptr, 10)) : 0;
|
||||
e.ammo_idfile = row[48] ? row[48] : "";
|
||||
e.ammo_idfile = row[48] ? row[48] : "IT10";
|
||||
e.prim_melee_type = row[49] ? static_cast<uint8_t>(strtoul(row[49], nullptr, 10)) : 28;
|
||||
e.sec_melee_type = row[50] ? static_cast<uint8_t>(strtoul(row[50], nullptr, 10)) : 28;
|
||||
e.ranged_type = row[51] ? static_cast<uint8_t>(strtoul(row[51], nullptr, 10)) : 7;
|
||||
e.runspeed = row[52] ? strtof(row[52], nullptr) : 0;
|
||||
e.MR = static_cast<int16_t>(atoi(row[53]));
|
||||
e.CR = static_cast<int16_t>(atoi(row[54]));
|
||||
e.DR = static_cast<int16_t>(atoi(row[55]));
|
||||
e.FR = static_cast<int16_t>(atoi(row[56]));
|
||||
e.PR = static_cast<int16_t>(atoi(row[57]));
|
||||
e.Corrup = static_cast<int16_t>(atoi(row[58]));
|
||||
e.MR = row[53] ? static_cast<int16_t>(atoi(row[53])) : 0;
|
||||
e.CR = row[54] ? static_cast<int16_t>(atoi(row[54])) : 0;
|
||||
e.DR = row[55] ? static_cast<int16_t>(atoi(row[55])) : 0;
|
||||
e.FR = row[56] ? static_cast<int16_t>(atoi(row[56])) : 0;
|
||||
e.PR = row[57] ? static_cast<int16_t>(atoi(row[57])) : 0;
|
||||
e.Corrup = row[58] ? static_cast<int16_t>(atoi(row[58])) : 0;
|
||||
e.PhR = row[59] ? static_cast<uint16_t>(strtoul(row[59], nullptr, 10)) : 0;
|
||||
e.see_invis = static_cast<int16_t>(atoi(row[60]));
|
||||
e.see_invis_undead = static_cast<int16_t>(atoi(row[61]));
|
||||
e.see_invis = row[60] ? static_cast<int16_t>(atoi(row[60])) : 0;
|
||||
e.see_invis_undead = row[61] ? static_cast<int16_t>(atoi(row[61])) : 0;
|
||||
e.qglobal = row[62] ? static_cast<uint32_t>(strtoul(row[62], nullptr, 10)) : 0;
|
||||
e.AC = static_cast<int16_t>(atoi(row[63]));
|
||||
e.npc_aggro = static_cast<int8_t>(atoi(row[64]));
|
||||
e.spawn_limit = static_cast<int8_t>(atoi(row[65]));
|
||||
e.AC = row[63] ? static_cast<int16_t>(atoi(row[63])) : 0;
|
||||
e.npc_aggro = row[64] ? static_cast<int8_t>(atoi(row[64])) : 0;
|
||||
e.spawn_limit = row[65] ? static_cast<int8_t>(atoi(row[65])) : 0;
|
||||
e.attack_speed = row[66] ? strtof(row[66], nullptr) : 0;
|
||||
e.attack_delay = row[67] ? static_cast<uint8_t>(strtoul(row[67], nullptr, 10)) : 30;
|
||||
e.findable = static_cast<int8_t>(atoi(row[68]));
|
||||
e.findable = row[68] ? static_cast<int8_t>(atoi(row[68])) : 0;
|
||||
e.STR = row[69] ? static_cast<uint32_t>(strtoul(row[69], nullptr, 10)) : 75;
|
||||
e.STA = row[70] ? static_cast<uint32_t>(strtoul(row[70], nullptr, 10)) : 75;
|
||||
e.DEX = row[71] ? static_cast<uint32_t>(strtoul(row[71], nullptr, 10)) : 75;
|
||||
@ -1318,56 +1318,56 @@ public:
|
||||
e._INT = row[73] ? static_cast<uint32_t>(strtoul(row[73], nullptr, 10)) : 80;
|
||||
e.WIS = row[74] ? static_cast<uint32_t>(strtoul(row[74], nullptr, 10)) : 75;
|
||||
e.CHA = row[75] ? static_cast<uint32_t>(strtoul(row[75], nullptr, 10)) : 75;
|
||||
e.see_hide = static_cast<int8_t>(atoi(row[76]));
|
||||
e.see_improved_hide = static_cast<int8_t>(atoi(row[77]));
|
||||
e.trackable = static_cast<int8_t>(atoi(row[78]));
|
||||
e.isbot = static_cast<int8_t>(atoi(row[79]));
|
||||
e.exclude = static_cast<int8_t>(atoi(row[80]));
|
||||
e.ATK = static_cast<int32_t>(atoi(row[81]));
|
||||
e.Accuracy = static_cast<int32_t>(atoi(row[82]));
|
||||
e.see_hide = row[76] ? static_cast<int8_t>(atoi(row[76])) : 0;
|
||||
e.see_improved_hide = row[77] ? static_cast<int8_t>(atoi(row[77])) : 0;
|
||||
e.trackable = row[78] ? static_cast<int8_t>(atoi(row[78])) : 1;
|
||||
e.isbot = row[79] ? static_cast<int8_t>(atoi(row[79])) : 0;
|
||||
e.exclude = row[80] ? static_cast<int8_t>(atoi(row[80])) : 1;
|
||||
e.ATK = row[81] ? static_cast<int32_t>(atoi(row[81])) : 0;
|
||||
e.Accuracy = row[82] ? static_cast<int32_t>(atoi(row[82])) : 0;
|
||||
e.Avoidance = row[83] ? static_cast<uint32_t>(strtoul(row[83], nullptr, 10)) : 0;
|
||||
e.slow_mitigation = static_cast<int16_t>(atoi(row[84]));
|
||||
e.slow_mitigation = row[84] ? static_cast<int16_t>(atoi(row[84])) : 0;
|
||||
e.version = row[85] ? static_cast<uint16_t>(strtoul(row[85], nullptr, 10)) : 0;
|
||||
e.maxlevel = static_cast<int8_t>(atoi(row[86]));
|
||||
e.scalerate = static_cast<int32_t>(atoi(row[87]));
|
||||
e.maxlevel = row[86] ? static_cast<int8_t>(atoi(row[86])) : 0;
|
||||
e.scalerate = row[87] ? static_cast<int32_t>(atoi(row[87])) : 100;
|
||||
e.private_corpse = row[88] ? static_cast<uint8_t>(strtoul(row[88], nullptr, 10)) : 0;
|
||||
e.unique_spawn_by_name = row[89] ? static_cast<uint8_t>(strtoul(row[89], nullptr, 10)) : 0;
|
||||
e.underwater = row[90] ? static_cast<uint8_t>(strtoul(row[90], nullptr, 10)) : 0;
|
||||
e.isquest = static_cast<int8_t>(atoi(row[91]));
|
||||
e.isquest = row[91] ? static_cast<int8_t>(atoi(row[91])) : 0;
|
||||
e.emoteid = row[92] ? static_cast<uint32_t>(strtoul(row[92], nullptr, 10)) : 0;
|
||||
e.spellscale = row[93] ? strtof(row[93], nullptr) : 100;
|
||||
e.healscale = row[94] ? strtof(row[94], nullptr) : 100;
|
||||
e.no_target_hotkey = row[95] ? static_cast<uint8_t>(strtoul(row[95], nullptr, 10)) : 0;
|
||||
e.raid_target = row[96] ? static_cast<uint8_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.armtexture = static_cast<int8_t>(atoi(row[97]));
|
||||
e.bracertexture = static_cast<int8_t>(atoi(row[98]));
|
||||
e.handtexture = static_cast<int8_t>(atoi(row[99]));
|
||||
e.legtexture = static_cast<int8_t>(atoi(row[100]));
|
||||
e.feettexture = static_cast<int8_t>(atoi(row[101]));
|
||||
e.light = static_cast<int8_t>(atoi(row[102]));
|
||||
e.walkspeed = static_cast<int8_t>(atoi(row[103]));
|
||||
e.peqid = static_cast<int32_t>(atoi(row[104]));
|
||||
e.unique_ = static_cast<int8_t>(atoi(row[105]));
|
||||
e.fixed = static_cast<int8_t>(atoi(row[106]));
|
||||
e.ignore_despawn = static_cast<int8_t>(atoi(row[107]));
|
||||
e.show_name = static_cast<int8_t>(atoi(row[108]));
|
||||
e.untargetable = static_cast<int8_t>(atoi(row[109]));
|
||||
e.charm_ac = static_cast<int16_t>(atoi(row[110]));
|
||||
e.charm_min_dmg = static_cast<int32_t>(atoi(row[111]));
|
||||
e.charm_max_dmg = static_cast<int32_t>(atoi(row[112]));
|
||||
e.charm_attack_delay = static_cast<int8_t>(atoi(row[113]));
|
||||
e.charm_accuracy_rating = static_cast<int32_t>(atoi(row[114]));
|
||||
e.charm_avoidance_rating = static_cast<int32_t>(atoi(row[115]));
|
||||
e.charm_atk = static_cast<int32_t>(atoi(row[116]));
|
||||
e.skip_global_loot = static_cast<int8_t>(atoi(row[117]));
|
||||
e.rare_spawn = static_cast<int8_t>(atoi(row[118]));
|
||||
e.stuck_behavior = static_cast<int8_t>(atoi(row[119]));
|
||||
e.model = static_cast<int16_t>(atoi(row[120]));
|
||||
e.flymode = static_cast<int8_t>(atoi(row[121]));
|
||||
e.always_aggro = static_cast<int8_t>(atoi(row[122]));
|
||||
e.exp_mod = static_cast<int32_t>(atoi(row[123]));
|
||||
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[124]));
|
||||
e.faction_amount = static_cast<int32_t>(atoi(row[125]));
|
||||
e.armtexture = row[97] ? static_cast<int8_t>(atoi(row[97])) : 0;
|
||||
e.bracertexture = row[98] ? static_cast<int8_t>(atoi(row[98])) : 0;
|
||||
e.handtexture = row[99] ? static_cast<int8_t>(atoi(row[99])) : 0;
|
||||
e.legtexture = row[100] ? static_cast<int8_t>(atoi(row[100])) : 0;
|
||||
e.feettexture = row[101] ? static_cast<int8_t>(atoi(row[101])) : 0;
|
||||
e.light = row[102] ? static_cast<int8_t>(atoi(row[102])) : 0;
|
||||
e.walkspeed = row[103] ? static_cast<int8_t>(atoi(row[103])) : 0;
|
||||
e.peqid = row[104] ? static_cast<int32_t>(atoi(row[104])) : 0;
|
||||
e.unique_ = row[105] ? static_cast<int8_t>(atoi(row[105])) : 0;
|
||||
e.fixed = row[106] ? static_cast<int8_t>(atoi(row[106])) : 0;
|
||||
e.ignore_despawn = row[107] ? static_cast<int8_t>(atoi(row[107])) : 0;
|
||||
e.show_name = row[108] ? static_cast<int8_t>(atoi(row[108])) : 1;
|
||||
e.untargetable = row[109] ? static_cast<int8_t>(atoi(row[109])) : 0;
|
||||
e.charm_ac = row[110] ? static_cast<int16_t>(atoi(row[110])) : 0;
|
||||
e.charm_min_dmg = row[111] ? static_cast<int32_t>(atoi(row[111])) : 0;
|
||||
e.charm_max_dmg = row[112] ? static_cast<int32_t>(atoi(row[112])) : 0;
|
||||
e.charm_attack_delay = row[113] ? static_cast<int8_t>(atoi(row[113])) : 0;
|
||||
e.charm_accuracy_rating = row[114] ? static_cast<int32_t>(atoi(row[114])) : 0;
|
||||
e.charm_avoidance_rating = row[115] ? static_cast<int32_t>(atoi(row[115])) : 0;
|
||||
e.charm_atk = row[116] ? static_cast<int32_t>(atoi(row[116])) : 0;
|
||||
e.skip_global_loot = row[117] ? static_cast<int8_t>(atoi(row[117])) : 0;
|
||||
e.rare_spawn = row[118] ? static_cast<int8_t>(atoi(row[118])) : 0;
|
||||
e.stuck_behavior = row[119] ? static_cast<int8_t>(atoi(row[119])) : 0;
|
||||
e.model = row[120] ? static_cast<int16_t>(atoi(row[120])) : 0;
|
||||
e.flymode = row[121] ? static_cast<int8_t>(atoi(row[121])) : -1;
|
||||
e.always_aggro = row[122] ? static_cast<int8_t>(atoi(row[122])) : 0;
|
||||
e.exp_mod = row[123] ? static_cast<int32_t>(atoi(row[123])) : 100;
|
||||
e.heroic_strikethrough = row[124] ? static_cast<int32_t>(atoi(row[124])) : 0;
|
||||
e.faction_amount = row[125] ? static_cast<int32_t>(atoi(row[125])) : 0;
|
||||
e.keeps_sold_items = row[126] ? static_cast<uint8_t>(strtoul(row[126], nullptr, 10)) : 1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -1393,19 +1393,19 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
NpcTypes e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.name = row[1] ? row[1] : "";
|
||||
e.lastname = row[2] ? row[2] : "";
|
||||
e.level = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.race = row[4] ? static_cast<uint16_t>(strtoul(row[4], nullptr, 10)) : 0;
|
||||
e.class_ = row[5] ? static_cast<uint8_t>(strtoul(row[5], nullptr, 10)) : 0;
|
||||
e.bodytype = static_cast<int32_t>(atoi(row[6]));
|
||||
e.bodytype = row[6] ? static_cast<int32_t>(atoi(row[6])) : 1;
|
||||
e.hp = row[7] ? strtoll(row[7], nullptr, 10) : 0;
|
||||
e.mana = row[8] ? strtoll(row[8], nullptr, 10) : 0;
|
||||
e.gender = row[9] ? static_cast<uint8_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.texture = row[10] ? static_cast<uint8_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.helmtexture = row[11] ? static_cast<uint8_t>(strtoul(row[11], nullptr, 10)) : 0;
|
||||
e.herosforgemodel = static_cast<int32_t>(atoi(row[12]));
|
||||
e.herosforgemodel = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.size = row[13] ? strtof(row[13], nullptr) : 0;
|
||||
e.hp_regen_rate = row[14] ? strtoll(row[14], nullptr, 10) : 0;
|
||||
e.hp_regen_per_second = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
@ -1415,12 +1415,12 @@ public:
|
||||
e.alt_currency_id = row[19] ? static_cast<uint32_t>(strtoul(row[19], nullptr, 10)) : 0;
|
||||
e.npc_spells_id = row[20] ? static_cast<uint32_t>(strtoul(row[20], nullptr, 10)) : 0;
|
||||
e.npc_spells_effects_id = row[21] ? static_cast<uint32_t>(strtoul(row[21], nullptr, 10)) : 0;
|
||||
e.npc_faction_id = static_cast<int32_t>(atoi(row[22]));
|
||||
e.npc_faction_id = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.adventure_template_id = row[23] ? static_cast<uint32_t>(strtoul(row[23], nullptr, 10)) : 0;
|
||||
e.trap_template = row[24] ? static_cast<uint32_t>(strtoul(row[24], nullptr, 10)) : 0;
|
||||
e.mindmg = row[25] ? static_cast<uint32_t>(strtoul(row[25], nullptr, 10)) : 0;
|
||||
e.maxdmg = row[26] ? static_cast<uint32_t>(strtoul(row[26], nullptr, 10)) : 0;
|
||||
e.attack_count = static_cast<int16_t>(atoi(row[27]));
|
||||
e.attack_count = row[27] ? static_cast<int16_t>(atoi(row[27])) : -1;
|
||||
e.npcspecialattks = row[28] ? row[28] : "";
|
||||
e.special_abilities = row[29] ? row[29] : "";
|
||||
e.aggroradius = row[30] ? static_cast<uint32_t>(strtoul(row[30], nullptr, 10)) : 0;
|
||||
@ -1432,36 +1432,36 @@ public:
|
||||
e.luclin_eyecolor2 = row[36] ? static_cast<uint32_t>(strtoul(row[36], nullptr, 10)) : 1;
|
||||
e.luclin_beardcolor = row[37] ? static_cast<uint32_t>(strtoul(row[37], nullptr, 10)) : 1;
|
||||
e.luclin_beard = row[38] ? static_cast<uint32_t>(strtoul(row[38], nullptr, 10)) : 0;
|
||||
e.drakkin_heritage = static_cast<int32_t>(atoi(row[39]));
|
||||
e.drakkin_tattoo = static_cast<int32_t>(atoi(row[40]));
|
||||
e.drakkin_details = static_cast<int32_t>(atoi(row[41]));
|
||||
e.drakkin_heritage = row[39] ? static_cast<int32_t>(atoi(row[39])) : 0;
|
||||
e.drakkin_tattoo = row[40] ? static_cast<int32_t>(atoi(row[40])) : 0;
|
||||
e.drakkin_details = row[41] ? static_cast<int32_t>(atoi(row[41])) : 0;
|
||||
e.armortint_id = row[42] ? static_cast<uint32_t>(strtoul(row[42], nullptr, 10)) : 0;
|
||||
e.armortint_red = row[43] ? static_cast<uint8_t>(strtoul(row[43], nullptr, 10)) : 0;
|
||||
e.armortint_green = row[44] ? static_cast<uint8_t>(strtoul(row[44], nullptr, 10)) : 0;
|
||||
e.armortint_blue = row[45] ? static_cast<uint8_t>(strtoul(row[45], nullptr, 10)) : 0;
|
||||
e.d_melee_texture1 = row[46] ? static_cast<uint32_t>(strtoul(row[46], nullptr, 10)) : 0;
|
||||
e.d_melee_texture2 = row[47] ? static_cast<uint32_t>(strtoul(row[47], nullptr, 10)) : 0;
|
||||
e.ammo_idfile = row[48] ? row[48] : "";
|
||||
e.ammo_idfile = row[48] ? row[48] : "IT10";
|
||||
e.prim_melee_type = row[49] ? static_cast<uint8_t>(strtoul(row[49], nullptr, 10)) : 28;
|
||||
e.sec_melee_type = row[50] ? static_cast<uint8_t>(strtoul(row[50], nullptr, 10)) : 28;
|
||||
e.ranged_type = row[51] ? static_cast<uint8_t>(strtoul(row[51], nullptr, 10)) : 7;
|
||||
e.runspeed = row[52] ? strtof(row[52], nullptr) : 0;
|
||||
e.MR = static_cast<int16_t>(atoi(row[53]));
|
||||
e.CR = static_cast<int16_t>(atoi(row[54]));
|
||||
e.DR = static_cast<int16_t>(atoi(row[55]));
|
||||
e.FR = static_cast<int16_t>(atoi(row[56]));
|
||||
e.PR = static_cast<int16_t>(atoi(row[57]));
|
||||
e.Corrup = static_cast<int16_t>(atoi(row[58]));
|
||||
e.MR = row[53] ? static_cast<int16_t>(atoi(row[53])) : 0;
|
||||
e.CR = row[54] ? static_cast<int16_t>(atoi(row[54])) : 0;
|
||||
e.DR = row[55] ? static_cast<int16_t>(atoi(row[55])) : 0;
|
||||
e.FR = row[56] ? static_cast<int16_t>(atoi(row[56])) : 0;
|
||||
e.PR = row[57] ? static_cast<int16_t>(atoi(row[57])) : 0;
|
||||
e.Corrup = row[58] ? static_cast<int16_t>(atoi(row[58])) : 0;
|
||||
e.PhR = row[59] ? static_cast<uint16_t>(strtoul(row[59], nullptr, 10)) : 0;
|
||||
e.see_invis = static_cast<int16_t>(atoi(row[60]));
|
||||
e.see_invis_undead = static_cast<int16_t>(atoi(row[61]));
|
||||
e.see_invis = row[60] ? static_cast<int16_t>(atoi(row[60])) : 0;
|
||||
e.see_invis_undead = row[61] ? static_cast<int16_t>(atoi(row[61])) : 0;
|
||||
e.qglobal = row[62] ? static_cast<uint32_t>(strtoul(row[62], nullptr, 10)) : 0;
|
||||
e.AC = static_cast<int16_t>(atoi(row[63]));
|
||||
e.npc_aggro = static_cast<int8_t>(atoi(row[64]));
|
||||
e.spawn_limit = static_cast<int8_t>(atoi(row[65]));
|
||||
e.AC = row[63] ? static_cast<int16_t>(atoi(row[63])) : 0;
|
||||
e.npc_aggro = row[64] ? static_cast<int8_t>(atoi(row[64])) : 0;
|
||||
e.spawn_limit = row[65] ? static_cast<int8_t>(atoi(row[65])) : 0;
|
||||
e.attack_speed = row[66] ? strtof(row[66], nullptr) : 0;
|
||||
e.attack_delay = row[67] ? static_cast<uint8_t>(strtoul(row[67], nullptr, 10)) : 30;
|
||||
e.findable = static_cast<int8_t>(atoi(row[68]));
|
||||
e.findable = row[68] ? static_cast<int8_t>(atoi(row[68])) : 0;
|
||||
e.STR = row[69] ? static_cast<uint32_t>(strtoul(row[69], nullptr, 10)) : 75;
|
||||
e.STA = row[70] ? static_cast<uint32_t>(strtoul(row[70], nullptr, 10)) : 75;
|
||||
e.DEX = row[71] ? static_cast<uint32_t>(strtoul(row[71], nullptr, 10)) : 75;
|
||||
@ -1469,56 +1469,56 @@ public:
|
||||
e._INT = row[73] ? static_cast<uint32_t>(strtoul(row[73], nullptr, 10)) : 80;
|
||||
e.WIS = row[74] ? static_cast<uint32_t>(strtoul(row[74], nullptr, 10)) : 75;
|
||||
e.CHA = row[75] ? static_cast<uint32_t>(strtoul(row[75], nullptr, 10)) : 75;
|
||||
e.see_hide = static_cast<int8_t>(atoi(row[76]));
|
||||
e.see_improved_hide = static_cast<int8_t>(atoi(row[77]));
|
||||
e.trackable = static_cast<int8_t>(atoi(row[78]));
|
||||
e.isbot = static_cast<int8_t>(atoi(row[79]));
|
||||
e.exclude = static_cast<int8_t>(atoi(row[80]));
|
||||
e.ATK = static_cast<int32_t>(atoi(row[81]));
|
||||
e.Accuracy = static_cast<int32_t>(atoi(row[82]));
|
||||
e.see_hide = row[76] ? static_cast<int8_t>(atoi(row[76])) : 0;
|
||||
e.see_improved_hide = row[77] ? static_cast<int8_t>(atoi(row[77])) : 0;
|
||||
e.trackable = row[78] ? static_cast<int8_t>(atoi(row[78])) : 1;
|
||||
e.isbot = row[79] ? static_cast<int8_t>(atoi(row[79])) : 0;
|
||||
e.exclude = row[80] ? static_cast<int8_t>(atoi(row[80])) : 1;
|
||||
e.ATK = row[81] ? static_cast<int32_t>(atoi(row[81])) : 0;
|
||||
e.Accuracy = row[82] ? static_cast<int32_t>(atoi(row[82])) : 0;
|
||||
e.Avoidance = row[83] ? static_cast<uint32_t>(strtoul(row[83], nullptr, 10)) : 0;
|
||||
e.slow_mitigation = static_cast<int16_t>(atoi(row[84]));
|
||||
e.slow_mitigation = row[84] ? static_cast<int16_t>(atoi(row[84])) : 0;
|
||||
e.version = row[85] ? static_cast<uint16_t>(strtoul(row[85], nullptr, 10)) : 0;
|
||||
e.maxlevel = static_cast<int8_t>(atoi(row[86]));
|
||||
e.scalerate = static_cast<int32_t>(atoi(row[87]));
|
||||
e.maxlevel = row[86] ? static_cast<int8_t>(atoi(row[86])) : 0;
|
||||
e.scalerate = row[87] ? static_cast<int32_t>(atoi(row[87])) : 100;
|
||||
e.private_corpse = row[88] ? static_cast<uint8_t>(strtoul(row[88], nullptr, 10)) : 0;
|
||||
e.unique_spawn_by_name = row[89] ? static_cast<uint8_t>(strtoul(row[89], nullptr, 10)) : 0;
|
||||
e.underwater = row[90] ? static_cast<uint8_t>(strtoul(row[90], nullptr, 10)) : 0;
|
||||
e.isquest = static_cast<int8_t>(atoi(row[91]));
|
||||
e.isquest = row[91] ? static_cast<int8_t>(atoi(row[91])) : 0;
|
||||
e.emoteid = row[92] ? static_cast<uint32_t>(strtoul(row[92], nullptr, 10)) : 0;
|
||||
e.spellscale = row[93] ? strtof(row[93], nullptr) : 100;
|
||||
e.healscale = row[94] ? strtof(row[94], nullptr) : 100;
|
||||
e.no_target_hotkey = row[95] ? static_cast<uint8_t>(strtoul(row[95], nullptr, 10)) : 0;
|
||||
e.raid_target = row[96] ? static_cast<uint8_t>(strtoul(row[96], nullptr, 10)) : 0;
|
||||
e.armtexture = static_cast<int8_t>(atoi(row[97]));
|
||||
e.bracertexture = static_cast<int8_t>(atoi(row[98]));
|
||||
e.handtexture = static_cast<int8_t>(atoi(row[99]));
|
||||
e.legtexture = static_cast<int8_t>(atoi(row[100]));
|
||||
e.feettexture = static_cast<int8_t>(atoi(row[101]));
|
||||
e.light = static_cast<int8_t>(atoi(row[102]));
|
||||
e.walkspeed = static_cast<int8_t>(atoi(row[103]));
|
||||
e.peqid = static_cast<int32_t>(atoi(row[104]));
|
||||
e.unique_ = static_cast<int8_t>(atoi(row[105]));
|
||||
e.fixed = static_cast<int8_t>(atoi(row[106]));
|
||||
e.ignore_despawn = static_cast<int8_t>(atoi(row[107]));
|
||||
e.show_name = static_cast<int8_t>(atoi(row[108]));
|
||||
e.untargetable = static_cast<int8_t>(atoi(row[109]));
|
||||
e.charm_ac = static_cast<int16_t>(atoi(row[110]));
|
||||
e.charm_min_dmg = static_cast<int32_t>(atoi(row[111]));
|
||||
e.charm_max_dmg = static_cast<int32_t>(atoi(row[112]));
|
||||
e.charm_attack_delay = static_cast<int8_t>(atoi(row[113]));
|
||||
e.charm_accuracy_rating = static_cast<int32_t>(atoi(row[114]));
|
||||
e.charm_avoidance_rating = static_cast<int32_t>(atoi(row[115]));
|
||||
e.charm_atk = static_cast<int32_t>(atoi(row[116]));
|
||||
e.skip_global_loot = static_cast<int8_t>(atoi(row[117]));
|
||||
e.rare_spawn = static_cast<int8_t>(atoi(row[118]));
|
||||
e.stuck_behavior = static_cast<int8_t>(atoi(row[119]));
|
||||
e.model = static_cast<int16_t>(atoi(row[120]));
|
||||
e.flymode = static_cast<int8_t>(atoi(row[121]));
|
||||
e.always_aggro = static_cast<int8_t>(atoi(row[122]));
|
||||
e.exp_mod = static_cast<int32_t>(atoi(row[123]));
|
||||
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[124]));
|
||||
e.faction_amount = static_cast<int32_t>(atoi(row[125]));
|
||||
e.armtexture = row[97] ? static_cast<int8_t>(atoi(row[97])) : 0;
|
||||
e.bracertexture = row[98] ? static_cast<int8_t>(atoi(row[98])) : 0;
|
||||
e.handtexture = row[99] ? static_cast<int8_t>(atoi(row[99])) : 0;
|
||||
e.legtexture = row[100] ? static_cast<int8_t>(atoi(row[100])) : 0;
|
||||
e.feettexture = row[101] ? static_cast<int8_t>(atoi(row[101])) : 0;
|
||||
e.light = row[102] ? static_cast<int8_t>(atoi(row[102])) : 0;
|
||||
e.walkspeed = row[103] ? static_cast<int8_t>(atoi(row[103])) : 0;
|
||||
e.peqid = row[104] ? static_cast<int32_t>(atoi(row[104])) : 0;
|
||||
e.unique_ = row[105] ? static_cast<int8_t>(atoi(row[105])) : 0;
|
||||
e.fixed = row[106] ? static_cast<int8_t>(atoi(row[106])) : 0;
|
||||
e.ignore_despawn = row[107] ? static_cast<int8_t>(atoi(row[107])) : 0;
|
||||
e.show_name = row[108] ? static_cast<int8_t>(atoi(row[108])) : 1;
|
||||
e.untargetable = row[109] ? static_cast<int8_t>(atoi(row[109])) : 0;
|
||||
e.charm_ac = row[110] ? static_cast<int16_t>(atoi(row[110])) : 0;
|
||||
e.charm_min_dmg = row[111] ? static_cast<int32_t>(atoi(row[111])) : 0;
|
||||
e.charm_max_dmg = row[112] ? static_cast<int32_t>(atoi(row[112])) : 0;
|
||||
e.charm_attack_delay = row[113] ? static_cast<int8_t>(atoi(row[113])) : 0;
|
||||
e.charm_accuracy_rating = row[114] ? static_cast<int32_t>(atoi(row[114])) : 0;
|
||||
e.charm_avoidance_rating = row[115] ? static_cast<int32_t>(atoi(row[115])) : 0;
|
||||
e.charm_atk = row[116] ? static_cast<int32_t>(atoi(row[116])) : 0;
|
||||
e.skip_global_loot = row[117] ? static_cast<int8_t>(atoi(row[117])) : 0;
|
||||
e.rare_spawn = row[118] ? static_cast<int8_t>(atoi(row[118])) : 0;
|
||||
e.stuck_behavior = row[119] ? static_cast<int8_t>(atoi(row[119])) : 0;
|
||||
e.model = row[120] ? static_cast<int16_t>(atoi(row[120])) : 0;
|
||||
e.flymode = row[121] ? static_cast<int8_t>(atoi(row[121])) : -1;
|
||||
e.always_aggro = row[122] ? static_cast<int8_t>(atoi(row[122])) : 0;
|
||||
e.exp_mod = row[123] ? static_cast<int32_t>(atoi(row[123])) : 100;
|
||||
e.heroic_strikethrough = row[124] ? static_cast<int32_t>(atoi(row[124])) : 0;
|
||||
e.faction_amount = row[125] ? static_cast<int32_t>(atoi(row[125])) : 0;
|
||||
e.keeps_sold_items = row[126] ? static_cast<uint8_t>(strtoul(row[126], nullptr, 10)) : 1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseObjectContentsRepository {
|
||||
public:
|
||||
struct ObjectContents {
|
||||
@ -164,14 +163,14 @@ public:
|
||||
e.parentid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.bagidx = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.itemid = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.charges = static_cast<int16_t>(atoi(row[4]));
|
||||
e.charges = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.droptime = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
e.augslot1 = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.augslot2 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.augslot3 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.augslot6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -210,7 +209,7 @@ public:
|
||||
v.push_back(columns[2] + " = " + std::to_string(e.bagidx));
|
||||
v.push_back(columns[3] + " = " + std::to_string(e.itemid));
|
||||
v.push_back(columns[4] + " = " + std::to_string(e.charges));
|
||||
v.push_back(columns[5] + " = FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "null") + ")");
|
||||
v.push_back(columns[5] + " = FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(columns[6] + " = " + std::to_string(e.augslot1));
|
||||
v.push_back(columns[7] + " = " + std::to_string(e.augslot2));
|
||||
v.push_back(columns[8] + " = " + std::to_string(e.augslot3));
|
||||
@ -243,7 +242,7 @@ public:
|
||||
v.push_back(std::to_string(e.bagidx));
|
||||
v.push_back(std::to_string(e.itemid));
|
||||
v.push_back(std::to_string(e.charges));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.augslot1));
|
||||
v.push_back(std::to_string(e.augslot2));
|
||||
v.push_back(std::to_string(e.augslot3));
|
||||
@ -284,7 +283,7 @@ public:
|
||||
v.push_back(std::to_string(e.bagidx));
|
||||
v.push_back(std::to_string(e.itemid));
|
||||
v.push_back(std::to_string(e.charges));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.augslot1));
|
||||
v.push_back(std::to_string(e.augslot2));
|
||||
v.push_back(std::to_string(e.augslot3));
|
||||
@ -328,14 +327,14 @@ public:
|
||||
e.parentid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.bagidx = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.itemid = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.charges = static_cast<int16_t>(atoi(row[4]));
|
||||
e.charges = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.droptime = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
e.augslot1 = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.augslot2 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.augslot3 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.augslot6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -364,14 +363,14 @@ public:
|
||||
e.parentid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.bagidx = row[2] ? static_cast<uint32_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||
e.itemid = row[3] ? static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) : 0;
|
||||
e.charges = static_cast<int16_t>(atoi(row[4]));
|
||||
e.charges = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.droptime = strtoll(row[5] ? row[5] : "-1", nullptr, 10);
|
||||
e.augslot1 = row[6] ? static_cast<uint32_t>(strtoul(row[6], nullptr, 10)) : 0;
|
||||
e.augslot2 = row[7] ? static_cast<uint32_t>(strtoul(row[7], nullptr, 10)) : 0;
|
||||
e.augslot3 = row[8] ? static_cast<uint32_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.augslot4 = row[9] ? static_cast<uint32_t>(strtoul(row[9], nullptr, 10)) : 0;
|
||||
e.augslot5 = row[10] ? static_cast<uint32_t>(strtoul(row[10], nullptr, 10)) : 0;
|
||||
e.augslot6 = static_cast<int32_t>(atoi(row[11]));
|
||||
e.augslot6 = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -451,7 +450,7 @@ public:
|
||||
v.push_back(std::to_string(e.bagidx));
|
||||
v.push_back(std::to_string(e.itemid));
|
||||
v.push_back(std::to_string(e.charges));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.augslot1));
|
||||
v.push_back(std::to_string(e.augslot2));
|
||||
v.push_back(std::to_string(e.augslot3));
|
||||
@ -485,7 +484,7 @@ public:
|
||||
v.push_back(std::to_string(e.bagidx));
|
||||
v.push_back(std::to_string(e.itemid));
|
||||
v.push_back(std::to_string(e.charges));
|
||||
v.push_back("FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "null") + ")");
|
||||
v.push_back("FROM_UNIXTIME(" + (e.droptime > 0 ? std::to_string(e.droptime) : "UNIX_TIMESTAMP()") + ")");
|
||||
v.push_back(std::to_string(e.augslot1));
|
||||
v.push_back(std::to_string(e.augslot2));
|
||||
v.push_back(std::to_string(e.augslot3));
|
||||
|
||||
@ -231,34 +231,34 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Object e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||
e.version = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.xpos = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.ypos = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.zpos = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.heading = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.itemid = static_cast<int32_t>(atoi(row[7]));
|
||||
e.itemid = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.charges = row[8] ? static_cast<uint16_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.objectname = row[9] ? row[9] : "";
|
||||
e.type = static_cast<int32_t>(atoi(row[10]));
|
||||
e.icon = static_cast<int32_t>(atoi(row[11]));
|
||||
e.type = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.icon = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.size_percentage = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.unknown24 = static_cast<int32_t>(atoi(row[13]));
|
||||
e.unknown60 = static_cast<int32_t>(atoi(row[14]));
|
||||
e.unknown64 = static_cast<int32_t>(atoi(row[15]));
|
||||
e.unknown68 = static_cast<int32_t>(atoi(row[16]));
|
||||
e.unknown72 = static_cast<int32_t>(atoi(row[17]));
|
||||
e.unknown76 = static_cast<int32_t>(atoi(row[18]));
|
||||
e.unknown84 = static_cast<int32_t>(atoi(row[19]));
|
||||
e.unknown24 = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.unknown60 = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.unknown64 = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.unknown68 = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.unknown72 = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.unknown76 = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.unknown84 = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.size = row[20] ? strtof(row[20], nullptr) : 100;
|
||||
e.solid_type = static_cast<int32_t>(atoi(row[21]));
|
||||
e.incline = static_cast<int32_t>(atoi(row[22]));
|
||||
e.solid_type = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.incline = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.tilt_x = row[23] ? strtof(row[23], nullptr) : 0;
|
||||
e.tilt_y = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.display_name = row[25] ? row[25] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[26]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[27]));
|
||||
e.min_expansion = row[26] ? static_cast<int8_t>(atoi(row[26])) : -1;
|
||||
e.max_expansion = row[27] ? static_cast<int8_t>(atoi(row[27])) : -1;
|
||||
e.content_flags = row[28] ? row[28] : "";
|
||||
e.content_flags_disabled = row[29] ? row[29] : "";
|
||||
|
||||
@ -466,34 +466,34 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Object e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||
e.version = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.xpos = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.ypos = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.zpos = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.heading = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.itemid = static_cast<int32_t>(atoi(row[7]));
|
||||
e.itemid = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.charges = row[8] ? static_cast<uint16_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.objectname = row[9] ? row[9] : "";
|
||||
e.type = static_cast<int32_t>(atoi(row[10]));
|
||||
e.icon = static_cast<int32_t>(atoi(row[11]));
|
||||
e.type = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.icon = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.size_percentage = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.unknown24 = static_cast<int32_t>(atoi(row[13]));
|
||||
e.unknown60 = static_cast<int32_t>(atoi(row[14]));
|
||||
e.unknown64 = static_cast<int32_t>(atoi(row[15]));
|
||||
e.unknown68 = static_cast<int32_t>(atoi(row[16]));
|
||||
e.unknown72 = static_cast<int32_t>(atoi(row[17]));
|
||||
e.unknown76 = static_cast<int32_t>(atoi(row[18]));
|
||||
e.unknown84 = static_cast<int32_t>(atoi(row[19]));
|
||||
e.unknown24 = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.unknown60 = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.unknown64 = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.unknown68 = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.unknown72 = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.unknown76 = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.unknown84 = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.size = row[20] ? strtof(row[20], nullptr) : 100;
|
||||
e.solid_type = static_cast<int32_t>(atoi(row[21]));
|
||||
e.incline = static_cast<int32_t>(atoi(row[22]));
|
||||
e.solid_type = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.incline = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.tilt_x = row[23] ? strtof(row[23], nullptr) : 0;
|
||||
e.tilt_y = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.display_name = row[25] ? row[25] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[26]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[27]));
|
||||
e.min_expansion = row[26] ? static_cast<int8_t>(atoi(row[26])) : -1;
|
||||
e.max_expansion = row[27] ? static_cast<int8_t>(atoi(row[27])) : -1;
|
||||
e.content_flags = row[28] ? row[28] : "";
|
||||
e.content_flags_disabled = row[29] ? row[29] : "";
|
||||
|
||||
@ -520,34 +520,34 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Object e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.zoneid = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||
e.version = static_cast<int16_t>(atoi(row[2]));
|
||||
e.version = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.xpos = row[3] ? strtof(row[3], nullptr) : 0;
|
||||
e.ypos = row[4] ? strtof(row[4], nullptr) : 0;
|
||||
e.zpos = row[5] ? strtof(row[5], nullptr) : 0;
|
||||
e.heading = row[6] ? strtof(row[6], nullptr) : 0;
|
||||
e.itemid = static_cast<int32_t>(atoi(row[7]));
|
||||
e.itemid = row[7] ? static_cast<int32_t>(atoi(row[7])) : 0;
|
||||
e.charges = row[8] ? static_cast<uint16_t>(strtoul(row[8], nullptr, 10)) : 0;
|
||||
e.objectname = row[9] ? row[9] : "";
|
||||
e.type = static_cast<int32_t>(atoi(row[10]));
|
||||
e.icon = static_cast<int32_t>(atoi(row[11]));
|
||||
e.type = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.icon = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.size_percentage = row[12] ? strtof(row[12], nullptr) : 0;
|
||||
e.unknown24 = static_cast<int32_t>(atoi(row[13]));
|
||||
e.unknown60 = static_cast<int32_t>(atoi(row[14]));
|
||||
e.unknown64 = static_cast<int32_t>(atoi(row[15]));
|
||||
e.unknown68 = static_cast<int32_t>(atoi(row[16]));
|
||||
e.unknown72 = static_cast<int32_t>(atoi(row[17]));
|
||||
e.unknown76 = static_cast<int32_t>(atoi(row[18]));
|
||||
e.unknown84 = static_cast<int32_t>(atoi(row[19]));
|
||||
e.unknown24 = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.unknown60 = row[14] ? static_cast<int32_t>(atoi(row[14])) : 0;
|
||||
e.unknown64 = row[15] ? static_cast<int32_t>(atoi(row[15])) : 0;
|
||||
e.unknown68 = row[16] ? static_cast<int32_t>(atoi(row[16])) : 0;
|
||||
e.unknown72 = row[17] ? static_cast<int32_t>(atoi(row[17])) : 0;
|
||||
e.unknown76 = row[18] ? static_cast<int32_t>(atoi(row[18])) : 0;
|
||||
e.unknown84 = row[19] ? static_cast<int32_t>(atoi(row[19])) : 0;
|
||||
e.size = row[20] ? strtof(row[20], nullptr) : 100;
|
||||
e.solid_type = static_cast<int32_t>(atoi(row[21]));
|
||||
e.incline = static_cast<int32_t>(atoi(row[22]));
|
||||
e.solid_type = row[21] ? static_cast<int32_t>(atoi(row[21])) : 0;
|
||||
e.incline = row[22] ? static_cast<int32_t>(atoi(row[22])) : 0;
|
||||
e.tilt_x = row[23] ? strtof(row[23], nullptr) : 0;
|
||||
e.tilt_y = row[24] ? strtof(row[24], nullptr) : 0;
|
||||
e.display_name = row[25] ? row[25] : "";
|
||||
e.min_expansion = static_cast<int8_t>(atoi(row[26]));
|
||||
e.max_expansion = static_cast<int8_t>(atoi(row[27]));
|
||||
e.min_expansion = row[26] ? static_cast<int8_t>(atoi(row[26])) : -1;
|
||||
e.max_expansion = row[27] ? static_cast<int8_t>(atoi(row[27])) : -1;
|
||||
e.content_flags = row[28] ? row[28] : "";
|
||||
e.content_flags_disabled = row[29] ? row[29] : "";
|
||||
|
||||
|
||||
@ -139,13 +139,13 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
PerlEventExportSettings e{};
|
||||
|
||||
e.event_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.event_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.event_description = row[1] ? row[1] : "";
|
||||
e.export_qglobals = static_cast<int16_t>(atoi(row[2]));
|
||||
e.export_mob = static_cast<int16_t>(atoi(row[3]));
|
||||
e.export_zone = static_cast<int16_t>(atoi(row[4]));
|
||||
e.export_item = static_cast<int16_t>(atoi(row[5]));
|
||||
e.export_event = static_cast<int16_t>(atoi(row[6]));
|
||||
e.export_qglobals = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.export_mob = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.export_zone = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.export_item = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
e.export_event = row[6] ? static_cast<int16_t>(atoi(row[6])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -283,13 +283,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
PerlEventExportSettings e{};
|
||||
|
||||
e.event_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.event_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.event_description = row[1] ? row[1] : "";
|
||||
e.export_qglobals = static_cast<int16_t>(atoi(row[2]));
|
||||
e.export_mob = static_cast<int16_t>(atoi(row[3]));
|
||||
e.export_zone = static_cast<int16_t>(atoi(row[4]));
|
||||
e.export_item = static_cast<int16_t>(atoi(row[5]));
|
||||
e.export_event = static_cast<int16_t>(atoi(row[6]));
|
||||
e.export_qglobals = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.export_mob = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.export_zone = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.export_item = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
e.export_event = row[6] ? static_cast<int16_t>(atoi(row[6])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -314,13 +314,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
PerlEventExportSettings e{};
|
||||
|
||||
e.event_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.event_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.event_description = row[1] ? row[1] : "";
|
||||
e.export_qglobals = static_cast<int16_t>(atoi(row[2]));
|
||||
e.export_mob = static_cast<int16_t>(atoi(row[3]));
|
||||
e.export_zone = static_cast<int16_t>(atoi(row[4]));
|
||||
e.export_item = static_cast<int16_t>(atoi(row[5]));
|
||||
e.export_event = static_cast<int16_t>(atoi(row[6]));
|
||||
e.export_qglobals = row[2] ? static_cast<int16_t>(atoi(row[2])) : 0;
|
||||
e.export_mob = row[3] ? static_cast<int16_t>(atoi(row[3])) : 0;
|
||||
e.export_zone = row[4] ? static_cast<int16_t>(atoi(row[4])) : 0;
|
||||
e.export_item = row[5] ? static_cast<int16_t>(atoi(row[5])) : 0;
|
||||
e.export_event = row[6] ? static_cast<int16_t>(atoi(row[6])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -183,13 +183,13 @@ public:
|
||||
e.petitiontext = row[5] ? row[5] : "";
|
||||
e.gmtext = row[6] ? row[6] : "";
|
||||
e.zone = row[7] ? row[7] : "";
|
||||
e.urgency = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charclass = static_cast<int32_t>(atoi(row[9]));
|
||||
e.charrace = static_cast<int32_t>(atoi(row[10]));
|
||||
e.charlevel = static_cast<int32_t>(atoi(row[11]));
|
||||
e.checkouts = static_cast<int32_t>(atoi(row[12]));
|
||||
e.unavailables = static_cast<int32_t>(atoi(row[13]));
|
||||
e.ischeckedout = static_cast<int8_t>(atoi(row[14]));
|
||||
e.urgency = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charclass = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.charrace = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.charlevel = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.checkouts = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.unavailables = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.ischeckedout = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.senttime = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
|
||||
return e;
|
||||
@ -362,13 +362,13 @@ public:
|
||||
e.petitiontext = row[5] ? row[5] : "";
|
||||
e.gmtext = row[6] ? row[6] : "";
|
||||
e.zone = row[7] ? row[7] : "";
|
||||
e.urgency = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charclass = static_cast<int32_t>(atoi(row[9]));
|
||||
e.charrace = static_cast<int32_t>(atoi(row[10]));
|
||||
e.charlevel = static_cast<int32_t>(atoi(row[11]));
|
||||
e.checkouts = static_cast<int32_t>(atoi(row[12]));
|
||||
e.unavailables = static_cast<int32_t>(atoi(row[13]));
|
||||
e.ischeckedout = static_cast<int8_t>(atoi(row[14]));
|
||||
e.urgency = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charclass = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.charrace = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.charlevel = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.checkouts = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.unavailables = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.ischeckedout = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.senttime = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
@ -402,13 +402,13 @@ public:
|
||||
e.petitiontext = row[5] ? row[5] : "";
|
||||
e.gmtext = row[6] ? row[6] : "";
|
||||
e.zone = row[7] ? row[7] : "";
|
||||
e.urgency = static_cast<int32_t>(atoi(row[8]));
|
||||
e.charclass = static_cast<int32_t>(atoi(row[9]));
|
||||
e.charrace = static_cast<int32_t>(atoi(row[10]));
|
||||
e.charlevel = static_cast<int32_t>(atoi(row[11]));
|
||||
e.checkouts = static_cast<int32_t>(atoi(row[12]));
|
||||
e.unavailables = static_cast<int32_t>(atoi(row[13]));
|
||||
e.ischeckedout = static_cast<int8_t>(atoi(row[14]));
|
||||
e.urgency = row[8] ? static_cast<int32_t>(atoi(row[8])) : 0;
|
||||
e.charclass = row[9] ? static_cast<int32_t>(atoi(row[9])) : 0;
|
||||
e.charrace = row[10] ? static_cast<int32_t>(atoi(row[10])) : 0;
|
||||
e.charlevel = row[11] ? static_cast<int32_t>(atoi(row[11])) : 0;
|
||||
e.checkouts = row[12] ? static_cast<int32_t>(atoi(row[12])) : 0;
|
||||
e.unavailables = row[13] ? static_cast<int32_t>(atoi(row[13])) : 0;
|
||||
e.ischeckedout = row[14] ? static_cast<int8_t>(atoi(row[14])) : 0;
|
||||
e.senttime = row[15] ? strtoll(row[15], nullptr, 10) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
|
||||
@ -123,9 +123,9 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
PetsEquipmentsetEntries e{};
|
||||
|
||||
e.set_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.set_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.slot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -251,9 +251,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
PetsEquipmentsetEntries e{};
|
||||
|
||||
e.set_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.set_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.slot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -278,9 +278,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
PetsEquipmentsetEntries e{};
|
||||
|
||||
e.set_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.slot = static_cast<int32_t>(atoi(row[1]));
|
||||
e.item_id = static_cast<int32_t>(atoi(row[2]));
|
||||
e.set_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.slot = row[1] ? static_cast<int32_t>(atoi(row[1])) : 0;
|
||||
e.item_id = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -123,9 +123,9 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
PetsEquipmentset e{};
|
||||
|
||||
e.set_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.set_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.setname = row[1] ? row[1] : "";
|
||||
e.nested_set = static_cast<int32_t>(atoi(row[2]));
|
||||
e.nested_set = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -251,9 +251,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
PetsEquipmentset e{};
|
||||
|
||||
e.set_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.set_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.setname = row[1] ? row[1] : "";
|
||||
e.nested_set = static_cast<int32_t>(atoi(row[2]));
|
||||
e.nested_set = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -278,9 +278,9 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
PetsEquipmentset e{};
|
||||
|
||||
e.set_id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.set_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.setname = row[1] ? row[1] : "";
|
||||
e.nested_set = static_cast<int32_t>(atoi(row[2]));
|
||||
e.nested_set = row[2] ? static_cast<int32_t>(atoi(row[2])) : -1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@ -147,15 +147,15 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Pets e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? row[1] : "";
|
||||
e.petpower = static_cast<int32_t>(atoi(row[2]));
|
||||
e.npcID = static_cast<int32_t>(atoi(row[3]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[4]));
|
||||
e.petcontrol = static_cast<int8_t>(atoi(row[5]));
|
||||
e.petnaming = static_cast<int8_t>(atoi(row[6]));
|
||||
e.monsterflag = static_cast<int8_t>(atoi(row[7]));
|
||||
e.equipmentset = static_cast<int32_t>(atoi(row[8]));
|
||||
e.petpower = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.npcID = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.temp = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.petcontrol = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
e.petnaming = row[6] ? static_cast<int8_t>(atoi(row[6])) : 0;
|
||||
e.monsterflag = row[7] ? static_cast<int8_t>(atoi(row[7])) : 0;
|
||||
e.equipmentset = row[8] ? static_cast<int32_t>(atoi(row[8])) : -1;
|
||||
|
||||
return e;
|
||||
}
|
||||
@ -298,15 +298,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Pets e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? row[1] : "";
|
||||
e.petpower = static_cast<int32_t>(atoi(row[2]));
|
||||
e.npcID = static_cast<int32_t>(atoi(row[3]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[4]));
|
||||
e.petcontrol = static_cast<int8_t>(atoi(row[5]));
|
||||
e.petnaming = static_cast<int8_t>(atoi(row[6]));
|
||||
e.monsterflag = static_cast<int8_t>(atoi(row[7]));
|
||||
e.equipmentset = static_cast<int32_t>(atoi(row[8]));
|
||||
e.petpower = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.npcID = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.temp = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.petcontrol = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
e.petnaming = row[6] ? static_cast<int8_t>(atoi(row[6])) : 0;
|
||||
e.monsterflag = row[7] ? static_cast<int8_t>(atoi(row[7])) : 0;
|
||||
e.equipmentset = row[8] ? static_cast<int32_t>(atoi(row[8])) : -1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@ -331,15 +331,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Pets e{};
|
||||
|
||||
e.id = static_cast<int32_t>(atoi(row[0]));
|
||||
e.id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
|
||||
e.type = row[1] ? row[1] : "";
|
||||
e.petpower = static_cast<int32_t>(atoi(row[2]));
|
||||
e.npcID = static_cast<int32_t>(atoi(row[3]));
|
||||
e.temp = static_cast<int8_t>(atoi(row[4]));
|
||||
e.petcontrol = static_cast<int8_t>(atoi(row[5]));
|
||||
e.petnaming = static_cast<int8_t>(atoi(row[6]));
|
||||
e.monsterflag = static_cast<int8_t>(atoi(row[7]));
|
||||
e.equipmentset = static_cast<int32_t>(atoi(row[8]));
|
||||
e.petpower = row[2] ? static_cast<int32_t>(atoi(row[2])) : 0;
|
||||
e.npcID = row[3] ? static_cast<int32_t>(atoi(row[3])) : 0;
|
||||
e.temp = row[4] ? static_cast<int8_t>(atoi(row[4])) : 0;
|
||||
e.petcontrol = row[5] ? static_cast<int8_t>(atoi(row[5])) : 0;
|
||||
e.petnaming = row[6] ? static_cast<int8_t>(atoi(row[6])) : 0;
|
||||
e.monsterflag = row[7] ? static_cast<int8_t>(atoi(row[7])) : 0;
|
||||
e.equipmentset = row[8] ? static_cast<int32_t>(atoi(row[8])) : -1;
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
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