fix(Core): Crashfix. (#14680)
This commit is contained in:
parent
4e01b95777
commit
7241e48a9a
1 changed files with 3 additions and 2 deletions
|
|
@ -491,10 +491,11 @@ void Vehicle::RemovePassenger(Unit* unit)
|
|||
if (_me->IsFlying() && !_me->GetInstanceId() && unit->GetTypeId() == TYPEID_PLAYER && !(unit->ToPlayer()->GetDelayedOperations() & DELAYED_VEHICLE_TELEPORT) && _me->GetEntry() != 30275 /*NPC_WILD_WYRM*/)
|
||||
_me->CastSpell(unit, VEHICLE_SPELL_PARACHUTE, true);
|
||||
|
||||
if (_me->GetTypeId() == TYPEID_UNIT && _me->ToCreature()->IsAIEnabled)
|
||||
bool isCreature = _me->GetTypeId() == TYPEID_UNIT;
|
||||
if (isCreature && _me->ToCreature()->IsAIEnabled)
|
||||
_me->ToCreature()->AI()->PassengerBoarded(unit, seat->first, false);
|
||||
|
||||
if (GetBase()->GetTypeId() == TYPEID_UNIT)
|
||||
if (isCreature)
|
||||
sScriptMgr->OnRemovePassenger(this, unit);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue