diff --git a/src/game/LuaEngine b/src/game/LuaEngine index 3b9cf46747..752db0d85e 160000 --- a/src/game/LuaEngine +++ b/src/game/LuaEngine @@ -1 +1 @@ -Subproject commit 3b9cf46747b5d7003c915a8074f9e26f8ca070a0 +Subproject commit 752db0d85e016e8b948f51a07454a5824a97f8ec diff --git a/src/game/Mails/MailHandler.cpp b/src/game/Mails/MailHandler.cpp index 0a86c9fce5..2ae2433fa5 100644 --- a/src/game/Mails/MailHandler.cpp +++ b/src/game/Mails/MailHandler.cpp @@ -38,6 +38,9 @@ #include "Server/Opcodes.h" #include "Chat/Chat.h" #include "Anticheat/Anticheat.hpp" +#ifdef BUILD_ELUNA +#include "LuaEngine/LuaEngine.h" +#endif #define MAX_INBOX_CLIENT_UI_CAPACITY 50 @@ -210,6 +213,14 @@ void WorldSession::HandleSendMail(WorldPacket& recv_data) } } +#ifdef BUILD_ELUNA + if (!sEluna->OnSendMail(pl, rc)) + { + pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_CANT_DO_RIGHT_NOW); + return; + } +#endif + m_anticheat->Mail(subject, body, rc); pl->SendMailResult(0, MAIL_SEND, MAIL_OK);