Core/Spells: Corrected logic checking vehicle summon spells, thx codels

This commit is contained in:
Shauren
2011-04-25 14:39:37 +02:00
parent ba5bd01ade
commit 5f2dcc1172
+3 -7
View File
@@ -3124,13 +3124,9 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
return; return;
// The spell that this effect will trigger. It has SPELL_AURA_CONTROL_VEHICLE // The spell that this effect will trigger. It has SPELL_AURA_CONTROL_VEHICLE
uint32 spell = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, effIndex); uint32 spell = VEHICLE_SPELL_RIDE_HARDCODED;
if (spell) if (SpellEntry const* spellProto = sSpellStore.LookupEntry(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, effIndex)))
{ spell = spellProto->Id;
SpellEntry const *spellProto = sSpellStore.LookupEntry(spell);
if (!spellProto)
spell = VEHICLE_SPELL_RIDE_HARDCODED;
}
// Hard coded enter vehicle spell // Hard coded enter vehicle spell
m_originalCaster->CastSpell(summon, spell, true); m_originalCaster->CastSpell(summon, spell, true);