mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 15:31:33 +00:00
Don't remove expedition lockouts from non-members
Clients still inside a dz after being removed from an expedition should only ever have lockouts added
This commit is contained in:
parent
17be2bf2f7
commit
006f7bf9e9
@ -1253,7 +1253,7 @@ void Expedition::ProcessLockoutUpdate(
|
|||||||
// if this is the expedition's dz instance, all clients inside the zone need
|
// if this is the expedition's dz instance, all clients inside the zone need
|
||||||
// to receive added lockouts. this is done on live to avoid exploits where
|
// to receive added lockouts. this is done on live to avoid exploits where
|
||||||
// members leave the expedition but haven't been kicked from zone yet
|
// members leave the expedition but haven't been kicked from zone yet
|
||||||
if (m_dynamiczone.IsCurrentZoneDzInstance())
|
if (!remove && m_dynamiczone.IsCurrentZoneDzInstance())
|
||||||
{
|
{
|
||||||
std::vector<ExpeditionMember> non_members;
|
std::vector<ExpeditionMember> non_members;
|
||||||
for (const auto& client_iter : entity_list.GetClientList())
|
for (const auto& client_iter : entity_list.GetClientList())
|
||||||
@ -1262,16 +1262,11 @@ void Expedition::ProcessLockoutUpdate(
|
|||||||
if (client && client->GetExpeditionID() != GetID())
|
if (client && client->GetExpeditionID() != GetID())
|
||||||
{
|
{
|
||||||
non_members.emplace_back(ExpeditionMember{client->CharacterID(), client->GetName()});
|
non_members.emplace_back(ExpeditionMember{client->CharacterID(), client->GetName()});
|
||||||
|
|
||||||
if (!remove) {
|
|
||||||
client->AddExpeditionLockout(lockout);
|
client->AddExpeditionLockout(lockout);
|
||||||
} else {
|
|
||||||
client->RemoveExpeditionLockout(m_expedition_name, event_name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!remove && !non_members.empty()) // expedition members were already updated in db
|
if (!non_members.empty())
|
||||||
{
|
{
|
||||||
ExpeditionDatabase::InsertMembersLockout(non_members, lockout);
|
ExpeditionDatabase::InsertMembersLockout(non_members, lockout);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user