aboutsummaryrefslogtreecommitdiff
path: root/src/game/TaxiHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-08 18:52:12 -0500
committermegamage <none@none>2009-05-08 18:52:12 -0500
commit29921b5bea032c1f701dda5f4fe64e10dc0b067a (patch)
treeb9d1c3fc9aac4dd9bc1984ea8f8e82982c4b20bd /src/game/TaxiHandler.cpp
parent7277ddd1140d388939ae135f135d5bf58871dacf (diff)
[7798] More Player::ActivateTaxiPathTo use improvements Author: VladimirMangos
* Provide more explicit way about spell that cast taxi flight if any * Remove incorrect states instead error reporting in case non-taximaster flight start (cast/script) * Remove mount_id arg from ActivateTaxiPathTo and implement support for 0 mount_id case (spell 32474) * Implement spell 32474 (except finilize part) * Provided Player::ActivateTaxiPathTo(uint32 taxi_path_id) function version for simplify one node to node paths use by id. --HG-- branch : trunk
Diffstat (limited to 'src/game/TaxiHandler.cpp')
-rw-r--r--src/game/TaxiHandler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp
index 24c6aca147a..5ba65c00660 100644
--- a/src/game/TaxiHandler.cpp
+++ b/src/game/TaxiHandler.cpp
@@ -128,7 +128,8 @@ void WorldSession::SendDoFlight( uint16 MountId, uint32 path, uint32 pathNode )
while(GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE)
GetPlayer()->GetMotionMaster()->MovementExpired(false);
- GetPlayer()->Mount( MountId );
+ if (MountId)
+ GetPlayer()->Mount( MountId );
GetPlayer()->GetMotionMaster()->MoveTaxiFlight(path,pathNode);
}
@@ -190,7 +191,7 @@ void WorldSession::HandleActivateTaxiFarOpcode ( WorldPacket & recv_data )
sLog.outDebug( "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" ,nodes.front(),nodes.back());
- GetPlayer()->ActivateTaxiPathTo(nodes, 0, npc);
+ GetPlayer()->ActivateTaxiPathTo(nodes, npc);
}
void WorldSession::HandleTaxiNextDestinationOpcode(WorldPacket& /*recv_data*/)
@@ -275,6 +276,6 @@ void WorldSession::HandleActivateTaxiOpcode( WorldPacket & recv_data )
return;
}
- GetPlayer()->ActivateTaxiPathTo(nodes, 0, npc);
+ GetPlayer()->ActivateTaxiPathTo(nodes, npc);
}