AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
MapScript< TMap > Class Template Reference

#include "ScriptObject.h"

Inheritance diagram for MapScript< TMap >:
UpdatableScript< TMap >

Public Member Functions

void checkMap ()
 
MapEntry const * GetEntry ()
 
virtual void OnCreate (TMap *)
 
virtual void OnDestroy (TMap *)
 
virtual void OnLoadGridMap (TMap *, GridMap *, uint32, uint32)
 
virtual void OnUnloadGridMap (TMap *, GridMap *, uint32, uint32)
 
virtual void OnPlayerEnter (TMap *, Player *)
 
virtual void OnPlayerLeave (TMap *, Player *)
 
void OnUpdate (TMap *, uint32) override
 
virtual void OnUpdate (TMap *, uint32)
 

Protected Member Functions

 MapScript (uint32 mapId)
 
- Protected Member Functions inherited from UpdatableScript< TMap >
 UpdatableScript ()=default
 

Private Attributes

MapEntry const * _mapEntry
 
uint32 _mapId
 

Detailed Description

template<class TMap>
class MapScript< TMap >

Constructor & Destructor Documentation

◆ MapScript()

template<class TMap >
MapScript< TMap >::MapScript ( uint32  mapId)
inlineexplicitprotected
86: _mapId(mapId) { }
uint32 _mapId
Definition: ScriptObject.h:83

Member Function Documentation

◆ checkMap()

template<class TMap >
void MapScript< TMap >::checkMap
34{
35 _mapEntry = sMapStore.LookupEntry(_mapId);
36
37 if (!_mapEntry)
38 LOG_ERROR("maps.script", "Invalid MapScript for {}; no such map ID.", _mapId);
39}
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
MapEntry const * _mapEntry
Definition: ScriptObject.h:82

References LOG_ERROR, and sMapStore.

◆ GetEntry()

template<class TMap >
MapEntry const * MapScript< TMap >::GetEntry ( )
inline
92{ return _mapEntry; }

References MapScript< TMap >::_mapEntry.

◆ OnCreate()

template<class TMap >
virtual void MapScript< TMap >::OnCreate ( TMap *  )
inlinevirtual
95{ }

Referenced by ScriptMgr::OnCreateMap().

◆ OnDestroy()

template<class TMap >
virtual void MapScript< TMap >::OnDestroy ( TMap *  )
inlinevirtual
98{ }

Referenced by ScriptMgr::OnDestroyMap().

◆ OnLoadGridMap()

template<class TMap >
virtual void MapScript< TMap >::OnLoadGridMap ( TMap *  ,
GridMap ,
uint32  ,
uint32   
)
inlinevirtual
101{ }

Referenced by ScriptMgr::OnLoadGridMap().

◆ OnPlayerEnter()

template<class TMap >
virtual void MapScript< TMap >::OnPlayerEnter ( TMap *  ,
Player  
)
inlinevirtual
107{ }

◆ OnPlayerLeave()

template<class TMap >
virtual void MapScript< TMap >::OnPlayerLeave ( TMap *  ,
Player  
)
inlinevirtual
110{ }

Referenced by ScriptMgr::OnPlayerLeaveMap().

◆ OnUnloadGridMap()

template<class TMap >
virtual void MapScript< TMap >::OnUnloadGridMap ( TMap *  ,
GridMap ,
uint32  ,
uint32   
)
inlinevirtual
104{ }

Referenced by ScriptMgr::OnUnloadGridMap().

◆ OnUpdate()

template<class TMap >
void MapScript< TMap >::OnUpdate ( TMap *  ,
uint32   
)
inlineoverridevirtual

Reimplemented from UpdatableScript< TMap >.

113{ }

Referenced by ScriptMgr::OnMapUpdate().

Member Data Documentation

◆ _mapEntry

template<class TMap >
MapEntry const* MapScript< TMap >::_mapEntry
private

◆ _mapId

template<class TMap >
uint32 MapScript< TMap >::_mapId
private