mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Diawind] Plus sign markdown fix (#2727)
This commit is contained in:
parent
6d13f46c40
commit
db7ab7a3ef
@ -69,12 +69,13 @@ void DialogueWindow::Render(Client *c, std::string markdown)
|
||||
std::string animation = Strings::GetBetween(output, "+", "+");
|
||||
if (!animation.empty()) {
|
||||
LogDiaWind("Client [{}] Animation is not empty, contents are [{}]", c->GetCleanName(), animation);
|
||||
Strings::FindReplace(output, fmt::format("+{}+", animation), "");
|
||||
|
||||
// we treat the animation field differently if it is a number
|
||||
bool found_animation = false;
|
||||
if (Strings::IsNumber(animation)) {
|
||||
LogDiaWindDetail("Client [{}] Animation is a number, firing animation [{}]", c->GetCleanName(), animation);
|
||||
target->DoAnim(std::stoi(animation));
|
||||
found_animation = true;
|
||||
}
|
||||
else {
|
||||
for (auto &a: animations) {
|
||||
@ -86,9 +87,14 @@ void DialogueWindow::Render(Client *c, std::string markdown)
|
||||
a.first
|
||||
);
|
||||
target->DoAnim(a.second);
|
||||
found_animation = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (found_animation) {
|
||||
Strings::FindReplace(output, fmt::format("+{}+", animation), "");
|
||||
}
|
||||
}
|
||||
|
||||
if (animation.empty() && RuleB(Chat, DialogueWindowAnimatesNPCsIfNoneSet)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user