mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 09:28: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 BaseStartZonesRepository {
|
||||
public:
|
||||
@@ -69,11 +70,41 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
static std::vector<std::string> SelectColumns()
|
||||
{
|
||||
return {
|
||||
"x",
|
||||
"y",
|
||||
"z",
|
||||
"heading",
|
||||
"zone_id",
|
||||
"bind_id",
|
||||
"player_choice",
|
||||
"player_class",
|
||||
"player_deity",
|
||||
"player_race",
|
||||
"start_zone",
|
||||
"bind_x",
|
||||
"bind_y",
|
||||
"bind_z",
|
||||
"select_rank",
|
||||
"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("start_zones");
|
||||
@@ -83,7 +114,7 @@ public:
|
||||
{
|
||||
return fmt::format(
|
||||
"SELECT {} FROM {}",
|
||||
ColumnsRaw(),
|
||||
SelectColumnsRaw(),
|
||||
TableName()
|
||||
);
|
||||
}
|
||||
@@ -116,8 +147,8 @@ public:
|
||||
entry.bind_y = 0;
|
||||
entry.bind_z = 0;
|
||||
entry.select_rank = 50;
|
||||
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