mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
refactor(Core): Clean-up after FD (#8586)
This commit is contained in:
@@ -318,7 +318,7 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR
|
||||
if (currentVictim)
|
||||
{
|
||||
Unit* cvUnit = currentVictim->getTarget();
|
||||
if (!attacker->_CanDetectFeignDeathOf(cvUnit) || !attacker->CanCreatureAttack(cvUnit)) // pussywizard: if currentVictim is not valid => don't compare the threat with it, just take the highest threat valid target
|
||||
if (!attacker->CanCreatureAttack(cvUnit)) // pussywizard: if currentVictim is not valid => don't compare the threat with it, just take the highest threat valid target
|
||||
currentVictim = nullptr;
|
||||
else if (cvUnit->IsImmunedToDamageOrSchool(attacker->GetMeleeDamageSchoolMask()) || cvUnit->HasNegativeAuraWithInterruptFlag(AURA_INTERRUPT_FLAG_TAKE_DAMAGE)) // pussywizard: no 10%/30% if currentVictim is immune to damage or has auras breakable by damage
|
||||
currentVictim = nullptr;
|
||||
@@ -353,7 +353,7 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR
|
||||
}
|
||||
|
||||
// pussywizard: skip not valid targets
|
||||
if (attacker->_CanDetectFeignDeathOf(target) && attacker->CanCreatureAttack(target))
|
||||
if (attacker->CanCreatureAttack(target))
|
||||
{
|
||||
if (currentVictim) // pussywizard: if not nullptr then target must have 10%/30% more threat
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user