mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 07:11:29 +00:00
Cleanup content flag loading logic
This commit is contained in:
parent
331eb51126
commit
a54d92d078
@ -1240,20 +1240,7 @@ void Zone::ReloadStaticData() {
|
|||||||
|
|
||||||
content_service.SetExpansionContext();
|
content_service.SetExpansionContext();
|
||||||
|
|
||||||
std::vector<std::string> set_content_flags;
|
ZoneStore::LoadContentFlags();
|
||||||
auto content_flags = ContentFlagsRepository::GetWhere("enabled = 1");
|
|
||||||
set_content_flags.reserve(content_flags.size());
|
|
||||||
|
|
||||||
for (auto &flags: content_flags) {
|
|
||||||
set_content_flags.push_back(flags.flag_name);
|
|
||||||
|
|
||||||
LogInfo(
|
|
||||||
"Enabled content flag [{}]",
|
|
||||||
flags.flag_name
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
content_service.SetContentFlags(set_content_flags);
|
|
||||||
|
|
||||||
LogInfo("Zone Static Data Reloaded");
|
LogInfo("Zone Static Data Reloaded");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,14 +149,15 @@ void ZoneStore::LoadContentFlags()
|
|||||||
std::vector<std::string> set_content_flags;
|
std::vector<std::string> set_content_flags;
|
||||||
auto content_flags = ContentFlagsRepository::GetWhere("enabled = 1");
|
auto content_flags = ContentFlagsRepository::GetWhere("enabled = 1");
|
||||||
|
|
||||||
|
set_content_flags.reserve(content_flags.size());
|
||||||
for (auto &flags: content_flags) {
|
for (auto &flags: content_flags) {
|
||||||
set_content_flags.push_back(flags.flag_name);
|
set_content_flags.push_back(flags.flag_name);
|
||||||
|
}
|
||||||
|
|
||||||
LogInfo(
|
LogInfo(
|
||||||
"Enabled content flag [{}]",
|
"Enabled content flags [{}]",
|
||||||
flags.flag_name
|
implode(", ", set_content_flags)
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
content_service.SetContentFlags(set_content_flags);
|
content_service.SetContentFlags(set_content_flags);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user