Skip to content

Commit

Permalink
[8922] Implement telant 46859 and ranks additional debuff apply.
Browse files Browse the repository at this point in the history
Thanks to xXxRRLxXx and KAPATEJIb for patch prepering.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
QAston authored and VladimirMangos committed Dec 5, 2009
1 parent a2f637f commit 92145a5
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
54 changes: 47 additions & 7 deletions src/game/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2254,14 +2254,54 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
return;
}

// Earth Shield
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x40000000000)))
switch(m_spellProto->SpellFamilyName)
{
// prevent double apply bonuses
if(m_target->GetTypeId() != TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
if (Unit* caster = GetCaster())
m_modifier.m_amount = caster->SpellHealingBonus(m_target, GetSpellProto(), m_modifier.m_amount, SPELL_DIRECT_DAMAGE);
return;
case SPELLFAMILY_WARRIOR:
// Overpower
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000004))
{
// Must be casting target
if (!m_target->IsNonMeleeSpellCasted(false))
return;

Unit* caster = GetCaster();
if (!caster)
return;

Unit::AuraList const& modifierAuras = caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
for(Unit::AuraList::const_iterator itr = modifierAuras.begin(); itr != modifierAuras.end(); ++itr)
{
// Unrelenting Assault
if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARRIOR && (*itr)->GetSpellProto()->SpellIconID == 2775)
{
switch ((*itr)->GetSpellProto()->Id)
{
case 46859: // Unrelenting Assault, rank 1
m_target->CastSpell(m_target,64849,true,NULL,(*itr));
break;
case 46860: // Unrelenting Assault, rank 2
m_target->CastSpell(m_target,64850,true,NULL,(*itr));
break;
default:
break;
}
break;
}
}
return;
}
break;
case SPELLFAMILY_SHAMAN:
// Earth Shield
if ((GetSpellProto()->SpellFamilyFlags & UI64LIT(0x40000000000)))
{
// prevent double apply bonuses
if(m_target->GetTypeId() != TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
if (Unit* caster = GetCaster())
m_modifier.m_amount = caster->SpellHealingBonus(m_target, GetSpellProto(), m_modifier.m_amount, SPELL_DIRECT_DAMAGE);
return;
}
break;
}
}
// AT REMOVE
Expand Down
1 change: 1 addition & 0 deletions src/game/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,7 @@ void Spell::EffectDummy(uint32 i)
m_damage+= uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
return;
}

switch(m_spellInfo->Id)
{
// Warrior's Wrath
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8921"
#define REVISION_NR "8922"
#endif // __REVISION_NR_H__

0 comments on commit 92145a5

Please sign in to comment.