mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Correct flagging spell caster for pvp when healing/buffing friendly creatures - it should only happen if target is in combat (#27977)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user