void Trigger(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* target = GetTarget(); if (dmgInfo.GetAttacker() == target) return; int32 bp = absorbAmount / 2; target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_REFLECTIVE_SHIELD_T, &bp, NULL, NULL, true, NULL, aurEff); }
void OnAbsorb(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* target = GetTarget(); if (dmgInfo.GetAttacker() == target) return; int32 bp = absorbAmount / 2; target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_REFLECTIVE_SHIELD_DAMAGE, &bp, nullptr, nullptr, true, nullptr, aurEff); }
void ReflectDamage(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount) { Unit* target = GetTarget(); if (dmgInfo.GetAttacker() == target) return; if (AuraEffect const* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_PRIEST_REFLECTIVE_SHIELD_R1, EFFECT_0)) { int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount()); target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff); } }
void Trigger(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* target = GetTarget(); if (dmgInfo.GetAttacker() == target) return; Unit* caster = GetCaster(); if (!caster) return; if (AuraEffect* talentAurEff = target->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 4880, EFFECT_0)) { int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount()); target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff); } }
void Trigger(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit * target = dmgInfo.GetAttacker(); if (!target) return; Unit * caster = GetCaster(); if (!caster) return; int32 bp = CalculatePct(absorbAmount, 25); target->CastCustomSpell(target, SPELL_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff); }
void ShieldScript::HandleOnEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* caster = GetCaster(); Unit* attacker = dmgInfo.GetAttacker(); if (!caster || !attacker) return; absorbAmount = dmgInfo.GetDamage(); // Deal the damage and show it on caster's log caster->DealDamage(attacker, (uint32)(absorbAmount*0.25f), NULL, dmgInfo.GetDamageType(), dmgInfo.GetSchoolMask()); caster->SendSpellNonMeleeDamageLog(attacker, GetSpellInfo()->Id, (uint32) (absorbAmount*0.25f), dmgInfo.GetSchoolMask(), 0, 0, true, 0); }