mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-17 21:39:52 -04:00
First part of petAI logic cleanup : Hunter PetAI change: Ignore attacking CC'ed targets unless explicitly asked for by player
(thanks to QAston, Shauren, Liberate for the discussions and codehelp to sort this out properly) --HG-- branch : trunk
This commit is contained in:
@@ -4625,13 +4625,13 @@ bool Unit::HasAuraTypeWithValue(AuraType auratype, int32 value) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Unit::HasNegativeAuraWithInterruptFlag(uint32 flag)
|
||||
bool Unit::HasNegativeAuraWithInterruptFlag(uint32 flag, uint64 guid)
|
||||
{
|
||||
if (!(m_interruptMask & flag))
|
||||
return false;
|
||||
for (AuraApplicationList::iterator iter = m_interruptableAuras.begin(); iter != m_interruptableAuras.end(); ++iter)
|
||||
{
|
||||
if (!(*iter)->IsPositive() && (*iter)->GetBase()->GetSpellProto()->AuraInterruptFlags & flag)
|
||||
if (!(*iter)->IsPositive() && (*iter)->GetBase()->GetSpellProto()->AuraInterruptFlags & flag && (!guid || (*iter)->GetBase()->GetCasterGUID() == guid))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user