mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user