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

#include "ArenaScript.h"

Inheritance diagram for ArenaScript:
ScriptObject

Public Member Functions

bool IsDatabaseBound () const override
 
virtual bool CanAddMember (ArenaTeam *, ObjectGuid)
 
virtual void OnGetPoints (ArenaTeam *, uint32, float &)
 
virtual bool OnBeforeArenaCheckWinConditions (Battleground *const)
 
virtual bool CanSaveToDB (ArenaTeam *)
 
virtual void OnArenaStart (Battleground *)
 
- 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

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

◆ ArenaScript()

ArenaScript::ArenaScript ( const char *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
49{
50 // If empty - enable all available hooks.
51 if (enabledHooks.empty())
52 for (uint16 i = 0; i < ARENAHOOK_END; ++i)
53 enabledHooks.emplace_back(i);
54
55 ScriptRegistry<ArenaScript>::AddScript(this, std::move(enabledHooks));
56}
std::uint16_t uint16
Definition: Define.h:108
@ ARENAHOOK_END
Definition: ArenaScript.h:32
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:735
Definition: ScriptObject.h:43

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

Member Function Documentation

◆ CanAddMember()

virtual bool ArenaScript::CanAddMember ( ArenaTeam ,
ObjectGuid   
)
inlinevirtual
45{ return true; }

◆ CanSaveToDB()

virtual bool ArenaScript::CanSaveToDB ( ArenaTeam )
inlinevirtual
51{ return true; }

◆ IsDatabaseBound()

bool ArenaScript::IsDatabaseBound ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

43{ return false; }

◆ OnArenaStart()

virtual void ArenaScript::OnArenaStart ( Battleground )
inlinevirtual
53{ };

◆ OnBeforeArenaCheckWinConditions()

virtual bool ArenaScript::OnBeforeArenaCheckWinConditions ( Battleground * const  )
inlinevirtual
49{ return true; }

◆ OnGetPoints()

virtual void ArenaScript::OnGetPoints ( ArenaTeam ,
uint32  ,
float &   
)
inlinevirtual
47{ }