mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Saylinks] Implement Auto Saylink Injection (#1525)
* Implement auto saylink injection * Cover Lua say since it takes a different code path
This commit is contained in:
+13
-4
@@ -2923,10 +2923,19 @@ void Mob::Say(const char *format, ...)
|
||||
talker = this;
|
||||
}
|
||||
|
||||
entity_list.MessageCloseString(
|
||||
talker, false, 200, 10,
|
||||
GENERIC_SAY, GetCleanName(), buf
|
||||
);
|
||||
if (RuleB(Chat, AutoInjectSaylinksToSay)) {
|
||||
std::string new_message = EQ::SayLinkEngine::InjectSaylinksIfNotExist(buf);
|
||||
entity_list.MessageCloseString(
|
||||
talker, false, 200, 10,
|
||||
GENERIC_SAY, GetCleanName(), new_message.c_str()
|
||||
);
|
||||
}
|
||||
else {
|
||||
entity_list.MessageCloseString(
|
||||
talker, false, 200, 10,
|
||||
GENERIC_SAY, GetCleanName(), buf
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user