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

This commit is contained in:
Shocker
2011-11-26 22:42:26 +02:00
parent a2406e2ade
commit 8160e6e303
@@ -5546,7 +5546,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();
@@ -5559,6 +5559,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.appendPackGUID(target->GetGUID());
data << uint32(apply ? vehicleId : 0);