mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-03 02:13:51 +00:00
Load character lockouts without looping
This commit is contained in:
parent
d6ab87e2c4
commit
779fc6265e
@ -9614,8 +9614,7 @@ Expedition* Client::GetExpedition() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Client::AddExpeditionLockout(
|
||||
const ExpeditionLockoutTimer& lockout, bool update_db, bool update_client)
|
||||
void Client::AddExpeditionLockout(const ExpeditionLockoutTimer& lockout, bool update_db)
|
||||
{
|
||||
// todo: support for account based lockouts like live AoC expeditions
|
||||
|
||||
@ -9633,10 +9632,7 @@ void Client::AddExpeditionLockout(
|
||||
ExpeditionDatabase::InsertCharacterLockouts(CharacterID(), { lockout }, true);
|
||||
}
|
||||
|
||||
if (update_client)
|
||||
{
|
||||
SendExpeditionLockoutTimers();
|
||||
}
|
||||
SendExpeditionLockoutTimers();
|
||||
}
|
||||
|
||||
void Client::AddNewExpeditionLockout(
|
||||
@ -9730,13 +9726,7 @@ bool Client::HasExpeditionLockout(
|
||||
|
||||
void Client::LoadAllExpeditionLockouts()
|
||||
{
|
||||
m_expedition_lockouts.clear();
|
||||
|
||||
auto lockouts = ExpeditionDatabase::LoadCharacterLockouts(CharacterID());
|
||||
for (const auto& lockout : lockouts)
|
||||
{
|
||||
AddExpeditionLockout(lockout, false, false);
|
||||
}
|
||||
m_expedition_lockouts = ExpeditionDatabase::LoadCharacterLockouts(CharacterID());
|
||||
SendExpeditionLockoutTimers();
|
||||
}
|
||||
|
||||
|
||||
@ -1117,7 +1117,7 @@ public:
|
||||
Client* client, const std::string& client_name, uint16_t chat_type,
|
||||
uint32_t string_id, const std::initializer_list<std::string>& arguments = {});
|
||||
|
||||
void AddExpeditionLockout(const ExpeditionLockoutTimer& lockout, bool update_db = false, bool update_client = true);
|
||||
void AddExpeditionLockout(const ExpeditionLockoutTimer& lockout, bool update_db = false);
|
||||
void AddNewExpeditionLockout(
|
||||
const std::string& expedition_name, const std::string& event_name, uint32_t duration, std::string uuid = {});
|
||||
Expedition* CreateExpedition(DynamicZone& dz_instance, ExpeditionRequest& request);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user