TrinityCore
|
#include <Battlefield.h>
Public Types | |
typedef std::map< uint32, BfCapturePoint * > | BfCapturePointMap |
typedef of map witch store capturepoint and the associate gameobject entry More... | |
Public Member Functions | |
Battlefield () | |
Constructor. More... | |
virtual | ~Battlefield () |
Destructor. More... | |
virtual bool | SetupBattlefield () |
Call this to init the Battlefield. More... | |
void | SendUpdateWorldState (uint32 variable, uint32 value, bool hidden=false) |
Update data of a worldstate to all players present in zone. More... | |
virtual bool | Update (uint32 diff) |
Called every time for update bf data and time. More... | |
void | InvitePlayersInZoneToQueue () |
Invite all players in zone to join the queue, called x minutes before battle start in Update() More... | |
void | InvitePlayersInQueueToWar () |
Invite all players in queue to join battle on battle start. More... | |
void | InvitePlayersInZoneToWar () |
Invite all players in zone to join battle on battle start. More... | |
virtual void | HandleKill (Player *, Unit *) |
Called when a Unit is kill in battlefield zone. More... | |
uint32 | GetTypeId () const |
uint32 | GetZoneId () const |
uint64 | GetQueueId () const |
void | TeamApplyBuff (TeamId team, uint32 spellId, uint32 spellId2=0) |
bool | IsWarTime () const |
Return true if battle is start, false if battle is not started. More... | |
int8 | GetState () const |
void | ToggleBattlefield (bool enable) |
Enable or Disable battlefield. More... | |
bool | IsEnabled () const |
Return if battlefield is enable. More... | |
void | KickPlayerFromBattlefield (ObjectGuid guid) |
Kick player from battlefield and teleport him to kick-point location. More... | |
void | HandlePlayerEnterZone (Player *player, uint32 zone) |
Called when player (player) enter in zone. More... | |
void | HandlePlayerLeaveZone (Player *player, uint32 zone) |
Called when player (player) leave the zone. More... | |
virtual uint64 | GetData64 (uint32 dataId) const override |
virtual void | SetData64 (uint32 dataId, uint64 value) override |
virtual uint32 | GetData (uint32 dataId) const override |
virtual void | SetData (uint32 dataId, uint32 value) override |
virtual void | UpdateData (uint32 index, int32 pad) |
TeamId | GetDefenderTeam () const |
TeamId | GetAttackerTeam () const |
TeamId | GetOtherTeam (TeamId team) const |
void | SetDefenderTeam (TeamId team) |
Group * | GetFreeBfRaid (TeamId TeamId) |
Find a not full battlefield group, if there is no, create one. More... | |
Group * | GetGroupPlayer (ObjectGuid guid, TeamId TeamId) |
Return battlefield group where player is. More... | |
bool | AddOrSetPlayerToCorrectBfGroup (Player *player) |
Force player to join a battlefield group. More... | |
WorldSafeLocsEntry const * | GetClosestGraveYard (Player *player) |
virtual void | AddPlayerToResurrectQueue (ObjectGuid npc_guid, ObjectGuid player_guid) |
void | RemovePlayerFromResurrectQueue (ObjectGuid player_guid) |
void | SetGraveyardNumber (uint32 number) |
BfGraveyard * | GetGraveyardById (uint32 id) const |
virtual Creature * | SpawnCreature (uint32 entry, float x, float y, float z, float o, TeamId) |
Creature * | SpawnCreature (uint32 entry, Position const &pos, TeamId) |
GameObject * | SpawnGameObject (uint32 entry, float x, float y, float z, float o) |
Creature * | GetCreature (ObjectGuid guid) |
GameObject * | GetGameObject (ObjectGuid guid) |
virtual void | OnBattleStart () |
Called on start. More... | |
virtual void | OnBattleEnd (bool) |
Called at the end of battle. More... | |
virtual void | OnStartGrouping () |
Called x minutes before battle start when player in zone are invite to join queue. More... | |
virtual void | OnPlayerJoinWar (Player *) |
Called when a player accept to join the battle. More... | |
virtual void | OnPlayerLeaveWar (Player *) |
Called when a player leave the battle. More... | |
virtual void | OnPlayerLeaveZone (Player *) |
Called when a player leave battlefield zone. More... | |
virtual void | OnPlayerEnterZone (Player *) |
Called when a player enter in battlefield zone. More... | |
void | SendWarning (uint8 id, WorldObject const *target=nullptr) |
void | PlayerAcceptInviteToQueue (Player *player) |
void | PlayerAcceptInviteToWar (Player *player) |
uint32 | GetBattleId () const |
void | AskToLeaveQueue (Player *player) |
virtual void | DoCompleteOrIncrementAchievement (uint32, Player *, uint8) |
virtual void | SendInitWorldStatesToAll ()=0 |
Send all worldstate data to all player in zone. More... | |
virtual void | FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)=0 |
bool | CanFlyIn () |
Return if we can use mount in battlefield. More... | |
void | SendAreaSpiritHealerQueryOpcode (Player *player, ObjectGuid const &guid) |
void | StartBattle () |
void | EndBattle (bool endByTimer) |
void | HideNpc (Creature *creature) |
void | ShowNpc (Creature *creature, bool aggressive) |
GraveyardVect | GetGraveyardVector () const |
uint32 | GetTimer () const |
void | SetTimer (uint32 timer) |
void | DoPlaySoundToAll (uint32 SoundID) |
void | InvitePlayerToQueue (Player *player) |
void | InvitePlayerToWar (Player *player) |
void | InitStalker (uint32 entry, Position const &pos) |
Public Member Functions inherited from ZoneScript | |
ZoneScript () | |
virtual | ~ZoneScript () |
virtual uint32 | GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data) |
virtual uint32 | GetGameObjectEntry (ObjectGuid::LowType, uint32 entry) |
virtual void | OnCreatureCreate (Creature *) |
virtual void | OnCreatureRemove (Creature *) |
virtual void | OnGameObjectCreate (GameObject *) |
virtual void | OnGameObjectRemove (GameObject *) |
virtual void | OnUnitDeath (Unit *) |
virtual ObjectGuid | GetGuidData (uint32) const |
virtual void | SetGuidData (uint32, ObjectGuid) |
virtual void | ProcessEvent (WorldObject *, uint32) |
Protected Member Functions | |
void | KickAfkPlayers () |
virtual void | SendRemoveWorldStates (Player *) |
void | BroadcastPacketToZone (WorldPacket const *data) const |
void | BroadcastPacketToQueue (WorldPacket const *data) const |
void | BroadcastPacketToWar (WorldPacket const *data) const |
void | AddCapturePoint (BfCapturePoint *cp) |
BfCapturePoint * | GetCapturePoint (uint32 entry) const |
void | RegisterZone (uint32 zoneid) |
bool | HasPlayer (Player *player) const |
void | TeamCastSpell (TeamId team, int32 spellId) |
Friends | |
class | BattlefieldMgr |
typedef std::map<uint32 , BfCapturePoint*> Battlefield::BfCapturePointMap |
typedef of map witch store capturepoint and the associate gameobject entry
Battlefield::Battlefield | ( | ) |
Constructor.
|
virtual |
Destructor.
|
protected |
Force player to join a battlefield group.
|
virtual |
void Battlefield::AskToLeaveQueue | ( | Player * | player | ) |
|
protected |
|
protected |
|
protected |
|
inline |
Return if we can use mount in battlefield.
|
inlinevirtual |
Reimplemented in BattlefieldWG.
void Battlefield::DoPlaySoundToAll | ( | uint32 | SoundID | ) |
void Battlefield::EndBattle | ( | bool | endByTimer | ) |
|
pure virtual |
Implemented in BattlefieldWG.
|
inline |
|
inline |
|
protected |
WorldSafeLocsEntry const * Battlefield::GetClosestGraveYard | ( | Player * | player | ) |
Creature * Battlefield::GetCreature | ( | ObjectGuid | guid | ) |
Reimplemented from ZoneScript.
Reimplemented in BattlefieldWG.
Reimplemented from ZoneScript.
|
inline |
Find a not full battlefield group, if there is no, create one.
TeamId | : Id of player team for who we search a group (player->GetTeamId()) |
GameObject * Battlefield::GetGameObject | ( | ObjectGuid | guid | ) |
BfGraveyard * Battlefield::GetGraveyardById | ( | uint32 | id | ) | const |
|
inline |
Group * Battlefield::GetGroupPlayer | ( | ObjectGuid | guid, |
TeamId | TeamId | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Called when player (player) enter in zone.
Called when player (player) leave the zone.
void Battlefield::HideNpc | ( | Creature * | creature | ) |
void Battlefield::InvitePlayersInQueueToWar | ( | ) |
Invite all players in queue to join battle on battle start.
void Battlefield::InvitePlayersInZoneToQueue | ( | ) |
Invite all players in zone to join the queue, called x minutes before battle start in Update()
void Battlefield::InvitePlayersInZoneToWar | ( | ) |
Invite all players in zone to join battle on battle start.
void Battlefield::InvitePlayerToQueue | ( | Player * | player | ) |
void Battlefield::InvitePlayerToWar | ( | Player * | player | ) |
|
inline |
Return if battlefield is enable.
|
inline |
Return true if battle is start, false if battle is not started.
|
protected |
void Battlefield::KickPlayerFromBattlefield | ( | ObjectGuid | guid | ) |
Kick player from battlefield and teleport him to kick-point location.
guid | : guid of player who must be kick |
|
inlinevirtual |
Called at the end of battle.
Reimplemented in BattlefieldWG.
|
inlinevirtual |
|
inlinevirtual |
Called when a player enter in battlefield zone.
Reimplemented in BattlefieldWG.
|
inlinevirtual |
Called when a player accept to join the battle.
Reimplemented in BattlefieldWG.
|
inlinevirtual |
Called when a player leave the battle.
Reimplemented in BattlefieldWG.
|
inlinevirtual |
Called when a player leave battlefield zone.
Reimplemented in BattlefieldWG.
|
inlinevirtual |
Called x minutes before battle start when player in zone are invite to join queue.
Reimplemented in BattlefieldWG.
void Battlefield::PlayerAcceptInviteToQueue | ( | Player * | player | ) |
void Battlefield::PlayerAcceptInviteToWar | ( | Player * | player | ) |
|
protected |
void Battlefield::RemovePlayerFromResurrectQueue | ( | ObjectGuid | player_guid | ) |
void Battlefield::SendAreaSpiritHealerQueryOpcode | ( | Player * | player, |
ObjectGuid const & | guid | ||
) |
|
pure virtual |
Send all worldstate data to all player in zone.
Implemented in BattlefieldWG.
|
inlineprotectedvirtual |
Update data of a worldstate to all players present in zone.
void Battlefield::SendWarning | ( | uint8 | id, |
WorldObject const * | target = nullptr |
||
) |
Reimplemented from ZoneScript.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Call this to init the Battlefield.
Reimplemented in BattlefieldWG.
|
virtual |
GameObject * Battlefield::SpawnGameObject | ( | uint32 | entry, |
float | x, | ||
float | y, | ||
float | z, | ||
float | o | ||
) |
void Battlefield::StartBattle | ( | ) |
|
inline |
Enable or Disable battlefield.
Called every time for update bf data and time.
diff | : time ellapsed since last call (in ms) |
Reimplemented in BattlefieldWG.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |