mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-04 10:12:26 +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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::AddExpeditionLockout(
|
void Client::AddExpeditionLockout(const ExpeditionLockoutTimer& lockout, bool update_db)
|
||||||
const ExpeditionLockoutTimer& lockout, bool update_db, bool update_client)
|
|
||||||
{
|
{
|
||||||
// todo: support for account based lockouts like live AoC expeditions
|
// todo: support for account based lockouts like live AoC expeditions
|
||||||
|
|
||||||
@ -9633,10 +9632,7 @@ void Client::AddExpeditionLockout(
|
|||||||
ExpeditionDatabase::InsertCharacterLockouts(CharacterID(), { lockout }, true);
|
ExpeditionDatabase::InsertCharacterLockouts(CharacterID(), { lockout }, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (update_client)
|
|
||||||
{
|
|
||||||
SendExpeditionLockoutTimers();
|
SendExpeditionLockoutTimers();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::AddNewExpeditionLockout(
|
void Client::AddNewExpeditionLockout(
|
||||||
@ -9730,13 +9726,7 @@ bool Client::HasExpeditionLockout(
|
|||||||
|
|
||||||
void Client::LoadAllExpeditionLockouts()
|
void Client::LoadAllExpeditionLockouts()
|
||||||
{
|
{
|
||||||
m_expedition_lockouts.clear();
|
m_expedition_lockouts = ExpeditionDatabase::LoadCharacterLockouts(CharacterID());
|
||||||
|
|
||||||
auto lockouts = ExpeditionDatabase::LoadCharacterLockouts(CharacterID());
|
|
||||||
for (const auto& lockout : lockouts)
|
|
||||||
{
|
|
||||||
AddExpeditionLockout(lockout, false, false);
|
|
||||||
}
|
|
||||||
SendExpeditionLockoutTimers();
|
SendExpeditionLockoutTimers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1117,7 +1117,7 @@ public:
|
|||||||
Client* client, const std::string& client_name, uint16_t chat_type,
|
Client* client, const std::string& client_name, uint16_t chat_type,
|
||||||
uint32_t string_id, const std::initializer_list<std::string>& arguments = {});
|
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(
|
void AddNewExpeditionLockout(
|
||||||
const std::string& expedition_name, const std::string& event_name, uint32_t duration, std::string uuid = {});
|
const std::string& expedition_name, const std::string& event_name, uint32_t duration, std::string uuid = {});
|
||||||
Expedition* CreateExpedition(DynamicZone& dz_instance, ExpeditionRequest& request);
|
Expedition* CreateExpedition(DynamicZone& dz_instance, ExpeditionRequest& request);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user