mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-21 23:08:21 +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 BaseGroundSpawnsRepository {
|
||||
public:
|
||||
@@ -67,11 +68,40 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
static std::vector<std::string> SelectColumns()
|
||||
{
|
||||
return {
|
||||
"id",
|
||||
"zoneid",
|
||||
"version",
|
||||
"max_x",
|
||||
"max_y",
|
||||
"max_z",
|
||||
"min_x",
|
||||
"min_y",
|
||||
"heading",
|
||||
"name",
|
||||
"item",
|
||||
"max_allowed",
|
||||
"comment",
|
||||
"respawn_timer",
|
||||
"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("ground_spawns");
|
||||
@@ -81,7 +111,7 @@ public:
|
||||
{
|
||||
return fmt::format(
|
||||
"SELECT {} FROM {}",
|
||||
ColumnsRaw(),
|
||||
SelectColumnsRaw(),
|
||||
TableName()
|
||||
);
|
||||
}
|
||||
@@ -113,8 +143,8 @@ public:
|
||||
entry.max_allowed = 1;
|
||||
entry.comment = "";
|
||||
entry.respawn_timer = 300;
|
||||
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