diff options
author | Shauren <shauren.trinity@gmail.com> | 2015-09-19 16:44:33 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2015-09-19 16:44:33 +0200 |
commit | f1b047b826e92278e566d376b80989b600c0d7c0 (patch) | |
tree | 6914e46320f754f363ca70617728d370db390b29 /src/server/game/Globals/ObjectMgr.cpp | |
parent | 2c7459da6daf1d563825f3039b1c7112da2560ae (diff) |
Core/Taxi: Further improvements
* Updated segment distance calculations - now selected path fully matches clientside preview
* Fixed building sOldContinentsNodesMask to also include any new taxi node added in future
* Implemented filtering possible hops when searching for shortest path by faction (and in future PlayerCondition)
* Changed ObjectMgr::GetNearestTaxiNode to filter faction nodes by flags instead of mount display
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 5352112caca..b048afe16a6 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5673,9 +5673,10 @@ uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, ui float dist = 10000; uint32 id = 0; + uint32 requireFlag = (team == ALLIANCE) ? TAXI_NODE_FLAG_ALLIANCE : TAXI_NODE_FLAG_HORDE; for (TaxiNodesEntry const* node : sTaxiNodesStore) { - if (!node || node->MapID != mapid || (!node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981)) // dk flight + if (!node || node->MapID != mapid || !(node->Flags & requireFlag)) continue; uint8 field = (uint8)((node->ID - 1) / 8); |