Core/Spells: Fix a regression of 7f30ac5a95 - spells with TARGET_SELECT_CATEGORY_CHANNEL target type (like mind sear) should be triggered by triggering spell caster

This commit is contained in:
QAston
2011-08-26 12:39:50 +02:00
parent 5c48d9ec8a
commit 8e392440cf
6 changed files with 33 additions and 16 deletions
+5 -5
View File
@@ -4981,7 +4981,7 @@ bool Unit::HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
// default case
if ((!target && triggerEntry->IsRequiringSelectedTarget()) || (target && target != this && !target->isAlive()))
if ((!target && triggerEntry->NeedsExplicitUnitTarget()) || (target && target != this && !target->isAlive()))
return false;
if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(triggered_spell_id))
@@ -7770,7 +7770,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
// default case
if ((!target && triggerEntry->IsRequiringSelectedTarget()) || (target && target != this && !target->isAlive()))
if ((!target && triggerEntry->NeedsExplicitUnitTarget()) || (target && target != this && !target->isAlive()))
return false;
if (cooldown_spell_id == 0)
@@ -7832,7 +7832,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit* victim, uint32 /*damage*/, AuraEffec
}
// default case
if ((!target && triggerEntry->IsRequiringSelectedTarget()) || (target && target != this && !target->isAlive()))
if ((!target && triggerEntry->NeedsExplicitUnitTarget()) || (target && target != this && !target->isAlive()))
return false;
if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(triggered_spell_id))
@@ -7889,7 +7889,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit* victim, uint32 /*damage*/, Aura
}
// default case
if ((!target && triggerEntry->IsRequiringSelectedTarget()) || (target && target != this && !target->isAlive()))
if ((!target && triggerEntry->NeedsExplicitUnitTarget()) || (target && target != this && !target->isAlive()))
return false;
if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(triggered_spell_id))
@@ -9079,7 +9079,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
target = !(procFlags & (PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS)) && triggerEntry && triggerEntry->IsPositive() ? this : victim;
// default case
if ((!target && triggerEntry->IsRequiringSelectedTarget()) || (target && target != this && !target->isAlive()))
if ((!target && triggerEntry->NeedsExplicitUnitTarget()) || (target && target != this && !target->isAlive()))
return false;
if (basepoints0)