* Rename: BattleGround -> Battleground.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2010-08-08 04:37:24 +02:00
parent 3d1efa6ed7
commit 909e332579
77 changed files with 1556 additions and 1556 deletions
@@ -18,15 +18,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "BattleGround.h"
#include "BattleGroundBE.h"
#include "Battleground.h"
#include "BattlegroundBE.h"
#include "Language.h"
#include "Object.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "WorldPacket.h"
BattleGroundBE::BattleGroundBE()
BattlegroundBE::BattlegroundBE()
{
m_BgObjects.resize(BG_BE_OBJECT_MAX);
@@ -41,14 +41,14 @@ BattleGroundBE::BattleGroundBE()
m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
}
BattleGroundBE::~BattleGroundBE()
BattlegroundBE::~BattlegroundBE()
{
}
void BattleGroundBE::Update(uint32 diff)
void BattlegroundBE::Update(uint32 diff)
{
BattleGround::Update(diff);
Battleground::Update(diff);
/*if (GetStatus() == STATUS_IN_PROGRESS)
{
@@ -56,7 +56,7 @@ void BattleGroundBE::Update(uint32 diff)
}*/
}
void BattleGroundBE::StartingEventCloseDoors()
void BattlegroundBE::StartingEventCloseDoors()
{
for (uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_4; ++i)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
@@ -65,7 +65,7 @@ void BattleGroundBE::StartingEventCloseDoors()
SpawnBGObject(i, RESPAWN_ONE_DAY);
}
void BattleGroundBE::StartingEventOpenDoors()
void BattlegroundBE::StartingEventOpenDoors()
{
for (uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_2; ++i)
DoorOpen(i);
@@ -74,18 +74,18 @@ void BattleGroundBE::StartingEventOpenDoors()
SpawnBGObject(i, 60);
}
void BattleGroundBE::AddPlayer(Player *plr)
void BattlegroundBE::AddPlayer(Player *plr)
{
BattleGround::AddPlayer(plr);
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
BattleGroundBEScore* sc = new BattleGroundBEScore;
BattlegroundBEScore* sc = new BattlegroundBEScore;
m_PlayerScores[plr->GetGUID()] = sc;
UpdateArenaWorldState();
}
void BattleGroundBE::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
void BattlegroundBE::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
{
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
@@ -94,7 +94,7 @@ void BattleGroundBE::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
CheckArenaWinConditions();
}
void BattleGroundBE::HandleKillPlayer(Player *player, Player *killer)
void BattlegroundBE::HandleKillPlayer(Player *player, Player *killer)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -105,19 +105,19 @@ void BattleGroundBE::HandleKillPlayer(Player *player, Player *killer)
return;
}
BattleGround::HandleKillPlayer(player,killer);
Battleground::HandleKillPlayer(player,killer);
UpdateArenaWorldState();
CheckArenaWinConditions();
}
bool BattleGroundBE::HandlePlayerUnderMap(Player *player)
bool BattlegroundBE::HandlePlayerUnderMap(Player *player)
{
player->TeleportTo(GetMapId(),6238.930176,262.963470,0.889519,player->GetOrientation(),false);
return true;
}
void BattleGroundBE::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattlegroundBE::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)
@@ -143,19 +143,19 @@ void BattleGroundBE::HandleAreaTrigger(Player *Source, uint32 Trigger)
// HandleTriggerBuff(buff_guid,Source);
}
void BattleGroundBE::FillInitialWorldStates(WorldPacket &data)
void BattlegroundBE::FillInitialWorldStates(WorldPacket &data)
{
data << uint32(0x9f3) << uint32(1); // 9
UpdateArenaWorldState();
}
void BattleGroundBE::Reset()
void BattlegroundBE::Reset()
{
//call parent's class reset
BattleGround::Reset();
Battleground::Reset();
}
bool BattleGroundBE::SetupBattleGround()
bool BattlegroundBE::SetupBattleground()
{
// gates
if (!AddObject(BG_BE_OBJECT_DOOR_1, BG_BE_OBJECT_TYPE_DOOR_1, 6287.277f, 282.1877f, 3.810925f, -2.260201f, 0, 0, 0.9044551f, -0.4265689f, RESPAWN_IMMEDIATELY)
@@ -173,15 +173,15 @@ bool BattleGroundBE::SetupBattleGround()
return true;
}
void BattleGroundBE::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
void BattlegroundBE::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
BattleGroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
if (itr == m_PlayerScores.end()) // player not found...
return;
//there is nothing special in this score
BattleGround::UpdatePlayerScore(Source,type,value, doAddHonor);
Battleground::UpdatePlayerScore(Source,type,value, doAddHonor);
}