Core: Codestyle clean-up

"pl"->"player"

 Note: codestyle methods needs maintained, Player* player.
still to do properly clean-up chat.cpp.
This commit is contained in:
Bootz
2011-11-07 11:18:00 -06:00
parent f75ec5ba2b
commit d1334624da
34 changed files with 277 additions and 277 deletions
@@ -1823,8 +1823,8 @@ uint32 Battleground::GetAlivePlayersCountByTeam(uint32 Team) const
{
if (itr->second.Team == Team)
{
Player* pl = ObjectAccessor::FindPlayer(itr->first);
if (pl && pl->isAlive() && !pl->HasByteFlag(UNIT_FIELD_BYTES_2, 3, FORM_SPIRITOFREDEMPTION))
Player* player = ObjectAccessor::FindPlayer(itr->first);
if (player && player->isAlive() && !player->HasByteFlag(UNIT_FIELD_BYTES_2, 3, FORM_SPIRITOFREDEMPTION))
++count;
}
}
+1 -1
View File
@@ -329,7 +329,7 @@ class Battleground
{
}
virtual void DestroyGate(Player* /*pl*/, GameObject* /*go*/) {}
virtual void DestroyGate(Player* /*player*/, GameObject* /*go*/) {}
/* achievement req. */
virtual bool IsAllNodesConrolledByTeam(uint32 /*team*/) const { return false; }
@@ -868,35 +868,35 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid
}
}
void BattlegroundMgr::SendToBattleground(Player* pl, uint32 instanceId, BattlegroundTypeId bgTypeId)
void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, BattlegroundTypeId bgTypeId)
{
Battleground* bg = GetBattleground(instanceId, bgTypeId);
if (bg)
{
uint32 mapid = bg->GetMapId();
float x, y, z, O;
uint32 team = pl->GetBGTeam();
uint32 team = player->GetBGTeam();
if (team == 0)
team = pl->GetTeam();
team = player->GetTeam();
bg->GetTeamStartLoc(team, x, y, z, O);
sLog->outDetail("BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", pl->GetName(), mapid, x, y, z, O);
pl->TeleportTo(mapid, x, y, z, O);
sLog->outDetail("BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", player->GetName(), mapid, x, y, z, O);
player->TeleportTo(mapid, x, y, z, O);
}
else
{
sLog->outError("player %u is trying to port to non-existent bg instance %u", pl->GetGUIDLow(), instanceId);
sLog->outError("player %u is trying to port to non-existent bg instance %u", player->GetGUIDLow(), instanceId);
}
}
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* pl, Battleground* bg, uint64 guid)
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, uint64 guid)
{
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds
if (time_ == uint32(-1))
time_ = 0;
data << guid << time_;
pl->GetSession()->SendPacket(&data);
player->GetSession()->SendPacket(&data);
}
bool BattlegroundMgr::IsArenaType(BattlegroundTypeId bgTypeId)
@@ -73,7 +73,7 @@ class BattlegroundMgr
void BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg);
void BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame = 1);
void BuildPlaySoundPacket(WorldPacket* data, uint32 soundid);
void SendAreaSpiritHealerQueryOpcode(Player* pl, Battleground* bg, uint64 guid);
void SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, uint64 guid);
/* Battlegrounds */
Battleground* GetBattlegroundThroughClientInstance(uint32 instanceId, BattlegroundTypeId bgTypeId);
@@ -91,7 +91,7 @@ class BattlegroundMgr
void CreateInitialBattlegrounds();
void DeleteAllBattlegrounds();
void SendToBattleground(Player* pl, uint32 InstanceID, BattlegroundTypeId bgTypeId);
void SendToBattleground(Player* player, uint32 InstanceID, BattlegroundTypeId bgTypeId);
/* Battleground queues */
//these queues are instantiated when creating BattlegroundMrg