mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Quest API] Add Marquee methods to Perl/Lua. (#2544)
* [Quest API] Add zonemarquee to Perl/Lua. # Perl - Add `quest::zonemarquee(type, priority, fade_in, fade_out, duration, message)` to Perl. # Lua - Add `eq.zone_marquee(type, priority, fade_in, fade_out, duration, message)` to Lua. # Notes - Allows operators to easily send a zone-wide marquee, similar to `quest::ze`/`eq.zone_emote`. * Update lua_general.cpp * Add other methods. * Add entity list marquee * Update client.cpp * Add more shorthands.
This commit is contained in:
+34
-7
@@ -2519,22 +2519,29 @@ void QuestManager::we(int type, const char *str) {
|
||||
);
|
||||
}
|
||||
|
||||
void QuestManager::message(int color, const char *message) {
|
||||
void QuestManager::message(uint32 type, const char *message) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!initiator)
|
||||
if (!initiator) {
|
||||
return;
|
||||
}
|
||||
|
||||
initiator->Message(color, message);
|
||||
initiator->Message(type, message);
|
||||
}
|
||||
|
||||
void QuestManager::whisper(const char *message) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!initiator || !owner)
|
||||
if (!initiator || !owner) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string mob_name = owner->GetCleanName();
|
||||
std::string new_message = fmt::format("{} whispers, '{}'", mob_name, message);
|
||||
initiator->Message(Chat::EchoChat1, new_message.c_str());
|
||||
initiator->Message(
|
||||
Chat::EchoChat1,
|
||||
fmt::format(
|
||||
"{} whispers, '{}'",
|
||||
owner->GetCleanName(),
|
||||
message
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
int QuestManager::getlevel(uint8 type)
|
||||
@@ -3724,3 +3731,23 @@ void QuestManager::LearnRecipe(uint32 recipe_id) {
|
||||
|
||||
initiator->LearnRecipe(recipe_id);
|
||||
}
|
||||
|
||||
void QuestManager::marquee(uint32 type, std::string message, uint32 duration)
|
||||
{
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!initiator) {
|
||||
return;
|
||||
}
|
||||
|
||||
initiator->SendMarqueeMessage(type, message, duration);
|
||||
}
|
||||
|
||||
void QuestManager::marquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, std::string message)
|
||||
{
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!initiator) {
|
||||
return;
|
||||
}
|
||||
|
||||
initiator->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user