Core/Spells: ported some edge case fixes for taunts
This commit is contained in:
1 parent
1b46c95a9c
commit
ddbe5d9dd2
2 files changed
+19
-5
No files matched your search
@@ -2604,9 +2604,23 @@ void Spell::EffectTaunt(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!m_caster)
|
||||
return;
|
||||
|
||||
// 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 || !unitTarget->CanHaveThreatList())
|
||||
if (!unitTarget || unitTarget->IsTotem())
|
||||
{
|
||||
SendCastResult(SPELL_FAILED_DONT_REPORT);
|
||||
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->GetTypeId() != TYPEID_PLAYER && unitTarget->GetTarget() != m_caster->GetGUID())
|
||||
unitCaster->CastSpell(unitTarget, 67485, true);
|
||||
|
||||
if (!unitTarget->CanHaveThreatList())
|
||||
{
|
||||
SendCastResult(SPELL_FAILED_DONT_REPORT);
|
||||
return;
|
||||
@@ -2619,10 +2633,6 @@ void Spell::EffectTaunt(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
}
|
||||
|
||||
// Hand of Reckoning
|
||||
if (m_spellInfo->Id == 62124)
|
||||
m_caster->CastSpell(unitTarget, 67485, true);
|
||||
|
||||
if (!mgr.IsThreatListEmpty())
|
||||
// Set threat equal to highest threat currently on target
|
||||
mgr.MatchUnitThreatToHighestThreat(m_caster);
|
||||
|
||||
Reference in new issue
Block a user