diff options
| author | megamage <none@none> | 2009-05-23 20:40:14 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-23 20:40:14 -0500 |
| commit | 278089303093545c131a58089099335ec6dc7c61 (patch) | |
| tree | 58f73b56551e7f837902523c095062583354dfa4 /src/game/SpellAuras.cpp | |
| parent | 7ef7f7fa82f88d0549c1d103bb1ab3f466bc4bf1 (diff) | |
*Fix a bug that player can change to an occupied seat on vehicle.
*Load full creature data for vehicles.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 18 |
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*/) |
