mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Store expeditions with dz id not instance id
This exposes dynamic zone ids for any future changes and will make it easier to preserve historic dz and expedition data. This also cleans up some dynamic zone creation for expedition requests When purging instances the expedition table is no longer updated since dynamic zone ids are not re-used like instance ids are Update #dz list commands to show dz id Add GetDynamicZoneID and get_expedition_by_dz_id quest apis
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include <fmt/core.h>
|
||||
|
||||
uint32_t ExpeditionDatabase::InsertExpedition(
|
||||
const std::string& uuid, uint32_t instance_id, const std::string& expedition_name,
|
||||
const std::string& uuid, uint32_t dz_id, const std::string& expedition_name,
|
||||
uint32_t leader_id, uint32_t min_players, uint32_t max_players)
|
||||
{
|
||||
LogExpeditionsDetail(
|
||||
@@ -36,10 +36,10 @@ uint32_t ExpeditionDatabase::InsertExpedition(
|
||||
|
||||
std::string query = fmt::format(SQL(
|
||||
INSERT INTO expeditions
|
||||
(uuid, instance_id, expedition_name, leader_id, min_players, max_players)
|
||||
(uuid, dynamic_zone_id, expedition_name, leader_id, min_players, max_players)
|
||||
VALUES
|
||||
('{}', {}, '{}', {}, {}, {});
|
||||
), uuid, instance_id, EscapeString(expedition_name), leader_id, min_players, max_players);
|
||||
), uuid, dz_id, EscapeString(expedition_name), leader_id, min_players, max_players);
|
||||
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
@@ -57,7 +57,7 @@ std::string ExpeditionDatabase::LoadExpeditionsSelectQuery()
|
||||
SELECT
|
||||
expeditions.id,
|
||||
expeditions.uuid,
|
||||
expeditions.instance_id,
|
||||
expeditions.dynamic_zone_id,
|
||||
expeditions.expedition_name,
|
||||
expeditions.leader_id,
|
||||
expeditions.min_players,
|
||||
|
||||
Reference in New Issue
Block a user