mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-12 00:18:37 +00:00
Add message(color, message) and whisper(message) to Perl/Lua.
- Add quest::message(color, message) to Perl. - Add eq.message(color, message) to Lua. - Add quest::whisper(message) to Perl. - Add eq.whisper(message) to Lua. These methods allow you to use implied client references. The whisper method also converts a widely used plugin in Perl to a Perl and Lua method that works on both Clients and NPCs.
This commit is contained in:
@@ -2580,6 +2580,24 @@ void QuestManager::we(int type, const char *str) {
|
||||
worldserver.SendEmoteMessage(0, 0, type, str);
|
||||
}
|
||||
|
||||
void QuestManager::message(int color, const char *message) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!initiator)
|
||||
return;
|
||||
|
||||
initiator->Message(color, message);
|
||||
}
|
||||
|
||||
void QuestManager::whisper(const char *message) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!initiator || !owner)
|
||||
return;
|
||||
|
||||
std::string mob_name = owner->GetCleanName();
|
||||
std::string new_message = fmt::format("{} whispers, '{}'", mob_name, message);
|
||||
initiator->Message(315, new_message.c_str());
|
||||
}
|
||||
|
||||
int QuestManager::getlevel(uint8 type)
|
||||
{
|
||||
QuestManagerCurrentQuestVars();
|
||||
|
||||
Reference in New Issue
Block a user