mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[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:
+6
-1
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user