Core/Spells: Correct flagging spell caster for pvp when healing/buffing friendly creatures - it should only happen if target is in combat
This commit is contained in:
1 parent
16aef47f61
commit
458b841691
1 file changed
+2
-1
@@ -2447,7 +2447,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