Skip to content

Commit

Permalink
[10706] Implement talent 30326 for spell 5138.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
virusav authored and tomrus88 committed Nov 15, 2010
1 parent 40d0f17 commit 9f57cc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/game/SpellAuras.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion 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__

0 comments on commit 9f57cc2

Please sign in to comment.