fix(Core/Unit): Only allow Judgement of Light/Wisdom to proc for targets friendly to caster. (#20374)
Init.
This commit is contained in:
@@ -7770,9 +7770,9 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||||||
// Judgement of Light
|
// Judgement of Light
|
||||||
case 20185:
|
case 20185:
|
||||||
{
|
{
|
||||||
if (!victim || !victim->IsAlive() || victim->HasSpellCooldown(20267))
|
if (!victim || !victim->IsAlive() || victim->HasSpellCooldown(20267) || !victim->IsFriendlyTo(triggeredByAura->GetBase()->GetCaster()))
|
||||||
return false;
|
return false;
|
||||||
// 2% of base mana
|
// 2% of base health
|
||||||
basepoints0 = int32(victim->CountPctFromMaxHealth(2));
|
basepoints0 = int32(victim->CountPctFromMaxHealth(2));
|
||||||
victim->CastCustomSpell(victim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
|
victim->CastCustomSpell(victim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
|
||||||
victim->AddSpellCooldown(20267, 0, 4 * IN_MILLISECONDS);
|
victim->AddSpellCooldown(20267, 0, 4 * IN_MILLISECONDS);
|
||||||
@@ -7781,7 +7781,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||||||
// Judgement of Wisdom
|
// Judgement of Wisdom
|
||||||
case 20186:
|
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;
|
return false;
|
||||||
|
|
||||||
// 2% of base mana
|
// 2% of base mana
|
||||||
|
|||||||
Reference in New Issue
Block a user