Note: Threat system is still thread-unsafe. This patch only reduces the chance of crash.
This commit is contained in:
1 parent
3d4f9a0d1c
commit
8aead2a1ee
1 file changed
+4
@@ -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