diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index a153dff5b4..5293adf0fc 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -57,6 +57,7 @@ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "CellImpl.h" +#include "Vehicle.h" pEffect SpellEffects[TOTAL_SPELL_EFFECTS] = { @@ -3963,8 +3964,16 @@ void Spell::EffectForceCast(SpellEffectEntry const* effect) int32 basePoints = damage; - // spell effect 141 has BasePoints greater than 1 - if (basePoints > 1) + // forced cast spells by vehicle on master always unboard the master + if (m_caster->IsVehicle() && m_caster->GetVehicleInfo()->HasOnBoard(unitTarget) && + effect->EffectImplicitTargetA == TARGET_MASTER) + { + if (sSpellStore.LookupEntry(basePoints)) + m_caster->RemoveAurasDueToSpell(basePoints); + } + + // spell effect 141 needs to be cast as custom with basePoints + if (effect->Effect == SPELL_EFFECT_FORCE_CAST_WITH_VALUE) unitTarget->CastCustomSpell(unitTarget, spellInfo, &basePoints, &basePoints, &basePoints, true, NULL , NULL, m_originalCasterGUID, m_spellInfo); else unitTarget->CastSpell(unitTarget, spellInfo, true, NULL, NULL, m_originalCasterGUID, m_spellInfo); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 687106ee75..261e191f4b 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12949" + #define REVISION_NR "12950" #endif // __REVISION_NR_H__