diff options
| author | Nay <dnpd.dd@gmail.com> | 2012-09-25 19:58:18 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2012-09-25 19:58:18 +0100 |
| commit | 424ac73766da612cbae8c55d47f1cd5a667f18d5 (patch) | |
| tree | 7765f0b65180a0f03bcd29c2f3cf0ceee85f8e34 /src | |
| parent | 15c05ed771331f35c3c32dd692586e599e8f430e (diff) | |
Core/Spells: Properly (hopefully) merge 335's Beacon of Light + 434 changes (also fixes build)
Closes #7871
Closes #7872
Diffstat (limited to 'src')
| -rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index b9c08296840..8e13c24c64f 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6359,42 +6359,41 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere { for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player* Member = itr->getSource(); + Player* Member = itr->getSource(); - // check if it was heal by paladin which casted this beacon of light - if (Aura const * aura = Member->GetAura(53563, victim->GetGUID())) - { - Unit* beaconTarget = Member; - - // do not proc when target of beacon of light is healed - if (beaconTarget == this) - return false; - - basepoints0 = int32(damage); - triggered_spell_id = 53652; - victim->CastCustomSpell(beaconTarget, triggered_spell_id, &basepoints0, NULL, NULL, true, 0, triggeredByAura); - int32 percent = 0; - switch (procSpell->Id) + // check if it was heal by paladin which casted this beacon of light + if (Aura const * aura = Member->GetAura(53563, victim->GetGUID())) { - case 85673: // Word of Glory - case 20473: // Holy Shock - case 19750: // Flash of Light - case 82326: // Divine Light - case 85222: // Light of Dawn - percent = triggerAmount; // 50% heal from these spells - break; - case 635: // Holy Light - percent = triggerAmount * 2; // 100% heal from Holy Light - break; + // do not proc when target of beacon of light is healed + if (Member == this) + return false; + + beaconTarget = Member; + basepoints0 = int32(damage); + triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(365)) ? 53652 : 53654; + break; } - basepoints0 = CalculatePctN(damage, percent); - victim->CastCustomSpell(beaconTarget, 53652, &basepoints0, NULL, NULL, true); } } } if (triggered_spell_id && beaconTarget) { + int32 percent = 0; + switch (procSpell->Id) + { + case 85673: // Word of Glory + case 20473: // Holy Shock + case 19750: // Flash of Light + case 82326: // Divine Light + case 85222: // Light of Dawn + percent = triggerAmount; // 50% heal from these spells + break; + case 635: // Holy Light + percent = triggerAmount * 2; // 100% heal from Holy Light + break; + } + basepoints0 = CalculatePctN(damage, percent); victim->CastCustomSpell(beaconTarget, triggered_spell_id, &basepoints0, NULL, NULL, true, 0, triggeredByAura); return true; } |
