AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "WaypointMovementGenerator.h"
Classes | |
struct | TaxiNodeChangeInfo |
node index where preloading starts More... | |
Private Attributes | |
float | _endGridX |
float | _endGridY |
X coord of last node location. More... | |
uint32 | _endMapId |
Y coord of last node location. More... | |
uint32 | _preloadTargetNode |
map Id of last node location More... | |
std::deque< TaxiNodeChangeInfo > | _pointsForPathSwitch |
Additional Inherited Members | |
Protected Attributes inherited from PathMovementBase< Player, TaxiPathNodeList > | |
TaxiPathNodeList | i_path |
uint32 | i_currentNode |
FlightPathMovementGenerator generates movement of the player for the paths and hence generates ground and activities for the player.
|
inlineexplicit |
References _endGridX, _endGridY, _endMapId, _preloadTargetNode, and PathMovementBase< Player, TaxiPathNodeList >::i_currentNode.
void FlightPathMovementGenerator::DoEventIfAny | ( | Player * | player, |
TaxiPathNodeEntry const * | node, | ||
bool | departure | ||
) |
References TaxiPathNodeEntry::arrivalEventID, TaxiPathNodeEntry::departureEventID, WorldObject::GetMap(), WorldObject::GetName(), TaxiPathNodeEntry::index, LOG_DEBUG, TaxiPathNodeEntry::path, Map::ScriptsStart(), and sEventScripts.
Referenced by DoUpdate().
void FlightPathMovementGenerator::DoFinalize | ( | Player * | player | ) |
References PlayerTaxi::ClearTaxiDestinations(), Unit::ClearUnitState(), Unit::Dismount(), PlayerTaxi::empty(), GameTime::GetGameTime(), Unit::getHostileRefMgr(), Position::GetPositionZ(), Player::m_taxi, PLAYER_FLAGS_TAXI_BENCHMARK, Player::RemovePlayerFlag(), Unit::RemoveUnitFlag(), Player::SetFallInformation(), HostileRefMgr::setOnlineOfflineState(), Unit::StopMoving(), UNIT_FLAG_DISABLE_MOVE, UNIT_FLAG_TAXI_FLIGHT, and UNIT_STATE_IN_FLIGHT.
void FlightPathMovementGenerator::DoInitialize | ( | Player * | player | ) |
References InitEndGridInfo(), and MovementGeneratorMedium< Player, FlightPathMovementGenerator >::Reset().
void FlightPathMovementGenerator::DoReset | ( | Player * | player | ) |
References Unit::AddUnitState(), PathMovementBase< Player, TaxiPathNodeList >::GetCurrentNode(), Object::GetGUID(), Unit::getHostileRefMgr(), GetPathAtMapEnd(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), PathMovementBase< Player, TaxiPathNodeList >::i_path, Movement::MoveSplineInit::Launch(), LOG_DEBUG, Movement::MoveSplineInit::Path(), PLAYER_FLIGHT_SPEED, Movement::MoveSplineInit::SetFirstPointId(), Movement::MoveSplineInit::SetFly(), HostileRefMgr::setOnlineOfflineState(), Unit::SetUnitFlag(), Movement::MoveSplineInit::SetVelocity(), ObjectGuid::ToString(), UNIT_FLAG_DISABLE_MOVE, UNIT_FLAG_TAXI_FLIGHT, and UNIT_STATE_IN_FLIGHT.
References _pointsForPathSwitch, _preloadTargetNode, ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TRAVELLING, ASSERT, Movement::MoveSpline::currentPathIdx(), DoEventIfAny(), Object::GetGUID(), PathMovementBase< Player, TaxiPathNodeList >::i_currentNode, PathMovementBase< Player, TaxiPathNodeList >::i_path, Player::m_taxi, Player::ModifyMoney(), Unit::movespline, PlayerTaxi::NextTaxiDestination(), PreloadEndGrid(), ObjectGuid::ToString(), and Player::UpdateAchievementCriteria().
|
inlineoverridevirtual |
|
inline |
uint32 FlightPathMovementGenerator::GetPathAtMapEnd | ( | ) | const |
References PathMovementBase< Player, TaxiPathNodeList >::i_currentNode, and PathMovementBase< Player, TaxiPathNodeList >::i_path.
Referenced by DoReset().
bool FlightPathMovementGenerator::GetResetPos | ( | Player * | , |
float & | x, | ||
float & | y, | ||
float & | z | ||
) |
References PathMovementBase< Player, TaxiPathNodeList >::i_currentNode, PathMovementBase< Player, TaxiPathNodeList >::i_path, TaxiPathNodeEntry::x, TaxiPathNodeEntry::y, and TaxiPathNodeEntry::z.
|
inline |
void FlightPathMovementGenerator::InitEndGridInfo | ( | ) |
Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will be reinitialized for each flightmaster at the end of each spline (or stop) in the flight.
Number of nodes in path.
MapId of last node
References _endGridX, _endGridY, _endMapId, _preloadTargetNode, and PathMovementBase< Player, TaxiPathNodeList >::i_path.
Referenced by DoInitialize().
void FlightPathMovementGenerator::LoadPath | ( | Player * | player | ) |
References _pointsForPathSwitch, PathMovementBase< Player, TaxiPathNodeList >::GetCurrentNode(), PlayerTaxi::GetFlightMasterFactionTemplate(), Object::GetGUID(), PlayerTaxi::GetPath(), Position::GetPosition(), Player::GetReputationPriceDiscount(), PathMovementBase< Player, TaxiPathNodeList >::i_currentNode, PathMovementBase< Player, TaxiPathNodeList >::i_path, IsNodeIncludedInShortenedPath(), LOG_ERROR, Player::m_taxi, sObjectMgr, sTaxiPathNodesByPath, and ObjectGuid::ToString().
Referenced by MotionMaster::MoveTaxiFlight().
void FlightPathMovementGenerator::PreloadEndGrid | ( | ) |
References _endGridX, _endGridY, _endMapId, _preloadTargetNode, PathMovementBase< Player, TaxiPathNodeList >::i_path, Map::LoadGrid(), LOG_DEBUG, and sMapMgr.
Referenced by DoUpdate().
void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport | ( | ) |
References PathMovementBase< Player, TaxiPathNodeList >::i_currentNode, and PathMovementBase< Player, TaxiPathNodeList >::i_path.
|
inline |
References PathMovementBase< Player, TaxiPathNodeList >::i_currentNode.
|
private |
Referenced by FlightPathMovementGenerator(), InitEndGridInfo(), and PreloadEndGrid().
|
private |
X coord of last node location.
Referenced by FlightPathMovementGenerator(), InitEndGridInfo(), and PreloadEndGrid().
|
private |
Y coord of last node location.
Referenced by FlightPathMovementGenerator(), InitEndGridInfo(), and PreloadEndGrid().
|
private |
Referenced by DoUpdate(), and LoadPath().
|
private |
map Id of last node location
Referenced by DoUpdate(), FlightPathMovementGenerator(), InitEndGridInfo(), and PreloadEndGrid().