diff options
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index dc1c1f78b12..727a6194bb1 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3129,7 +3129,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) { float x, y, z; m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE); - summon = m_caster->GetMap()->SummonCreature(entry, pos, properties, duration, m_caster); + summon = m_originalCaster->GetMap()->SummonCreature(entry, pos, properties, duration, m_caster); if (!summon || !summon->IsVehicle()) return; @@ -3137,10 +3137,21 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) { SpellEntry const *spellProto = sSpellStore.LookupEntry(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, effIndex)); if (spellProto) - m_caster->CastSpell(summon, spellProto, true); + { + m_originalCaster->CastSpell(summon, spellProto, true); + return; + } } - m_caster->EnterVehicle(summon->GetVehicleKit()); + // Hard coded enter vehicle spell + m_originalCaster->CastSpell(summon, 46598, true); + + summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id); + uint32 faction = properties->Faction; + if (!faction) + faction = m_originalCaster->getFaction(); + + summon->setFaction(faction); break; } } |