diff options
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rwxr-xr-x | src/server/game/Maps/Map.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 6205b2037a3..cfd5dafbfb8 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -505,10 +505,10 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::Obj 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) + for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter) { Player* plr = m_mapRefIter->getSource(); - if(plr && plr->IsInWorld()) + if (plr && plr->IsInWorld()) { //plr->Update(t_diff); WorldSession * pSession = plr->GetSession(); @@ -1605,21 +1605,21 @@ inline bool IsOutdoorWMO(uint32 mogpFlags, int32 /*adtId*/, int32 /*rootId*/, in { bool outdoor = true; - if(wmoEntry && atEntry) + if (wmoEntry && atEntry) { - if(atEntry->flags & AREA_FLAG_OUTSIDE) + if (atEntry->flags & AREA_FLAG_OUTSIDE) return true; - if(atEntry->flags & AREA_FLAG_INSIDE) + if (atEntry->flags & AREA_FLAG_INSIDE) return false; } outdoor = mogpFlags&0x8; - if(wmoEntry) + if (wmoEntry) { - if(wmoEntry->Flags & 4) + if (wmoEntry->Flags & 4) return true; - if((wmoEntry->Flags & 2)!=0) + if ((wmoEntry->Flags & 2)!=0) outdoor = false; } return outdoor; @@ -1631,12 +1631,12 @@ bool Map::IsOutdoors(float x, float y, float z) const int32 adtId, rootId, groupId; // no wmo found? -> outside by default - if(!GetAreaInfo(x, y, z, mogpFlags, adtId, rootId, groupId)) + if (!GetAreaInfo(x, y, z, mogpFlags, adtId, rootId, groupId)) return true; AreaTableEntry const* atEntry = 0; WMOAreaTableEntry const* wmoEntry= GetWMOAreaTableEntryByTripple(rootId, adtId, groupId); - if(wmoEntry) + if (wmoEntry) { sLog->outStaticDebug("Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId); atEntry = GetAreaEntryByAreaID(wmoEntry->areaId); @@ -1651,11 +1651,11 @@ bool Map::GetAreaInfo(float x, float y, float z, uint32 &flags, int32 &adtId, in if (vmgr->getAreaInfo(GetId(), x, y, vmap_z, flags, adtId, rootId, groupId)) { // check if there's terrain between player height and object height - if(GridMap *gmap = const_cast<Map*>(this)->GetGrid(x, y)) + if (GridMap *gmap = const_cast<Map*>(this)->GetGrid(x, y)) { float _mapheight = gmap->getHeight(x, y); // z + 2.0f condition taken from GetHeight(), not sure if it's such a great choice... - if(z + 2.0f > _mapheight && _mapheight > vmap_z) + if (z + 2.0f > _mapheight && _mapheight > vmap_z) return false; } return true; @@ -1744,7 +1744,7 @@ ZLiquidStatus Map::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidTyp } } - if(GridMap* gmap = const_cast<Map*>(this)->GetGrid(x, y)) + if (GridMap* gmap = const_cast<Map*>(this)->GetGrid(x, y)) { LiquidData map_data; ZLiquidStatus map_result = gmap->getLiquidStatus(x, y, z, ReqLiquidType, &map_data); |