[Dialogue Window / Saylinks] Missing Changes (#1574)

* Implement auto saylink injection

* Cover Lua say since it takes a different code path

* [Dialogue] Dialogue Window Middleware (#1526)

* Dialogue window quest dialogue work

* Add rest of DialogueWindow hooks

* Remove spacing
This commit is contained in:
Chris Miles
2021-10-01 22:09:21 -05:00
committed by GitHub
parent 0762ffa3dc
commit 3883adcefc
7 changed files with 107 additions and 13 deletions
+6 -1
View File
@@ -11,6 +11,7 @@
#include "lua_hate_list.h"
#include "lua_client.h"
#include "lua_stat_bonuses.h"
#include "dialogue_window.h"
struct SpecialAbilities { };
@@ -757,7 +758,11 @@ void Lua_Mob::Message(int type, const char *message) {
Lua_Safe_Call_Void();
// auto inject saylinks
if (RuleB(Chat, AutoInjectSaylinksToClientMessage)) {
if (RuleB(Chat, QuestDialogueUsesDialogueWindow) && self->IsClient()) {
std::string window_markdown = message;
DialogueWindow::Render(self->CastToClient(), window_markdown);
}
else if (RuleB(Chat, AutoInjectSaylinksToClientMessage)) {
std::string new_message = EQ::SayLinkEngine::InjectSaylinksIfNotExist(message);
self->Message(type, new_message.c_str());
}