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

#include "WorldMapScript.h"

Inheritance diagram for WorldMapScript:
ScriptObject MapScript< Map > UpdatableScript< TObject >

Public Member Functions

bool isAfterLoadScript () const override
 
void checkValidity () override
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 
- Public Member Functions inherited from MapScript< Map >
void checkMap ()
 
MapEntry const * GetEntry ()
 
virtual void OnCreate (Map *)
 
virtual void OnDestroy (Map *)
 
virtual void OnLoadGridMap (Map *, GridMap *, uint32, uint32)
 
virtual void OnUnloadGridMap (Map *, GridMap *, uint32, uint32)
 
virtual void OnPlayerEnter (Map *, Player *)
 
virtual void OnPlayerLeave (Map *, Player *)
 
void OnUpdate (Map *, uint32) override
 
- Public Member Functions inherited from UpdatableScript< TObject >
virtual void OnUpdate (TObject *, uint32)
 

Protected Member Functions

 WorldMapScript (const char *name, uint32 mapId)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from MapScript< Map >
 MapScript (uint32 mapId)
 
- Protected Member Functions inherited from UpdatableScript< TObject >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ WorldMapScript()

WorldMapScript::WorldMapScript ( const char *  name,
uint32  mapId 
)
protected
22 :
23 ScriptObject(name), MapScript<Map>(mapId)
24{
26}
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:737
Definition: ScriptObject.h:44
Definition: ScriptObject.h:82

References ScriptRegistry< TScript >::AddScript().

Member Function Documentation

◆ checkValidity()

void WorldMapScript::checkValidity ( )
overridevirtual

Reimplemented from ScriptObject.

29{
30 checkMap();
31
32 if (GetEntry() && !GetEntry()->IsWorldMap())
33 {
34 LOG_ERROR("maps.script", "WorldMapScript for map {} is invalid.", GetEntry()->MapID);
35 }
36}
#define LOG_ERROR(filterType__,...)
Definition: Log.h:156
MapEntry const * GetEntry()
Definition: ScriptObject.h:93
void checkMap()
Definition: ScriptObject.cpp:33

References MapScript< Map >::checkMap(), MapScript< Map >::GetEntry(), and LOG_ERROR.

◆ isAfterLoadScript()

bool WorldMapScript::isAfterLoadScript ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

29{ return true; }