Skip to content

Commit

Permalink
Add SendMail hook
Browse files Browse the repository at this point in the history
-Update Eluna submodule

Co-Authored-By: Foereaper <[email protected]>
  • Loading branch information
Niam5 and Foereaper committed Oct 13, 2023
1 parent e996079 commit 7fb3f41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/LuaEngine
11 changes: 11 additions & 0 deletions src/game/Mails/MailHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7fb3f41

Please sign in to comment.