mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
[Dialogue] Add hidden response support. (#1583)
Allows operators to hide responses. Syntax is `hiddenresponse`.
This commit is contained in:
parent
3a76d9a28e
commit
ccab07bd66
@ -56,6 +56,13 @@ void DialogueWindow::Render(Client *c, std::string markdown)
|
|||||||
find_replace(output, "nobracket", "");
|
find_replace(output, "nobracket", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool render_hiddenresponse = false;
|
||||||
|
if (markdown.find("hiddenresponse") != std::string::npos) {
|
||||||
|
render_hiddenresponse = true;
|
||||||
|
LogDiaWind("Client [{}] Rendering hiddenresponse", c->GetCleanName());
|
||||||
|
find_replace(output, "hiddenresponse", "");
|
||||||
|
}
|
||||||
|
|
||||||
// animations
|
// animations
|
||||||
std::string animation = get_between(output, "+", "+");
|
std::string animation = get_between(output, "+", "+");
|
||||||
if (!animation.empty()) {
|
if (!animation.empty()) {
|
||||||
@ -504,6 +511,9 @@ void DialogueWindow::Render(Client *c, std::string markdown)
|
|||||||
// build the final output string
|
// build the final output string
|
||||||
std::string final_output;
|
std::string final_output;
|
||||||
final_output = fmt::format("{}{}{} <br><br> {}", quote_string, output, quote_string, click_response);
|
final_output = fmt::format("{}{}{} <br><br> {}", quote_string, output, quote_string, click_response);
|
||||||
|
if (render_hiddenresponse) {
|
||||||
|
final_output = fmt::format("{}{}{}", quote_string, output, quote_string);
|
||||||
|
}
|
||||||
|
|
||||||
// send popup
|
// send popup
|
||||||
c->SendFullPopup(
|
c->SendFullPopup(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user