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

#include "ScriptMgr.h"

Inheritance diagram for BGScript:
ScriptObject

Public Member Functions

bool IsDatabaseBound () const override
 
virtual void OnBattlegroundStart (Battleground *)
 This hook runs before start Battleground.
 
virtual void OnBattlegroundEndReward (Battleground *, Player *, TeamId)
 
virtual void OnBattlegroundUpdate (Battleground *, uint32)
 
virtual void OnBattlegroundAddPlayer (Battleground *, Player *)
 
virtual void OnBattlegroundBeforeAddPlayer (Battleground *, Player *)
 
virtual void OnBattlegroundRemovePlayerAtLeave (Battleground *, Player *)
 
virtual void OnQueueUpdate (BattlegroundQueue *, uint32, BattlegroundTypeId, BattlegroundBracketId, uint8, bool, uint32)
 
virtual void OnAddGroup (BattlegroundQueue *, GroupQueueInfo *, uint32 &, Player *, Group *, BattlegroundTypeId, PvPDifficultyEntry const *, uint8, bool, bool, uint32, uint32, uint32, uint32)
 
virtual bool CanFillPlayersToBG (BattlegroundQueue *, Battleground *, BattlegroundBracketId)
 
virtual bool IsCheckNormalMatch (BattlegroundQueue *, Battleground *, BattlegroundBracketId, uint32, uint32)
 
virtual bool CanSendMessageBGQueue (BattlegroundQueue *, Player *, Battleground *, PvPDifficultyEntry const *)
 
virtual bool OnBeforeSendJoinMessageArenaQueue (BattlegroundQueue *, Player *, GroupQueueInfo *, PvPDifficultyEntry const *, bool)
 This hook runs before sending the join message during the arena queue, allowing you to run extra operations or disabling the join message.
 
virtual bool OnBeforeSendExitMessageArenaQueue (BattlegroundQueue *, GroupQueueInfo *)
 This hook runs before sending the exit message during the arena queue, allowing you to run extra operations or disabling the exit message.
 
virtual void OnBattlegroundEnd (Battleground *, TeamId)
 This hook runs after end Battleground.
 
virtual void OnBattlegroundDestroy (Battleground *)
 This hook runs before Battleground destroy.
 
virtual void OnBattlegroundCreate (Battleground *)
 This hook runs after Battleground create.
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 

Protected Member Functions

 BGScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ BGScript()

BGScript::BGScript ( const char *  name)
protected
504 : ScriptObject(name)
505{
507}
Definition: ScriptMgr.h:108
static void AddScript(TScript *const script)
Definition: ScriptMgr.h:2720

References ScriptRegistry< TScript >::AddScript().

Member Function Documentation

◆ CanFillPlayersToBG()

virtual bool BGScript::CanFillPlayersToBG ( BattlegroundQueue ,
Battleground ,
BattlegroundBracketId   
)
inlinevirtual
1641{ return true; }

Referenced by ScriptMgr::CanFillPlayersToBG().

◆ CanSendMessageBGQueue()

virtual bool BGScript::CanSendMessageBGQueue ( BattlegroundQueue ,
Player ,
Battleground ,
PvPDifficultyEntry const *   
)
inlinevirtual
1645{ return true; }

Referenced by ScriptMgr::CanSendMessageBGQueue().

◆ IsCheckNormalMatch()

virtual bool BGScript::IsCheckNormalMatch ( BattlegroundQueue ,
Battleground ,
BattlegroundBracketId  ,
uint32  ,
uint32   
)
inlinevirtual
1643{ return false; };

Referenced by ScriptMgr::IsCheckNormalMatch().

◆ IsDatabaseBound()

bool BGScript::IsDatabaseBound ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

1612{ return false; }

◆ OnAddGroup()

virtual void BGScript::OnAddGroup ( BattlegroundQueue ,
GroupQueueInfo ,
uint32 ,
Player ,
Group ,
BattlegroundTypeId  ,
PvPDifficultyEntry const *  ,
uint8  ,
bool  ,
bool  ,
uint32  ,
uint32  ,
uint32  ,
uint32   
)
inlinevirtual
1639 { }

Referenced by ScriptMgr::OnAddGroup().

◆ OnBattlegroundAddPlayer()

virtual void BGScript::OnBattlegroundAddPlayer ( Battleground ,
Player  
)
inlinevirtual
1628{ }

Referenced by ScriptMgr::OnBattlegroundAddPlayer().

◆ OnBattlegroundBeforeAddPlayer()

virtual void BGScript::OnBattlegroundBeforeAddPlayer ( Battleground ,
Player  
)
inlinevirtual

◆ OnBattlegroundCreate()

virtual void BGScript::OnBattlegroundCreate ( Battleground )
inlinevirtual

This hook runs after Battleground create.

Parameters
bgContains information about the Battleground
1688{ }

Referenced by ScriptMgr::OnBattlegroundCreate().

◆ OnBattlegroundDestroy()

virtual void BGScript::OnBattlegroundDestroy ( Battleground )
inlinevirtual

This hook runs before Battleground destroy.

Parameters
bgContains information about the Battleground
1681{ }

Referenced by ScriptMgr::OnBattlegroundDestroy().

◆ OnBattlegroundEnd()

virtual void BGScript::OnBattlegroundEnd ( Battleground ,
TeamId   
)
inlinevirtual

This hook runs after end Battleground.

Parameters
bgContains information about the Battleground
TeamIdContains information about the winneer team
1674{ }

Referenced by ScriptMgr::OnBattlegroundEnd().

◆ OnBattlegroundEndReward()

virtual void BGScript::OnBattlegroundEndReward ( Battleground ,
Player ,
TeamId   
)
inlinevirtual
1622{ }

Referenced by ScriptMgr::OnBattlegroundEndReward().

◆ OnBattlegroundRemovePlayerAtLeave()

virtual void BGScript::OnBattlegroundRemovePlayerAtLeave ( Battleground ,
Player  
)
inlinevirtual

◆ OnBattlegroundStart()

virtual void BGScript::OnBattlegroundStart ( Battleground )
inlinevirtual

This hook runs before start Battleground.

Parameters
bgContains information about the Battleground
1619{ }

Referenced by ScriptMgr::OnBattlegroundStart().

◆ OnBattlegroundUpdate()

virtual void BGScript::OnBattlegroundUpdate ( Battleground ,
uint32   
)
inlinevirtual
1625{ }

Referenced by ScriptMgr::OnBattlegroundUpdate().

◆ OnBeforeSendExitMessageArenaQueue()

virtual bool BGScript::OnBeforeSendExitMessageArenaQueue ( BattlegroundQueue ,
GroupQueueInfo  
)
inlinevirtual

This hook runs before sending the exit message during the arena queue, allowing you to run extra operations or disabling the exit message.

Parameters
queueContains information about the Arena queue
ginfoContains information about the group of the queue
Returns
True if you want to continue sending the message, false if you want to disable the message
1666{ return true; }

Referenced by ScriptMgr::OnBeforeSendExitMessageArenaQueue().

◆ OnBeforeSendJoinMessageArenaQueue()

virtual bool BGScript::OnBeforeSendJoinMessageArenaQueue ( BattlegroundQueue ,
Player ,
GroupQueueInfo ,
PvPDifficultyEntry const *  ,
bool   
)
inlinevirtual

This hook runs before sending the join message during the arena queue, allowing you to run extra operations or disabling the join message.

Parameters
queueContains information about the Arena queue
leaderContains information about the player leader
ginfoContains information about the group of the queue
bracketEntryContains information about the bracket
isRatedContains information about rated arena or skirmish
Returns
True if you want to continue sending the message, false if you want to disable the message
1657{ return true; }

Referenced by ScriptMgr::OnBeforeSendJoinMessageArenaQueue().

◆ OnQueueUpdate()

virtual void BGScript::OnQueueUpdate ( BattlegroundQueue ,
uint32  ,
BattlegroundTypeId  ,
BattlegroundBracketId  ,
uint8  ,
bool  ,
uint32   
)
inlinevirtual
1636{ }

Referenced by ScriptMgr::OnQueueUpdate().