mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Assign expeditions a uuid
This commit is contained in:
@@ -26,17 +26,19 @@
|
||||
#include <fmt/core.h>
|
||||
|
||||
uint32_t ExpeditionDatabase::InsertExpedition(
|
||||
uint32_t instance_id, const std::string& expedition_name, uint32_t leader_id,
|
||||
uint32_t min_players, uint32_t max_players)
|
||||
const std::string& uuid, uint32_t instance_id, const std::string& expedition_name,
|
||||
uint32_t leader_id, uint32_t min_players, uint32_t max_players)
|
||||
{
|
||||
LogExpeditionsDetail("Inserting new expedition [{}] leader [{}]", expedition_name, leader_id);
|
||||
LogExpeditionsDetail(
|
||||
"Inserting new expedition [{}] leader [{}] uuid [{}]", expedition_name, leader_id, uuid
|
||||
);
|
||||
|
||||
std::string query = fmt::format(SQL(
|
||||
INSERT INTO expedition_details
|
||||
(instance_id, expedition_name, leader_id, min_players, max_players)
|
||||
(uuid, instance_id, expedition_name, leader_id, min_players, max_players)
|
||||
VALUES
|
||||
({}, '{}', {}, {}, {});
|
||||
), instance_id, expedition_name, leader_id, min_players, max_players);
|
||||
('{}', {}, '{}', {}, {}, {});
|
||||
), uuid, instance_id, expedition_name, leader_id, min_players, max_players);
|
||||
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
@@ -53,6 +55,7 @@ std::string ExpeditionDatabase::LoadExpeditionsSelectQuery()
|
||||
return std::string(SQL(
|
||||
SELECT
|
||||
expedition_details.id,
|
||||
expedition_details.uuid,
|
||||
expedition_details.instance_id,
|
||||
expedition_details.expedition_name,
|
||||
expedition_details.leader_id,
|
||||
|
||||
Reference in New Issue
Block a user