Implement content flags

This commit is contained in:
Akkadius
2020-04-11 05:48:41 -05:00
parent 47b8aa3f18
commit 5b4c4bfd66
11 changed files with 535 additions and 96 deletions
+18
View File
@@ -19,6 +19,10 @@
*/
#include "world_content_service.h"
#include "../database.h"
#include "../rulesys.h"
#include "../eqemu_logsys.h"
WorldContentService::WorldContentService()
{
@@ -30,6 +34,20 @@ int WorldContentService::GetCurrentExpansion() const
return current_expansion;
}
void WorldContentService::SetExpansionContext()
{
int expansion = RuleI(Expansion, CurrentExpansion);
if (expansion >= Expansion::Classic && expansion <= Expansion::MaxId) {
content_service.SetCurrentExpansion(expansion);
}
LogInfo(
"Current expansion is [{}] ({})",
GetCurrentExpansion(),
GetCurrentExpansionName()
);
}
void WorldContentService::SetCurrentExpansion(int current_expansion)
{
WorldContentService::current_expansion = current_expansion;