mirror of
https://github.com/araxiaonline/AzerothCore-wotlk-with-NPCBots.git
synced 2026-06-13 03:22:24 -04:00
fix(Core/Vehicle): parachute on vehicle exit (#25848)
This commit is contained in:
@@ -506,6 +506,9 @@ void Vehicle::RemovePassenger(Unit* unit)
|
||||
|
||||
seat->second.Passenger.Reset();
|
||||
|
||||
// RemoveCharmedBy() clears MOVEMENTFLAG_FLYING, so cache this before uncharm.
|
||||
bool wasFlying = _me->IsFlying();
|
||||
|
||||
if (_me->IsCreature() && unit->IsPlayer() && seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL)
|
||||
_me->RemoveCharmedBy(unit);
|
||||
|
||||
@@ -521,7 +524,7 @@ void Vehicle::RemovePassenger(Unit* unit)
|
||||
}
|
||||
|
||||
// only for flyable vehicles
|
||||
if (_me->IsFlying() && !_me->GetInstanceId() && unit->IsPlayer() && !(unit->ToPlayer()->GetDelayedOperations() & DELAYED_VEHICLE_TELEPORT) && _me->GetEntry() != 30275 /*NPC_WILD_WYRM*/)
|
||||
if (wasFlying && !_me->GetInstanceId() && unit->IsPlayer() && !(unit->ToPlayer()->GetDelayedOperations() & DELAYED_VEHICLE_TELEPORT) && _me->GetEntry() != 30275 /*NPC_WILD_WYRM*/)
|
||||
_me->CastSpell(unit, VEHICLE_SPELL_PARACHUTE, true);
|
||||
|
||||
if (_me->IsCreature())
|
||||
|
||||
Reference in New Issue
Block a user