mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Quest API] (Performance) Check event EVENT_PAYLOAD or EVENT_SIGNAL exist before export and execute (#2902)
* [Quest API] Optionally parse EVENT_PAYLOAD and EVENT_SIGNAL # Notes - Optionally parse these events instead of always doing so. * Update bot.cpp
This commit is contained in:
+5
-2
@@ -3069,8 +3069,11 @@ void NPC::SignalNPC(int _signal_id)
|
||||
|
||||
void NPC::SendPayload(int payload_id, std::string payload_value)
|
||||
{
|
||||
const auto export_string = fmt::format("{} {}", payload_id, payload_value);
|
||||
parse->EventNPC(EVENT_PAYLOAD, this, nullptr, export_string, 0);
|
||||
if (parse->HasQuestSub(GetNPCTypeID(), EVENT_PAYLOAD)) {
|
||||
const auto& export_string = fmt::format("{} {}", payload_id, payload_value);
|
||||
|
||||
parse->EventNPC(EVENT_PAYLOAD, this, nullptr, export_string, 0);
|
||||
}
|
||||
}
|
||||
|
||||
NPC_Emote_Struct* NPC::GetNPCEmote(uint32 emoteid, uint8 event_) {
|
||||
|
||||
Reference in New Issue
Block a user