From 46c69df3a7cd3f863a7a3cca59a136a0a5cdec9d Mon Sep 17 00:00:00 2001 From: HelloKitty Date: Sat, 21 Jan 2017 14:44:31 +0100 Subject: Core/Vmaps: Stop M2s from occluding for spellcast LoS Closes #18528 (cherry-picked from 01d715eaef99e91f0959dc85fb7f69eb26d01a22) --- src/server/game/Maps/Map.cpp | 4 ++-- src/server/game/Maps/Map.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/server/game/Maps') diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index e840569672e..dfd8b7fd5b7 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2878,9 +2878,9 @@ float Map::GetWaterLevel(PhaseShift const& phaseShift, float x, float y) const return 0; } -bool Map::isInLineOfSight(PhaseShift const& phaseShift, float x1, float y1, float z1, float x2, float y2, float z2) const +bool Map::isInLineOfSight(PhaseShift const& phaseShift, float x1, float y1, float z1, float x2, float y2, float z2, VMAP::ModelIgnoreFlags ignoreFlags) const { - return VMAP::VMapFactory::createOrGetVMapManager()->isInLineOfSight(PhasingHandler::GetTerrainMapId(phaseShift, this, x1, y1), x1, y1, z1, x2, y2, z2) + return VMAP::VMapFactory::createOrGetVMapManager()->isInLineOfSight(PhasingHandler::GetTerrainMapId(phaseShift, this, x1, y1), x1, y1, z1, x2, y2, z2, ignoreFlags) && _dynamicTree.isInLineOfSight({ x1, y1, z1 }, { x2, y2, z2 }, phaseShift); } diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 7d453f0406a..5498b097b54 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -67,6 +67,7 @@ enum WeatherState : uint32; namespace Trinity { struct ObjectUpdater; } namespace G3D { class Plane; } +namespace VMAP { enum class ModelIgnoreFlags : uint32; } struct ScriptAction { @@ -493,7 +494,7 @@ class TC_GAME_API Map : public GridRefManager float GetWaterOrGroundLevel(PhaseShift const& phaseShift, float x, float y, float z, float* ground = nullptr, bool swim = false) const; float GetHeight(PhaseShift const& phaseShift, float x, float y, float z, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const; - bool isInLineOfSight(PhaseShift const& phaseShift, float x1, float y1, float z1, float x2, float y2, float z2) const; + bool isInLineOfSight(PhaseShift const& phaseShift, float x1, float y1, float z1, float x2, float y2, float z2, VMAP::ModelIgnoreFlags ignoreFlags) const; void Balance() { _dynamicTree.balance(); } void RemoveGameObjectModel(const GameObjectModel& model) { _dynamicTree.remove(model); } void InsertGameObjectModel(const GameObjectModel& model) { _dynamicTree.insert(model); } -- cgit v1.2.3