mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-23 04:18:41 +00:00
DB scheme changes
This commit is contained in:
@@ -384,7 +384,7 @@ int ClientListEntry::GetTaskLockoutTimeLeft(int id) const
|
||||
bool ClientListEntry::CleanExpiredTaskLockouts() const
|
||||
{
|
||||
std::string query =
|
||||
StringFormat("DELETE FROM `character_task_lockouts` WHERE `charid` = %i AND `timestamp` > %i", pcharid,
|
||||
StringFormat("DELETE FROM `character_task_lockouts` WHERE `character_id` = %i AND `timestamp` > %i", pcharid,
|
||||
Timer::GetCurrentTime());
|
||||
auto results = database.QueryDatabase(query);
|
||||
return results.Success();
|
||||
@@ -397,7 +397,7 @@ bool ClientListEntry::LoadTaskLockouts()
|
||||
{
|
||||
CleanExpiredTaskLockouts();
|
||||
std::string query = StringFormat(
|
||||
"SELECT `replay_group`, `original_id`, `timestamp` FROM `character_task_lockouts` WHERE `charid` = %i",
|
||||
"SELECT `replay_group`, `original_id`, `timestamp` FROM `character_task_lockouts` WHERE `character_id` = %i",
|
||||
pcharid);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
|
||||
@@ -374,7 +374,7 @@ bool SharedTaskManager::LoadSharedTaskState()
|
||||
{
|
||||
// one may think we should clean up expired tasks, but we don't just in case world is booting back up after a crash
|
||||
// we will clean them up in the normal process loop so zones get told to clean up
|
||||
std::string query = "SELECT `id`, `taskid`, `acceptedtime`, `locked` FROM `shared_task_state`";
|
||||
std::string query = "SELECT `id`, `task_id`, `accepted_time`, `is_locked` FROM `shared_task_state`";
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
if (results.Success() && results.RowCount() > 0) {
|
||||
@@ -389,7 +389,7 @@ bool SharedTaskManager::LoadSharedTaskState()
|
||||
}
|
||||
}
|
||||
|
||||
query = "SELECT `shared_id`, `charid`, `name`, `leader` FROM `shared_task_members` ORDER BY shared_id ASC";
|
||||
query = "SELECT `shared_task_id`, `character_id`, `character_name`, `is_leader` FROM `shared_task_members` ORDER BY shared_task_id ASC";
|
||||
results = database.QueryDatabase(query);
|
||||
if (results.Success() && results.RowCount() > 0) {
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
|
||||
Reference in New Issue
Block a user