Core/Spells: Trigger extra attacks on proper target
Ref #6892 Closes #11001
This commit is contained in:
1 parent
996ad78122
commit
47359a1ae2
4 files changed
+40
-6
No files matched your search
@@ -8499,6 +8499,10 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(trigger_spell_id))
|
||||
return false;
|
||||
|
||||
// extra attack should hit same target
|
||||
if (triggerEntry->HasEffect(SPELL_EFFECT_ADD_EXTRA_ATTACKS))
|
||||
target = victim;
|
||||
|
||||
// try detect target manually if not set
|
||||
if (target == NULL)
|
||||
target = !(procFlags & (PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS)) && triggerEntry && triggerEntry->IsPositive() ? this : victim;
|
||||
|
||||
Reference in new issue
Block a user