Skip to content

Commit 072e6ea

Browse files
committed
crashfix
1 parent d66e66f commit 072e6ea

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/server/game/Entities/Player/PlayerTaxi.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class TC_GAME_API PlayerTaxi
7373

7474
uint32 RequestEarlyLanding(bool allKnown)
7575
{
76+
if (m_TaxiDestinations.size() <= 2)
77+
return 0;
78+
7679
for (size_t i = 1; i < m_TaxiDestinations.size(); ++i)
7780
{
7881
uint32 node = m_TaxiDestinations[i];

‎src/server/game/Handlers/SpellHandler.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#define TAXI_STOP_DIRECT_7 "Ya te diriges directamente a tu pr\xC3\xB3ximo punto de vuelo conocido."
3636

3737
#include "DBCStores.h"
38+
#include "FlightPathMovementGenerator.h"
3839
#include "GameClient.h"
3940
#include "GameObject.h"
4041
#include "GameObjectAI.h"
@@ -388,6 +389,10 @@ void WorldSession::HandleCancelAuraOpcode(WorldPackets::Spells::CancelAura& canc
388389

389390
if (uint32 stopNode = _player->m_taxi.RequestEarlyLanding(_player->isTaxiCheater()))
390391
{
392+
if (MovementGenerator* movGen = _player->GetMotionMaster()->GetCurrentMovementGenerator())
393+
if (movGen->GetMovementGeneratorType() == FLIGHT_MOTION_TYPE)
394+
static_cast<FlightPathMovementGenerator*>(movGen)->LoadPath(_player);
395+
391396
_player->RemoveAurasDueToSpell(cancelAura.SpellID);
392397
if (TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(stopNode))
393398
ChatHandler(this).PSendSysMessage(msgNamed, nodeEntry->Name[loc]);

0 commit comments

Comments
 (0)