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

#include "ScriptMgr.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
 
- 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)
 
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
355{
357}
Definition: ScriptMgr.h:107
Definition: ScriptMgr.h:283
static void AddScript(TScript *const script)
Definition: ScriptMgr.h:2708

References ScriptRegistry< TScript >::AddScript().

Member Function Documentation

◆ checkValidity()

void BattlegroundMapScript::checkValidity ( )
inlineoverridevirtual

Reimplemented from ScriptObject.

373 {
374 checkMap();
375
376 if (GetEntry() && !GetEntry()->IsBattleground())
377 LOG_ERROR("maps.script", "BattlegroundMapScript for map {} is invalid.", GetEntry()->MapID);
378 }
#define LOG_ERROR(filterType__,...)
Definition: Log.h:159
MapEntry const * GetEntry()
Definition: ScriptMgr.h:303
void checkMap()
Definition: ScriptMgr.h:294

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

◆ isAfterLoadScript()

bool BattlegroundMapScript::isAfterLoadScript ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

370{ return true; }