mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Battlefields: Added missing virtual destructor (and delete copy and move operations)
This commit is contained in:
@@ -643,13 +643,15 @@ void Battlefield::SendAreaSpiritHealerQueryOpcode(Player* player, ObjectGuid gui
|
||||
// ----------------------
|
||||
// - BfGraveyard Method -
|
||||
// ----------------------
|
||||
BfGraveyard::BfGraveyard(Battlefield* battlefield)
|
||||
BfGraveyard::BfGraveyard(Battlefield* bf)
|
||||
{
|
||||
m_Bf = battlefield;
|
||||
m_Bf = bf;
|
||||
m_GraveyardId = 0;
|
||||
m_ControlTeam = TEAM_NEUTRAL;
|
||||
}
|
||||
|
||||
BfGraveyard::~BfGraveyard() = default;
|
||||
|
||||
void BfGraveyard::Initialize(TeamId startControl, uint32 graveyardId)
|
||||
{
|
||||
m_ControlTeam = startControl;
|
||||
@@ -847,7 +849,7 @@ GameObject* Battlefield::GetGameObject(ObjectGuid guid)
|
||||
// ******************* CapturePoint **********************
|
||||
// *******************************************************
|
||||
|
||||
BfCapturePoint::BfCapturePoint(Battlefield* battlefield) : m_Bf(battlefield), m_capturePointGUID()
|
||||
BfCapturePoint::BfCapturePoint(Battlefield* bf) : m_Bf(bf), m_capturePointGUID()
|
||||
{
|
||||
m_team = TEAM_NEUTRAL;
|
||||
m_value = 0;
|
||||
@@ -860,6 +862,8 @@ BfCapturePoint::BfCapturePoint(Battlefield* battlefield) : m_Bf(battlefield), m_
|
||||
m_maxSpeed = 0;
|
||||
}
|
||||
|
||||
BfCapturePoint::~BfCapturePoint() = default;
|
||||
|
||||
bool BfCapturePoint::HandlePlayerEnter(Player* player)
|
||||
{
|
||||
if (m_capturePointGUID)
|
||||
|
||||
@@ -85,9 +85,13 @@ typedef std::map<ObjectGuid, time_t> PlayerTimerMap;
|
||||
class TC_GAME_API BfCapturePoint
|
||||
{
|
||||
public:
|
||||
BfCapturePoint(Battlefield* bf);
|
||||
explicit BfCapturePoint(Battlefield* bf);
|
||||
BfCapturePoint(BfCapturePoint const&) = delete;
|
||||
BfCapturePoint(BfCapturePoint&&) = delete;
|
||||
BfCapturePoint& operator=(BfCapturePoint const&) = delete;
|
||||
BfCapturePoint& operator=(BfCapturePoint&&) = delete;
|
||||
|
||||
virtual ~BfCapturePoint() { }
|
||||
virtual ~BfCapturePoint();
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { }
|
||||
|
||||
@@ -153,7 +157,13 @@ class TC_GAME_API BfCapturePoint
|
||||
class TC_GAME_API BfGraveyard
|
||||
{
|
||||
public:
|
||||
BfGraveyard(Battlefield* Bf);
|
||||
explicit BfGraveyard(Battlefield* bf);
|
||||
BfGraveyard(BfGraveyard const&) = delete;
|
||||
BfGraveyard(BfGraveyard&&) = delete;
|
||||
BfGraveyard& operator=(BfGraveyard const&) = delete;
|
||||
BfGraveyard& operator=(BfGraveyard&&) = delete;
|
||||
|
||||
virtual ~BfGraveyard();
|
||||
|
||||
// Method to changing who controls the graveyard
|
||||
void GiveControlTo(TeamId team);
|
||||
@@ -204,6 +214,11 @@ class TC_GAME_API Battlefield : public ZoneScript
|
||||
public:
|
||||
/// Constructor
|
||||
Battlefield();
|
||||
Battlefield(Battlefield const&) = delete;
|
||||
Battlefield(Battlefield&&) = delete;
|
||||
Battlefield& operator=(Battlefield const&) = delete;
|
||||
Battlefield& operator=(Battlefield&&) = delete;
|
||||
|
||||
/// Destructor
|
||||
virtual ~Battlefield();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user