mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
*Do not allow creature to enterevademode when it is on vehicle.
*Do not allow unit to attack its vehicle. --HG-- branch : trunk
This commit is contained in:
@@ -10524,6 +10524,9 @@ bool Unit::canAttack(Unit const* target, bool force) const
|
||||
if(target->GetVisibility() == VISIBILITY_GROUP_STEALTH && !canDetectStealthOf(target, GetDistance(target)))
|
||||
return false;
|
||||
|
||||
if(target == m_Vehicle)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11247,6 +11250,9 @@ Unit* Creature::SelectVictim()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(m_Vehicle)
|
||||
return NULL;
|
||||
|
||||
// search nearby enemy before enter evade mode
|
||||
if(HasReactState(REACT_AGGRESSIVE))
|
||||
if(target = SelectNearestTarget())
|
||||
|
||||
Reference in New Issue
Block a user