diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-06-11 22:07:11 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-06-11 22:07:11 +0200 |
commit | 0bebf40fe7fc6ffdf3e86452f14e3bf647380b15 (patch) | |
tree | 42afd9e6643b3bd3400c9f4f80fd3991748fbcd7 /src/server/game/Maps/Map.cpp | |
parent | 93c86b0c52a99d69fd14f4904a000b6c86759c69 (diff) | |
parent | 9ec22fffa00135cd776afebe2899bf54fb52f15f (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/AuctionHouse/AuctionHouseMgr.h
src/server/game/Entities/Creature/Creature.cpp
src/server/game/Entities/Player/Player.cpp
src/server/game/Entities/Unit/StatSystem.cpp
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Entities/Vehicle/Vehicle.cpp
src/server/game/Handlers/NPCHandler.cpp
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 54a9fdea264..90e072825de 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -1934,25 +1934,14 @@ float Map::GetHeight(uint32 phasemask, float x, float y, float z, bool vmap/*=tr bool Map::IsInWater(float x, float y, float pZ, LiquidData* data) const { - // Check surface in x, y point for liquid - if (const_cast<Map*>(this)->GetGrid(x, y)) - { - LiquidData liquid_status; - LiquidData* liquid_ptr = data ? data : &liquid_status; - if (getLiquidStatus(x, y, pZ, MAP_ALL_LIQUIDS, liquid_ptr)) - return true; - } - return false; + LiquidData liquid_status; + LiquidData* liquid_ptr = data ? data : &liquid_status; + return getLiquidStatus(x, y, pZ, MAP_ALL_LIQUIDS, liquid_ptr) & (LIQUID_MAP_IN_WATER | LIQUID_MAP_UNDER_WATER); } bool Map::IsUnderWater(float x, float y, float z) const { - if (const_cast<Map*>(this)->GetGrid(x, y)) - { - if (getLiquidStatus(x, y, z, MAP_LIQUID_TYPE_WATER|MAP_LIQUID_TYPE_OCEAN)&LIQUID_MAP_UNDER_WATER) - return true; - } - return false; + return getLiquidStatus(x, y, z, MAP_LIQUID_TYPE_WATER|MAP_LIQUID_TYPE_OCEAN) & LIQUID_MAP_UNDER_WATER; } bool Map::CheckGridIntegrity(Creature* c, bool moved) const |