mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 10:58:20 +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
-2
@@ -41,6 +41,7 @@ typedef const char Const_char;
|
||||
#include "mob.h"
|
||||
#include "client.h"
|
||||
#include "../common/spdat.h"
|
||||
#include "dialogue_window.h"
|
||||
|
||||
#ifdef BOTS
|
||||
#include "bot.h"
|
||||
@@ -2621,8 +2622,11 @@ XS(XS_Mob_Message) {
|
||||
char *message = (char *) SvPV_nolen(ST(2));
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
|
||||
// auto inject saylinks
|
||||
if (RuleB(Chat, AutoInjectSaylinksToClientMessage)) {
|
||||
if (RuleB(Chat, QuestDialogueUsesDialogueWindow) && THIS->IsClient()) {
|
||||
std::string window_markdown = message;
|
||||
DialogueWindow::Render(THIS->CastToClient(), window_markdown);
|
||||
}
|
||||
else if (RuleB(Chat, AutoInjectSaylinksToClientMessage)) {
|
||||
std::string new_message = EQ::SayLinkEngine::InjectSaylinksIfNotExist(message);
|
||||
THIS->Message(type, new_message.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user