*Fix the bug that Elemental Invisibility causes the creatures to constantly evade. Thanks to XTElite1 and simon
--HG-- branch : trunk
This commit is contained in:
+3
-1
@@ -10597,7 +10597,9 @@ bool Unit::canAttack(Unit const* target, bool force) const
|
||||
if(!target->isAttackableByAOE() || target->hasUnitState(UNIT_STAT_DIED))
|
||||
return false;
|
||||
|
||||
if((m_invisibilityMask || target->m_invisibilityMask) && !canDetectInvisibilityOf(target))
|
||||
// shaman totem quests: spell 8898, shaman can detect elementals but elementals cannot see shaman
|
||||
if(m_invisibilityMask || target->m_invisibilityMask)
|
||||
if(!canDetectInvisibilityOf(target) && !target->canDetectInvisibilityOf(target))
|
||||
return false;
|
||||
|
||||
if(target->GetVisibility() == VISIBILITY_GROUP_STEALTH && !canDetectStealthOf(target, GetDistance(target)))
|
||||
|
||||
Reference in New Issue
Block a user