Properly stop attacking after player leaves ffa area (like Gurubashi Arena)

Port From (https://github.com/TrinityCore/TrinityCore/commit/4380fe2751869e7a011d51ee9449e8723b00067f)
This commit is contained in:
hondacrx
2019-08-30 18:05:45 -04:00
parent 7f03373c93
commit 8797760d8a
2 changed files with 23 additions and 0 deletions
@@ -110,9 +110,14 @@ namespace Game.Entities
m_areaUpdateId = newArea;
AreaTableRecord area = CliDB.AreaTableStorage.LookupByKey(newArea);
bool oldFFAPvPArea = pvpInfo.IsInFFAPvPArea;
pvpInfo.IsInFFAPvPArea = area != null && area.Flags[0].HasAnyFlag(AreaFlags.Arena);
UpdatePvPState(true);
// check if we were in ffa arena and we left
if (oldFFAPvPArea && !pvpInfo.IsInFFAPvPArea)
ValidateAttackersAndOwnTarget();
PhasingHandler.OnAreaChange(this);
UpdateAreaDependentAuras(newArea);