[10706] Implement talent 30326 for spell 5138.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
virusav 2010-11-09 04:54:04 +03:00 committed by VladimirMangos
parent b825c33cdf
commit 262b3ce1ff
2 changed files with 8 additions and 4 deletions

View file

@ -6876,11 +6876,15 @@ void Aura::PeriodicTick()
SpellPeriodicAuraLogInfo pInfo(this, drain_amount, 0, 0, 0, gain_multiplier); SpellPeriodicAuraLogInfo pInfo(this, drain_amount, 0, 0, 0, gain_multiplier);
target->SendPeriodicAuraLog(&pInfo); target->SendPeriodicAuraLog(&pInfo);
int32 gain_amount = int32(drain_amount * gain_multiplier); if (int32 gain_amount = int32(drain_amount * gain_multiplier))
if(gain_amount)
{ {
int32 gain = pCaster->ModifyPower(power, gain_amount); 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); target->AddThreat(pCaster, float(gain) * 0.5f, pInfo.critical, GetSpellSchoolMask(spellProto), spellProto);
} }
break; break;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10705" #define REVISION_NR "10706"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__