fix(Core/Unit): Only allow Judgement of Light/Wisdom to proc for targets friendly to caster. (#20374)
Init.
This commit is contained in:
parent
009dd9fda1
commit
3c6273a9dd
1 changed files with 3 additions and 3 deletions
|
|
@ -7770,9 +7770,9 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||
// Judgement of Light
|
||||
case 20185:
|
||||
{
|
||||
if (!victim || !victim->IsAlive() || victim->HasSpellCooldown(20267))
|
||||
if (!victim || !victim->IsAlive() || victim->HasSpellCooldown(20267) || !victim->IsFriendlyTo(triggeredByAura->GetBase()->GetCaster()))
|
||||
return false;
|
||||
// 2% of base mana
|
||||
// 2% of base health
|
||||
basepoints0 = int32(victim->CountPctFromMaxHealth(2));
|
||||
victim->CastCustomSpell(victim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
|
||||
victim->AddSpellCooldown(20267, 0, 4 * IN_MILLISECONDS);
|
||||
|
|
@ -7781,7 +7781,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||
// Judgement of Wisdom
|
||||
case 20186:
|
||||
{
|
||||
if (!victim || !victim->IsAlive() || !victim->HasActivePowerType(POWER_MANA) || victim->HasSpellCooldown(20268))
|
||||
if (!victim || !victim->IsAlive() || !victim->HasActivePowerType(POWER_MANA) || victim->HasSpellCooldown(20268) || !victim->IsFriendlyTo(triggeredByAura->GetBase()->GetCaster()))
|
||||
return false;
|
||||
|
||||
// 2% of base mana
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue