diff options
author | Kandera <KanderaDev@gmail.com> | 2012-09-17 12:08:26 -0400 |
---|---|---|
committer | Kandera <KanderaDev@gmail.com> | 2012-09-17 12:08:26 -0400 |
commit | 3f6428613242c7cc8a2877b67a199616ab94181a (patch) | |
tree | f5676ac8a23291b9bfcf595671435bc6d50eda45 /src | |
parent | d3dd3a2b83a7c201ac0e7a53e53f7db46c7a7945 (diff) |
Core/Spells: fix beacon of light proc thx (oMadMono)
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 7dc1afa9738..180ed98212e 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6653,24 +6653,33 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Light's Beacon - Beacon of Light if (dummySpell->Id == 53651) { - // Get target of beacon of light - if (Unit* beaconTarget = triggeredByAura->GetBase()->GetCaster()) + if (this->GetTypeId() != TYPEID_PLAYER) + return false; + // Check Party/Raid Group + if (Group *group = this->ToPlayer()->GetGroup()) { - // do not proc when target of beacon of light is healed - if (beaconTarget == this) - return false; - // check if it was heal by paladin which casted this beacon of light - if (beaconTarget->GetAura(53563, victim->GetGUID())) + for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { - if (beaconTarget->IsWithinLOSInMap(victim)) + 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())) { - basepoints0 = damage; - victim->CastCustomSpell(beaconTarget, 53654, &basepoints0, NULL, NULL, true); + 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); return true; } } } - return false; + else + return false; } // Judgements of the Wise if (dummySpell->SpellIconID == 3017) |