diff options
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 90e072825de..fb0f6d0c461 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -520,7 +520,7 @@ void Map::Update(const uint32 t_diff) /// update worldsessions for existing players for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter) { - Player* player = m_mapRefIter->getSource(); + Player* player = m_mapRefIter->GetSource(); if (player && player->IsInWorld()) { //player->Update(t_diff); @@ -542,7 +542,7 @@ void Map::Update(const uint32 t_diff) // to make sure calls to Map::Remove don't invalidate it for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter) { - Player* player = m_mapRefIter->getSource(); + Player* player = m_mapRefIter->GetSource(); if (!player || !player->IsInWorld()) continue; @@ -586,7 +586,7 @@ struct ResetNotifier template<class T>inline void resetNotify(GridRefManager<T> &m) { for (typename GridRefManager<T>::iterator iter=m.begin(); iter != m.end(); ++iter) - iter->getSource()->ResetAllNotifies(); + iter->GetSource()->ResetAllNotifies(); } template<class T> void Visit(GridRefManager<T> &) {} void Visit(CreatureMapType &m) { resetNotify<Creature>(m);} @@ -597,7 +597,7 @@ void Map::ProcessRelocationNotifies(const uint32 diff) { for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end(); ++i) { - NGridType *grid = i->getSource(); + NGridType *grid = i->GetSource(); if (grid->GetGridState() != GRID_STATE_ACTIVE) continue; @@ -637,7 +637,7 @@ void Map::ProcessRelocationNotifies(const uint32 diff) TypeContainerVisitor<ResetNotifier, WorldTypeMapContainer > world_notifier(reset); for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end(); ++i) { - NGridType *grid = i->getSource(); + NGridType *grid = i->GetSource(); if (grid->GetGridState() != GRID_STATE_ACTIVE) continue; @@ -839,7 +839,7 @@ void Map::MoveAllCreaturesInMoveList() //But this check is always needed to ensure safety /// @todo pets will disappear if this is outside CreatureRespawnRelocation //need to check why pet is frequently relocated to an unloaded cell - if (c->isPet()) + if (c->IsPet()) ((Pet*)c)->Remove(PET_SAVE_NOT_IN_SLOT, true); else AddObjectToRemoveList(c); @@ -1024,7 +1024,7 @@ void Map::RemoveAllPlayers() { for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) { - Player* player = itr->getSource(); + Player* player = itr->GetSource(); if (!player->IsBeingTeleportedFar()) { // this is happening for bg @@ -1042,7 +1042,7 @@ void Map::UnloadAll() for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();) { - NGridType &grid(*i->getSource()); + NGridType &grid(*i->GetSource()); ++i; UnloadGrid(grid, true); // deletes the grid and removes it from the GridRefManager } @@ -2090,8 +2090,8 @@ void Map::DelayedUpdate(const uint32 t_diff) { for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();) { - NGridType *grid = i->getSource(); - GridInfo* info = i->getSource()->getGridInfoRef(); + NGridType *grid = i->GetSource(); + GridInfo* info = i->GetSource()->getGridInfoRef(); ++i; // The update might delete the map and we need the next map before the iterator gets invalid ASSERT(grid->GetGridState() >= 0 && grid->GetGridState() < MAX_GRID_STATE); si_GridStates[grid->GetGridState()]->Update(*this, *grid, *info, t_diff); @@ -2182,7 +2182,7 @@ uint32 Map::GetPlayersCountExceptGMs() const { uint32 count = 0; for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - if (!itr->getSource()->isGameMaster()) + if (!itr->GetSource()->IsGameMaster()) ++count; return count; } @@ -2190,7 +2190,7 @@ uint32 Map::GetPlayersCountExceptGMs() const void Map::SendToPlayers(WorldPacket const* data) const { for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - itr->getSource()->GetSession()->SendPacket(data); + itr->GetSource()->GetSession()->SendPacket(data); } bool Map::ActiveObjectsNearGrid(NGridType const& ngrid) const @@ -2209,7 +2209,7 @@ bool Map::ActiveObjectsNearGrid(NGridType const& ngrid) const for (MapRefManager::const_iterator iter = m_mapRefManager.begin(); iter != m_mapRefManager.end(); ++iter) { - Player* player = iter->getSource(); + Player* player = iter->GetSource(); CellCoord p = Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()); if ((cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) && @@ -2235,7 +2235,7 @@ void Map::AddToActive(Creature* c) AddToActiveHelper(c); // also not allow unloading spawn grid to prevent creating creature clone at load - if (!c->isPet() && c->GetDBTableGUIDLow()) + if (!c->IsPet() && c->GetDBTableGUIDLow()) { float x, y, z; c->GetRespawnPosition(x, y, z); @@ -2256,7 +2256,7 @@ void Map::RemoveFromActive(Creature* c) RemoveFromActiveHelper(c); // also allow unloading spawn grid - if (!c->isPet() && c->GetDBTableGUIDLow()) + if (!c->IsPet() && c->GetDBTableGUIDLow()) { float x, y, z; c->GetRespawnPosition(x, y, z); @@ -2325,7 +2325,7 @@ bool InstanceMap::CanEnter(Player* player) } // allow GM's to enter - if (player->isGameMaster()) + if (player->IsGameMaster()) return Map::CanEnter(player); // cannot enter if the instance is full (player cap), GMs don't count @@ -2339,7 +2339,7 @@ bool InstanceMap::CanEnter(Player* player) // cannot enter while an encounter is in progress on raids /*Group* group = player->GetGroup(); - if (!player->isGameMaster() && group && group->InCombatToInstance(GetInstanceId()) && player->GetMapId() != GetId())*/ + if (!player->IsGameMaster() && group && group->InCombatToInstance(GetInstanceId()) && player->GetMapId() != GetId())*/ if (IsRaid() && GetInstanceScript() && GetInstanceScript()->IsEncounterInProgress()) { player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); @@ -2353,9 +2353,9 @@ bool InstanceMap::CanEnter(Player* player) if (!playerList.isEmpty()) for (PlayerList::const_iterator i = playerList.begin(); i != playerList.end(); ++i) - if (Player* iPlayer = i->getSource()) + if (Player* iPlayer = i->GetSource()) { - if (iPlayer->isGameMaster()) // bypass GMs + if (iPlayer->IsGameMaster()) // bypass GMs continue; if (!player->GetGroup()) // player has not group and there is someone inside, deny entry { @@ -2568,14 +2568,14 @@ bool InstanceMap::Reset(uint8 method) { // notify the players to leave the instance so it can be reset for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - itr->getSource()->SendResetFailedNotify(GetId()); + itr->GetSource()->SendResetFailedNotify(GetId()); } else { if (method == INSTANCE_RESET_GLOBAL) // set the homebind timer for players inside (1 minute) for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - itr->getSource()->m_InstanceValid = false; + itr->GetSource()->m_InstanceValid = false; // the unload timer is not started // instead the map will unload immediately after the players have left @@ -2609,7 +2609,7 @@ void InstanceMap::PermBindAllPlayers(Player* source) // group members outside the instance group don't get bound for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) { - Player* player = itr->getSource(); + Player* player = itr->GetSource(); // players inside an instance cannot be bound to other instances // some players may already be permanently bound, in this case nothing happens InstancePlayerBind* bind = player->GetBoundInstance(save->GetMapId(), save->GetDifficulty()); @@ -2642,7 +2642,7 @@ void InstanceMap::UnloadAll() void InstanceMap::SendResetWarnings(uint32 timeLeft) const { for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - itr->getSource()->SendInstanceResetWarning(GetId(), itr->getSource()->GetDifficulty(IsRaid()), timeLeft); + itr->GetSource()->SendInstanceResetWarning(GetId(), itr->GetSource()->GetDifficulty(IsRaid()), timeLeft); } void InstanceMap::SetResetSchedule(bool on) @@ -2758,7 +2758,7 @@ void BattlegroundMap::RemoveAllPlayers() { if (HavePlayers()) for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - if (Player* player = itr->getSource()) + if (Player* player = itr->GetSource()) if (!player->IsBeingTeleportedFar()) player->TeleportTo(player->GetBattlegroundEntryPoint()); } |