Merge pull request #143 from azerothcore/master

Update (crashfix movement generator)
This commit is contained in:
bashermens
2026-01-09 07:43:25 +01:00
committed by GitHub
2 changed files with 2 additions and 3 deletions

View File

@@ -718,7 +718,6 @@ Logger.spells.scripts=2,Console Errors
Logger.playerbots=5,Console Playerbots
#Logger.achievement=4,Console Server
#Logger.addon=4,Console Server
#Logger.ahbot=4,Console Server
#Logger.auctionHouse=4,Console Server
#Logger.autobroadcast=4, Console Server
#Logger.bg.arena=4,Console Server

View File

@@ -389,10 +389,10 @@ void FlightPathMovementGenerator::LoadPath(Player* player)
LOG_ERROR("movement.flightpath", "Failed to build correct path for player: {}. Current node: {}, max nodes: {}. Paths: {}. Player pos: {}.", player->GetGUID().ToString(), GetCurrentNode(), i_path.size(), paths, player->GetPosition().ToString());
// Lets choose the second last element so that a player would still have some flight.
if (int(i_path.size()) - 2 >= 0)
if (i_path.size() >= 2)
i_currentNode = uint32(i_path.size() - 2);
else
i_currentNode = uint32(i_path.size() - 1);
i_currentNode = 0;
}
}