aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-21 17:59:05 -0600
committermegamage <none@none>2009-03-21 17:59:05 -0600
commitb1e23bb90482e5426ce28098d2e7d1e5184acad4 (patch)
tree72cd97f58c833ecbc18df5fd5ce0431a11605486 /src
parente01e7d7934dce58c246eb956bf513ef7e3f073c9 (diff)
*Auto enter vehicle for summon vehicle spells.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp4
-rw-r--r--src/game/SpellEffects.cpp7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index f01195b2b23..0cf768d8f51 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6541,8 +6541,8 @@ void Aura::HandleAuraControlVehicle(bool apply, bool Real)
if(Pet *pet = m_target->GetPet())
pet->Remove(PET_SAVE_AS_CURRENT);
- WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
- ((Player*)m_target)->GetSession()->SendPacket(&data);
+ //WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
+ //((Player*)m_target)->GetSession()->SendPacket(&data);
}
void Aura::HandleAuraConvertRune(bool apply, bool Real)
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 742fc30fd69..1d92b6aa6ec 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -6657,6 +6657,13 @@ void Spell::SummonVehicle(uint32 entry, SummonPropertiesEntry const *properties)
return;
vehicle->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
+
+ if(damage)
+ {
+ m_caster->CastSpell(vehicle, damage, true);
+ if(m_caster->GetTypeId() == TYPEID_PLAYER)
+ ((Player*)m_caster)->EnterVehicle(vehicle);
+ }
}
void Spell::GetSummonPosition(float &x, float &y, float &z, float radius, uint32 count)