diff options
| author | xinef1 <w.szyszko2@gmail.com> | 2017-02-05 22:24:23 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-02-05 22:24:23 +0100 |
| commit | 227d5a9288db1200720444226320914ebcc8a216 (patch) | |
| tree | debe3ff16c93a51cb2228735e175b5f2d1d999fc /src | |
| parent | 169e150628913a84d44cac2cc4a70976de0a025a (diff) | |
Core/Spells: Corrected summon category SUMMON_CATEGORY_VEHICLE (#19052)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 356d8115bb9..c4592477529 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2308,12 +2308,19 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) // The spell that this effect will trigger. It has SPELL_AURA_CONTROL_VEHICLE uint32 spellId = VEHICLE_SPELL_RIDE_HARDCODED; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spellInfo->Effects[effIndex].CalcValue()); - if (spellInfo && spellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE)) - spellId = spellInfo->Id; + int32 basePoints = m_spellInfo->Effects[effIndex].CalcValue(); + if (basePoints > MAX_VEHICLE_SEATS) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(basePoints); + if (spellInfo && spellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE)) + spellId = spellInfo->Id; + } - // Hard coded enter vehicle spell - m_originalCaster->CastSpell(summon, spellId, true); + // if we have small value, it indicates seat position + if (basePoints > 0 && basePoints < MAX_VEHICLE_SEATS) + m_originalCaster->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, basePoints, summon, true); + else + m_originalCaster->CastSpell(summon, spellId, true); uint32 faction = properties->Faction; if (!faction) |
