[8925] Implement 34297 and rank in part health/mana effects.

Original patch from unknown author.
Used version provided by nanounico & KAPATEJIb

Rewrited in more proper way.
This commit is contained in:
VladimirMangos 2009-12-06 08:21:25 +03:00
parent fef94f9b36
commit 8c1ea4f444
2 changed files with 30 additions and 10 deletions

View file

@ -5680,6 +5680,34 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{ {
switch(dummySpell->Id) switch(dummySpell->Id)
{ {
// Leader of the Pack
case 24932:
{
// dummy m_amount store health percent (!=0 if Improved Leader of the Pack applied)
int32 heal_percent = triggeredByAura->GetModifier()->m_amount;
if (!heal_percent)
return false;
// check explicitly only to prevent mana cast when halth cast cooldown
if (cooldown && ((Player*)this)->HasSpellCooldown(34299))
return false;
// health
triggered_spell_id = 34299;
basepoints0 = GetMaxHealth() * heal_percent / 100;
target = this;
// mana to caster
if (triggeredByAura->GetCasterGUID() == GetGUID())
{
if (SpellEntry const* manaCastEntry = sSpellStore.LookupEntry(60889))
{
int32 mana_percent = manaCastEntry->CalculateSimpleValue(0) * heal_percent;
CastCustomSpell(this, manaCastEntry, &mana_percent, NULL, NULL, true, castItem, triggeredByAura);
}
}
break;
}
// Healing Touch (Dreamwalker Raiment set) // Healing Touch (Dreamwalker Raiment set)
case 28719: case 28719:
{ {
@ -6999,16 +7027,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
} }
case SPELLFAMILY_DRUID: case SPELLFAMILY_DRUID:
{ {
// Leader of the Pack
if (auraSpellInfo->Id == 24932)
{
if (triggerAmount == 0)
return false;
basepoints[0] = triggerAmount * GetMaxHealth() / 100;
trigger_spell_id = 34299;
}
// Druid Forms Trinket // Druid Forms Trinket
else if (auraSpellInfo->Id==37336) if (auraSpellInfo->Id==37336)
{ {
switch(m_form) switch(m_form)
{ {

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 "8924" #define REVISION_NR "8925"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__