mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[9346] Implement bonuses for spell 50464
* Implement percent bonus at own Hot at target. Original patch provided by rechapa79 * Implement glyph 45603. Original patch provided by Splinter. * Rewrite code for spell 60137.
This commit is contained in:
parent
96202d7dfd
commit
841cf86402
2 changed files with 31 additions and 14 deletions
|
|
@ -9437,19 +9437,17 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||||
case 8477: // Nourish Heal Boost
|
case 8477: // Nourish Heal Boost
|
||||||
{
|
{
|
||||||
int32 stepPercent = (*i)->GetModifier()->m_amount;
|
int32 stepPercent = (*i)->GetModifier()->m_amount;
|
||||||
int32 modPercent = 0;
|
|
||||||
AuraMap const& victimAuras = pVictim->GetAuras();
|
int ownHotCount = 0;
|
||||||
for (AuraMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
|
|
||||||
{
|
Unit::AuraList const& RejorRegr = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_HEAL);
|
||||||
if (itr->second->GetCasterGUID()!=GetGUID())
|
for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
|
||||||
continue;
|
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
|
||||||
SpellEntry const* m_spell = itr->second->GetSpellProto();
|
(*i)->GetCasterGUID() == GetGUID())
|
||||||
if (m_spell->SpellFamilyName != SPELLFAMILY_DRUID ||
|
ownHotCount += (*i)->GetStackAmount();
|
||||||
!(m_spell->SpellFamilyFlags & UI64LIT(0x0000001000000050)))
|
|
||||||
continue;
|
if (ownHotCount)
|
||||||
modPercent += stepPercent * itr->second->GetStackAmount();
|
TakenTotalMod *= (stepPercent * ownHotCount + 100.0f) / 100.0f;
|
||||||
}
|
|
||||||
DoneTotalMod *= (modPercent+100.0f)/100.0f;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 7871: // Glyph of Lesser Healing Wave
|
case 7871: // Glyph of Lesser Healing Wave
|
||||||
|
|
@ -9539,6 +9537,25 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||||
if((*itr)->GetId() == 29203)
|
if((*itr)->GetId() == 29203)
|
||||||
TakenTotalMod *= ((*itr)->GetModifier()->m_amount+100.0f) / 100.0f;
|
TakenTotalMod *= ((*itr)->GetModifier()->m_amount+100.0f) / 100.0f;
|
||||||
}
|
}
|
||||||
|
// Nourish 20% of heal increase if target is affected by Druids HOTs
|
||||||
|
else if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && (spellProto->SpellFamilyFlags & UI64LIT(0x0200000000000000)))
|
||||||
|
{
|
||||||
|
int ownHotCount = 0;
|
||||||
|
Unit::AuraList const& RejorRegr = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_HEAL);
|
||||||
|
for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
|
||||||
|
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
|
||||||
|
(*i)->GetCasterGUID() == GetGUID())
|
||||||
|
ownHotCount += (*i)->GetStackAmount();
|
||||||
|
|
||||||
|
if (ownHotCount)
|
||||||
|
{
|
||||||
|
TakenTotalMod *= 1.2f; // base bonus at HoTs
|
||||||
|
|
||||||
|
if (Aura* glyph = GetAura(62971,0)) // Glyph of Nourish
|
||||||
|
TakenTotalMod *= (glyph->GetModifier()->m_amount * ownHotCount + 100.0f) / 100.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
AuraList const& mHealingGet= pVictim->GetAurasByType(SPELL_AURA_MOD_HEALING_RECEIVED);
|
AuraList const& mHealingGet= pVictim->GetAurasByType(SPELL_AURA_MOD_HEALING_RECEIVED);
|
||||||
for(AuraList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i)
|
for(AuraList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9345"
|
#define REVISION_NR "9346"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue