aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 36244257d28..5b8e23697df 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5062,27 +5062,18 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
m_caster->ToPlayer()->learnSpell(discoveredSpell, false);
return;
}
- case 62428: // Load into Catapult
- {
- if (Vehicle* seat = m_caster->GetVehicleKit())
- if (Unit* passenger = seat->GetPassenger(0))
- if (Unit* demolisher = m_caster->GetVehicleBase())
- passenger->CastSpell(demolisher, damage, true);
- return;
- }
case 62482: // Grab Crate
{
if (unitTarget)
{
- if (Vehicle* seat = m_caster->GetVehicleKit())
+ if (Unit* seat = m_caster->GetVehicleBase())
{
- if (Unit* passenger = seat->GetPassenger(1))
- if (Creature* oldContainer = passenger->ToCreature())
- oldContainer->DisappearAndDie();
-
- // TODO: a hack, range = 11, should after some time cast, otherwise too far
- m_caster->CastSpell(seat->GetBase(), 62496, true);
- unitTarget->EnterVehicle(m_caster, 1);
+ if (Unit* parent = seat->GetVehicleBase())
+ {
+ // TODO: a hack, range = 11, should after some time cast, otherwise too far
+ m_caster->CastSpell(parent, 62496, true);
+ unitTarget->CastSpell(parent, m_spellInfo->Effects[EFFECT_0].CalcValue());
+ }
}
}
return;