AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
MailScript Class Reference

#include "MailScript.h"

Inheritance diagram for MailScript:
ScriptObject

Public Member Functions

virtual void OnBeforeMailDraftSendMailTo (MailDraft *, MailReceiver const &, MailSender const &, MailCheckMask &, uint32 &, uint32 &, bool &, bool &)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Protected Member Functions

 MailScript (const char *name, std::vector< uint16 > enabledHooks=std::vector< uint16 >())
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ MailScript()

MailScript::MailScript ( const char *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
29{
30 // If empty - enable all available hooks.
31 if (enabledHooks.empty())
32 for (uint16 i = 0; i < MAILHOOK_END; ++i)
33 enabledHooks.emplace_back(i);
34
35 ScriptRegistry<MailScript>::AddScript(this, std::move(enabledHooks));
36}
std::uint16_t uint16
Definition: Define.h:108
@ MAILHOOK_END
Definition: MailScript.h:27
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:737
Definition: ScriptObject.h:44

References ScriptRegistry< TScript >::AddScript(), and MAILHOOK_END.

Member Function Documentation

◆ OnBeforeMailDraftSendMailTo()

virtual void MailScript::OnBeforeMailDraftSendMailTo ( MailDraft ,
MailReceiver const &  ,
MailSender const &  ,
MailCheckMask ,
uint32 ,
uint32 ,
bool &  ,
bool &   
)
inlinevirtual
37{ }