Core/Spells: Allow SPELL_AURA_SET_VEHICLE_ID to be used on creatures too

(cherry picked from commit 8160e6e303)
This commit is contained in:
Shocker
2011-11-26 22:37:02 +02:00
committed by Shauren
parent b5ebf0281d
commit 4ea21dab05

View File

@@ -4985,7 +4985,7 @@ void AuraEffect::HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode,
Unit* target = aurApp->GetTarget();
if (target->GetTypeId() != TYPEID_PLAYER || !target->IsInWorld())
if (!target->IsInWorld())
return;
uint32 vehicleId = GetMiscValue();
@@ -4998,6 +4998,9 @@ void AuraEffect::HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode,
else if (target->GetVehicleKit())
target->RemoveVehicleKit();
if (target->GetTypeId() != TYPEID_PLAYER)
return;
WorldPacket data(SMSG_PLAYER_VEHICLE_DATA, target->GetPackGUID().size()+4);
data << target->GetPackGUID();
data << uint32(apply ? vehicleId : 0);