Skip to content

Commit

Permalink
Core/Combat: Allow refresh pvp combat when assisting a unit that is i…
Browse files Browse the repository at this point in the history
…n pvp combat (#26773)
  • Loading branch information
Jildor committed Aug 8, 2021
1 parent 39a1fd4 commit 372c843
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/server/game/Combat/CombatManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,11 @@ void CombatManager::InheritCombatStatesFrom(Unit const* who)
}
for (auto& ref : mgr._pvpRefs)
{
if (!IsInCombatWith(ref.first))
{
Unit* target = ref.second->GetOther(who);
if ((_owner->IsImmuneToPC() && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) ||
(_owner->IsImmuneToNPC() && !target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)))
continue;
SetInCombatWith(target);
}
Unit* target = ref.second->GetOther(who);
if ((_owner->IsImmuneToPC() && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) ||
(_owner->IsImmuneToNPC() && !target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)))
continue;
SetInCombatWith(target);
}
}

Expand Down

0 comments on commit 372c843

Please sign in to comment.