mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Note: Threat system is still thread-unsafe. This patch only reduces the chance of crash.
This commit is contained in:
@@ -74,6 +74,10 @@ bool ThreatCalcHelper::isValidProcess(Unit* hatedUnit, Unit* hatingUnit, SpellIn
|
||||
if (!hatedUnit->isAlive() || !hatingUnit->isAlive())
|
||||
return false;
|
||||
|
||||
// not in same map or phase
|
||||
if (!hatedUnit->IsInMap(hatingUnit))
|
||||
return false;
|
||||
|
||||
// spell not causing threat
|
||||
if (threatSpell && threatSpell->AttributesEx & SPELL_ATTR1_NO_THREAT)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user