![]() |
TrinityCore
|
#include <Vehicle.h>
Inheritance diagram for Vehicle:Public Member Functions | |
| Vehicle (Unit *unit, VehicleEntry const *vehInfo, uint32 creatureEntry) | |
| ~Vehicle () | |
| Vehicle (Vehicle const &right)=delete | |
| Vehicle (Vehicle &&right)=delete | |
| Vehicle & | operator= (Vehicle const &right)=delete |
| Vehicle & | operator= (Vehicle &&right)=delete |
| void | Install () |
| Initializes power type for vehicle. Nothing more. | |
| void | Uninstall () |
| Removes all passengers and sets status to STATUS_UNINSTALLING. No new passengers can be added to the vehicle after this call. | |
| void | Reset (bool evading=false) |
| Reapplies immunities and reinstalls accessories. Only has effect for creatures. | |
| void | InstallAllAccessories (bool evading) |
| void | ApplyAllImmunities () |
| Applies specific immunities that cannot be set in DB. | |
| void | InstallAccessory (uint32 entry, int8 seatId, bool minion, uint8 type, uint32 summonTime, Optional< uint32 > rideSpellId={}) |
| Installs an accessory. | |
| Unit * | GetBase () const |
| VehicleEntry const * | GetVehicleInfo () const |
| uint32 | GetCreatureEntry () const |
| bool | HasEmptySeat (int8 seatId) const |
| Checks if vehicle's seat specified by 'seatId' is empty. | |
| Unit * | GetPassenger (int8 seatId) const |
| Gets a passenger on specified seat. | |
| SeatMap::const_iterator | GetNextEmptySeat (int8 seatId, bool next) const |
| Gets the next empty seat based on current seat. | |
| VehicleSeatAddon const * | GetSeatAddonForSeatOfPassenger (Unit const *passenger) const |
| Gets the vehicle seat addon data for the seat of a passenger. | |
| uint8 | GetAvailableSeatCount () const |
| Gets the available seat count. | |
| bool | AddVehiclePassenger (Unit *unit, int8 seatId=-1) |
| Vehicle * | RemovePassenger (WorldObject *passenger) override |
| Removes the passenger from the vehicle. | |
| void | RelocatePassengers () |
| Relocate passengers. Must be called after m_base::Relocate. | |
| void | RemoveAllPassengers () |
| Removes all current and pending passengers from the vehicle. | |
| bool | IsVehicleInUse () const |
| Returns information whether the vehicle is currently used by any unit. | |
| bool | IsControllableVehicle () const |
| SeatMap::iterator | GetSeatIteratorForPassenger (Unit *passenger) |
| Gets seat iterator for specified passenger. | |
| VehicleSeatEntry const * | GetSeatForPassenger (Unit const *passenger) const |
| Returns information on the seat of specified passenger, represented by the format in VehicleSeat.dbc. | |
| void | RemovePendingEventsForPassenger (Unit *passenger) |
| Milliseconds | GetDespawnDelay () |
| float | GetPitch () |
| std::string | GetDebugInfo () const |
| Trinity::unique_weak_ptr< Vehicle > | GetWeakPtr () const |
Public Member Functions inherited from TransportBase | |
| void | UpdatePassengerPosition (Map *map, WorldObject *passenger, Position const &position, bool setHomePosition) |
Public Attributes | |
| SeatMap | Seats |
| The collection of all seats on the vehicle. Including vacant ones. | |
Protected Attributes | |
| uint32 | UsableSeatNum |
| Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags. | |
Private Types | |
| enum | Status { STATUS_NONE , STATUS_INSTALLED , STATUS_UNINSTALLING } |
| typedef std::list< VehicleJoinEvent * > | PendingJoinEventContainer |
Private Member Functions | |
| void | InitMovementInfoForBase () |
| Sets correct MovementFlags2 based on VehicleFlags from DBC. | |
| ObjectGuid | GetTransportGUID () const override |
| float | GetTransportOrientation () const override |
| void | AddPassenger (WorldObject *, Position const &) override |
| Attempts to add a passenger to the vehicle on 'seatId'. | |
| Position | GetPositionWithOffset (Position const &offset) const override |
| This method transforms supplied transport offsets into global coordinates. | |
| Position | GetPositionOffsetTo (Position const &endPos) const override |
| This method transforms supplied global coordinates into local offsets. | |
| int32 | GetMapIdForSpawning () const override |
| void | RemovePendingEvent (VehicleJoinEvent *e) |
| Removes @VehicleJoinEvent objects from pending join event store. This method only removes it after it's executed or aborted to prevent leaving pointers to deleted events. | |
| void | RemovePendingEventsForSeat (int8 seatId) |
| Removes any pending events for given seatId. Executed when a @VehicleJoinEvent::Execute is called. | |
| bool | HasPendingEventForSeat (int8 seatId) const |
Private Attributes | |
| Unit * | _me |
| The underlying unit with the vehicle kit. Can be player or creature. | |
| VehicleEntry const * | _vehicleInfo |
| DBC data for vehicle. | |
| GuidSet | vehiclePlayers |
| uint32 | _creatureEntry |
| Can be different than the entry of _me in case of players. | |
| Status | _status |
| Internal variable for sanity checks. | |
| PendingJoinEventContainer | _pendingJoinEvents |
| Collection of delayed join events for prospective passengers. | |
Friends | |
| class | VehicleJoinEvent |
Additional Inherited Members | |
Protected Member Functions inherited from TransportBase | |
| TransportBase () | |
| virtual | ~TransportBase () |
|
private |
|
private |
| Vehicle::Vehicle | ( | Unit * | unit, |
| VehicleEntry const * | vehInfo, | ||
| uint32 | creatureEntry | ||
| ) |
Definition at line 49 of file Vehicle.cpp.
References _me, _vehicleInfo, BaseEntity::GetTypeId(), InitMovementInfoForBase(), Unit::m_unitData, MAX_VEHICLE_SEATS, Unit::RemoveNpcFlag(), VehicleEntry::SeatID, Unit::SetNpcFlag(), sObjectMgr, sVehicleSeatStore, TYPEID_PLAYER, UNIT_NPC_FLAG_PLAYER_VEHICLE, UNIT_NPC_FLAG_SPELLCLICK, and UsableSeatNum.
| Vehicle::~Vehicle | ( | ) |
@Uninstall must be called before this.
Definition at line 73 of file Vehicle.cpp.
References _status, ASSERT, and STATUS_UNINSTALLING.
|
delete |
|
delete |
|
inlineoverrideprivatevirtual |
Attempts to add a passenger to the vehicle on 'seatId'.
| unit | The prospective passenger. |
| seatId | Identifier for the seat. Value of -1 indicates the next available seat. |
Implements TransportBase.
Definition at line 98 of file Vehicle.h.
References ABORT_MSG.
@Prevent adding passengers when vehicle is uninstalling. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
Definition at line 442 of file Vehicle.cpp.
References _me, _pendingJoinEvents, _status, _vehicleInfo, EventProcessor::AddEvent(), ASSERT, EventProcessor::CalculateTime(), Unit::ExitVehicle(), GetBase(), Object::GetEntry(), BaseEntity::GetGUID(), WorldObject::GetName(), ObjectAccessor::GetUnit(), HasPendingEventForSeat(), VehicleEntry::ID, WorldObject::m_Events, BasicEvent::ScheduleAbort(), VehicleJoinEvent::Seat, STATUS_UNINSTALLING, TC_LOG_DEBUG, TC_LOG_ERROR, ObjectGuid::ToString(), and VehicleJoinEvent.
Referenced by Unit::_EnterVehicle().
| void Vehicle::ApplyAllImmunities | ( | ) |
Applies specific immunities that cannot be set in DB.
Definition at line 173 of file Vehicle.cpp.
References _me, Unit::ApplySpellImmune(), CREATURE_TYPE_MECHANICAL, Creature::GetCreatureTemplate(), GetVehicleInfo(), IMMUNITY_EFFECT, IMMUNITY_MECHANIC, IMMUNITY_STATE, Creature::isWorldBoss(), MECHANIC_BANISH, MECHANIC_IMMUNE_SHIELD, MECHANIC_SHIELD, Unit::SetControlled(), SPELL_AURA_DAMAGE_SHIELD, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, SPELL_AURA_MOD_DECREASE_SPEED, SPELL_AURA_MOD_RESISTANCE, SPELL_AURA_MOD_STAT, SPELL_AURA_MOD_UNATTACKABLE, SPELL_AURA_PERIODIC_HEAL, SPELL_AURA_SCHOOL_ABSORB, SPELL_AURA_SCHOOL_IMMUNITY, SPELL_AURA_SPLIT_DAMAGE_PCT, SPELL_EFFECT_DISPEL, SPELL_EFFECT_HEAL, SPELL_EFFECT_HEAL_PCT, SPELL_EFFECT_KNOCK_BACK, SPELL_EFFECT_KNOCK_BACK_DEST, Object::ToCreature(), CreatureTemplate::type, and UNIT_STATE_ROOT.
Referenced by Reset().
| uint8 Vehicle::GetAvailableSeatCount | ( | ) | const |
Gets the available seat count.
Definition at line 712 of file Vehicle.cpp.
References HasPendingEventForSeat().
Referenced by Aura::CanStackWith(), spell_elementium_spike_shield::spell_elementium_spike_shield_SpellScript::HandleBouncerSpikes(), and npc_brunnhildar_prisoner::SpellHit().
|
inline |
Definition at line 49 of file Vehicle.h.
Referenced by Unit::_EnterVehicle(), Unit::_ExitVehicle(), Creature::_IsTargetAcceptable(), VehicleJoinEvent::Abort(), AddVehiclePassenger(), Unit::ChangeSeat(), VehicleJoinEvent::Execute(), GetPassenger(), SmartScript::GetTargets(), ObjectMgr::GetVehicleAccessoryList(), Unit::GetVehicleBase(), WorldSession::HandleEjectPassenger(), spell_auto_repair::spell_auto_repair_SpellScript::HandleScript(), Install(), InstallAllAccessories(), npc_tiger_matriarch::IsSummonedBy(), ScriptMgr::OnAddPassenger(), ScriptMgr::OnInstall(), ScriptMgr::OnInstallAccessory(), ScriptMgr::OnRemovePassenger(), ScriptMgr::OnReset(), ScriptMgr::OnUninstall(), RelocatePassengers(), RemovePassenger(), Reset(), and Uninstall().
|
inline |
Definition at line 51 of file Vehicle.h.
Referenced by ObjectMgr::GetVehicleAccessoryList(), ObjectMgr::GetVehicleTemplate(), Unit::HandleSpellClick(), InstallAccessory(), and Reset().
| std::string Vehicle::GetDebugInfo | ( | ) | const |
Definition at line 1000 of file Vehicle.cpp.
References _pendingJoinEvents.
Referenced by Unit::GetDebugInfo().
| Milliseconds Vehicle::GetDespawnDelay | ( | ) |
Definition at line 983 of file Vehicle.cpp.
References sObjectMgr.
Referenced by Unit::_ExitVehicle().
|
inlineoverrideprivatevirtual |
Implements TransportBase.
| SeatMap::const_iterator Vehicle::GetNextEmptySeat | ( | int8 | seatId, |
| bool | next | ||
| ) | const |
Gets the next empty seat based on current seat.
| seatId | Identifier for the current seat. |
| next | true if iterating forward, false means iterating backwards. |
Definition at line 326 of file Vehicle.cpp.
References HasPendingEventForSeat().
Referenced by Unit::ChangeSeat().
Gets a passenger on specified seat.
| seatId | Seat to look on. |
Definition at line 303 of file Vehicle.cpp.
References GetBase(), and ObjectAccessor::GetUnit().
Referenced by boss_leviathan_mk_ii::boss_leviathan_mk_iiAI::DamageTaken(), npc_orb_carrier::DoAction(), boss_gormok::ExecuteEvent(), npc_sanitron_5000::ForceCastOnPassenger(), spell_pilgrims_bounty_on_plate::GetPlateInSeat(), spell_icecrown_jump_jets::HandleCast(), spell_icecrown_illidan_kill_credit_master::HandleDummy(), spell_icecrown_plant_battle_standard::HandleDummy(), spell_auto_repair::spell_auto_repair_SpellScript::HandleScript(), spell_zuldrak_gymers_throw::HandleScript(), spell_gen_eject_passengers_3_8::HandleScriptEffect(), boss_occuthar::boss_occutharAI::JustSummoned(), npc_snobold_vassal::MountOnBoss(), spell_lord_stormsong_ancient_mindbender_aura::OnRemove(), boss_flame_leviathan_overload_device::boss_flame_leviathan_overload_deviceAI::OnSpellClick(), boss_flame_leviathan_seat::boss_flame_leviathan_seatAI::PassengerBoarded(), boss_vx_001::boss_vx_001AI::UpdateAI(), npc_freed_protodrake::UpdateAI(), and generic_vehicleAI_toc5::generic_vehicleAI_toc5AI::UpdateAI().
| float Vehicle::GetPitch | ( | ) |
Definition at line 991 of file Vehicle.cpp.
References _vehicleInfo, VehicleEntry::PitchMax, VehicleEntry::PitchMin, and sObjectMgr.
Referenced by InitMovementInfoForBase().
This method transforms supplied global coordinates into local offsets.
Implements TransportBase.
Definition at line 104 of file Vehicle.h.
References Position::GetPositionOffsetTo().
|
inlineoverrideprivatevirtual |
This method transforms supplied transport offsets into global coordinates.
Implements TransportBase.
Definition at line 101 of file Vehicle.h.
References Position::GetPositionWithOffset().
| VehicleSeatAddon const * Vehicle::GetSeatAddonForSeatOfPassenger | ( | Unit const * | passenger | ) | const |
Gets the vehicle seat addon data for the seat of a passenger.
| passenger | Identifier for the current seat user |
Definition at line 370 of file Vehicle.cpp.
References BaseEntity::GetGUID().
Referenced by Unit::_ExitVehicle().
| VehicleSeatEntry const * Vehicle::GetSeatForPassenger | ( | Unit const * | passenger | ) | const |
Returns information on the seat of specified passenger, represented by the format in VehicleSeat.dbc.
| [in,out] | The | passenger for which we check the seat info. |
Definition at line 670 of file Vehicle.cpp.
References BaseEntity::GetGUID().
Referenced by SpellInfo::CheckVehicle(), WorldSession::HandleEjectPassenger(), WorldSession::HandleMoveChangeVehicleSeats(), WorldSession::HandleRequestVehicleNextSeat(), WorldSession::HandleRequestVehiclePrevSeat(), and WorldSession::HandleRequestVehicleSwitchSeat().
| SeatMap::iterator Vehicle::GetSeatIteratorForPassenger | ( | Unit * | passenger | ) |
Gets seat iterator for specified passenger.
| [in,out] | passenger | Passenger to look up. |
Definition at line 692 of file Vehicle.cpp.
References BaseEntity::GetGUID().
Referenced by RemovePassenger().
|
inlineoverrideprivatevirtual |
Implements TransportBase.
|
inlineoverrideprivatevirtual |
Implements TransportBase.
|
inline |
Definition at line 50 of file Vehicle.h.
Referenced by ApplyAllImmunities(), BaseEntity::BuildMovementUpdate(), VehicleJoinEvent::Execute(), npc_vp_slipstream::InitializeAI(), and InitMovementInfoForBase().
| Trinity::unique_weak_ptr< Vehicle > Vehicle::GetWeakPtr | ( | ) | const |
Definition at line 1027 of file Vehicle.cpp.
References _me, and Unit::GetVehicleKitWeakPtr().
| bool Vehicle::HasEmptySeat | ( | int8 | seatId | ) | const |
Checks if vehicle's seat specified by 'seatId' is empty.
| seatId | Identifier for the seat. |
Definition at line 282 of file Vehicle.cpp.
Referenced by WorldSession::HandleMoveChangeVehicleSeats(), npc_ros_dark_rider::npc_ros_dark_riderAI::Reset(), and npc_mechanolift::npc_mechanoliftAI::UpdateAI().
|
private |
Definition at line 973 of file Vehicle.cpp.
References _pendingJoinEvents.
Referenced by AddVehiclePassenger(), GetAvailableSeatCount(), and GetNextEmptySeat().
|
private |
Sets correct MovementFlags2 based on VehicleFlags from DBC.
Definition at line 639 of file Vehicle.cpp.
References _me, Unit::AddUnitMovementFlag(), VehicleEntry::Flags, GetPitch(), GetVehicleInfo(), WorldObject::m_movementInfo, MOVEMENTFLAG_ALWAYS_ALLOW_PITCHING, MOVEMENTFLAG_FULL_SPEED_PITCHING, MOVEMENTFLAG_FULL_SPEED_TURNING, MOVEMENTFLAG_NO_JUMPING, MOVEMENTFLAG_NO_STRAFE, MovementInfo::pitch, VEHICLE_FLAG_ALLOW_PITCHING, VEHICLE_FLAG_FULLSPEEDPITCHING, VEHICLE_FLAG_FULLSPEEDTURNING, VEHICLE_FLAG_NO_JUMPING, and VEHICLE_FLAG_NO_STRAFE.
Referenced by Vehicle().
| void Vehicle::Install | ( | ) |
Initializes power type for vehicle. Nothing more.
Definition at line 90 of file Vehicle.cpp.
References _status, GetBase(), sScriptMgr, STATUS_INSTALLED, and TYPEID_UNIT.
Referenced by Creature::AddToWorld().
| void Vehicle::InstallAccessory | ( | uint32 | entry, |
| int8 | seatId, | ||
| bool | minion, | ||
| uint8 | type, | ||
| uint32 | summonTime, | ||
| Optional< uint32 > | rideSpellId = {} |
||
| ) |
Installs an accessory.
| entry | The NPC entry of accessory. |
| seatId | Identifier for the seat to add the accessory to. |
| minion | true if accessory considered a 'minion'. Implies that the accessory will despawn when the vehicle despawns. Essentially that it has no life without the vehicle. Their fates are bound. |
| type | See enum @SummonType. |
| summonTime | Time after which the minion is despawned in case of a timed despawn @type specified. |
@Prevent adding accessories when vehicle is uninstalling. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
If for some reason adding accessory to vehicle fails it will unsummon in @VehicleJoinEvent::Abort
Definition at line 396 of file Vehicle.cpp.
References _me, _status, Unit::AddUnitTypeMask(), ASSERT, GetCreatureEntry(), BaseEntity::GetGUID(), Unit::GetThreatManager(), Unit::HandleSpellClick(), ThreatManager::Initialize(), STATUS_UNINSTALLING, WorldObject::SummonCreature(), TC_LOG_DEBUG, TC_LOG_ERROR, ObjectGuid::ToString(), and UNIT_MASK_ACCESSORY.
Referenced by InstallAllAccessories().
| void Vehicle::InstallAllAccessories | ( | bool | evading | ) |
Definition at line 97 of file Vehicle.cpp.
References GetBase(), InstallAccessory(), RemoveAllPassengers(), sObjectMgr, and TYPEID_PLAYER.
Referenced by npc_ioc_siege_engine::DoAction(), Unit::Mount(), Reset(), and npc_hyldsmeet_protodrake::UpdateAI().
| bool Vehicle::IsControllableVehicle | ( | ) | const |
Definition at line 621 of file Vehicle.cpp.
References VEHICLE_SEAT_FLAG_CAN_CONTROL.
Referenced by Spell::CheckEffectTarget().
| bool Vehicle::IsVehicleInUse | ( | ) | const |
Returns information whether the vehicle is currently used by any unit.
Definition at line 612 of file Vehicle.cpp.
Referenced by VehicleAI::OnCharmed().
| void Vehicle::RelocatePassengers | ( | ) |
Relocate passengers. Must be called after m_base::Relocate.
Definition at line 579 of file Vehicle.cpp.
References _me, ASSERT, GetBase(), WorldObject::GetMap(), Position::GetPositionWithOffset(), ObjectAccessor::GetUnit(), and TransportBase::UpdatePassengerPosition().
Referenced by Map::CreatureRelocation(), Map::MoveAllCreaturesInMoveList(), Map::PlayerRelocation(), Unit::UpdateHeight(), and Unit::UpdateOrientation().
| void Vehicle::RemoveAllPassengers | ( | ) |
Removes all current and pending passengers from the vehicle.
Setting to_Abort to true will cause @VehicleJoinEvent::Abort to be executed on next @Unit::UpdateEvents call This will properly "reset" the pending join process for the passenger.
Update vehicle pointer in every pending join event - Abort may be called after vehicle is deleted
Definition at line 238 of file Vehicle.cpp.
References _creatureEntry, _me, _pendingJoinEvents, _status, BaseEntity::GetGUID(), ObjectAccessor::GetUnit(), Unit::RemoveAurasByType(), BasicEvent::ScheduleAbort(), Seats, SPELL_AURA_CONTROL_VEHICLE, STATUS_UNINSTALLING, VehicleJoinEvent::Target, TC_LOG_DEBUG, and ObjectGuid::ToString().
Referenced by InstallAllAccessories(), Uninstall(), and npc_silverpine_forsaken_bat::WaypointReached().
|
overridevirtual |
Removes the passenger from the vehicle.
| [in,out] | unit | The passenger to remove. |
Implements TransportBase.
Definition at line 513 of file Vehicle.cpp.
References _me, _vehicleInfo, Creature::AI(), ASSERT, WorldObject::CastSpell(), VehicleTemplate::CustomFlags, DontForceParachuteOnExit, GetBase(), Object::GetEntry(), BaseEntity::GetGUID(), WorldObject::GetName(), GetSeatIteratorForPassenger(), WorldObject::GetTransport(), BaseEntity::GetTypeId(), Unit::GetVehicle(), EnumFlag< T >::HasFlag(), VehicleEntry::ID, Unit::IsAIEnabled(), Unit::IsFlying(), BaseEntity::IsInWorld(), WorldObject::m_movementInfo, CreatureAI::PassengerBoarded(), Unit::RemoveCharmedBy(), MovementInfo::ResetTransport(), Unit::SetDisableGravity(), Unit::SetNpcFlag(), Unit::SetUninteractible(), Unit::SetVehicle(), sObjectMgr, sScriptMgr, TC_LOG_DEBUG, Object::ToCreature(), ObjectGuid::ToString(), Object::ToUnit(), MovementInfo::transport, TYPEID_PLAYER, TYPEID_UNIT, UNIT_NPC_FLAG_PLAYER_VEHICLE, UNIT_NPC_FLAG_SPELLCLICK, UsableSeatNum, VEHICLE_SEAT_FLAG_CAN_CONTROL, VEHICLE_SEAT_FLAG_DISABLE_GRAVITY, VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE, and VEHICLE_SPELL_PARACHUTE.
Referenced by Unit::_ExitVehicle(), AuraEffect::HandleAuraControlVehicle(), and spell_skadi_ride_vehicle::OnRemoveVehicle().
|
private |
Removes @VehicleJoinEvent objects from pending join event store. This method only removes it after it's executed or aborted to prevent leaving pointers to deleted events.
| [in] | e | The VehicleJoinEvent* to remove from pending event store. |
Definition at line 736 of file Vehicle.cpp.
References _pendingJoinEvents.
Referenced by VehicleJoinEvent::Abort().
| void Vehicle::RemovePendingEventsForPassenger | ( | Unit * | passenger | ) |
Definition at line 784 of file Vehicle.cpp.
References _pendingJoinEvents.
Referenced by VehicleJoinEvent::Execute(), AuraEffect::HandleAuraControlVehicle(), and spell_ulduar_stone_grip::spell_ulduar_stone_grip_AuraScript::OnRemoveVehicle().
|
private |
Removes any pending events for given seatId. Executed when a @VehicleJoinEvent::Execute is called.
Removes any pending events for given passenger. Executed when vehicle control aura is removed while adding passenger is in progress.
| seatId | Identifier for the seat. |
| passenger | Unit that is supposed to enter the vehicle. |
Definition at line 759 of file Vehicle.cpp.
References _pendingJoinEvents.
Referenced by VehicleJoinEvent::Execute().
| void Vehicle::Reset | ( | bool | evading = false | ) |
Reapplies immunities and reinstalls accessories. Only has effect for creatures.
| evading | true if called from CreatureAI::EnterEvadeMode |
Definition at line 150 of file Vehicle.cpp.
References _me, ApplyAllImmunities(), GetBase(), GetCreatureEntry(), BaseEntity::GetGUID(), Creature::GetSpawnId(), InstallAllAccessories(), sScriptMgr, TC_LOG_DEBUG, Object::ToCreature(), ObjectGuid::ToString(), and TYPEID_UNIT.
Referenced by Creature::AIM_Initialize(), HomeMovementGenerator< T >::DoFinalize(), firelands_bossAI::EnterEvadeMode(), npc_daegarn::EnterEvadeMode(), CreatureGameObjectAreaTriggerConversationScriptRegistrySwapHooks< ObjectType, ScriptType, Base >::LoadResetScript(), and Creature::Update().
| void Vehicle::Uninstall | ( | ) |
Removes all passengers and sets status to STATUS_UNINSTALLING. No new passengers can be added to the vehicle after this call.
@Prevent recursive uninstall call. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
Definition at line 121 of file Vehicle.cpp.
References _creatureEntry, _me, _status, GetBase(), BaseEntity::GetGUID(), RemoveAllPassengers(), sScriptMgr, STATUS_UNINSTALLING, TC_LOG_DEBUG, TC_LOG_ERROR, ObjectGuid::ToString(), TYPEID_UNIT, and UNIT_MASK_MINION.
Referenced by Unit::RemoveVehicleKit().
|
friend |
Definition at line 81 of file Vehicle.h.
Referenced by AddVehiclePassenger().
|
private |
Can be different than the entry of _me in case of players.
Definition at line 118 of file Vehicle.h.
Referenced by RemoveAllPassengers(), and Uninstall().
|
private |
The underlying unit with the vehicle kit. Can be player or creature.
Definition at line 114 of file Vehicle.h.
Referenced by AddVehiclePassenger(), ApplyAllImmunities(), GetWeakPtr(), InitMovementInfoForBase(), InstallAccessory(), RelocatePassengers(), RemoveAllPassengers(), RemovePassenger(), Reset(), Uninstall(), and Vehicle().
|
private |
Collection of delayed join events for prospective passengers.
Definition at line 122 of file Vehicle.h.
Referenced by AddVehiclePassenger(), GetDebugInfo(), HasPendingEventForSeat(), RemoveAllPassengers(), RemovePendingEvent(), RemovePendingEventsForPassenger(), and RemovePendingEventsForSeat().
|
private |
Internal variable for sanity checks.
Definition at line 119 of file Vehicle.h.
Referenced by AddVehiclePassenger(), Install(), InstallAccessory(), RemoveAllPassengers(), Uninstall(), and ~Vehicle().
|
private |
DBC data for vehicle.
Definition at line 115 of file Vehicle.h.
Referenced by AddVehiclePassenger(), GetPitch(), RemovePassenger(), and Vehicle().
| SeatMap Vehicle::Seats |
The collection of all seats on the vehicle. Including vacant ones.
Definition at line 67 of file Vehicle.h.
Referenced by Unit::ChangeSeat(), SmartScript::GetTargets(), spell_eject_spirits_of_redemption::HandleHitTarget(), FlameLeviathanPursuedTargetSelector::operator()(), Unit::OutDebugInfo(), RemoveAllPassengers(), and boss_flame_leviathan::boss_flame_leviathanAI::SpellHitTarget().
|
protected |
Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags.
Definition at line 82 of file Vehicle.h.
Referenced by VehicleJoinEvent::Execute(), RemovePassenger(), and Vehicle().