diff options
| author | Wyrserth <wyrserth@protonmail.com> | 2019-06-27 22:08:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-27 22:08:39 +0200 |
| commit | 5dc2dfd60c4ecd243729e86496d926976e383156 (patch) | |
| tree | 0e930831ede2354c4f98b899698475656cecba2a /src/server/game/Spells/Spell.cpp | |
| parent | cf223370f3345a7cfa39f8bfb23835391603f985 (diff) | |
Core/Spell: fix some issues with taunt spells (#23425)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 4 |
1 files changed, 4 insertions, 0 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) { |
