diff options
author | megamage <none@none> | 2009-03-21 17:59:05 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-21 17:59:05 -0600 |
commit | b1e23bb90482e5426ce28098d2e7d1e5184acad4 (patch) | |
tree | 72cd97f58c833ecbc18df5fd5ce0431a11605486 /src/game/SpellEffects.cpp | |
parent | e01e7d7934dce58c246eb956bf513ef7e3f073c9 (diff) |
*Auto enter vehicle for summon vehicle spells.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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) |