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

#include "AllBattlegroundScript.h"

Inheritance diagram for AllBattlegroundScript:
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 bool OnQueueUpdateValidity (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.
 
virtual void OnBattlegroundSetup (Battleground *)
 This hook runs after the Battleground setup is completed (map is created and initial objects are spawned)
 
virtual bool CanAddGroupToMatchingPool (BattlegroundQueue *, GroupQueueInfo *, uint32, Battleground *, BattlegroundBracketId)
 This hook runs before adding a group to the battleground matching pool.
 
virtual bool GetPlayerMatchmakingRating (ObjectGuid, BattlegroundTypeId, float &)
 This hook allows modules to provide matchmaking rating for a player.
 
- Public Member Functions inherited from ScriptObject
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
std::string const & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Protected Member Functions

 AllBattlegroundScript (char const *name, std::vector< uint16 > enabledHooks=std::vector< uint16 >())
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (char const *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ AllBattlegroundScript()

AllBattlegroundScript::AllBattlegroundScript ( char const *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
122 :
124{
125 // If empty - enable all available hooks.
126 if (enabledHooks.empty())
127 for (uint16 i = 0; i < ALLBATTLEGROUNDHOOK_END; ++i)
128 enabledHooks.emplace_back(i);
129
130 ScriptRegistry<AllBattlegroundScript>::AddScript(this, std::move(enabledHooks));
131}
@ ALLBATTLEGROUNDHOOK_END
Definition AllBattlegroundScript.h:47
std::uint16_t uint16
Definition Define.h:108
Definition ScriptObject.h:43
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition ScriptMgr.h:772

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

Member Function Documentation

◆ CanAddGroupToMatchingPool()

virtual bool AllBattlegroundScript::CanAddGroupToMatchingPool ( BattlegroundQueue ,
GroupQueueInfo ,
uint32  ,
Battleground ,
BattlegroundBracketId   
)
inlinevirtual

This hook runs before adding a group to the battleground matching pool.

Allows modules to filter groups based on custom criteria (e.g., MMR matching). Called during FillPlayersToBG before each group is added to the SelectionPool.

Parameters
queueThe battleground queue
groupThe group being considered for addition
poolPlayerCountCurrent number of players already in the selection pool
bgThe battleground instance
bracketIdThe bracket ID
Returns
True to allow adding this group, false to skip it
163{ return true; }

Referenced by ScriptMgr::CanAddGroupToMatchingPool().

◆ CanFillPlayersToBG()

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

Referenced by ScriptMgr::CanFillPlayersToBG().

◆ CanSendMessageBGQueue()

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

Referenced by ScriptMgr::CanSendMessageBGQueue().

◆ GetPlayerMatchmakingRating()

virtual bool AllBattlegroundScript::GetPlayerMatchmakingRating ( ObjectGuid  ,
BattlegroundTypeId  ,
float &   
)
inlinevirtual

This hook allows modules to provide matchmaking rating for a player.

Modules implementing MMR systems can use this hook to provide player ratings for use in matchmaking algorithms.

Parameters
playerGuidThe player's GUID
bgTypeIdThe battleground type
outRatingReference to store the rating value
Returns
True if rating was provided, false otherwise
176{ return false; }

Referenced by ScriptMgr::GetPlayerMatchmakingRating().

◆ IsCheckNormalMatch()

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

Referenced by ScriptMgr::IsCheckNormalMatch().

◆ IsDatabaseBound()

bool AllBattlegroundScript::IsDatabaseBound ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

63{ return false; }

◆ OnAddGroup()

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

Referenced by ScriptMgr::OnAddGroup().

◆ OnBattlegroundAddPlayer()

virtual void AllBattlegroundScript::OnBattlegroundAddPlayer ( Battleground ,
Player  
)
inlinevirtual

◆ OnBattlegroundBeforeAddPlayer()

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

◆ OnBattlegroundCreate()

virtual void AllBattlegroundScript::OnBattlegroundCreate ( Battleground )
inlinevirtual

This hook runs after Battleground create.

Parameters
bgContains information about the Battleground
141{ }

Referenced by ScriptMgr::OnBattlegroundCreate().

◆ OnBattlegroundDestroy()

virtual void AllBattlegroundScript::OnBattlegroundDestroy ( Battleground )
inlinevirtual

This hook runs before Battleground destroy.

Parameters
bgContains information about the Battleground
134{ }

Referenced by ScriptMgr::OnBattlegroundDestroy().

◆ OnBattlegroundEnd()

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

This hook runs after end Battleground.

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

Referenced by ScriptMgr::OnBattlegroundEnd().

◆ OnBattlegroundEndReward()

virtual void AllBattlegroundScript::OnBattlegroundEndReward ( Battleground ,
Player ,
TeamId   
)
inlinevirtual

◆ OnBattlegroundRemovePlayerAtLeave()

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

◆ OnBattlegroundSetup()

virtual void AllBattlegroundScript::OnBattlegroundSetup ( Battleground )
inlinevirtual

This hook runs after the Battleground setup is completed (map is created and initial objects are spawned)

Parameters
bgContains information about the Battleground
148{ }

Referenced by ScriptMgr::OnBattlegroundSetup().

◆ OnBattlegroundStart()

virtual void AllBattlegroundScript::OnBattlegroundStart ( Battleground )
inlinevirtual

This hook runs before start Battleground.

Parameters
bgContains information about the Battleground
70{ }

Referenced by ScriptMgr::OnBattlegroundStart().

◆ OnBattlegroundUpdate()

virtual void AllBattlegroundScript::OnBattlegroundUpdate ( Battleground ,
uint32   
)
inlinevirtual
76{ }

Referenced by ScriptMgr::OnBattlegroundUpdate().

◆ OnBeforeSendExitMessageArenaQueue()

virtual bool AllBattlegroundScript::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
119{ return true; }

Referenced by ScriptMgr::OnBeforeSendExitMessageArenaQueue().

◆ OnBeforeSendJoinMessageArenaQueue()

virtual bool AllBattlegroundScript::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
110{ return true; }

Referenced by ScriptMgr::OnBeforeSendJoinMessageArenaQueue().

◆ OnQueueUpdate()

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

Referenced by ScriptMgr::OnQueueUpdate().

◆ OnQueueUpdateValidity()

virtual bool AllBattlegroundScript::OnQueueUpdateValidity ( BattlegroundQueue ,
uint32  ,
BattlegroundTypeId  ,
BattlegroundBracketId  ,
uint8  ,
bool  ,
uint32   
)
inlinevirtual
89{ return true; }

Referenced by ScriptMgr::OnQueueUpdateValidity().


The documentation for this class was generated from the following files: