本文整理汇总了C++中FlightPathMovementGenerator::GetPath方法的典型用法代码示例。如果您正苦于以下问题:C++ FlightPathMovementGenerator::GetPath方法的具体用法?C++ FlightPathMovementGenerator::GetPath怎么用?C++ FlightPathMovementGenerator::GetPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlightPathMovementGenerator
的用法示例。
在下文中一共展示了FlightPathMovementGenerator::GetPath方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleTaxiRequestEarlyLanding
void WorldSession::HandleTaxiRequestEarlyLanding(WorldPackets::Taxi::TaxiRequestEarlyLanding& /*taxiRequestEarlyLanding*/)
{
if (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
{
if (GetPlayer()->m_taxi.RequestEarlyLanding())
{
FlightPathMovementGenerator* flight = static_cast<FlightPathMovementGenerator*>(GetPlayer()->GetMotionMaster()->top());
flight->LoadPath(GetPlayer(), flight->GetPath()[flight->GetCurrentNode()]->NodeIndex);
flight->Reset(GetPlayer());
}
}
}
示例2: HandleMoveSplineDoneOpcode
void WorldSession::HandleMoveSplineDoneOpcode(WorldPackets::Movement::MoveSplineDone& moveSplineDone)
{
MovementInfo movementInfo = moveSplineDone.movementInfo;
_player->ValidateMovementInfo(&movementInfo);
// in taxi flight packet received in 2 case:
// 1) end taxi path in far (multi-node) flight
// 2) switch from one map to other in case multim-map taxi path
// we need process only (1)
uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
if (curDest)
{
TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
// far teleport case
if (curDestNode && curDestNode->MapID != GetPlayer()->GetMapId())
{
if (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
flight->SetCurrentNodeAfterTeleport();
TaxiPathNodeEntry const* node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->MapID, node->Loc.X, node->Loc.Y, node->Loc.Z, GetPlayer()->GetOrientation());
}
}
return;
}
// at this point only 1 node is expected (final destination)
if (GetPlayer()->m_taxi.GetPath().size() != 1)
return;
GetPlayer()->CleanupAfterTaxiFlight();
GetPlayer()->SetFallInformation(0, GetPlayer()->GetPositionZ());
if (GetPlayer()->pvpInfo.IsHostile)
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
}
示例3: HandleTaxiNextDestinationOpcode
void WorldSession::HandleTaxiNextDestinationOpcode(WorldPacket& recv_data)
{
DEBUG_LOG("WORLD: Received CMSG_MOVE_SPLINE_DONE");
MovementInfo movementInfo; // used only for proper packet read
recv_data >> movementInfo;
recv_data.read_skip<uint32>(); // unk
// in taxi flight packet received in 2 case:
// 1) end taxi path in far (multi-node) flight
// 2) switch from one map to other in case multim-map taxi path
// we need process only (1)
uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
if (!curDest)
return;
TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
if (curDestNode && curDestNode->map_id == GetPlayer()->GetMapId())
{
while (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
GetPlayer()->GetMotionMaster()->MovementExpired(false);
}
// far teleport case
if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId())
{
if (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
flight->SetCurrentNodeAfterTeleport();
TaxiPathNodeEntry const& node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->map_id,node.x,node.y,node.z,GetPlayer()->GetOrientation());
}
return;
}
uint32 destinationnode = GetPlayer()->m_taxi.NextTaxiDestination();
if (destinationnode > 0) // if more destinations to go
{
// current source node for next destination
uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
// Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path)
if (GetPlayer()->isTaxiCheater())
{
if (GetPlayer()->m_taxi.SetTaximaskNode(sourcenode))
{
WorldPacket data(SMSG_NEW_TAXI_PATH, 0);
_player->GetSession()->SendPacket(&data);
}
}
DEBUG_LOG("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
uint16 MountId = objmgr.GetTaxiMount(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
objmgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
if (path && MountId)
SendDoFlight(MountId, path, 1); // skip start fly node
else
GetPlayer()->CleanupAfterTaxiFlight(); // clear problematic path and next
}
else
GetPlayer()->CleanupAfterTaxiFlight(); // not destinations, clear source node
}
示例4: HandleMoveWorldportAckOpcode
void WorldSession::HandleMoveWorldportAckOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug( "WORLD: got MSG_MOVE_WORLDPORT_ACK." );
MapEntry const* mEntry = sMapStore.LookupEntry(GetPlayer()->GetMapId());
if(!mEntry || !MaNGOS::IsValidMapCoord(GetPlayer()->GetPositionX(),GetPlayer()->GetPositionY()))
{
LogoutPlayer(false);
return;
}
// reset instance validity
GetPlayer()->m_InstanceValid = true;
GetPlayer()->SetSemaphoreTeleport(false);
GetPlayer()->SendInitialPacketsBeforeAddToMap();
MapManager::Instance().GetMap(GetPlayer()->GetMapId(), GetPlayer())->Add(GetPlayer());
GetPlayer()->SendInitialPacketsAfterAddToMap();
// flight fast teleport case
if(GetPlayer()->GetMotionMaster()->top()->GetMovementGeneratorType()==FLIGHT_MOTION_TYPE)
{
if(!_player->InBattleGround())
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
flight->Initialize(*GetPlayer());
SendPath(flight->GetPath(),flight->GetCurrentNode(),flight->GetPathAtMapEnd());
GetPlayer()->SetDontMove(false);
return;
}
// battleground state prepre, stop flight
GetPlayer()->GetMotionMaster()->MovementExpired();
GetPlayer()->FlightComplete();
GetPlayer()->ClearTaxiDestinations();
GetPlayer()->StopMoving();
}
// resurrect character at enter into instance where his corpse exist after add to map
Corpse *corpse = GetPlayer()->GetCorpse();
if (corpse && corpse->GetType() == CORPSE_RESURRECTABLE && corpse->GetMapId() == GetPlayer()->GetMapId())
{
if( mEntry && (mEntry->map_type == MAP_INSTANCE || mEntry->map_type == MAP_RAID) )
{
GetPlayer()->ResurrectPlayer(0.5f,false);
GetPlayer()->SpawnCorpseBones();
GetPlayer()->SaveToDB();
}
}
// mount allow check
if(!_player->GetBaseMap()->IsMountAllowed())
_player->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
// battleground state preper
if(_player->InBattleGround())
{
BattleGround *bg = _player->GetBattleGround();
if(bg)
{
if(bg->GetMapId() == _player->GetMapId()) // we teleported to bg
{
if(!bg->GetBgRaid(_player->GetTeam())) // first player joined
{
Group *group = new Group;
bg->SetBgRaid(_player->GetTeam(), group);
group->ConvertToRaid();
group->AddMember(_player->GetGUID(), _player->GetName());
group->ChangeLeader(_player->GetGUID());
}
else // raid already exist
{
bg->GetBgRaid(_player->GetTeam())->AddMember(_player->GetGUID(), _player->GetName());
}
}
}
}
// honorless target
if(GetPlayer()->pvpInfo.inHostileArea)
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
// resummon pet
if(GetPlayer()->m_oldpetnumber)
{
Pet* NewPet = new Pet(GetPlayer());
if(!NewPet->LoadPetFromDB(GetPlayer(), 0, GetPlayer()->m_oldpetnumber, true))
delete NewPet;
GetPlayer()->m_oldpetnumber = 0;
}
GetPlayer()->SetDontMove(false);
}
示例5: HandleMoveSplineDoneOpcode
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
{
DEBUG_LOG( "WORLD: Received CMSG_MOVE_SPLINE_DONE" );
ObjectGuid guid; // used only for proper packet read
MovementInfo movementInfo; // used only for proper packet read
recv_data >> guid.ReadAsPacked();
recv_data >> movementInfo;
recv_data >> Unused<uint32>(); // unk
// in taxi flight packet received in 2 case:
// 1) end taxi path in far (multi-node) flight
// 2) switch from one map to other in case multi-map taxi path
// we need process only (1)
uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
if(!curDest)
return;
TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
// far teleport case
if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId())
{
if (GetPlayer()->IsInUnitState(UNIT_ACTION_TAXI))
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->CurrentMovementGenerator());
flight->Interrupt(*GetPlayer()); // will reset at map landing
flight->SetCurrentNodeAfterTeleport();
TaxiPathNodeEntry const& node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->map_id,node.x,node.y,node.z,GetPlayer()->GetOrientation());
}
return;
}
uint32 destinationnode = GetPlayer()->m_taxi.NextTaxiDestination();
if ( destinationnode > 0 ) // if more destinations to go
{
// current source node for next destination
uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
// Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path)
if (GetPlayer()->isTaxiCheater())
{
if(GetPlayer()->m_taxi.SetTaximaskNode(sourcenode))
{
WorldPacket data(SMSG_NEW_TAXI_PATH, 0);
_player->GetSession()->SendPacket( &data );
}
}
DEBUG_LOG( "WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode );
uint32 mountDisplayId = sObjectMgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
sObjectMgr.GetTaxiPath( sourcenode, destinationnode, path, cost);
if(path && mountDisplayId)
SendDoFlight( mountDisplayId, path, 1 ); // skip start fly node
else
GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
}
else
GetPlayer()->m_taxi.ClearTaxiDestinations(); // not destinations, clear source node
}
示例6: HandleMasterIncomingPacket
//.........这里部分代码省略.........
p >> guid.ReadAsPacked();
p >> movementInfo;
p >> Unused<uint32>(); // unk
for (PlayerBotMap::const_iterator it = GetPlayerBotsBegin(); it != GetPlayerBotsEnd(); ++it)
{
Player* const bot = it->second;
if (!bot)
return;
// in taxi flight packet received in 2 case:
// 1) end taxi path in far (multi-node) flight
// 2) switch from one map to other in case multi-map taxi path
// we need process only (1)
uint32 curDest = bot->m_taxi.GetTaxiDestination();
if (!curDest)
return;
TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
// far teleport case
if (curDestNode && curDestNode->map_id != bot->GetMapId())
{
if (bot->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator *) (bot->GetMotionMaster()->top());
flight->Interrupt(*bot); // will reset at map landing
flight->SetCurrentNodeAfterTeleport();
TaxiPathNodeEntry const& node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
bot->TeleportTo(curDestNode->map_id, node.x, node.y, node.z, bot->GetOrientation());
}
return;
}
uint32 destinationnode = bot->m_taxi.NextTaxiDestination();
if (destinationnode > 0) // if more destinations to go
{
// current source node for next destination
uint32 sourcenode = bot->m_taxi.GetTaxiSource();
// Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path)
if (bot->isTaxiCheater())
if (bot->m_taxi.SetTaximaskNode(sourcenode))
{
WorldPacket data(SMSG_NEW_TAXI_PATH, 0);
bot->GetSession()->SendPacket(&data);
}
// DEBUG_LOG ("[PlayerbotMgr]: HandleMasterIncomingPacket - Received CMSG_MOVE_SPLINE_DONE Taxi has to go from %u to %u", sourcenode, destinationnode);
uint32 mountDisplayId = sObjectMgr.GetTaxiMountDisplayId(sourcenode, bot->GetTeam());
uint32 path, cost;
sObjectMgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
if (path && mountDisplayId)
bot->GetSession()->SendDoFlight(mountDisplayId, path, 1); // skip start fly node
else
bot->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
示例7: HandleMoveSplineDoneOpcode
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
{
sLog.outDebug("WORLD: Received CMSG_MOVE_SPLINE_DONE");
MovementInfo movementInfo; // used only for proper packet read
//recv_data >> Unused<uint64>(); //unused GUID
recv_data >> movementInfo;
recv_data >> Unused<uint32>(); // unk
// in taxi flight packet received in 2 case:
// 1) end taxi path in far (multi-node) flight
// 2) switch from one map to other in case multi-map taxi path
// we need process only (1)
uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
if (!curDest)
return;
TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
// far teleport case
if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId())
{
if (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
flight->Interrupt(*GetPlayer());
flight->SetCurrentNodeAfterTeleport();
TaxiPathNodeEntry const& node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->map_id,node.x,node.y,node.z,GetPlayer()->GetOrientation());
}
return;
}
uint32 destinationnode = GetPlayer()->m_taxi.NextTaxiDestination();
if (destinationnode > 0) // if more destinations to go
{
// current source node for next destination
uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
// Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path)
if (GetPlayer()->isTaxiCheater())
{
if (GetPlayer()->m_taxi.SetTaximaskNode(sourcenode))
{
WorldPacket data(SMSG_NEW_TAXI_PATH, 0);
_player->SendPacketToSelf(&data);
}
}
sLog.outDebug("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
uint16 MountId = sObjectMgr.GetTaxiMount(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
sObjectMgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
if (path && MountId)
SendDoFlight(MountId, path, 1); // skip start fly node
else
GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
}
else
GetPlayer()->m_taxi.ClearTaxiDestinations(); // not destinations, clear source node
// TaxiNodes: 96 -> Zangarmarsh - Quest - As the Crow Flies - End | quest support: As the Crow Flies
if (curDest == 96 && GetPlayer()->GetQuestStatus(9718) == QUEST_STATUS_INCOMPLETE)
GetPlayer()->CompleteQuest(9718);
// TaxiNodes: 158 -> Blade Edge's Mountain - Quest - Vision Guide
if (curDest == 158 && GetPlayer()->GetQuestStatus(10525) == QUEST_STATUS_INCOMPLETE)
{
GetPlayer()->RemoveAurasDueToSpell(36573);
GetPlayer()->CompleteQuest(10525);
}
}
示例8: HandleMoveSplineDoneOpcode
//.........这里部分代码省略.........
GetPlayer()->GetMotionMaster()->MovementExpired(false);
// movement anticheat code
GetPlayer()->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
GetPlayer()->m_movementInfo = movementInfo;
GetPlayer()->SetUnitMovementFlags(movementInfo.flags);
// calc time deltas
int32 cClientTimeDelta = 0;
if (GetPlayer()->m_anti_LastClientTime != 0)
{
cClientTimeDelta = movementInfo.time - GetPlayer()->m_anti_LastClientTime;
GetPlayer()->m_anti_DeltaClientTime += cClientTimeDelta;
GetPlayer()->m_anti_LastClientTime = movementInfo.time;
}
else
GetPlayer()->m_anti_LastClientTime = movementInfo.time;
const uint64 cServerTime = getMSTime();
uint32 cServerTimeDelta = 0;
if (GetPlayer()->m_anti_LastServerTime != 0)
{
cServerTimeDelta = cServerTime - GetPlayer()->m_anti_LastServerTime;
GetPlayer()->m_anti_DeltaServerTime += cServerTimeDelta;
GetPlayer()->m_anti_LastServerTime = cServerTime;
}
else
GetPlayer()->m_anti_LastServerTime = cServerTime;
// end movement anticheat
// far teleport case
if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId())
{
if (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
flight->SetCurrentNodeAfterTeleport();
Path::PathNode const& node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->map_id,node.x,node.y,node.z,GetPlayer()->GetOrientation());
}
return;
}
// movement anticheat fix - disallow unmount from taxi
if (curloc != curDest)
{
// current source node for next destination
uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
uint16 MountId = objmgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
objmgr.GetTaxiPath(sourcenode, curDest, path, cost);
if (path && MountId)
SendDoFlight(MountId, path, 1); // skip start fly node
else
GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
return;
}
// end movement anticheat
uint32 destinationnode = GetPlayer()->m_taxi.NextTaxiDestination();
if (destinationnode > 0) // if more destinations to go
{
// current source node for next destination
uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
// Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path)
if (GetPlayer()->isTaxiCheater())
{
if (GetPlayer()->m_taxi.SetTaximaskNode(sourcenode))
{
WorldPacket data(SMSG_NEW_TAXI_PATH, 0);
_player->GetSession()->SendPacket(&data);
}
}
sLog.outDebug("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
uint32 mountDisplayId = objmgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
objmgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
if (path && mountDisplayId)
SendDoFlight(mountDisplayId, path, 1); // skip start fly node
else
GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
return;
}
GetPlayer()->CleanupAfterTaxiFlight();
GetPlayer()->SetFallInformation(0, GetPlayer()->GetPositionZ());
if (GetPlayer()->pvpInfo.inHostileArea)
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
}
示例9: HandleTaxiNextDestinationOpcode
void WorldSession::HandleTaxiNextDestinationOpcode(WorldPacket& recv_data)
{
DEBUG_LOG("WORLD: Received CMSG_MOVE_SPLINE_DONE");
MovementInfo movementInfo; // used only for proper packet read
recv_data >> movementInfo;
recv_data >> Unused<uint32>(); // unk
// in taxi flight packet received at the end of current path in far (multi-node) flight
uint32 curDest = GetPlayer()->m_taxi.GetTaxiDestination();
if (!curDest)
return;
TaxiNodesEntry const* curDestNode = sTaxiNodesStore.LookupEntry(curDest);
// far teleport case
if (curDestNode && curDestNode->map_id != GetPlayer()->GetMapId())
{
if (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE)
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
flight->SetCurrentNodeAfterTeleport();
TaxiPathNodeEntry const& node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->map_id, node.x, node.y, node.z, GetPlayer()->GetOrientation());
}
return;
}
uint32 destinationnode = GetPlayer()->m_taxi.NextTaxiDestination();
if (destinationnode > 0) // if more destinations to go
{
// current source node for next destination
uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
// Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path)
if (GetPlayer()->isTaxiCheater())
{
if (GetPlayer()->m_taxi.SetTaximaskNode(sourcenode))
{
WorldPacket data(SMSG_NEW_TAXI_PATH, 0);
_player->GetSession()->SendPacket(&data);
}
}
DEBUG_LOG("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
uint16 MountId = sObjectMgr.GetTaxiMount(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
sObjectMgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
if (path && MountId)
SendDoFlight(MountId, path, 1); // skip start fly node
else
GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
return;
}
else
{
GetPlayer()->m_taxi.ClearTaxiDestinations(); // not destinations, clear source node
// has taxi flight just finished reset fall information to avoid receiving fall damage
GetPlayer()->SetFallInformation(0, movementInfo.GetPos()->GetPositionZ());
}
GetPlayer()->CleanupAfterTaxiFlight();
}