mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -7772,7 +7772,12 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
{
|
||||
if (!victim || !victim->IsAlive() || victim->HasSpellCooldown(20267))
|
||||
return false;
|
||||
// 2% of base mana
|
||||
|
||||
auto* caster = triggeredByAura->GetBase()->GetCaster();
|
||||
if (!caster || !victim->IsFriendlyTo(caster))
|
||||
return false;
|
||||
|
||||
// 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);
|
||||
@@ -7784,6 +7789,10 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (!victim || !victim->IsAlive() || !victim->HasActivePowerType(POWER_MANA) || victim->HasSpellCooldown(20268))
|
||||
return false;
|
||||
|
||||
auto* caster = triggeredByAura->GetBase()->GetCaster();
|
||||
if (!caster || !victim->IsFriendlyTo(caster))
|
||||
return false;
|
||||
|
||||
// 2% of base mana
|
||||
basepoints0 = int32(CalculatePct(victim->GetCreateMana(), 2));
|
||||
victim->CastCustomSpell(victim, 20268, &basepoints0, nullptr, nullptr, true, 0, triggeredByAura);
|
||||
|
||||
Reference in New Issue
Block a user