#include "BattlefieldScript.h"
◆ BattlefieldScript()
| BattlefieldScript::BattlefieldScript |
( |
const char * |
name, |
|
|
std::vector< uint16 > |
enabledHooks = std::vector<uint16>() |
|
) |
| |
|
protected |
47 :
49{
50
51 if (enabledHooks.empty())
53 enabledHooks.emplace_back(i);
54
56}
@ BATTLEFIELDHOOK_END
Definition BattlefieldScript.h:31
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:763
References ScriptRegistry< TScript >::AddScript(), and BATTLEFIELDHOOK_END.
◆ IsDatabaseBound()
| bool BattlefieldScript::IsDatabaseBound |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ OnBattlefieldBeforeInvitePlayerToWar()
| virtual void BattlefieldScript::OnBattlefieldBeforeInvitePlayerToWar |
( |
Battlefield * |
, |
|
|
Player * |
|
|
) |
| |
|
inlinevirtual |
Called inside InvitePlayerToWar after the WillBeKick entry is erased (using the player's current team) and before the player is inserted into m_InvitedPlayers. This is the correct place to reassign a player's effective team for pre-war zone players: the invite bucket write that follows will use the newly assigned team, keeping all subsequent core operations consistent.
- Parameters
-
| bf | The Battlefield instance |
| player | The player being invited to war |
Referenced by ScriptMgr::OnBattlefieldBeforeInvitePlayerToWar().
◆ OnBattlefieldPlayerEnterZone()
| virtual void BattlefieldScript::OnBattlefieldPlayerEnterZone |
( |
Battlefield * |
, |
|
|
Player * |
|
|
) |
| |
|
inlinevirtual |
Called when a player enters the battlefield zone, before team-based data assignment. This is the ideal place to reassign a player's team for cross-faction purposes.
- Parameters
-
| bf | The Battlefield instance |
| player | The player entering the zone |
Referenced by ScriptMgr::OnBattlefieldPlayerEnterZone().
◆ OnBattlefieldPlayerJoinWar()
| virtual void BattlefieldScript::OnBattlefieldPlayerJoinWar |
( |
Battlefield * |
, |
|
|
Player * |
|
|
) |
| |
|
inlinevirtual |
◆ OnBattlefieldPlayerLeaveWar()
| virtual void BattlefieldScript::OnBattlefieldPlayerLeaveWar |
( |
Battlefield * |
, |
|
|
Player * |
|
|
) |
| |
|
inlinevirtual |
◆ OnBattlefieldPlayerLeaveZone()
| virtual void BattlefieldScript::OnBattlefieldPlayerLeaveZone |
( |
Battlefield * |
, |
|
|
Player * |
|
|
) |
| |
|
inlinevirtual |
Called when a player leaves the battlefield zone, after all cleanup. This is the ideal place to restore a player's original team/faction.
- Parameters
-
| bf | The Battlefield instance |
| player | The player leaving the zone |
Referenced by ScriptMgr::OnBattlefieldPlayerLeaveZone().
The documentation for this class was generated from the following files: