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

#include "GameEventScript.h"

Inheritance diagram for GameEventScript:
ScriptObject

Public Member Functions

virtual void OnStart (uint16)
 
virtual void OnStop (uint16)
 
virtual void OnEventCheck (uint16)
 
- 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

 GameEventScript (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

◆ GameEventScript()

GameEventScript::GameEventScript ( const char *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
39{
40 // If empty - enable all available hooks.
41 if (enabledHooks.empty())
42 for (uint16 i = 0; i < GAMEEVENTHOOK_END; ++i)
43 enabledHooks.emplace_back(i);
44
45 ScriptRegistry<GameEventScript>::AddScript(this, std::move(enabledHooks));
46}
std::uint16_t uint16
Definition: Define.h:108
@ GAMEEVENTHOOK_END
Definition: GameEventScript.h:29
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:738
Definition: ScriptObject.h:43

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

Member Function Documentation

◆ OnEventCheck()

virtual void GameEventScript::OnEventCheck ( uint16  )
inlinevirtual
45{ }

◆ OnStart()

virtual void GameEventScript::OnStart ( uint16  )
inlinevirtual
39{ }

◆ OnStop()

virtual void GameEventScript::OnStop ( uint16  )
inlinevirtual
42{ }