From aa91187e97d3bc44f0b26f4cb77b62b2d6f3a8bf Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 24 Apr 2011 10:22:58 +0200 Subject: Core/Spells: Cast proper vehicle spells on vehicle summon --- src/server/game/Miscellaneous/SharedDefines.h | 2 ++ src/server/game/Spells/SpellEffects.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 0d6f508ea4f..2fd47e2d781 100755 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -2700,6 +2700,8 @@ enum SummonCategory SUMMON_CATEGORY_PET = 2, SUMMON_CATEGORY_PUPPET = 3, SUMMON_CATEGORY_VEHICLE = 4, + SUMMON_CATEGORY_UNK = 5, // as of patch 3.3.5a only Bone Spike in Icecrown Citadel + // uses this category }; enum SummonType diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 809abab18f8..21d9a765c55 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3006,6 +3006,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) { case SUMMON_CATEGORY_WILD: case SUMMON_CATEGORY_ALLY: + case SUMMON_CATEGORY_UNK: if (properties->Flags & 512) { SummonGuardian(effIndex, entry, properties); @@ -3113,7 +3114,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) case SUMMON_CATEGORY_PUPPET: summon = m_caster->GetMap()->SummonCreature(entry, pos, properties, duration, m_originalCaster); break; - case SUMMON_CATEGORY_VEHICLE: + case SUMMON_CATEGORY_VEHICLE: // Summoning spells (usually triggered by npc_spellclick) that spawn a vehicle and that cause the clicker // to cast a ride vehicle spell on the summoned unit. float x, y, z; @@ -3123,10 +3124,10 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) return; // The spell that this effect will trigger. It has SPELL_AURA_CONTROL_VEHICLE - uint32 spell = m_spellInfo->EffectBasePoints[effIndex]; + uint32 spell = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, effIndex); if (spell) { - SpellEntry const *spellProto = sSpellStore.LookupEntry(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, effIndex)); + SpellEntry const *spellProto = sSpellStore.LookupEntry(spell); if (!spellProto) spell = VEHICLE_SPELL_RIDE_HARDCODED; } -- cgit v1.2.3