Core/Spell: fix some issues with taunt spells
Port From (https://github.com/TrinityCore/TrinityCore/commit/575f42089e2014c3df64f0468ed25c45a544f6d8)
This commit is contained in:
@@ -7790,6 +7790,10 @@ namespace Game.Spells
|
||||
else if (MissCondition == SpellMissInfo.Reflect && ReflectResult == SpellMissInfo.None)
|
||||
_spellHitTarget = spell.GetCaster().ToUnit();
|
||||
|
||||
// Ensure that a player target is put in combat by a taunt, even if they result immune clientside
|
||||
if ((MissCondition == SpellMissInfo.Immune || MissCondition == SpellMissInfo.Immune2) && spell.GetCaster().IsPlayer() && unit.IsPlayer() && spell.GetCaster().IsValidAttackTarget(unit, spell.GetSpellInfo()))
|
||||
unit.SetInCombatWith(spell.GetCaster().ToPlayer());
|
||||
|
||||
_enablePVP = false; // need to check PvP state before spell effects, but act on it afterwards
|
||||
if (_spellHitTarget)
|
||||
{
|
||||
|
||||
@@ -2473,7 +2473,18 @@ namespace Game.Spells
|
||||
|
||||
// this effect use before aura Taunt apply for prevent taunt already attacking target
|
||||
// for spell as marked "non effective at already attacking target"
|
||||
if (unitTarget == null || !unitTarget.CanHaveThreatList())
|
||||
if (!unitTarget || unitTarget.IsTotem())
|
||||
{
|
||||
SendCastResult(SpellCastResult.DontReport);
|
||||
return;
|
||||
}
|
||||
|
||||
// Hand of Reckoning can hit some entities that can't have a threat list (including players' pets)
|
||||
if (m_spellInfo.Id == 62124)
|
||||
if (!unitTarget.IsPlayer() && unitTarget.GetTarget() != unitCaster.GetGUID())
|
||||
unitCaster.CastSpell(unitTarget, 67485, true);
|
||||
|
||||
if (!unitTarget.CanHaveThreatList())
|
||||
{
|
||||
SendCastResult(SpellCastResult.DontReport);
|
||||
return;
|
||||
@@ -2967,7 +2978,6 @@ namespace Game.Spells
|
||||
}
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user