Core/Combat: Improve sanctuary combat stop (#24266)

Stop combat when a Player moves to a Sanctuary area only if there is any PvP combat (it would be nice to keep PvE combat but that's still an issue)
This commit is contained in:
Giacomo Pozzoni
2020-03-07 18:08:30 +01:00
committed by GitHub
parent 41d80f2d43
commit c7974bdf90

View File

@@ -7027,7 +7027,7 @@ void Player::UpdateArea(uint32 newArea)
{
SetByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PVP_FLAG, UNIT_BYTE2_FLAG_SANCTUARY);
pvpInfo.IsInNoPvPArea = true;
if (!duel)
if (!duel && GetCombatManager().HasPvPCombat())
CombatStopWithPets();
}
else