Core/Maps: Removed MapInstanced - no longer neccessary for grid data reference counting (moved to TerrainInfo)
Port From (https://github.com/TrinityCore/TrinityCore/commit/fbe0b8efebca3bc2662b477bdf45627f9783d6c2)
This commit is contained in:
@@ -109,7 +109,7 @@ namespace Game.Movement
|
||||
break;
|
||||
|
||||
if (_currentNode == _preloadTargetNode)
|
||||
PreloadEndGrid();
|
||||
PreloadEndGrid(owner);
|
||||
|
||||
_currentNode += (departureEvent ? 1 : 0);
|
||||
departureEvent = !departureEvent;
|
||||
@@ -262,14 +262,17 @@ namespace Game.Movement
|
||||
else
|
||||
_preloadTargetNode = (uint)nodeCount - 3;
|
||||
|
||||
while (_path[(int)_preloadTargetNode].ContinentID != _endMapId)
|
||||
++_preloadTargetNode;
|
||||
|
||||
_endGridX = _path[nodeCount - 1].Loc.X;
|
||||
_endGridY = _path[nodeCount - 1].Loc.Y;
|
||||
}
|
||||
|
||||
void PreloadEndGrid()
|
||||
void PreloadEndGrid(Player owner)
|
||||
{
|
||||
// Used to preload the final grid where the flightmaster is
|
||||
Map endMap = Global.MapMgr.FindBaseNonInstanceMap(_endMapId);
|
||||
Map endMap = owner.GetMap();
|
||||
|
||||
// Load the grid
|
||||
if (endMap != null)
|
||||
|
||||
Reference in New Issue
Block a user