Export quest::is_content_flag_enabled and quest::set_content_flag

This commit is contained in:
Akkadius committed 2020-05-24 20:45:44 -05:00
1 parent 50c266982f
commit a4b027db58
7 files changed
+155 -31

No files matched your search

+39 -15
View File
@@ -48,21 +48,6 @@ void WorldContentService::SetExpansionContext()
);
}
void WorldContentService::SetCurrentExpansion(int current_expansion)
{
WorldContentService::current_expansion = current_expansion;
}
const std::vector<std::string> &WorldContentService::GetContentFlags() const
{
return content_flags;
}
void WorldContentService::SetContentFlags(std::vector<std::string> content_flags)
{
WorldContentService::content_flags = content_flags;
}
std::string WorldContentService::GetCurrentExpansionName()
{
if (content_service.GetCurrentExpansion() == Expansion::EXPANSION_ALL) {
@@ -75,3 +60,42 @@ std::string WorldContentService::GetCurrentExpansionName()
return "Unknown Expansion";
}
/**
* @param current_expansion
*/
void WorldContentService::SetCurrentExpansion(int current_expansion)
{
WorldContentService::current_expansion = current_expansion;
}
/**
* @return
*/
const std::vector<std::string> &WorldContentService::GetContentFlags() const
{
return content_flags;
}
/**
* @param content_flags
*/
void WorldContentService::SetContentFlags(std::vector<std::string> content_flags)
{
WorldContentService::content_flags = content_flags;
}
/**
* @param content_flag
* @return
*/
bool WorldContentService::IsContentFlagEnabled(const std::string& content_flag)
{
for (auto &flag : GetContentFlags()) {
if (flag == content_flag) {
return true;
}
}
return false;
}