mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Spells: More research on SPELL_ATTR6_ONLY_CAST_WHILE_POSSESSED and implement new research (original caster should be charmer or owner) and implement QAston's earlier research (only castable while possessed).
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user