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

#include "BattlegroundMapScript.h"

Inheritance diagram for BattlegroundMapScript:
ScriptObject MapScript< BattlegroundMap > 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< BattlegroundMap >
void checkMap ()
 
MapEntry const * GetEntry ()
 
virtual void OnCreate (BattlegroundMap *)
 
virtual void OnDestroy (BattlegroundMap *)
 
virtual void OnLoadGridMap (BattlegroundMap *, GridMap *, uint32, uint32)
 
virtual void OnUnloadGridMap (BattlegroundMap *, GridMap *, uint32, uint32)
 
virtual void OnPlayerEnter (BattlegroundMap *, Player *)
 
virtual void OnPlayerLeave (BattlegroundMap *, Player *)
 
void OnUpdate (BattlegroundMap *, uint32) override
 
- Public Member Functions inherited from UpdatableScript< TObject >
virtual void OnUpdate (TObject *, uint32)
 

Protected Member Functions

 BattlegroundMapScript (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< BattlegroundMap >
 MapScript (uint32 mapId)
 
- Protected Member Functions inherited from UpdatableScript< TObject >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ BattlegroundMapScript()

BattlegroundMapScript::BattlegroundMapScript ( const char *  name,
uint32  mapId 
)
protected
22 :
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 BattlegroundMapScript::checkValidity ( )
overridevirtual

Reimplemented from ScriptObject.

29{
30 checkMap();
31
32 if (GetEntry() && !GetEntry()->IsBattleground())
33 {
34 LOG_ERROR("maps.script", "BattlegroundMapScript 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< BattlegroundMap >::checkMap(), MapScript< BattlegroundMap >::GetEntry(), and LOG_ERROR.

◆ isAfterLoadScript()

bool BattlegroundMapScript::isAfterLoadScript ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

29{ return true; }