mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-12-06 02:30:26 -08:00
fix(Core/Spells): MC should work on mounted targets (#23905)
This commit is contained in:
parent
dfe44b7e86
commit
4d16a5ccee
3 changed files with 8 additions and 3 deletions
BIN
src.zip
Normal file
BIN
src.zip
Normal file
Binary file not shown.
|
|
@ -18388,7 +18388,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
|
|||
}
|
||||
|
||||
// dismount players when charmed
|
||||
if (IsPlayer())
|
||||
if (IsPlayer() && type != CHARM_TYPE_POSSESS)
|
||||
RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||
|
||||
if (charmer->IsPlayer())
|
||||
|
|
|
|||
|
|
@ -6609,8 +6609,13 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
if (target->IsCreature() && target->ToCreature()->IsVehicle())
|
||||
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
|
||||
|
||||
// Allow SPELL_AURA_MOD_POSSESS to work on mounted players,
|
||||
// but keep the old restriction for everything else.
|
||||
if (target->IsMounted())
|
||||
return SPELL_FAILED_CANT_BE_CHARMED;
|
||||
{
|
||||
if (!(target->IsPlayer() && m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_POSSESS))
|
||||
return SPELL_FAILED_CANT_BE_CHARMED;
|
||||
}
|
||||
|
||||
if (target->GetCharmerGUID())
|
||||
return SPELL_FAILED_CHARMED;
|
||||
|
|
@ -7905,7 +7910,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
|
|||
case SPELL_AURA_AOE_CHARM:
|
||||
if (target->IsCreature() && target->IsVehicle())
|
||||
return false;
|
||||
if (target->IsMounted())
|
||||
if (target->IsMounted() && m_spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_MOD_POSSESS)
|
||||
return false;
|
||||
if (target->GetCharmerGUID())
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue