aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 0c9acbec4b6..cc2d817dee3 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6812,27 +6812,25 @@ void AuraEffect::HandleAuraControlVehicle(bool apply, bool Real, bool /*changeAm
return;
Unit *caster = GetCaster();
- if(!caster)
+ if(!caster || caster == m_target)
return;
- /*Vehicle *vehicle = dynamic_cast<Vehicle*>(m_target);
+ Vehicle *vehicle = dynamic_cast<Vehicle*>(m_target);
if (apply)
{
- if(caster->GetTypeId() == TYPEID_PLAYER)
- if(Pet *pet = ((Player*)caster)->GetPet())
- pet->Remove(PET_SAVE_AS_CURRENT);
- caster->EnterVehicle(vehicle);
+ //if(caster->GetTypeId() == TYPEID_PLAYER)
+ // if(Pet *pet = ((Player*)caster)->GetPet())
+ // pet->Remove(PET_SAVE_AS_CURRENT);
+ caster->EnterVehicle(vehicle, 0);
}
else
{
- SpellEntry const *spell = GetSpellProto();
-
// some SPELL_AURA_CONTROL_VEHICLE auras have a dummy effect on the player - remove them
- caster->RemoveAurasDueToSpell(spell->Id);
+ caster->RemoveAurasDueToSpell(GetId());
caster->ExitVehicle();
- }*/
+ }
}
void AuraEffect::HandleAuraConvertRune(bool apply, bool Real, bool /*changeAmount*/)