AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "OutdoorPvP.h"
Public Member Functions | |
OPvPCapturePoint (OutdoorPvP *pvp) | |
virtual | ~OPvPCapturePoint ()=default |
virtual void | FillInitialWorldStates (WorldPacket &) |
void | SendUpdateWorldState (uint32 field, uint32 value) |
void | SendObjectiveComplete (uint32 id, ObjectGuid guid=ObjectGuid::Empty) |
virtual bool | HandlePlayerEnter (Player *player) |
virtual void | HandlePlayerLeave (Player *player) |
bool | IsInsideObjective (Player *player) const |
virtual bool | HandleCustomSpell (Player *player, uint32 spellId, GameObject *go) |
virtual int32 | HandleOpenGo (Player *player, GameObject *go) |
virtual bool | Update (uint32 diff) |
virtual void | ChangeState ()=0 |
virtual void | ChangeTeam (TeamId) |
virtual void | SendChangePhase () |
virtual bool | HandleGossipOption (Player *player, Creature *creature, uint32 gossipId) |
virtual bool | CanTalkTo (Player *player, Creature *c, GossipMenuItems const &gso) |
virtual bool | HandleDropFlag (Player *player, uint32 spellId) |
virtual void | DeleteSpawns () |
void | AddGO (uint32 type, ObjectGuid::LowType guid, uint32 entry=0) |
void | AddCre (uint32 type, ObjectGuid::LowType guid, uint32 entry=0) |
bool | SetCapturePointData (uint32 entry, uint32 map, float x, float y, float z, float o=0, float rotation0=0, float rotation1=0, float rotation2=0, float rotation3=0) |
void | SetSlider (float slider) |
float | GetSlider () const |
Public Attributes | |
ObjectGuid::LowType | m_capturePointSpawnId {} |
GameObject * | _capturePoint {} |
Protected Member Functions | |
bool | AddObject (uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3) |
bool | AddCreature (uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, uint32 spawntimeDelay=0) |
bool | DelCreature (uint32 type) |
bool | DelObject (uint32 type) |
bool | DelCapturePoint () |
Protected Attributes | |
std::array< PlayerSet, 2 > | _activePlayers |
float | _maxValue {} |
float | _minValue {} |
float | _maxSpeed {} |
float | _value {} |
TeamId | _team { TEAM_NEUTRAL } |
ObjectiveStates | _oldState { OBJECTIVESTATE_NEUTRAL } |
ObjectiveStates | _state { OBJECTIVESTATE_NEUTRAL } |
uint32 | _neutralValuePct {} |
OutdoorPvP * | _pvp {} |
std::unordered_map< uint32, ObjectGuid::LowType > | _objects |
std::unordered_map< uint32, ObjectGuid::LowType > | _creatures |
std::unordered_map< ObjectGuid::LowType, uint32 > | _objectTypes |
std::unordered_map< ObjectGuid::LowType, uint32 > | _creatureTypes |
|
explicit |
|
virtualdefault |
void OPvPCapturePoint::AddCre | ( | uint32 | type, |
ObjectGuid::LowType | guid, | ||
uint32 | entry = 0 |
||
) |
References _creatures, _creatureTypes, CreatureData::id1, and sObjectMgr.
Referenced by AddCreature().
|
protected |
References AddCre(), and sObjectMgr.
Referenced by OPvPCapturePointZM_GraveYard::OPvPCapturePointZM_GraveYard(), OPvPCapturePointEP_PWT::SummonFlightMaster(), and OPvPCapturePointEP_EWT::SummonSupportUnitAtNorthpassTower().
void OPvPCapturePoint::AddGO | ( | uint32 | type, |
ObjectGuid::LowType | guid, | ||
uint32 | entry = 0 |
||
) |
References _objects, _objectTypes, GameObjectData::id, and sObjectMgr.
Referenced by AddObject().
|
protected |
References AddGO(), and sObjectMgr.
Referenced by OPvPCapturePointNA::HandleOpenGo(), OPvPCapturePointZM_GraveYard::HandleOpenGo(), OPvPCapturePointEP_CGT::OPvPCapturePointEP_CGT(), OPvPCapturePointEP_EWT::OPvPCapturePointEP_EWT(), OPvPCapturePointEP_NPT::OPvPCapturePointEP_NPT(), OPvPCapturePointEP_PWT::OPvPCapturePointEP_PWT(), OPvPCapturePointHP::OPvPCapturePointHP(), OPvPCapturePointZM_GraveYard::OPvPCapturePointZM_GraveYard(), OPvPCapturePointNA::SpawnGOsForTeam(), and OPvPCapturePointEP_NPT::SummonGO().
|
virtual |
Reimplemented in OPvPCapturePointZM_GraveYard.
|
pure virtual |
|
inlinevirtual |
Referenced by Update(), and OPvPCapturePointNA::Update().
|
protected |
References _capturePoint, GameObject::Delete(), m_capturePointSpawnId, GameObject::SetRespawnTime(), and sObjectMgr.
Referenced by DeleteSpawns().
|
protected |
References _creatures, _creatureTypes, _pvp, WorldObject::AddObjectToRemoveList(), CHAR_DEL_CREATURE_RESPAWN, CharacterDatabase, Map::GetCreatureBySpawnIdStore(), Map::GetId(), OutdoorPvP::GetMap(), LOG_DEBUG, Creature::RemoveCorpse(), PreparedStatementBase::SetData(), Creature::SetRespawnTime(), and sObjectMgr.
Referenced by OPvPCapturePointEP_PWT::ChangeState(), DeleteSpawns(), OPvPCapturePointEP_PWT::SummonFlightMaster(), and OPvPCapturePointEP_EWT::SummonSupportUnitAtNorthpassTower().
|
virtual |
References _creatures, _objects, DelCapturePoint(), DelCreature(), and DelObject().
|
protected |
References _objects, _objectTypes, _pvp, GameObject::Delete(), Map::GetGameObjectBySpawnIdStore(), OutdoorPvP::GetMap(), GameObject::SetRespawnTime(), and sObjectMgr.
Referenced by OPvPCapturePointEP_NPT::ChangeState(), DeleteSpawns(), OPvPCapturePointNA::DespawnGOs(), OPvPCapturePointNA::HandleOpenGo(), OPvPCapturePointZM_GraveYard::HandleOpenGo(), and OPvPCapturePointEP_NPT::SummonGO().
|
inlinevirtual |
|
inline |
References _value.
|
virtual |
Reimplemented in OPvPCapturePointNA.
Reimplemented in OPvPCapturePointZM_GraveYard.
|
virtual |
Reimplemented in OPvPCapturePointZM_GraveYard.
|
virtual |
Reimplemented in OPvPCapturePointNA, and OPvPCapturePointZM_GraveYard.
References _objectTypes, and GameObject::GetSpawnId().
Referenced by OPvPCapturePointNA::HandleOpenGo(), and OPvPCapturePointZM_GraveYard::HandleOpenGo().
|
virtual |
Reimplemented in OPvPCapturePointEP_EWT, OPvPCapturePointEP_NPT, OPvPCapturePointEP_CGT, OPvPCapturePointEP_PWT, OPvPCapturePointGH, OPvPCapturePointHP, OPvPCapturePointNA, OPvPCapturePointTF, and OPvPCapturePointZM_Beacon.
References _activePlayers, _capturePoint, _maxValue, _neutralValuePct, _value, GameObjectTemplate::capturePoint, GameObject::GetGOInfo(), Object::GetGUID(), Player::GetTeamId(), Player::SendUpdateWorldState(), GameObjectTemplate::worldState1, GameObjectTemplate::worldstate2, and GameObjectTemplate::worldstate3.
Referenced by OPvPCapturePointEP_EWT::HandlePlayerEnter(), OPvPCapturePointEP_NPT::HandlePlayerEnter(), OPvPCapturePointEP_CGT::HandlePlayerEnter(), OPvPCapturePointEP_PWT::HandlePlayerEnter(), OPvPCapturePointGH::HandlePlayerEnter(), OPvPCapturePointHP::HandlePlayerEnter(), OPvPCapturePointNA::HandlePlayerEnter(), OPvPCapturePointTF::HandlePlayerEnter(), OPvPCapturePointZM_Beacon::HandlePlayerEnter(), and Update().
|
virtual |
Reimplemented in OPvPCapturePointEP_EWT, OPvPCapturePointEP_NPT, OPvPCapturePointEP_CGT, OPvPCapturePointEP_PWT, OPvPCapturePointGH, OPvPCapturePointHP, OPvPCapturePointNA, OPvPCapturePointTF, and OPvPCapturePointZM_Beacon.
References _activePlayers, _capturePoint, GameObjectTemplate::capturePoint, GameObject::GetGOInfo(), Object::GetGUID(), Player::GetTeamId(), Player::SendUpdateWorldState(), and GameObjectTemplate::worldState1.
Referenced by OPvPCapturePointEP_EWT::HandlePlayerLeave(), OPvPCapturePointEP_NPT::HandlePlayerLeave(), OPvPCapturePointEP_CGT::HandlePlayerLeave(), OPvPCapturePointEP_PWT::HandlePlayerLeave(), OPvPCapturePointGH::HandlePlayerLeave(), OPvPCapturePointHP::HandlePlayerLeave(), OPvPCapturePointNA::HandlePlayerLeave(), OPvPCapturePointTF::HandlePlayerLeave(), OPvPCapturePointZM_Beacon::HandlePlayerLeave(), and Update().
bool OPvPCapturePoint::IsInsideObjective | ( | Player * | player | ) | const |
References _activePlayers, Object::GetGUID(), and Player::GetTeamId().
|
virtual |
Reimplemented in OPvPCapturePointEP_EWT, OPvPCapturePointEP_NPT, OPvPCapturePointEP_CGT, OPvPCapturePointEP_PWT, OPvPCapturePointGH, OPvPCapturePointHP, OPvPCapturePointNA, OPvPCapturePointTF, and OPvPCapturePointZM_Beacon.
References _capturePoint, _maxValue, _neutralValuePct, _value, GameObjectTemplate::capturePoint, GameObject::GetGOInfo(), SendUpdateWorldState(), GameObjectTemplate::worldState1, GameObjectTemplate::worldstate2, and GameObjectTemplate::worldstate3.
Referenced by Update().
void OPvPCapturePoint::SendObjectiveComplete | ( | uint32 | id, |
ObjectGuid | guid = ObjectGuid::Empty |
||
) |
References _activePlayers, _state, ObjectAccessor::FindPlayer(), OBJECTIVESTATE_ALLIANCE, and OBJECTIVESTATE_HORDE.
Referenced by OPvPCapturePointEP_EWT::ChangeState(), OPvPCapturePointEP_NPT::ChangeState(), OPvPCapturePointEP_CGT::ChangeState(), OPvPCapturePointEP_PWT::ChangeState(), and OPvPCapturePointHP::ChangeState().
References _activePlayers, and ObjectAccessor::FindPlayer().
Referenced by SendChangePhase(), OPvPCapturePointEP_EWT::SendChangePhase(), OPvPCapturePointEP_NPT::SendChangePhase(), OPvPCapturePointEP_CGT::SendChangePhase(), OPvPCapturePointEP_PWT::SendChangePhase(), OPvPCapturePointGH::SendChangePhase(), OPvPCapturePointHP::SendChangePhase(), OPvPCapturePointNA::SendChangePhase(), OPvPCapturePointTF::SendChangePhase(), OPvPCapturePointZM_Beacon::SendChangePhase(), and OPvPCapturePointNA::Update().
bool OPvPCapturePoint::SetCapturePointData | ( | uint32 | entry, |
uint32 | map, | ||
float | x, | ||
float | y, | ||
float | z, | ||
float | o = 0 , |
||
float | rotation0 = 0 , |
||
float | rotation1 = 0 , |
||
float | rotation2 = 0 , |
||
float | rotation3 = 0 |
||
) |
References _maxSpeed, _maxValue, _minValue, _neutralValuePct, CalculatePct(), GameObjectTemplate::capturePoint, GAMEOBJECT_TYPE_CAPTURE_POINT, LOG_DEBUG, LOG_ERROR, m_capturePointSpawnId, GameObjectTemplate::maxTime, GameObjectTemplate::minTime, GameObjectTemplate::neutralPercent, sObjectMgr, and GameObjectTemplate::type.
Referenced by OPvPCapturePointEP_CGT::OPvPCapturePointEP_CGT(), OPvPCapturePointEP_EWT::OPvPCapturePointEP_EWT(), OPvPCapturePointEP_NPT::OPvPCapturePointEP_NPT(), OPvPCapturePointEP_PWT::OPvPCapturePointEP_PWT(), OPvPCapturePointGH::OPvPCapturePointGH(), OPvPCapturePointHP::OPvPCapturePointHP(), OPvPCapturePointNA::OPvPCapturePointNA(), OPvPCapturePointTF::OPvPCapturePointTF(), and OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon().
void OPvPCapturePoint::SetSlider | ( | float | slider | ) |
|
virtual |
Reimplemented in OPvPCapturePointNA, OPvPCapturePointTF, and OPvPCapturePointZM_GraveYard.
References _activePlayers, _capturePoint, _maxSpeed, _maxValue, _minValue, _oldState, _state, _team, _value, GameObjectTemplate::capturePoint, ChangeState(), ChangeTeam(), ObjectAccessor::FindPlayer(), GameObject::GetGOInfo(), Object::GetGUID(), Player::GetTeamId(), HandlePlayerEnter(), HandlePlayerLeave(), Player::IsOutdoorPvPActive(), GameObject::IsWithinDistInMap(), OBJECTIVESTATE_ALLIANCE, OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE, OBJECTIVESTATE_HORDE, OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE, OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE, OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE, OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL, GameObjectTemplate::radius, SendChangePhase(), TEAM_ALLIANCE, TEAM_HORDE, TEAM_NEUTRAL, and Cell::VisitWorldObjects().
Referenced by OPvPCapturePointTF::Update().
|
protected |
GameObject* OPvPCapturePoint::_capturePoint {} |
Referenced by DelCapturePoint(), HandlePlayerEnter(), HandlePlayerLeave(), SendChangePhase(), Update(), and OPvPCapturePointNA::Update().
|
protected |
|
protected |
|
protected |
Referenced by SetCapturePointData(), Update(), and OPvPCapturePointNA::Update().
|
protected |
Referenced by HandlePlayerEnter(), OPvPCapturePointEP_EWT::HandlePlayerEnter(), OPvPCapturePointEP_NPT::HandlePlayerEnter(), OPvPCapturePointEP_CGT::HandlePlayerEnter(), OPvPCapturePointEP_PWT::HandlePlayerEnter(), OPvPCapturePointGH::HandlePlayerEnter(), OPvPCapturePointHP::HandlePlayerEnter(), OPvPCapturePointNA::HandlePlayerEnter(), OPvPCapturePointTF::HandlePlayerEnter(), OPvPCapturePointZM_Beacon::HandlePlayerEnter(), SendChangePhase(), OPvPCapturePointEP_EWT::SendChangePhase(), OPvPCapturePointEP_NPT::SendChangePhase(), OPvPCapturePointEP_CGT::SendChangePhase(), OPvPCapturePointEP_PWT::SendChangePhase(), OPvPCapturePointGH::SendChangePhase(), OPvPCapturePointHP::SendChangePhase(), OPvPCapturePointNA::SendChangePhase(), OPvPCapturePointTF::SendChangePhase(), OPvPCapturePointZM_Beacon::SendChangePhase(), SetCapturePointData(), SetSlider(), Update(), and OPvPCapturePointNA::Update().
|
protected |
Referenced by SetCapturePointData(), Update(), and OPvPCapturePointNA::Update().
|
protected |
Referenced by HandlePlayerEnter(), OPvPCapturePointEP_EWT::HandlePlayerEnter(), OPvPCapturePointEP_NPT::HandlePlayerEnter(), OPvPCapturePointEP_CGT::HandlePlayerEnter(), OPvPCapturePointEP_PWT::HandlePlayerEnter(), OPvPCapturePointGH::HandlePlayerEnter(), OPvPCapturePointHP::HandlePlayerEnter(), OPvPCapturePointNA::HandlePlayerEnter(), OPvPCapturePointTF::HandlePlayerEnter(), OPvPCapturePointZM_Beacon::HandlePlayerEnter(), SendChangePhase(), OPvPCapturePointEP_EWT::SendChangePhase(), OPvPCapturePointEP_NPT::SendChangePhase(), OPvPCapturePointEP_CGT::SendChangePhase(), OPvPCapturePointEP_PWT::SendChangePhase(), OPvPCapturePointGH::SendChangePhase(), OPvPCapturePointHP::SendChangePhase(), OPvPCapturePointNA::SendChangePhase(), OPvPCapturePointTF::SendChangePhase(), OPvPCapturePointZM_Beacon::SendChangePhase(), and SetCapturePointData().
|
protected |
|
protected |
Referenced by AddGO(), DelObject(), and HandleOpenGo().
|
protected |
Referenced by OPvPCapturePointEP_EWT::ChangeState(), OPvPCapturePointEP_NPT::ChangeState(), OPvPCapturePointEP_CGT::ChangeState(), OPvPCapturePointEP_PWT::ChangeState(), OPvPCapturePointHP::ChangeState(), OPvPCapturePointTF::ChangeState(), OPvPCapturePointZM_Beacon::ChangeState(), OPvPCapturePointTF::ResetToTeamControlled(), Update(), OPvPCapturePointNA::Update(), and OPvPCapturePointZM_GraveYard::Update().
|
protected |
Referenced by OPvPCapturePointEP_EWT::ChangeState(), OPvPCapturePointEP_NPT::ChangeState(), OPvPCapturePointEP_CGT::ChangeState(), OPvPCapturePointEP_PWT::ChangeState(), OPvPCapturePointHP::ChangeState(), OPvPCapturePointTF::ChangeState(), OPvPCapturePointZM_Beacon::ChangeState(), DelCreature(), DelObject(), OPvPCapturePointNA::DespawnCreatures(), OPvPCapturePointNA::FactionTakeOver(), OPvPCapturePointNA::GetAliveGuardsCount(), OPvPCapturePointZM_GraveYard::HandleOpenGo(), OPvPCapturePointNA::SpawnNPCsForTeam(), OPvPCapturePointNA::Update(), OPvPCapturePointTF::Update(), OPvPCapturePointNA::UpdateHalaaWorldState(), OPvPCapturePointEP_EWT::UpdateTowerState(), OPvPCapturePointEP_NPT::UpdateTowerState(), OPvPCapturePointEP_CGT::UpdateTowerState(), OPvPCapturePointEP_PWT::UpdateTowerState(), OPvPCapturePointTF::UpdateTowerState(), OPvPCapturePointZM_Beacon::UpdateTowerState(), OPvPCapturePointZM_GraveYard::UpdateTowerState(), and OPvPCapturePointNA::UpdateWyvernRoostWorldState().
|
protected |
Referenced by OPvPCapturePointEP_EWT::ChangeState(), OPvPCapturePointEP_NPT::ChangeState(), OPvPCapturePointEP_CGT::ChangeState(), OPvPCapturePointEP_PWT::ChangeState(), OPvPCapturePointGH::ChangeState(), OPvPCapturePointHP::ChangeState(), OPvPCapturePointNA::ChangeState(), OPvPCapturePointTF::ChangeState(), OPvPCapturePointZM_Beacon::ChangeState(), OPvPCapturePointHP::FillInitialWorldStates(), OPvPCapturePointTF::ResetToTeamControlled(), SendObjectiveComplete(), Update(), OPvPCapturePointNA::Update(), and OPvPCapturePointZM_GraveYard::Update().
|
protected |
Referenced by OPvPCapturePointTF::ResetToTeamControlled(), Update(), and OPvPCapturePointNA::Update().
|
protected |
Referenced by GetSlider(), HandlePlayerEnter(), OPvPCapturePointEP_EWT::HandlePlayerEnter(), OPvPCapturePointEP_NPT::HandlePlayerEnter(), OPvPCapturePointEP_CGT::HandlePlayerEnter(), OPvPCapturePointEP_PWT::HandlePlayerEnter(), OPvPCapturePointGH::HandlePlayerEnter(), OPvPCapturePointHP::HandlePlayerEnter(), OPvPCapturePointNA::HandlePlayerEnter(), OPvPCapturePointTF::HandlePlayerEnter(), OPvPCapturePointZM_Beacon::HandlePlayerEnter(), OPvPCapturePointTF::ResetToTeamControlled(), SendChangePhase(), OPvPCapturePointEP_EWT::SendChangePhase(), OPvPCapturePointEP_NPT::SendChangePhase(), OPvPCapturePointEP_CGT::SendChangePhase(), OPvPCapturePointEP_PWT::SendChangePhase(), OPvPCapturePointGH::SendChangePhase(), OPvPCapturePointHP::SendChangePhase(), OPvPCapturePointNA::SendChangePhase(), OPvPCapturePointTF::SendChangePhase(), OPvPCapturePointZM_Beacon::SendChangePhase(), SetSlider(), Update(), and OPvPCapturePointNA::Update().
ObjectGuid::LowType OPvPCapturePoint::m_capturePointSpawnId {} |
Referenced by OutdoorPvP::AddCapturePoint(), OPvPCapturePointEP_EWT::ChangeState(), OPvPCapturePointEP_NPT::ChangeState(), OPvPCapturePointEP_CGT::ChangeState(), OPvPCapturePointEP_PWT::ChangeState(), OPvPCapturePointGH::ChangeState(), OPvPCapturePointHP::ChangeState(), OPvPCapturePointNA::ChangeState(), OPvPCapturePointTF::ChangeState(), DelCapturePoint(), and SetCapturePointData().