mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 02:31:03 +00:00
Move LoadAllClientLockouts back to a client method
This commit is contained in:
+17
-1
@@ -9581,7 +9581,7 @@ void Client::UpdateExpeditionInfoAndLockouts()
|
||||
}
|
||||
}
|
||||
|
||||
Expedition::LoadAllClientLockouts(this);
|
||||
LoadAllExpeditionLockouts();
|
||||
}
|
||||
|
||||
Expedition* Client::CreateExpedition(
|
||||
@@ -9704,6 +9704,22 @@ bool Client::HasExpeditionLockout(
|
||||
return (GetExpeditionLockout(expedition_name, event_name, include_expired) != nullptr);
|
||||
}
|
||||
|
||||
void Client::LoadAllExpeditionLockouts()
|
||||
{
|
||||
auto results = ExpeditionDatabase::LoadCharacterLockouts(CharacterID());
|
||||
if (results.Success())
|
||||
{
|
||||
for (auto row = results.begin(); row != results.end(); ++row)
|
||||
{
|
||||
auto expire_time = strtoull(row[0], nullptr, 10);
|
||||
auto original_duration = static_cast<uint32_t>(strtoul(row[1], nullptr, 10));
|
||||
ExpeditionLockoutTimer lockout{ row[2], row[3], expire_time, original_duration };
|
||||
AddExpeditionLockout(lockout);
|
||||
}
|
||||
}
|
||||
SendExpeditionLockoutTimers();
|
||||
}
|
||||
|
||||
void Client::SendExpeditionLockoutTimers()
|
||||
{
|
||||
std::vector<ExpeditionLockoutTimerEntry_Struct> lockout_entries;
|
||||
|
||||
Reference in New Issue
Block a user