mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Cleanup some vector emplacements in expeditions
This commit is contained in:
parent
0c5bd9b338
commit
f822798c63
@ -274,13 +274,13 @@ std::vector<Expedition> ExpeditionDatabase::LoadExpeditions()
|
||||
|
||||
if (last_expedition_id != expedition_id)
|
||||
{
|
||||
expeditions.emplace_back(Expedition{
|
||||
expeditions.emplace_back(
|
||||
static_cast<uint32_t>(strtoul(row[0], nullptr, 10)), // expedition_id
|
||||
static_cast<uint32_t>(strtoul(row[1], nullptr, 10)), // dz_instance_id
|
||||
static_cast<uint32_t>(strtoul(row[2], nullptr, 10)), // dz_zone_id
|
||||
static_cast<uint32_t>(strtoul(row[3], nullptr, 10)), // start_time
|
||||
static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) // duration
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
last_expedition_id = expedition_id;
|
||||
|
||||
@ -207,7 +207,7 @@ void Expedition::CacheExpeditions(MySQLRequestResult& results)
|
||||
current_expedition->AddInternalMember(
|
||||
row[col::member_name], member_id, ExpeditionMemberStatus::Offline
|
||||
);
|
||||
expedition_character_ids.emplace_back(std::make_pair(expedition_id, member_id));
|
||||
expedition_character_ids.emplace_back(expedition_id, member_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@ void Expedition::AddInternalMember(
|
||||
|
||||
if (it == m_members.end())
|
||||
{
|
||||
m_members.emplace_back(ExpeditionMember{character_id, char_name, status});
|
||||
m_members.emplace_back(character_id, char_name, status);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1288,7 +1288,7 @@ void Expedition::ProcessLockoutUpdate(
|
||||
Client* client = client_iter.second;
|
||||
if (client && client->GetExpeditionID() != GetID())
|
||||
{
|
||||
non_members.emplace_back(ExpeditionMember{client->CharacterID(), client->GetName()});
|
||||
non_members.emplace_back(client->CharacterID(), client->GetName());
|
||||
client->AddExpeditionLockout(lockout);
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,13 +118,13 @@ std::vector<ExpeditionLockoutTimer> ExpeditionDatabase::LoadCharacterLockouts(ui
|
||||
{
|
||||
for (auto row = results.begin(); row != results.end(); ++row)
|
||||
{
|
||||
lockouts.emplace_back(ExpeditionLockoutTimer{
|
||||
lockouts.emplace_back(
|
||||
row[0], // expedition_uuid
|
||||
row[1], // expedition_name
|
||||
row[2], // event_name
|
||||
strtoull(row[3], nullptr, 10), // expire_time
|
||||
static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) // duration
|
||||
});
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,13 +157,13 @@ std::vector<ExpeditionLockoutTimer> ExpeditionDatabase::LoadCharacterLockouts(
|
||||
{
|
||||
for (auto row = results.begin(); row != results.end(); ++row)
|
||||
{
|
||||
lockouts.emplace_back(ExpeditionLockoutTimer{
|
||||
lockouts.emplace_back(
|
||||
row[0], // expedition_uuid
|
||||
expedition_name,
|
||||
row[1], // event_name
|
||||
strtoull(row[2], nullptr, 10), // expire_time
|
||||
static_cast<uint32_t>(strtoul(row[3], nullptr, 10)) // duration
|
||||
});
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -208,7 +208,7 @@ bool ExpeditionRequest::CheckMembersForConflicts(const std::vector<std::string>&
|
||||
if (character_id != last_character_id)
|
||||
{
|
||||
// defaults to online status, if offline group members implemented this needs to change
|
||||
m_members.emplace_back(ExpeditionMember{character_id, character_name});
|
||||
m_members.emplace_back(character_id, character_name);
|
||||
|
||||
// process event lockout conflict messages from the previous character
|
||||
for (const auto& member_lockout : member_lockout_conflicts)
|
||||
@ -257,7 +257,7 @@ bool ExpeditionRequest::CheckMembersForConflicts(const std::vector<std::string>&
|
||||
// leader doesn't have this lockout. queue instead of messaging
|
||||
// now so message comes after any replay lockout messages
|
||||
has_conflicts = true;
|
||||
member_lockout_conflicts.emplace_back(ExpeditionRequestConflict{character_name, lockout});
|
||||
member_lockout_conflicts.push_back({character_name, lockout});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user