aboutsummaryrefslogtreecommitdiff
path: root/src/game/TaxiHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-15 18:02:12 -0500
committermegamage <none@none>2009-06-15 18:02:12 -0500
commit572a9191d970b9b960555c8a5d31efd3160a8b44 (patch)
tree69909d6d37af3164da06a919dd429bef4242bb0c /src/game/TaxiHandler.cpp
parentb7d218febc3d65afce761ff7f5b32f9bc98e581c (diff)
*Some creature display id update. By VladimirMangos and GriffonHeart
--HG-- branch : trunk
Diffstat (limited to 'src/game/TaxiHandler.cpp')
-rw-r--r--src/game/TaxiHandler.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp
index 7d90bbd26ce..0928b8ba96a 100644
--- a/src/game/TaxiHandler.cpp
+++ b/src/game/TaxiHandler.cpp
@@ -119,17 +119,18 @@ void WorldSession::SendTaxiMenu( Creature* unit )
sLog.outDebug( "WORLD: Sent SMSG_SHOWTAXINODES" );
}
-void WorldSession::SendDoFlight( uint16 MountId, uint32 path, uint32 pathNode )
+void WorldSession::SendDoFlight( uint32 mountDisplayId, uint32 path, uint32 pathNode )
{
// remove fake death
- if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
+ if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
while(GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE)
GetPlayer()->GetMotionMaster()->MovementExpired(false);
- if (MountId)
- GetPlayer()->Mount( MountId );
+ if (mountDisplayId)
+ GetPlayer()->Mount( mountDisplayId );
+
GetPlayer()->GetMotionMaster()->MoveTaxiFlight(path,pathNode);
}
@@ -243,16 +244,15 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& /*recv_data*/)
sLog.outDebug( "WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode );
- uint16 MountId = objmgr.GetTaxiMount(sourcenode, GetPlayer()->GetTeam());
+ uint32 mountDisplayId = objmgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
objmgr.GetTaxiPath( sourcenode, destinationnode, path, cost);
- if(path && MountId)
- {
- SendDoFlight( MountId, path, 1 ); // skip start fly node
- return;
- }
+ if(path && mountDisplayId)
+ SendDoFlight( mountDisplayId, path, 1 ); // skip start fly node
+ else
+ GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
}
GetPlayer()->m_taxi.ClearTaxiDestinations(); // not destinations, clear source node