[7798] More Player::ActivateTaxiPathTo use improvements

* 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.
This commit is contained in:
VladimirMangos 2009-05-08 01:07:49 +04:00
parent 3989212ad1
commit 666b6f798e
7 changed files with 85 additions and 45 deletions

View file

@ -126,7 +126,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);
}
@ -188,7 +189,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*/)
@ -273,5 +274,5 @@ void WorldSession::HandleActivateTaxiOpcode( WorldPacket & recv_data )
return;
}
GetPlayer()->ActivateTaxiPathTo(nodes, 0, npc);
GetPlayer()->ActivateTaxiPathTo(nodes, npc);
}