eqemu-server/zone/gm_commands/show/content_flags.cpp
Chris Miles d182fc3613
[Expansions] Zone Expansion Version Routing (#4084)
* Expansion version routing

* CheckForImproperContentFiles rule

* Update world_content_service.cpp

* Update client.cpp

* Update client.cpp

* Update CheckForImproperContentFiles

* Remove nek pok check

* Remove file checking

* Remove

* Command and dev tools menu tweaks

* Update world_content_service.cpp

* Update world_content_service.cpp

* Update version path

* Update content_filter_criteria.h

* Update content_filter_criteria.h

* Update quest_parser_collection.cpp

* Update comments

* PR feedback

* Update client_packet.cpp

* Remove notes column for display cleanliness
2024-02-19 20:35:17 -06:00

31 lines
851 B
C++

#include "../../client.h"
#include "../../dialogue_window.h"
void ShowContentFlags(Client *c, const Seperator *sep)
{
Client *t = c;
if (c->GetTarget() && c->GetTarget()->IsClient()) {
t = c->GetTarget()->CastToClient();
}
std::string flags = DialogueWindow::TableRow(
DialogueWindow::TableCell("id") +
DialogueWindow::TableCell("flag_name") +
DialogueWindow::TableCell("enabled")
);
for (auto &f: ContentFlagsRepository::All(database)) {
flags += DialogueWindow::TableRow(
DialogueWindow::TableCell(std::to_string(f.id)) +
DialogueWindow::TableCell(f.flag_name) +
DialogueWindow::TableCell(
f.enabled ?
DialogueWindow::ColorMessage("forest_green", "yes") :
DialogueWindow::ColorMessage("red", "no")
)
);
}
c->SendPopupToClient("Server Content Flag Settings", DialogueWindow::Table(flags).c_str());
}