From 9f57cc29a09cf213cd0cd74e0337fb0e1e066ccd Mon Sep 17 00:00:00 2001 From: virusav Date: Tue, 9 Nov 2010 04:54:04 +0300 Subject: [PATCH] [10706] Implement talent 30326 for spell 5138. Signed-off-by: VladimirMangos --- src/game/SpellAuras.cpp | 10 +++++++--- src/shared/revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 5704ed9316c..1b35d772157 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6914,11 +6914,15 @@ void Aura::PeriodicTick() SpellPeriodicAuraLogInfo pInfo(this, drain_amount, 0, 0, 0, gain_multiplier); target->SendPeriodicAuraLog(&pInfo); - int32 gain_amount = int32(drain_amount * gain_multiplier); - - if(gain_amount) + if (int32 gain_amount = int32(drain_amount * gain_multiplier)) { int32 gain = pCaster->ModifyPower(power, gain_amount); + + if (GetId() == 5138) // Drain Mana + if (Aura* petPart = GetHolder()->GetAuraByEffectIndex(EFFECT_INDEX_1)) + if (int pet_gain = gain_amount * petPart->GetModifier()->m_amount / 100) + pCaster->CastCustomSpell(pCaster, 32554, &pet_gain, NULL, NULL, true); + target->AddThreat(pCaster, float(gain) * 0.5f, pInfo.critical, GetSpellSchoolMask(spellProto), spellProto); } break; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 454908ea31c..b151c7977c6 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10705" + #define REVISION_NR "10706" #endif // __REVISION_NR_H__