diff options
| author | Shauren <shauren.trinity@gmail.com> | 2018-03-28 22:01:22 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2018-03-28 22:01:22 +0200 |
| commit | 42f9deb21ec68e169f7ed1c8cf14092f144b22da (patch) | |
| tree | e022243733903be45592138354d1f49342c811a4 /src/server/game/Movement | |
| parent | 95615a4b0d9af431b559bcca68ce9f9f38381397 (diff) | |
Core/Maps: Implemented getting area id from gameobject spawns
Yes, you can now spawn LK platform anywhere and it will treat you as inside Icecrown Citadel
Diffstat (limited to 'src/server/game/Movement')
| -rw-r--r-- | src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Movement/PathGenerator.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index 6603aeade68..2f042353a81 100644 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -38,7 +38,7 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature) float respX, respY, respZ, respO, destX, destY, destZ, travelDistZ; creature->GetHomePosition(respX, respY, respZ, respO); - Map const* map = creature->GetBaseMap(); + Map const* map = creature->GetMap(); // For 2D/3D system selection //bool is_land_ok = creature.CanWalk(); // not used? diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index 4c89bb99e2c..cbc5785829b 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -186,7 +186,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con // Check both start and end points, if they're both in water, then we can *safely* let the creature move for (uint32 i = 0; i < _pathPoints.size(); ++i) { - ZLiquidStatus status = _sourceUnit->GetBaseMap()->getLiquidStatus(_sourceUnit->GetPhaseShift(), _pathPoints[i].x, _pathPoints[i].y, _pathPoints[i].z, MAP_ALL_LIQUIDS, NULL); + ZLiquidStatus status = _sourceUnit->GetMap()->getLiquidStatus(_sourceUnit->GetPhaseShift(), _pathPoints[i].x, _pathPoints[i].y, _pathPoints[i].z, MAP_ALL_LIQUIDS, NULL); // One of the points is not in the water, cancel movement. if (status == LIQUID_MAP_NO_WATER) { @@ -212,7 +212,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con Creature* owner = (Creature*)_sourceUnit; G3D::Vector3 const& p = (distToStartPoly > 7.0f) ? startPos : endPos; - if (_sourceUnit->GetBaseMap()->IsUnderWater(_sourceUnit->GetPhaseShift(), p.x, p.y, p.z)) + if (_sourceUnit->GetMap()->IsUnderWater(_sourceUnit->GetPhaseShift(), p.x, p.y, p.z)) { TC_LOG_DEBUG("maps", "++ BuildPolyPath :: underWater case\n"); if (owner->CanSwim()) @@ -649,7 +649,7 @@ void PathGenerator::UpdateFilter() NavTerrain PathGenerator::GetNavTerrain(float x, float y, float z) { LiquidData data; - ZLiquidStatus liquidStatus = _sourceUnit->GetBaseMap()->getLiquidStatus(_sourceUnit->GetPhaseShift(), x, y, z, MAP_ALL_LIQUIDS, &data); + ZLiquidStatus liquidStatus = _sourceUnit->GetMap()->getLiquidStatus(_sourceUnit->GetPhaseShift(), x, y, z, MAP_ALL_LIQUIDS, &data); if (liquidStatus == LIQUID_MAP_NO_WATER) return NAV_GROUND; |
