diff options
author | Jinnaix <37972361+Jinnaix@users.noreply.github.com> | 2022-06-09 11:33:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 11:33:30 +0200 |
commit | b155209ec40f867fc90d64eb207f3d3e7f633c2b (patch) | |
tree | 00629dcba9d1bec222090cd62e50138b141101d8 | |
parent | 222a0ba8ee68c83c8063f1b5eb4287a2c3a515cd (diff) |
Core/Spells: Correct flagging spell caster for pvp when healing/buffing friendly creatures - it should only happen if target is in combat (#27977)
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 1c0042b06dc..d475620a4c9 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2322,7 +2322,8 @@ void Spell::TargetInfo::PreprocessTarget(Spell* spell) if (_spellHitTarget) { // if target is flagged for pvp also flag caster if a player - if (unit->IsPvP() && spell->m_caster->GetTypeId() == TYPEID_PLAYER) + // but respect current pvp rules (buffing/healing npcs flagged for pvp only flags you if they are in combat) + if (unit->IsPvP() && (unit->IsInCombat() || unit->IsCharmedOwnedByPlayerOrPlayer()) && spell->m_caster->GetTypeId() == TYPEID_PLAYER) _enablePVP = true; // Decide on PvP flagging now, but act on it later. SpellMissInfo missInfo = spell->PreprocessSpellHit(_spellHitTarget, ScaleAura, *this); |