mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31: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, "+", "+");
|
std::string animation = Strings::GetBetween(output, "+", "+");
|
||||||
if (!animation.empty()) {
|
if (!animation.empty()) {
|
||||||
LogDiaWind("Client [{}] Animation is not empty, contents are [{}]", c->GetCleanName(), animation);
|
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
|
// we treat the animation field differently if it is a number
|
||||||
|
bool found_animation = false;
|
||||||
if (Strings::IsNumber(animation)) {
|
if (Strings::IsNumber(animation)) {
|
||||||
LogDiaWindDetail("Client [{}] Animation is a number, firing animation [{}]", c->GetCleanName(), animation);
|
LogDiaWindDetail("Client [{}] Animation is a number, firing animation [{}]", c->GetCleanName(), animation);
|
||||||
target->DoAnim(std::stoi(animation));
|
target->DoAnim(std::stoi(animation));
|
||||||
|
found_animation = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (auto &a: animations) {
|
for (auto &a: animations) {
|
||||||
@ -86,9 +87,14 @@ void DialogueWindow::Render(Client *c, std::string markdown)
|
|||||||
a.first
|
a.first
|
||||||
);
|
);
|
||||||
target->DoAnim(a.second);
|
target->DoAnim(a.second);
|
||||||
|
found_animation = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (found_animation) {
|
||||||
|
Strings::FindReplace(output, fmt::format("+{}+", animation), "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (animation.empty() && RuleB(Chat, DialogueWindowAnimatesNPCsIfNoneSet)) {
|
if (animation.empty() && RuleB(Chat, DialogueWindowAnimatesNPCsIfNoneSet)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user