diff options
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 17 | 
2 files changed, 16 insertions, 5 deletions
| diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index dcaa1fd2b2c..e7439700fc1 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2280,6 +2280,10 @@ void Spell::TargetInfo::PreprocessTarget(Spell* spell)      else if (MissCondition == SPELL_MISS_REFLECT && ReflectResult == SPELL_MISS_NONE)          _spellHitTarget = spell->m_caster->ToUnit(); +    // Ensure that a player target is put in combat by a taunt, even if they result immune clientside +    if ((MissCondition == SPELL_MISS_IMMUNE || MissCondition == SPELL_MISS_IMMUNE2) && spell->m_caster->GetTypeId() == TYPEID_PLAYER && unit->GetTypeId() == TYPEID_PLAYER && spell->m_caster->IsValidAttackTarget(unit, spell->GetSpellInfo())) +        unit->SetInCombatWith(spell->m_caster->ToPlayer()); +      _enablePVP = false; // need to check PvP state before spell effects, but act on it afterwards      if (_spellHitTarget)      { diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index f0f95b22e44..3f01f2bea65 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3069,7 +3069,18 @@ void Spell::EffectTaunt(SpellEffIndex /*effIndex*/)      // 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() != unitCaster->GetGUID()) +            unitCaster->CastSpell(unitTarget, 67485, true); + +    if (!unitTarget->CanHaveThreatList())      {          SendCastResult(SPELL_FAILED_DONT_REPORT);          return; @@ -3082,10 +3093,6 @@ void Spell::EffectTaunt(SpellEffIndex /*effIndex*/)          return;      } -    // Hand of Reckoning -    if (m_spellInfo->Id == 62124) -        unitCaster->CastSpell(unitTarget, 67485, true); -      if (!mgr.IsThreatListEmpty())          // Set threat equal to highest threat currently on target          mgr.MatchUnitThreatToHighestThreat(unitCaster); | 
