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

#include "AllMapScript.h"

Inheritance diagram for AllMapScript:
ScriptObject

Public Member Functions

virtual void OnPlayerEnterAll (Map *, Player *)
 This hook called when a player enters any Map. More...
 
virtual void OnPlayerLeaveAll (Map *, Player *)
 This hook called when a player leave any Map. More...
 
virtual void OnBeforeCreateInstanceScript (InstanceMap *, InstanceScript **, bool, std::string, uint32)
 This hook called before create instance script. More...
 
virtual void OnDestroyInstance (MapInstanced *, Map *)
 This hook called before destroy instance. More...
 
virtual void OnCreateMap (Map *)
 This hook called before creating map. More...
 
virtual void OnDestroyMap (Map *)
 This hook called before destroing map. More...
 
virtual void OnMapUpdate (Map *, uint32)
 This hook called before updating map. More...
 
- 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

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

◆ AllMapScript()

AllMapScript::AllMapScript ( const char *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
278{
279 // If empty - enable all available hooks.
280 if (enabledHooks.empty())
281 for (uint16 i = 0; i < ALLMAPHOOK_END; ++i)
282 enabledHooks.emplace_back(i);
283
284 ScriptRegistry<AllMapScript>::AddScript(this, std::move(enabledHooks));
285}
std::uint16_t uint16
Definition: Define.h:108
@ ALLMAPHOOK_END
Definition: AllMapScript.h:33
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:738
Definition: ScriptObject.h:43

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

Member Function Documentation

◆ OnBeforeCreateInstanceScript()

virtual void AllMapScript::OnBeforeCreateInstanceScript ( InstanceMap ,
InstanceScript **  ,
bool  ,
std::string  ,
uint32   
)
inlinevirtual

This hook called before create instance script.

Parameters
instanceMapContains information about the WorldSession
instanceDataContains information about the WorldPacket
loadif true loading instance save data
dataContains information about the instance save data
completedEncounterMaskContains information about the completed encouter mask
67{ }

◆ OnCreateMap()

virtual void AllMapScript::OnCreateMap ( Map )
inlinevirtual

This hook called before creating map.

Parameters
mapContains information about the Map
82{ }

◆ OnDestroyInstance()

virtual void AllMapScript::OnDestroyInstance ( MapInstanced ,
Map  
)
inlinevirtual

This hook called before destroy instance.

Parameters
mapInstancedContains information about the MapInstanced
mapContains information about the Map
75{ }

◆ OnDestroyMap()

virtual void AllMapScript::OnDestroyMap ( Map )
inlinevirtual

This hook called before destroing map.

Parameters
mapContains information about the Map
89{ }

◆ OnMapUpdate()

virtual void AllMapScript::OnMapUpdate ( Map ,
uint32   
)
inlinevirtual

This hook called before updating map.

Parameters
mapContains information about the Map
diffContains information about the diff time
97{ }

◆ OnPlayerEnterAll()

virtual void AllMapScript::OnPlayerEnterAll ( Map ,
Player  
)
inlinevirtual

This hook called when a player enters any Map.

Parameters
mapContains information about the Map
playerContains information about the Player
48{ }

◆ OnPlayerLeaveAll()

virtual void AllMapScript::OnPlayerLeaveAll ( Map ,
Player  
)
inlinevirtual

This hook called when a player leave any Map.

Parameters
mapContains information about the Map
playerContains information about the Player
56{ }