*Allow dest target spells to proc spellcast.
*Allow source target spells to be triggered during spellproc if no unit target avalible. --HG-- branch : trunk
This commit is contained in:
+5
-5
@@ -4829,7 +4829,7 @@ bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
}
|
||||
|
||||
// default case
|
||||
if(!target || target!=this && !target->isAlive())
|
||||
if((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -6944,7 +6944,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
}
|
||||
|
||||
// default case
|
||||
if(!target || target!=this && !target->isAlive())
|
||||
if((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -7002,7 +7002,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit *pVictim, uint32 damage, AuraEffect*
|
||||
}
|
||||
|
||||
// default case
|
||||
if(!target || target!=this && !target->isAlive())
|
||||
if((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -7059,7 +7059,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 damage, AuraEff
|
||||
}
|
||||
|
||||
// default case
|
||||
if(!target || target!=this && !target->isAlive())
|
||||
if((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -7870,7 +7870,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
target = !(procFlags & (PROC_FLAG_SUCCESSFUL_POSITIVE_MAGIC_SPELL | PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL_HIT)) && IsPositiveSpell(trigger_spell_id) ? this : pVictim;
|
||||
|
||||
// default case
|
||||
if(!target || target!=this && !target->isAlive())
|
||||
if((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if(basepoints0)
|
||||
|
||||
Reference in New Issue
Block a user