[Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions)

This commit is contained in:
Spp
2011-09-15 14:12:57 +02:00
parent 9006e4e8dc
commit af05915b9e
431 changed files with 3131 additions and 3131 deletions
+2 -2
View File
@@ -194,7 +194,7 @@ bool ArenaTeam::LoadArenaTeamFromDB(QueryResult result)
if (!result)
return false;
Field *fields = result->Fetch();
Field* fields = result->Fetch();
TeamId = fields[0].GetUInt32();
TeamName = fields[1].GetString();
@@ -224,7 +224,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
do
{
Field *fields = result->Fetch();
Field* fields = result->Fetch();
// Prevent crash if db records are broken when all members in result are already processed and current team doesn't have any members
if (!fields)
@@ -148,7 +148,7 @@ void ArenaTeamMgr::DistributeArenaPoints()
// At first update all points for all team members
for (ArenaTeamContainer::iterator teamItr = GetArenaTeamMapBegin(); teamItr != GetArenaTeamMapEnd(); ++teamItr)
if (ArenaTeam * at = teamItr->second)
if (ArenaTeam* at = teamItr->second)
at->UpdateArenaPointsHelper(PlayerPoints);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
@@ -172,7 +172,7 @@ void ArenaTeamMgr::DistributeArenaPoints()
sWorld->SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_START);
for (ArenaTeamContainer::iterator titr = GetArenaTeamMapBegin(); titr != GetArenaTeamMapEnd(); ++titr)
{
if (ArenaTeam * at = titr->second)
if (ArenaTeam* at = titr->second)
{
at->FinishWeek();
at->SaveToDB();
+25 -25
View File
@@ -124,7 +124,7 @@ template<class Do>
void Battleground::BroadcastWorker(Do& _do)
{
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
if (Player *plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
if (Player* plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
_do(plr);
}
@@ -325,10 +325,10 @@ inline void Battleground::_ProcessRessurect(uint32 diff)
{
for (std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr)
{
Creature *sh = NULL;
Creature* sh = NULL;
for (std::vector<uint64>::const_iterator itr2 = (itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
{
Player *plr = ObjectAccessor::FindPlayer(*itr2);
Player* plr = ObjectAccessor::FindPlayer(*itr2);
if (!plr)
continue;
@@ -359,7 +359,7 @@ inline void Battleground::_ProcessRessurect(uint32 diff)
{
for (std::vector<uint64>::const_iterator itr = m_ResurrectQueue.begin(); itr != m_ResurrectQueue.end(); ++itr)
{
Player *plr = ObjectAccessor::FindPlayer(*itr);
Player* plr = ObjectAccessor::FindPlayer(*itr);
if (!plr)
continue;
plr->ResurrectPlayer(1.0f);
@@ -424,7 +424,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
{
m_ResetStatTimer = 0;
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player *plr = ObjectAccessor::FindPlayer(itr->first))
if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
plr->ResetAllPowers();
}
@@ -472,7 +472,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
{
// TODO : add arena sound PlaySoundToAll(SOUND_ARENA_START);
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player *plr = ObjectAccessor::FindPlayer(itr->first))
if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
{
// BG Status packet
WorldPacket status;
@@ -488,7 +488,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
for (Unit::AuraApplicationMap::iterator iter = auraMap.begin(); iter != auraMap.end();)
{
AuraApplication * aurApp = iter->second;
Aura * aura = aurApp->GetBase();
Aura* aura = aurApp->GetBase();
if (!aura->IsPermanent()
&& aura->GetDuration() <= 30*IN_MILLISECONDS
&& aurApp->IsPositive()
@@ -594,7 +594,7 @@ void Battleground::SendPacketToAll(WorldPacket* packet)
player->GetSession()->SendPacket(packet);
}
void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player *sender, bool self)
void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender, bool self)
{
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
if (Player* player = _GetPlayerForTeam(TeamID, itr, "SendPacketToTeam"))
@@ -963,8 +963,8 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
if (isRated() && GetStatus() == STATUS_IN_PROGRESS)
{
//left a rated match while the encounter was in progress, consider as loser
ArenaTeam * winner_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
ArenaTeam * loser_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team));
ArenaTeam* winner_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
ArenaTeam* loser_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team));
if (winner_arena_team && loser_arena_team && winner_arena_team != loser_arena_team)
loser_arena_team->MemberLost(plr, GetArenaMatchmakerRating(GetOtherTeam(team)));
}
@@ -985,8 +985,8 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
if (isRated() && GetStatus() == STATUS_IN_PROGRESS)
{
//left a rated match while the encounter was in progress, consider as loser
ArenaTeam * others_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
ArenaTeam * players_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team));
ArenaTeam* others_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
ArenaTeam* players_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team));
if (others_arena_team && players_arena_team)
players_arena_team->OfflineMemberLost(guid, GetArenaMatchmakerRating(GetOtherTeam(team)));
}
@@ -1373,7 +1373,7 @@ void Battleground::AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid
{
m_ReviveQueue[npc_guid].push_back(player_guid);
Player *plr = ObjectAccessor::FindPlayer(player_guid);
Player* plr = ObjectAccessor::FindPlayer(player_guid);
if (!plr)
return;
@@ -1389,7 +1389,7 @@ void Battleground::RemovePlayerFromResurrectQueue(uint64 player_guid)
if (*itr2 == player_guid)
{
(itr->second).erase(itr2);
if (Player *plr = ObjectAccessor::FindPlayer(player_guid))
if (Player* plr = ObjectAccessor::FindPlayer(player_guid))
plr->RemoveAurasDueToSpell(SPELL_WAITING_FOR_RESURRECT);
return;
}
@@ -1402,7 +1402,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
// If the assert is called, means that m_BgObjects must be resized!
ASSERT(type < m_BgObjects.size());
Map *map = GetBgMap();
Map* map = GetBgMap();
if (!map)
return false;
// Must be created this way, adding to godatamap would add it to the base map of the instance
@@ -1451,7 +1451,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
// It would be nice to correctly implement GO_ACTIVATED state and open/close doors in gameobject code
void Battleground::DoorClose(uint32 type)
{
if (GameObject *obj = GetBgMap()->GetGameObject(m_BgObjects[type]))
if (GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]))
{
// If doors are open, close it
if (obj->getLootState() == GO_ACTIVATED && obj->GetGoState() != GO_STATE_READY)
@@ -1468,7 +1468,7 @@ void Battleground::DoorClose(uint32 type)
void Battleground::DoorOpen(uint32 type)
{
if (GameObject *obj = GetBgMap()->GetGameObject(m_BgObjects[type]))
if (GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]))
{
// Change state to be sure they will be opened
obj->SetLootState(GO_READY);
@@ -1481,7 +1481,7 @@ void Battleground::DoorOpen(uint32 type)
GameObject* Battleground::GetBGObject(uint32 type)
{
GameObject *obj = GetBgMap()->GetGameObject(m_BgObjects[type]);
GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]);
if (!obj)
sLog->outError("Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
type, GUID_LOPART(m_BgObjects[type]), m_MapId, m_InstanceID);
@@ -1490,7 +1490,7 @@ GameObject* Battleground::GetBGObject(uint32 type)
Creature* Battleground::GetBGCreature(uint32 type)
{
Creature *creature = GetBgMap()->GetCreature(m_BgCreatures[type]);
Creature* creature = GetBgMap()->GetCreature(m_BgCreatures[type]);
if (!creature)
sLog->outError("Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
type, GUID_LOPART(m_BgCreatures[type]), m_MapId, m_InstanceID);
@@ -1500,7 +1500,7 @@ Creature* Battleground::GetBGCreature(uint32 type)
void Battleground::SpawnBGObject(uint32 type, uint32 respawntime)
{
if (Map* map = GetBgMap())
if (GameObject *obj = map->GetGameObject(m_BgObjects[type]))
if (GameObject* obj = map->GetGameObject(m_BgObjects[type]))
{
if (respawntime)
obj->SetLootState(GO_JUST_DEACTIVATED);
@@ -1533,7 +1533,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
pCreature->SetHomePosition(x, y, z, o);
CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(entry);
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cinfo)
{
sLog->outError("Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!",
@@ -1559,7 +1559,7 @@ bool Battleground::DelCreature(uint32 type)
if (!m_BgCreatures[type])
return true;
if (Creature *creature = GetBgMap()->GetCreature(m_BgCreatures[type]))
if (Creature* creature = GetBgMap()->GetCreature(m_BgCreatures[type]))
{
creature->AddObjectToRemoveList();
m_BgCreatures[type] = 0;
@@ -1668,7 +1668,7 @@ void Battleground::SendWarningToAll(int32 entry, ...)
data << msg.c_str();
data << (uint8)0;
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
if (Player *plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
if (Player* plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
if (plr->GetSession())
plr->GetSession()->SendPacket(&data);
}
@@ -1699,7 +1699,7 @@ const char* Battleground::GetTrinityString(int32 entry)
// buffs are in their positions when battleground starts
void Battleground::HandleTriggerBuff(uint64 go_guid)
{
GameObject *obj = GetBgMap()->GetGameObject(go_guid);
GameObject* obj = GetBgMap()->GetGameObject(go_guid);
if (!obj || obj->GetGoType() != GAMEOBJECT_TYPE_TRAP || !obj->isSpawned())
return;
@@ -1857,7 +1857,7 @@ void Battleground::UpdateArenaWorldState()
UpdateWorldState(0xe11, GetAlivePlayersCountByTeam(ALLIANCE));
}
void Battleground::SetBgRaid(uint32 TeamID, Group *bg_raid)
void Battleground::SetBgRaid(uint32 TeamID, Group* bg_raid)
{
Group*& old_raid = TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE];
if (old_raid)
+5 -5
View File
@@ -476,10 +476,10 @@ class Battleground
void SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 strId1 = 0, int32 strId2 = 0);
// Raid Group
Group *GetBgRaid(uint32 TeamID) const { return TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE]; }
void SetBgRaid(uint32 TeamID, Group *bg_raid);
Group* GetBgRaid(uint32 TeamID) const { return TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE]; }
void SetBgRaid(uint32 TeamID, Group* bg_raid);
virtual void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
virtual void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
static BattlegroundTeamId GetTeamIndexByTeamId(uint32 Team) { return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE; }
uint32 GetPlayersCountByTeam(uint32 Team) const { return m_PlayersCount[GetTeamIndexByTeamId(Team)]; }
@@ -630,7 +630,7 @@ class Battleground
bool m_IsRated; // is this battle rated?
bool m_PrematureCountDown;
uint32 m_PrematureCountDownTimer;
char const *m_Name;
char const* m_Name;
/* Pre- and post-update hooks */
@@ -673,7 +673,7 @@ class Battleground
uint32 m_InvitedHorde;
// Raid Group
Group *m_BgRaids[BG_TEAMS_COUNT]; // 0 - alliance, 1 - horde
Group* m_BgRaids[BG_TEAMS_COUNT]; // 0 - alliance, 1 - horde
// Players count by team
uint32 m_PlayersCount[BG_TEAMS_COUNT];
@@ -174,7 +174,7 @@ void BattlegroundMgr::Update(uint32 diff)
}
}
void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battleground *bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame)
void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame)
{
// we can be in 2 queues in same time...
@@ -227,7 +227,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battlegro
}
}
void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
{
uint8 type = (bg->isArena() ? 1 : 0);
// last check on 3.0.3
@@ -291,7 +291,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
}
else
{
Player *plr = ObjectAccessor::FindPlayer(itr2->first);
Player* plr = ObjectAccessor::FindPlayer(itr2->first);
uint32 team = bg->GetPlayerTeam(itr2->first);
if (!team && plr)
team = plr->GetBGTeam();
@@ -396,7 +396,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
data->put(wpos, scoreCount);
}
void BattlegroundMgr::BuildGroupJoinedBattlegroundPacket(WorldPacket *data, GroupJoinBattlegroundResult result)
void BattlegroundMgr::BuildGroupJoinedBattlegroundPacket(WorldPacket* data, GroupJoinBattlegroundResult result)
{
data->Initialize(SMSG_GROUP_JOINED_BATTLEGROUND, 4);
*data << int32(result);
@@ -404,26 +404,26 @@ void BattlegroundMgr::BuildGroupJoinedBattlegroundPacket(WorldPacket *data, Grou
*data << uint64(0); // player guid
}
void BattlegroundMgr::BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value)
void BattlegroundMgr::BuildUpdateWorldStatePacket(WorldPacket* data, uint32 field, uint32 value)
{
data->Initialize(SMSG_UPDATE_WORLD_STATE, 4+4);
*data << uint32(field);
*data << uint32(value);
}
void BattlegroundMgr::BuildPlaySoundPacket(WorldPacket *data, uint32 soundid)
void BattlegroundMgr::BuildPlaySoundPacket(WorldPacket* data, uint32 soundid)
{
data->Initialize(SMSG_PLAY_SOUND, 4);
*data << uint32(soundid);
}
void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(WorldPacket *data, uint64 guid)
void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(WorldPacket* data, uint64 guid)
{
data->Initialize(SMSG_BATTLEGROUND_PLAYER_LEFT, 8);
*data << uint64(guid);
}
void BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(WorldPacket *data, Player *plr)
void BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, Player* plr)
{
data->Initialize(SMSG_BATTLEGROUND_PLAYER_JOINED, 8);
*data << uint64(plr->GetGUID());
@@ -500,8 +500,8 @@ uint32 BattlegroundMgr::CreateClientVisibleInstanceId(BattlegroundTypeId bgTypeI
Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated)
{
// get the template BG
Battleground *bg_template = GetBattlegroundTemplate(bgTypeId);
BattlegroundSelectionWeightMap *selectionWeights = NULL;
Battleground* bg_template = GetBattlegroundTemplate(bgTypeId);
BattlegroundSelectionWeightMap* selectionWeights = NULL;
if (!bg_template)
{
@@ -552,7 +552,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId
}
}
Battleground *bg = NULL;
Battleground* bg = NULL;
// create a copy of the BG template
switch(bgTypeId)
{
@@ -625,7 +625,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId
uint32 BattlegroundMgr::CreateBattleground(CreateBattlegroundData& data)
{
// Create the BG
Battleground *bg = NULL;
Battleground* bg = NULL;
switch (data.bgTypeId)
{
case BATTLEGROUND_AV: bg = new BattlegroundAV; break;
@@ -652,8 +652,8 @@ uint32 BattlegroundMgr::CreateBattleground(CreateBattlegroundData& data)
bg->SetArenaorBGType(data.IsArena);
bg->SetMinPlayersPerTeam(data.MinPlayersPerTeam);
bg->SetMaxPlayersPerTeam(data.MaxPlayersPerTeam);
bg->SetMinPlayers(data.MinPlayersPerTeam * 2);
bg->SetMaxPlayers(data.MaxPlayersPerTeam * 2);
bg->SetMinPlayers(data.MinPlayersPerTeam* 2);
bg->SetMaxPlayers(data.MaxPlayersPerTeam* 2);
bg->SetName(data.BattlegroundName);
bg->SetTeamStartLoc(ALLIANCE, data.Team1StartLocX, data.Team1StartLocY, data.Team1StartLocZ, data.Team1StartLocO);
bg->SetTeamStartLoc(HORDE, data.Team2StartLocX, data.Team2StartLocY, data.Team2StartLocZ, data.Team2StartLocO);
@@ -672,7 +672,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
uint32 oldMSTime = getMSTime();
uint8 selectionWeight;
BattlemasterListEntry const *bl;
BattlemasterListEntry const* bl;
// 0 1 2 3 4 5 6 7 8 9 10
QueryResult result = WorldDatabase.Query("SELECT id, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, AllianceStartLoc, AllianceStartO, HordeStartLoc, HordeStartO, Weight, ScriptName FROM battleground_template");
@@ -688,7 +688,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
do
{
Field *fields = result->Fetch();
Field* fields = result->Fetch();
uint32 bgTypeID_ = fields[0].GetUInt32();
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeID_, NULL))
@@ -805,7 +805,7 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution()
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Automatic Arena Point Distribution initialized.");
}
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket *data, uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere)
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere)
{
if (!plr)
return;
@@ -869,9 +869,9 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket *data, uint64 guid
}
}
void BattlegroundMgr::SendToBattleground(Player *pl, uint32 instanceId, BattlegroundTypeId bgTypeId)
void BattlegroundMgr::SendToBattleground(Player* pl, uint32 instanceId, BattlegroundTypeId bgTypeId)
{
Battleground *bg = GetBattleground(instanceId, bgTypeId);
Battleground* bg = GetBattleground(instanceId, bgTypeId);
if (bg)
{
uint32 mapid = bg->GetMapId();
@@ -890,7 +890,7 @@ void BattlegroundMgr::SendToBattleground(Player *pl, uint32 instanceId, Battlegr
}
}
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player *pl, Battleground *bg, uint64 guid)
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* pl, Battleground* bg, uint64 guid)
{
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds
@@ -1080,7 +1080,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
{
++count;
Field *fields = result->Fetch();
Field* fields = result->Fetch();
uint32 entry = fields[0].GetUInt32();
uint32 bgTypeId = fields[1].GetUInt32();
+10 -10
View File
@@ -65,15 +65,15 @@ class BattlegroundMgr
void Update(uint32 diff);
/* Packet Building */
void BuildPlayerJoinedBattlegroundPacket(WorldPacket *data, Player *plr);
void BuildPlayerLeftBattlegroundPacket(WorldPacket *data, uint64 guid);
void BuildBattlegroundListPacket(WorldPacket *data, uint64 guid, Player *plr, BattlegroundTypeId bgTypeId, uint8 fromWhere);
void BuildGroupJoinedBattlegroundPacket(WorldPacket *data, GroupJoinBattlegroundResult result);
void BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value);
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 BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, Player* plr);
void BuildPlayerLeftBattlegroundPacket(WorldPacket* data, uint64 guid);
void BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere);
void BuildGroupJoinedBattlegroundPacket(WorldPacket* data, GroupJoinBattlegroundResult result);
void BuildUpdateWorldStatePacket(WorldPacket* data, uint32 field, uint32 value);
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);
/* 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* pl, uint32 InstanceID, BattlegroundTypeId bgTypeId);
/* Battleground queues */
//these queues are instantiated when creating BattlegroundMrg
@@ -105,7 +105,7 @@ bool BattlegroundQueue::SelectionPool::KickGroup(uint32 size)
// used when building selection pools
// returns true if we can invite more players, or when we added group to selection pool
// returns false when selection pool is full
bool BattlegroundQueue::SelectionPool::AddGroup(GroupQueueInfo *ginfo, uint32 desiredCount)
bool BattlegroundQueue::SelectionPool::AddGroup(GroupQueueInfo* ginfo, uint32 desiredCount)
{
//if group is larger than desired count - don't allow to add it to pool
if (!ginfo->IsInvitedToBGInstanceGUID && desiredCount >= PlayerCount + ginfo->Players.size())
@@ -125,7 +125,7 @@ bool BattlegroundQueue::SelectionPool::AddGroup(GroupQueueInfo *ginfo, uint32 de
/*********************************************************/
// add group or player (grp == NULL) to bg queue with the given leader and bg specifications
GroupQueueInfo * BattlegroundQueue::AddGroup(Player *leader, Group* grp, BattlegroundTypeId BgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 arenateamid)
GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, BattlegroundTypeId BgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 arenateamid)
{
BattlegroundBracketId bracketId = bracketEntry->GetBracketId();
@@ -159,7 +159,7 @@ GroupQueueInfo * BattlegroundQueue::AddGroup(Player *leader, Group* grp, Battleg
//announce world (this don't need mutex)
if (isRated && sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE))
{
ArenaTeam *Team = sArenaTeamMgr->GetArenaTeamById(arenateamid);
ArenaTeam* Team = sArenaTeamMgr->GetArenaTeamById(arenateamid);
if (Team)
sWorld->SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, Team->GetName().c_str(), ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating);
}
@@ -169,9 +169,9 @@ GroupQueueInfo * BattlegroundQueue::AddGroup(Player *leader, Group* grp, Battleg
//ACE_Guard<ACE_Recursive_Thread_Mutex> guard(m_Lock);
if (grp)
{
for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *member = itr->getSource();
Player* member = itr->getSource();
if (!member)
continue; // this should never happen
PlayerQueueInfo& pl_info = m_QueuedPlayers[member->GetGUID()];
@@ -283,7 +283,7 @@ uint32 BattlegroundQueue::GetAverageQueueWaitTime(GroupQueueInfo* ginfo, Battleg
//remove player from queue and from group info, if group info is empty then remove it too
void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
{
//Player *plr = ObjectAccessor::FindPlayer(guid);
//Player* plr = ObjectAccessor::FindPlayer(guid);
int32 bracket_id = -1; // signed for proper for-loop finish
QueuedPlayersMap::iterator itr;
@@ -351,16 +351,16 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
// announce to world if arena team left queue for rated match, show only once
if (group->ArenaType && group->IsRated && group->Players.empty() && sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE))
if (ArenaTeam *Team = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId))
if (ArenaTeam* Team = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId))
sWorld->SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, Team->GetName().c_str(), group->ArenaType, group->ArenaType, group->ArenaTeamRating);
// if player leaves queue and he is invited to rated arena match, then he have to lose
if (group->IsInvitedToBGInstanceGUID && group->IsRated && decreaseInvitedCount)
{
if (ArenaTeam * at = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId))
if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId))
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating);
if (Player *plr = ObjectAccessor::FindPlayer(guid))
if (Player* plr = ObjectAccessor::FindPlayer(guid))
at->MemberLost(plr, group->OpponentsMatchmakerRating);
else
at->OfflineMemberLost(guid, group->OpponentsMatchmakerRating);
@@ -381,7 +381,7 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
{
// remove next player, this is recursive
// first send removal information
if (Player *plr2 = ObjectAccessor::FindPlayer(group->Players.begin()->first))
if (Player* plr2 = ObjectAccessor::FindPlayer(group->Players.begin()->first))
{
Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(group->BgTypeId);
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(group->BgTypeId, group->ArenaType);
@@ -415,7 +415,7 @@ bool BattlegroundQueue::GetPlayerGroupInfoData(uint64 guid, GroupQueueInfo* ginf
return true;
}
bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, Battleground* bg, uint32 side)
bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg, uint32 side)
{
// set side if needed
if (side)
@@ -33,7 +33,7 @@ struct GroupQueueInfo; // type predefinitio
struct PlayerQueueInfo // stores information for players in queue
{
uint32 LastOnlineTime; // for tracking and removing offline players from queue after 5 minutes
GroupQueueInfo * GroupInfo; // pointer to the associated groupqueueinfo
GroupQueueInfo* GroupInfo; // pointer to the associated groupqueueinfo
};
struct GroupQueueInfo // stores information about the group in queue (also used when joined as solo!)
@@ -75,7 +75,7 @@ class BattlegroundQueue
bool CheckPremadeMatch(BattlegroundBracketId bracket_id, uint32 MinPlayersPerTeam, uint32 MaxPlayersPerTeam);
bool CheckNormalMatch(Battleground* bg_template, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers);
bool CheckSkirmishForSameFaction(BattlegroundBracketId bracket_id, uint32 minPlayersPerTeam);
GroupQueueInfo * AddGroup(Player* leader, Group* group, BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId = 0);
GroupQueueInfo* AddGroup(Player* leader, Group* group, BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId = 0);
void RemovePlayer(uint64 guid, bool decreaseInvitedCount);
bool IsPlayerInvited(uint64 pl_guid, const uint32 bgInstanceGuid, const uint32 removeTime);
bool GetPlayerGroupInfoData(uint64 guid, GroupQueueInfo* ginfo);
@@ -104,7 +104,7 @@ class BattlegroundQueue
{
public:
void Init();
bool AddGroup(GroupQueueInfo *ginfo, uint32 desiredCount);
bool AddGroup(GroupQueueInfo* ginfo, uint32 desiredCount);
bool KickGroup(uint32 size);
uint32 GetPlayerCount() const {return PlayerCount;}
public:
@@ -118,7 +118,7 @@ class BattlegroundQueue
private:
bool InviteGroupToBG(GroupQueueInfo * ginfo, Battleground* bg, uint32 side);
bool InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg, uint32 side);
uint32 m_WaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS][COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME];
uint32 m_WaitTimeLastPlayer[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS];
uint32 m_SumOfWaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS];
@@ -47,7 +47,7 @@ void BattlegroundAA::StartingEventOpenDoors()
{
}
void BattlegroundAA::AddPlayer(Player *plr)
void BattlegroundAA::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -35,12 +35,12 @@ class BattlegroundAA : public Battleground
~BattlegroundAA();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleKillPlayer(Player* player, Player* killer);
};
@@ -204,7 +204,7 @@ void BattlegroundAB::StartingEventOpenDoors()
DoorOpen(BG_AB_OBJECT_GATE_H);
}
void BattlegroundAB::AddPlayer(Player *plr)
void BattlegroundAB::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in the constructor
@@ -218,7 +218,7 @@ void BattlegroundAB::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*tea
}
void BattlegroundAB::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattlegroundAB::HandleAreaTrigger(Player* Source, uint32 Trigger)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -406,7 +406,7 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node)
std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[node]];
if (!ghost_list.empty())
{
WorldSafeLocsEntry const *ClosestGrave = NULL;
WorldSafeLocsEntry const* ClosestGrave = NULL;
for (std::vector<uint64>::const_iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
Player* plr = ObjectAccessor::FindPlayer(*itr);
@@ -428,7 +428,7 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node)
}
/* Invoked if a player used a banner as a gameobject */
void BattlegroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*target_obj*/)
void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -679,7 +679,7 @@ WorldSafeLocsEntry const* BattlegroundAB::GetClosestGraveYard(Player* player)
return good_entry;
}
void BattlegroundAB::UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor)
void BattlegroundAB::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
if (itr == m_PlayerScores.end()) // player not found...
@@ -245,23 +245,23 @@ class BattlegroundAB : public Battleground
BattlegroundAB();
~BattlegroundAB();
void AddPlayer(Player *plr);
void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
virtual bool SetupBattleground();
virtual void Reset();
void EndBattleground(uint32 winner);
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
/* Scorekeeping */
virtual void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
virtual void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
virtual void FillInitialWorldStates(WorldPacket& data);
/* Nodes occupying */
virtual void EventPlayerClickedOnFlag(Player *source, GameObject* target_obj);
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
/* achievement req. */
bool IsAllNodesConrolledByTeam(uint32 team) const; // overwrited
@@ -422,7 +422,7 @@ void BattlegroundAV::StartingEventOpenDoors()
DoorOpen(BG_AV_OBJECT_DOOR_A);
}
void BattlegroundAV::AddPlayer(Player *plr)
void BattlegroundAV::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -486,7 +486,7 @@ void BattlegroundAV::RemovePlayer(Player* plr, uint64 /*guid*/, uint32 /*team*/)
plr->RemoveAurasDueToSpell(AV_BUFF_H_CAPTAIN);
}
void BattlegroundAV::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattlegroundAV::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)
@@ -853,7 +853,7 @@ uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
//called when using banner
void BattlegroundAV::EventPlayerClickedOnFlag(Player *source, GameObject* target_obj)
void BattlegroundAV::EventPlayerClickedOnFlag(Player* source, GameObject* target_obj)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -1029,8 +1029,8 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[node]];
if (!ghost_list.empty())
{
Player *plr;
WorldSafeLocsEntry const *ClosestGrave = NULL;
Player* plr;
WorldSafeLocsEntry const* ClosestGrave = NULL;
for (std::vector<uint64>::iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
plr = ObjectAccessor::FindPlayer(*ghost_list.begin());
@@ -1539,21 +1539,21 @@ class BattlegroundAV : public Battleground
~BattlegroundAV();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
virtual void ResetBGSubclass();
/*general stuff*/
void UpdateScore(uint16 team, int16 points);
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
/*handlestuff*/ //these are functions which get called from extern
virtual void EventPlayerClickedOnFlag(Player *source, GameObject* target_obj);
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
void HandleKillPlayer(Player* player, Player* killer);
void HandleKillUnit(Creature* unit, Player* killer);
void HandleQuestComplete(uint32 questid, Player* player);
@@ -62,7 +62,7 @@ void BattlegroundBE::StartingEventOpenDoors()
SpawnBGObject(i, 60);
}
void BattlegroundBE::AddPlayer(Player *plr)
void BattlegroundBE::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -105,7 +105,7 @@ bool BattlegroundBE::HandlePlayerUnderMap(Player* player)
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)
@@ -55,12 +55,12 @@ class BattlegroundBE : public Battleground
~BattlegroundBE();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
@@ -68,6 +68,6 @@ class BattlegroundBE : public Battleground
bool HandlePlayerUnderMap(Player* plr);
/* Scorekeeping */
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
};
#endif
@@ -88,7 +88,7 @@ void BattlegroundDS::StartingEventOpenDoors()
SpawnBGObject(i, getWaterFallTimer());
}
void BattlegroundDS::AddPlayer(Player *plr)
void BattlegroundDS::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -125,7 +125,7 @@ void BattlegroundDS::HandleKillPlayer(Player* player, Player* killer)
CheckArenaWinConditions();
}
void BattlegroundDS::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattlegroundDS::HandleAreaTrigger(Player* Source, uint32 Trigger)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -64,12 +64,12 @@ class BattlegroundDS : public Battleground
~BattlegroundDS();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
@@ -137,7 +137,7 @@ void BattlegroundEY::AddPoints(uint32 Team, uint32 Points)
void BattlegroundEY::CheckSomeoneJoinedPoint()
{
GameObject *obj = NULL;
GameObject* obj = NULL;
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
obj = HashMapHolder<GameObject>::Find(m_BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REAVER + i]);
@@ -146,7 +146,7 @@ void BattlegroundEY::CheckSomeoneJoinedPoint()
uint8 j = 0;
while (j < m_PlayersNearPoint[EY_POINTS_MAX].size())
{
Player *plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
if (!plr)
{
sLog->outError("BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
@@ -177,7 +177,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
//reset current point counts
for (uint8 i = 0; i < 2*EY_POINTS_MAX; ++i)
m_CurrentPointPlayersCount[i] = 0;
GameObject *obj = NULL;
GameObject* obj = NULL;
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
obj = HashMapHolder<GameObject>::Find(m_BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REAVER + i]);
@@ -186,7 +186,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
uint8 j = 0;
while (j < m_PlayersNearPoint[i].size())
{
Player *plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]);
Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]);
if (!plr)
{
sLog->outError("BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
@@ -241,7 +241,7 @@ void BattlegroundEY::UpdatePointStatuses()
for (uint8 i = 0; i < m_PlayersNearPoint[point].size(); ++i)
{
Player *plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[point][i]);
Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[point][i]);
if (plr)
{
this->UpdateWorldStateForPlayer(PROGRESS_BAR_STATUS, m_PointBarStatus[point], plr);
@@ -330,7 +330,7 @@ void BattlegroundEY::UpdatePointsIcons(uint32 Team, uint32 Point)
}
}
void BattlegroundEY::AddPlayer(Player *plr)
void BattlegroundEY::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map
@@ -341,7 +341,7 @@ void BattlegroundEY::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc;
}
void BattlegroundEY::RemovePlayer(Player *plr, uint64 guid, uint32 /*team*/)
void BattlegroundEY::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/)
{
// sometimes flag aura not removed :(
for (int j = EY_POINTS_MAX; j >= 0; --j)
@@ -365,7 +365,7 @@ void BattlegroundEY::RemovePlayer(Player *plr, uint64 guid, uint32 /*team*/)
}
}
void BattlegroundEY::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattlegroundEY::HandleAreaTrigger(Player* Source, uint32 Trigger)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -491,7 +491,7 @@ bool BattlegroundEY::SetupBattleground()
sLog->outError("BattlegroundEY: Cannot spawn buff");
}
WorldSafeLocsEntry const *sg = NULL;
WorldSafeLocsEntry const* sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_ALLIANCE);
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
{
@@ -563,7 +563,7 @@ void BattlegroundEY::RespawnFlagAfterDrop()
{
RespawnFlag(true);
GameObject *obj = HashMapHolder<GameObject>::Find(GetDroppedFlagGUID());
GameObject* obj = HashMapHolder<GameObject>::Find(GetDroppedFlagGUID());
if (obj)
obj->Delete();
else
@@ -581,7 +581,7 @@ void BattlegroundEY::HandleKillPlayer(Player* player, Player* killer)
EventPlayerDroppedFlag(player);
}
void BattlegroundEY::EventPlayerDroppedFlag(Player *Source)
void BattlegroundEY::EventPlayerDroppedFlag(Player* Source)
{
if (GetStatus() != STATUS_IN_PROGRESS)
{
@@ -617,7 +617,7 @@ void BattlegroundEY::EventPlayerDroppedFlag(Player *Source)
SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL);
}
void BattlegroundEY::EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj)
void BattlegroundEY::EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj)
{
if (GetStatus() != STATUS_IN_PROGRESS || IsFlagPickedup() || !Source->IsWithinDistInMap(target_obj, 10))
return;
@@ -649,7 +649,7 @@ void BattlegroundEY::EventPlayerClickedOnFlag(Player *Source, GameObject* target
PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL, Source->GetName());
}
void BattlegroundEY::EventTeamLostPoint(Player *Source, uint32 Point)
void BattlegroundEY::EventTeamLostPoint(Player* Source, uint32 Point)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -697,7 +697,7 @@ void BattlegroundEY::EventTeamLostPoint(Player *Source, uint32 Point)
DelCreature(Point + 6);//NULL checks are in DelCreature! 0-5 spirit guides
}
void BattlegroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point)
void BattlegroundEY::EventTeamCapturedPoint(Player* Source, uint32 Point)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -736,7 +736,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point)
if (m_BgCreatures[Point])
DelCreature(Point);
WorldSafeLocsEntry const *sg = NULL;
WorldSafeLocsEntry const* sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId);
if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, Team))
sLog->outError("BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
@@ -764,7 +764,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point)
}
}
void BattlegroundEY::EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType)
void BattlegroundEY::EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType)
{
if (GetStatus() != STATUS_IN_PROGRESS || GetFlagPickerGUID() != Source->GetGUID())
return;
@@ -803,7 +803,7 @@ void BattlegroundEY::EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType
UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1);
}
void BattlegroundEY::UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor)
void BattlegroundEY::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
if (itr == m_PlayerScores.end()) // player not found
@@ -871,7 +871,7 @@ void BattlegroundEY::FillInitialWorldStates(WorldPacket& data)
data << uint32(0xc0d) << uint32(0x17b);
}
WorldSafeLocsEntry const *BattlegroundEY::GetClosestGraveYard(Player* player)
WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player)
{
uint32 g_id = 0;
@@ -336,7 +336,7 @@ class BattlegroundEY : public Battleground
~BattlegroundEY();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
@@ -348,32 +348,32 @@ class BattlegroundEY : public Battleground
void RespawnFlag(bool send_message);
void RespawnFlagAfterDrop();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleBuffUse(uint64 buff_guid);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
void HandleKillPlayer(Player* player, Player* killer);
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
virtual bool SetupBattleground();
virtual void Reset();
void UpdateTeamScore(uint32 Team);
void EndBattleground(uint32 winner);
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
virtual void FillInitialWorldStates(WorldPacket& data);
void SetDroppedFlagGUID(uint64 guid) { m_DroppedFlagGUID = guid;}
uint64 GetDroppedFlagGUID() const { return m_DroppedFlagGUID;}
/* Battleground Events */
virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
virtual void EventPlayerDroppedFlag(Player *Source);
virtual void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj);
virtual void EventPlayerDroppedFlag(Player* Source);
/* achievement req. */
bool IsAllNodesConrolledByTeam(uint32 team) const;
private:
virtual void PostUpdateImpl(uint32 diff);
void EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType);
void EventTeamCapturedPoint(Player *Source, uint32 Point);
void EventTeamLostPoint(Player *Source, uint32 Point);
void EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType);
void EventTeamCapturedPoint(Player* Source, uint32 Point);
void EventTeamLostPoint(Player* Source, uint32 Point);
void UpdatePointsCount(uint32 Team);
void UpdatePointsIcons(uint32 Team, uint32 Point);
@@ -292,7 +292,7 @@ bool BattlegroundIC::IsAllNodesConrolledByTeam(uint32 team) const
return count == NODE_TYPE_WORKSHOP;
}
void BattlegroundIC::AddPlayer(Player *plr)
void BattlegroundIC::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -479,7 +479,7 @@ void BattlegroundIC::RealocatePlayers(ICNodePointType nodeType)
std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[BG_IC_NPC_SPIRIT_GUIDE_1+nodeType-2]];
if (!ghost_list.empty())
{
WorldSafeLocsEntry const *ClosestGrave = NULL;
WorldSafeLocsEntry const* ClosestGrave = NULL;
for (std::vector<uint64>::const_iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
Player* plr = ObjectAccessor::FindPlayer(*itr);
@@ -862,19 +862,19 @@ class BattlegroundIC : public Battleground
~BattlegroundIC();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
virtual void PostUpdateImpl(uint32 diff);
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void SpawnLeader(uint32 teamid);
void HandleKillUnit(Creature* unit, Player* killer);
void HandleKillPlayer(Player* player, Player* killer);
void EndBattleground(uint32 winner);
void EventPlayerClickedOnFlag(Player *source, GameObject* /*target_obj*/);
void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/);
void EventPlayerDamagedGO(Player* /*plr*/, GameObject* go, uint32 eventType);
void DestroyGate(Player* player, GameObject* go);
@@ -882,7 +882,7 @@ class BattlegroundIC : public Battleground
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
/* Scorekeeping */
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
void FillInitialWorldStates(WorldPacket& data);
@@ -59,7 +59,7 @@ void BattlegroundNA::StartingEventOpenDoors()
SpawnBGObject(i, 60);
}
void BattlegroundNA::AddPlayer(Player *plr)
void BattlegroundNA::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -102,7 +102,7 @@ bool BattlegroundNA::HandlePlayerUnderMap(Player* player)
return true;
}
void BattlegroundNA::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattlegroundNA::HandleAreaTrigger(Player* Source, uint32 Trigger)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -56,12 +56,12 @@ class BattlegroundNA : public Battleground
~BattlegroundNA();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
@@ -43,7 +43,7 @@ void BattlegroundRB::StartingEventOpenDoors()
{
}
void BattlegroundRB::AddPlayer(Player *plr)
void BattlegroundRB::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -34,15 +34,15 @@ class BattlegroundRB : public Battleground
BattlegroundRB();
~BattlegroundRB();
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
/* Scorekeeping */
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
private:
};
@@ -59,7 +59,7 @@ void BattlegroundRL::StartingEventOpenDoors()
SpawnBGObject(i, 60);
}
void BattlegroundRL::AddPlayer(Player *plr)
void BattlegroundRL::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -102,7 +102,7 @@ bool BattlegroundRL::HandlePlayerUnderMap(Player* player)
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)
@@ -52,14 +52,14 @@ class BattlegroundRL : public Battleground
~BattlegroundRL();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleKillPlayer(Player* player, Player* killer);
bool HandlePlayerUnderMap(Player* plr);
@@ -102,7 +102,7 @@ void BattlegroundRV::StartingEventOpenDoors()
setTimer(BG_RV_FIRST_TIMER);
}
void BattlegroundRV::AddPlayer(Player *plr)
void BattlegroundRV::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -150,7 +150,7 @@ bool BattlegroundRV::HandlePlayerUnderMap(Player* player)
return true;
}
void BattlegroundRV::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattlegroundRV::HandleAreaTrigger(Player* Source, uint32 Trigger)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -105,14 +105,14 @@ class BattlegroundRV : public Battleground
~BattlegroundRV();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleKillPlayer(Player* player, Player* killer);
bool HandlePlayerUnderMap(Player* plr);
@@ -62,7 +62,7 @@ bool BattlegroundSA::SetupBattleground()
bool BattlegroundSA::ResetObjs()
{
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player *plr = ObjectAccessor::FindPlayer(itr->first))
if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
SendTransportsRemove(plr);
uint32 atF = BG_SA_Factions[Attackers];
@@ -150,7 +150,7 @@ bool BattlegroundSA::ResetObjs()
//Graveyards!
for (uint8 i = 0;i < BG_SA_MAX_GY; i++)
{
WorldSafeLocsEntry const *sg = NULL;
WorldSafeLocsEntry const* sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]);
if (!sg)
@@ -245,7 +245,7 @@ bool BattlegroundSA::ResetObjs()
for (int i = BG_SA_BOAT_ONE; i <= BG_SA_BOAT_TWO; i++)
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player *plr = ObjectAccessor::FindPlayer(itr->first))
if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
SendTransportInit(plr);
TeleportPlayers();
@@ -431,7 +431,7 @@ void BattlegroundSA::FillInitialWorldStates(WorldPacket& data)
data << uint32(BG_SA_LEFT_ATT_TOKEN_ALL) << ally_attacks;
}
void BattlegroundSA::AddPlayer(Player *plr)
void BattlegroundSA::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -492,7 +492,7 @@ void BattlegroundSA::TeleportPlayers()
{
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
{
if (Player *plr = ObjectAccessor::FindPlayer(itr->first))
if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
{
// should remove spirit of redemption
if (plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
@@ -684,7 +684,7 @@ void BattlegroundSA::SendTime()
UpdateWorldState(BG_SA_TIMER_SEC_DECS, ((end_of_round%60000)%10000)/1000);
}
void BattlegroundSA::EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj)
void BattlegroundSA::EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj)
{
switch(target_obj->GetEntry())
{
@@ -708,14 +708,14 @@ void BattlegroundSA::EventPlayerClickedOnFlag(Player *Source, GameObject* target
};
}
void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source)
void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
{
if (GraveyardStatus[i] == Attackers)
return;
DelCreature(BG_SA_MAXNPC + i);
GraveyardStatus[i] = Source->GetTeamId();
WorldSafeLocsEntry const *sg = NULL;
WorldSafeLocsEntry const* sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]);
AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], (GraveyardStatus[i] == TEAM_ALLIANCE? ALLIANCE : HORDE));
uint32 npc = 0;
@@ -798,7 +798,7 @@ void BattlegroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
//Achievement Storm the Beach (1310)
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
{
if (Player *plr = ObjectAccessor::FindPlayer(itr->first))
if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
if (plr->GetTeamId() == Attackers)
plr->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65246);
}
@@ -822,7 +822,7 @@ void BattlegroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
//Achievement Storm the Beach (1310)
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
{
if (Player *plr = ObjectAccessor::FindPlayer(itr->first))
if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
if (plr->GetTeamId() == Attackers && RoundScores[1].winner == Attackers)
plr->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65246);
}
@@ -865,7 +865,7 @@ void BattlegroundSA::UpdateDemolisherSpawns()
{
if (m_BgCreatures[i])
{
if (Creature *Demolisher = GetBGCreature(i))
if (Creature* Demolisher = GetBGCreature(i))
{
if (Demolisher->isDead())
{
@@ -423,7 +423,7 @@ class BattlegroundSA : public Battleground
/* inherited from BattlegroundClass */
/// Called when a player join battle
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
/// Called when battle start
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
@@ -439,7 +439,7 @@ class BattlegroundSA : public Battleground
/// Return the nearest graveyard where player can respawn
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
/// Called when a player click on flag (graveyard flag)
virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
virtual void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj);
/// Called when a player use a gamobject (relic)
virtual void EventPlayerUsedGO(Player* Source, GameObject* object);
/// Return gate id, relative to bg data, according to gameobject id
@@ -477,12 +477,12 @@ class BattlegroundSA : public Battleground
void EndBattleground(uint32 winner);
/// CAlled when a player leave battleground
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
/* Scorekeeping */
/// Update score board
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
// Achievement Defense of the Ancients
bool gateDestroyed;
@@ -530,7 +530,7 @@ class BattlegroundSA : public Battleground
* \param i : id of graveyard
* \param Source : Player who capture gy
*/
void CaptureGraveyard(BG_SA_Graveyards i, Player *Source);
void CaptureGraveyard(BG_SA_Graveyards i, Player* Source);
/// Switch on/off timer worldstate
void ToggleTimer();
@@ -202,7 +202,7 @@ void BattlegroundWS::StartingEventOpenDoors()
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE);
}
void BattlegroundWS::AddPlayer(Player *plr)
void BattlegroundWS::AddPlayer(Player* plr)
{
Battleground::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
@@ -254,7 +254,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team)
PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED);
if (GameObject *obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team)))
if (GameObject* obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team)))
obj->Delete();
else
sLog->outError("unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team)));
@@ -263,7 +263,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team)
m_BothFlagsKept = false;
}
void BattlegroundWS::EventPlayerCapturedFlag(Player *Source)
void BattlegroundWS::EventPlayerCapturedFlag(Player* Source)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -349,7 +349,7 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player *Source)
}
}
void BattlegroundWS::EventPlayerDroppedFlag(Player *Source)
void BattlegroundWS::EventPlayerDroppedFlag(Player* Source)
{
if (GetStatus() != STATUS_IN_PROGRESS)
{
@@ -435,7 +435,7 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player *Source)
}
}
void BattlegroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj)
void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
@@ -556,7 +556,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target
Source->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
}
void BattlegroundWS::RemovePlayer(Player *plr, uint64 guid, uint32 /*team*/)
void BattlegroundWS::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/)
{
// sometimes flag aura not removed :(
if (IsAllianceFlagPickedup() && m_FlagKeepers[BG_TEAM_ALLIANCE] == guid)
@@ -599,7 +599,7 @@ void BattlegroundWS::UpdateTeamScore(uint32 team)
UpdateWorldState(BG_WS_FLAG_CAPTURES_HORDE, GetTeamScore(team));
}
void BattlegroundWS::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattlegroundWS::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)
@@ -682,7 +682,7 @@ bool BattlegroundWS::SetupBattleground()
return false;
}
WorldSafeLocsEntry const *sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE);
WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE);
if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
{
sLog->outErrorDb("BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!");
@@ -754,7 +754,7 @@ void BattlegroundWS::HandleKillPlayer(Player* player, Player* killer)
Battleground::HandleKillPlayer(player, killer);
}
void BattlegroundWS::UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor)
void BattlegroundWS::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
@@ -163,7 +163,7 @@ class BattlegroundWS : public Battleground
~BattlegroundWS();
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
virtual void AddPlayer(Player* plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
@@ -183,12 +183,12 @@ class BattlegroundWS : public Battleground
bool IsForceTimerDone;
/* Battleground Events */
virtual void EventPlayerDroppedFlag(Player *Source);
virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
virtual void EventPlayerCapturedFlag(Player *Source);
virtual void EventPlayerDroppedFlag(Player* Source);
virtual void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj);
virtual void EventPlayerCapturedFlag(Player* Source);
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
void RemovePlayer(Player* plr, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
void HandleKillPlayer(Player* player, Player* killer);
bool SetupBattleground();
virtual void Reset();
@@ -198,7 +198,7 @@ class BattlegroundWS : public Battleground
void UpdateFlagState(uint32 team, uint32 value);
void SetLastFlagCapture(uint32 team) { m_LastFlagCaptureTeam = team; }
void UpdateTeamScore(uint32 team);
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
void SetDroppedFlagGUID(uint64 guid, uint32 TeamID) { m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)] = guid;}
uint64 GetDroppedFlagGUID(uint32 TeamID) { return m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)];}
virtual void FillInitialWorldStates(WorldPacket& data);