refactor(Scripts/OutdoorPvP): code cleanup (part 7) (#6927)

This commit is contained in:
Francesco Borzì
2021-07-21 14:12:40 +02:00
committed by GitHub
parent b7332b9305
commit 383946af6c
7 changed files with 30 additions and 46 deletions

View File

@@ -4,10 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#include "Creature.h"
#include "GameGraveyard.h"
#include "GameObject.h"
#include "GossipDef.h"
#include "Language.h"
#include "MapManager.h"
#include "ObjectAccessor.h"
@@ -140,11 +138,7 @@ void OPvPCapturePointEP_EWT::SummonSupportUnitAtNorthpassTower(TeamId teamId)
if (m_UnitsSummonedSideId != teamId)
{
m_UnitsSummonedSideId = teamId;
const creature_type* ct = nullptr;
if (teamId == TEAM_ALLIANCE)
ct = EP_EWT_Summons_A;
else
ct = EP_EWT_Summons_H;
const creature_type* ct = teamId == TEAM_ALLIANCE ? EP_EWT_Summons_A : EP_EWT_Summons_H;
for (uint8 i = 0; i < EP_EWT_NUM_CREATURES; ++i)
{

View File

@@ -27,13 +27,13 @@ const uint32 EP_PWT_CM = 17698;
const uint32 EPBuffZones[EPBuffZonesNum] = {139, 2017, 2057};
enum EP_TaxiNodes
{
EP_CGT_Taxi = 87,
EP_EWT_Taxi = 86,
EP_NPT_Taxi = 85,
EP_PWT_Taxi = 84
};
//enum EP_TaxiNodes
//{
// EP_CGT_Taxi = 87,
// EP_EWT_Taxi = 86,
// EP_NPT_Taxi = 85,
// EP_PWT_Taxi = 84
//};
enum EP_EastwallTowerWorldStates
{
@@ -125,9 +125,9 @@ const go_type EPTowerFlags[EP_TOWER_NUM] =
{182106, 0, 1838.42f, -3703.56f, 167.713f, 0.890118f, 0.0f, 0.0f, 0.430511f, 0.902585f}
};
const uint32 EPTowerPlayerEnterEvents[EP_TOWER_NUM] = {10691, 10699, 10701, 10705};
//const uint32 EPTowerPlayerEnterEvents[EP_TOWER_NUM] = {10691, 10699, 10701, 10705};
const uint32 EPTowerPlayerLeaveEvents[EP_TOWER_NUM] = {10692, 10698, 10700, 10704};
//const uint32 EPTowerPlayerLeaveEvents[EP_TOWER_NUM] = {10692, 10698, 10700, 10704};
const uint8 EP_NUM_CREATURES = 6;
const uint8 EP_EWT_NUM_CREATURES = 5;

View File

@@ -5,9 +5,7 @@
*/
#include "GameEventMgr.h"
#include "Language.h"
#include "MapManager.h"
#include "ObjectMgr.h"
#include "OutdoorPvPGH.h"
#include "OutdoorPvPMgr.h"
#include "Player.h"
@@ -25,12 +23,8 @@ bool OutdoorPvPGH::SetupOutdoorPvP()
RegisterZone(GH_ZONE);
SetMapFromZone(GH_ZONE);
if ((m_obj = new OPvPCapturePointGH(this)))
{
AddCapturePoint(m_obj);
return true;
}
return false;
AddCapturePoint(new OPvPCapturePointGH(this));
return true;
}
void OutdoorPvPGH::SendRemoveWorldStates(Player* player)

View File

@@ -31,9 +31,6 @@ public:
OutdoorPvPGH();
bool SetupOutdoorPvP() override;
void SendRemoveWorldStates(Player* player) override;
private:
OPvPCapturePointGH* m_obj;
};
class OPvPCapturePointGH : public OPvPCapturePoint

View File

@@ -31,9 +31,9 @@ enum OutdoorPvPHPTowerType
const uint32 HP_CREDITMARKER[HP_TOWER_NUM] = {19032, 19028, 19029};
const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM] = {11404, 11396, 11388};
//const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM] = {11404, 11396, 11388};
const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403, 11395, 11387};
//const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403, 11395, 11387};
enum OutdoorPvPHPWorldStates
{

View File

@@ -67,23 +67,23 @@ const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] =
{0xa85, 0xa84, 0xa83}
};
const uint32 TFTowerPlayerEnterEvents[TF_TOWER_NUM] =
{
12226,
12497,
12486,
12499,
12501
};
//const uint32 TFTowerPlayerEnterEvents[TF_TOWER_NUM] =
//{
// 12226,
// 12497,
// 12486,
// 12499,
// 12501
//};
const uint32 TFTowerPlayerLeaveEvents[TF_TOWER_NUM] =
{
12225,
12496,
12487,
12498,
12500
};
//const uint32 TFTowerPlayerLeaveEvents[TF_TOWER_NUM] =
//{
// 12225,
// 12496,
// 12487,
// 12498,
// 12500
//};
enum TFWorldStates
{

View File

@@ -6,7 +6,6 @@
#include "Creature.h"
#include "GameGraveyard.h"
#include "GossipDef.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "OutdoorPvPMgr.h"