mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Fix crash when applying mind control to vehicles
Closes issue #2816 What should happen when mind control is applied to vehicles? --HG-- branch : trunk
This commit is contained in:
@@ -3910,6 +3910,9 @@ void AuraEffect::HandleModPossessPet(AuraApplication const * aurApp, uint8 mode,
|
||||
if (caster->ToPlayer()->GetPet() != target)
|
||||
return;
|
||||
|
||||
if (target->IsVehicle()) //Avoid crash when mind controling vehicles due to an assert in Unit::SetCharmedBy
|
||||
return;
|
||||
|
||||
target->SetCharmedBy(caster, CHARM_TYPE_POSSESS);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user