[6987] Implemented aura dependent creature target prioritization more correctly

This commit is contained in:
arrai 2008-12-30 19:16:08 +01:00
parent 2b7004a0ab
commit 9a411858d0
4 changed files with 13 additions and 2 deletions

View file

@ -10279,6 +10279,16 @@ Unit* Unit::SelectNearbyTarget() const
return *tcIter;
}
bool Unit::hasNegativeAuraWithInterruptFlag(uint32 flag)
{
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); ++iter)
{
if (!iter->second->IsPositive() && iter->second->GetSpellProto()->AuraInterruptFlags & flag)
return true;
}
return false;
}
void Unit::ApplyAttackTimePercentMod( WeaponAttackType att,float val, bool apply )
{
if(val > 0)