Let world shutdown dz early for empty expeditions

Since world now tracks empty expeditions it can determine when to
shutdown dynamic zone instances when the rule is enabled rather than
letting zones do it.
This commit is contained in:
hg
2020-05-27 23:26:47 -04:00
parent 148af3edfc
commit 9164073d14
11 changed files with 93 additions and 67 deletions
-19
View File
@@ -395,25 +395,6 @@ ExpeditionMember ExpeditionDatabase::GetExpeditionLeader(uint32_t expedition_id)
return leader;
}
uint32_t ExpeditionDatabase::GetExpeditionMemberCount(uint32_t expedition_id)
{
auto query = fmt::format(SQL(
SELECT COUNT(IF(is_current_member = TRUE, 1, NULL)) member_count
FROM expedition_members
WHERE expedition_id = {};
), expedition_id);
auto results = database.QueryDatabase(query);
uint32_t member_count = 0;
if (results.Success() && results.RowCount() > 0)
{
auto row = results.begin();
member_count = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
}
return member_count;
}
void ExpeditionDatabase::InsertCharacterLockouts(
uint32_t character_id, const std::vector<ExpeditionLockoutTimer>& lockouts,
bool update_expire_times, bool is_pending)