From 5e95be0c33d25bb9832d20e724f7c7279d1e82ca Mon Sep 17 00:00:00 2001 From: silinoron Date: Sun, 5 Sep 2010 14:59:46 -0700 Subject: Fix Glyph of Totem of Wrath. Fixes issue #3743 Patch by dr.tenma. --HG-- branch : trunk --- src/server/game/Entities/Unit/Unit.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index b947aca725e..40b405ccacb 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7416,6 +7416,38 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger } return false; } + case 63280: // Glyph of Totem of Wrath + { + if (procSpell->SpellIconID != 2019) + return false; + + AuraEffect * aurEffA = NULL; + AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_DONE); + for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i) + { + SpellEntry const *spell = (*i)->GetSpellProto(); + if (spell->SpellFamilyName == uint32(SPELLFAMILY_SHAMAN) && spell->SpellFamilyFlags.HasFlag(0, 0x02000000, 0)) + { + if ((*i)->GetCasterGUID() != GetGUID()) + continue; + if (spell->Id == 63283) + continue; + aurEffA = (*i); + break; + } + } + if (aurEffA) + { + int32 bp0 = 0, bp1 = 0; + bp0 = aurEffA->GetAmount() * triggerAmount / 100; + if (AuraEffect * aurEffB = aurEffA->GetBase()->GetEffect(EFFECT_1)) + bp1 = aurEffB->GetAmount() * triggerAmount / 100; + CastCustomSpell(this, 63283, &bp0, &bp1, NULL, true, NULL, triggeredByAura); + return true; + } + return false; + } + break; } // Frozen Power if (dummySpell->SpellIconID == 3780) -- cgit v1.2.3