mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-01 06:01:38 +00:00
[Repositories] Update repositories (#2040)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDoorsRepository {
|
||||
public:
|
||||
@@ -101,11 +102,57 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
static std::vector<std::string> SelectColumns()
|
||||
{
|
||||
return {
|
||||
"id",
|
||||
"doorid",
|
||||
"zone",
|
||||
"version",
|
||||
"name",
|
||||
"pos_y",
|
||||
"pos_x",
|
||||
"pos_z",
|
||||
"heading",
|
||||
"opentype",
|
||||
"guild",
|
||||
"lockpick",
|
||||
"keyitem",
|
||||
"nokeyring",
|
||||
"triggerdoor",
|
||||
"triggertype",
|
||||
"disable_timer",
|
||||
"doorisopen",
|
||||
"door_param",
|
||||
"dest_zone",
|
||||
"dest_instance",
|
||||
"dest_x",
|
||||
"dest_y",
|
||||
"dest_z",
|
||||
"dest_heading",
|
||||
"invert_state",
|
||||
"incline",
|
||||
"size",
|
||||
"buffer",
|
||||
"client_version_mask",
|
||||
"is_ldon_door",
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
{
|
||||
return std::string("doors");
|
||||
@@ -115,7 +162,7 @@ public:
|
||||
{
|
||||
return fmt::format(
|
||||
"SELECT {} FROM {}",
|
||||
ColumnsRaw(),
|
||||
SelectColumnsRaw(),
|
||||
TableName()
|
||||
);
|
||||
}
|
||||
@@ -164,8 +211,8 @@ public:
|
||||
entry.buffer = 0;
|
||||
entry.client_version_mask = 4294967295;
|
||||
entry.is_ldon_door = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.min_expansion = -1;
|
||||
entry.max_expansion = -1;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user