* Rename: BattleGround -> Battleground.
--HG-- branch : trunk
This commit is contained in:
@@ -18,15 +18,15 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "BattleGround.h"
|
||||
#include "BattleGroundRL.h"
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundRL.h"
|
||||
#include "Language.h"
|
||||
#include "Object.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
BattleGroundRL::BattleGroundRL()
|
||||
BattlegroundRL::BattlegroundRL()
|
||||
{
|
||||
m_BgObjects.resize(BG_RL_OBJECT_MAX);
|
||||
|
||||
@@ -41,14 +41,14 @@ BattleGroundRL::BattleGroundRL()
|
||||
m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
|
||||
}
|
||||
|
||||
BattleGroundRL::~BattleGroundRL()
|
||||
BattlegroundRL::~BattlegroundRL()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BattleGroundRL::Update(uint32 diff)
|
||||
void BattlegroundRL::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
Battleground::Update(diff);
|
||||
|
||||
/*if (GetStatus() == STATUS_IN_PROGRESS)
|
||||
{
|
||||
@@ -56,13 +56,13 @@ void BattleGroundRL::Update(uint32 diff)
|
||||
}*/
|
||||
}
|
||||
|
||||
void BattleGroundRL::StartingEventCloseDoors()
|
||||
void BattlegroundRL::StartingEventCloseDoors()
|
||||
{
|
||||
for (uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; ++i)
|
||||
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
|
||||
}
|
||||
|
||||
void BattleGroundRL::StartingEventOpenDoors()
|
||||
void BattlegroundRL::StartingEventOpenDoors()
|
||||
{
|
||||
for (uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; ++i)
|
||||
DoorOpen(i);
|
||||
@@ -71,18 +71,18 @@ void BattleGroundRL::StartingEventOpenDoors()
|
||||
SpawnBGObject(i, 60);
|
||||
}
|
||||
|
||||
void BattleGroundRL::AddPlayer(Player *plr)
|
||||
void BattlegroundRL::AddPlayer(Player *plr)
|
||||
{
|
||||
BattleGround::AddPlayer(plr);
|
||||
Battleground::AddPlayer(plr);
|
||||
//create score and add it to map, default values are set in constructor
|
||||
BattleGroundRLScore* sc = new BattleGroundRLScore;
|
||||
BattlegroundRLScore* sc = new BattlegroundRLScore;
|
||||
|
||||
m_PlayerScores[plr->GetGUID()] = sc;
|
||||
|
||||
UpdateArenaWorldState();
|
||||
}
|
||||
|
||||
void BattleGroundRL::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
|
||||
void BattlegroundRL::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
|
||||
{
|
||||
if (GetStatus() == STATUS_WAIT_LEAVE)
|
||||
return;
|
||||
@@ -91,7 +91,7 @@ void BattleGroundRL::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
|
||||
CheckArenaWinConditions();
|
||||
}
|
||||
|
||||
void BattleGroundRL::HandleKillPlayer(Player *player, Player *killer)
|
||||
void BattlegroundRL::HandleKillPlayer(Player *player, Player *killer)
|
||||
{
|
||||
if (GetStatus() != STATUS_IN_PROGRESS)
|
||||
return;
|
||||
@@ -102,19 +102,19 @@ void BattleGroundRL::HandleKillPlayer(Player *player, Player *killer)
|
||||
return;
|
||||
}
|
||||
|
||||
BattleGround::HandleKillPlayer(player,killer);
|
||||
Battleground::HandleKillPlayer(player,killer);
|
||||
|
||||
UpdateArenaWorldState();
|
||||
CheckArenaWinConditions();
|
||||
}
|
||||
|
||||
bool BattleGroundRL::HandlePlayerUnderMap(Player *player)
|
||||
bool BattlegroundRL::HandlePlayerUnderMap(Player *player)
|
||||
{
|
||||
player->TeleportTo(GetMapId(),1285.810547,1667.896851,39.957642,player->GetOrientation(),false);
|
||||
return true;
|
||||
}
|
||||
|
||||
void BattleGroundRL::HandleAreaTrigger(Player *Source, uint32 Trigger)
|
||||
void BattlegroundRL::HandleAreaTrigger(Player *Source, uint32 Trigger)
|
||||
{
|
||||
// this is wrong way to implement these things. On official it done by gameobject spell cast.
|
||||
if (GetStatus() != STATUS_IN_PROGRESS)
|
||||
@@ -137,19 +137,19 @@ void BattleGroundRL::HandleAreaTrigger(Player *Source, uint32 Trigger)
|
||||
// HandleTriggerBuff(buff_guid,Source);
|
||||
}
|
||||
|
||||
void BattleGroundRL::FillInitialWorldStates(WorldPacket &data)
|
||||
void BattlegroundRL::FillInitialWorldStates(WorldPacket &data)
|
||||
{
|
||||
data << uint32(0xbba) << uint32(1); // 9
|
||||
UpdateArenaWorldState();
|
||||
}
|
||||
|
||||
void BattleGroundRL::Reset()
|
||||
void BattlegroundRL::Reset()
|
||||
{
|
||||
//call parent's reset
|
||||
BattleGround::Reset();
|
||||
Battleground::Reset();
|
||||
}
|
||||
|
||||
bool BattleGroundRL::SetupBattleGround()
|
||||
bool BattlegroundRL::SetupBattleground()
|
||||
{
|
||||
// gates
|
||||
if (!AddObject(BG_RL_OBJECT_DOOR_1, BG_RL_OBJECT_TYPE_DOOR_1, 1293.561, 1601.938, 31.60557, -1.457349, 0, 0, -0.6658813, 0.7460576, RESPAWN_IMMEDIATELY)
|
||||
|
||||
Reference in New Issue
Block a user