aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-06-10 23:44:30 +0200
committerQAston <none@none>2009-06-10 23:44:30 +0200
commitda067afe12b457e603fd9f3af6914764c48a07dd (patch)
tree4436fd11765815908a7281c76cbd5b4cc9b49e00 /src/game/SpellAuras.cpp
parent5ad8284841af267a45f5099f391e1aba9f57576a (diff)
*Fix Improved Spell Reflection
*Fix Glyph of Improved Scorch *Sword And Board *Fix Glyph of Devastate - original patch by CRAZyBUg --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 30e81e39587..0b726f742aa 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -80,7 +80,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&AuraEffect::HandleAuraModPacify, // 25 SPELL_AURA_MOD_PACIFY
&AuraEffect::HandleAuraModRoot, // 26 SPELL_AURA_MOD_ROOT
&AuraEffect::HandleAuraModSilence, // 27 SPELL_AURA_MOD_SILENCE
- &AuraEffect::HandleNoImmediateEffect, // 28 SPELL_AURA_REFLECT_SPELLS implement in Unit::SpellHitResult
+ &AuraEffect::HandleReflectSpells, // 28 SPELL_AURA_REFLECT_SPELLS implement in Unit::SpellHitResult
&AuraEffect::HandleAuraModStat, // 29 SPELL_AURA_MOD_STAT
&AuraEffect::HandleAuraModSkill, // 30 SPELL_AURA_MOD_SKILL
&AuraEffect::HandleAuraModIncreaseSpeed, // 31 SPELL_AURA_MOD_INCREASE_SPEED
@@ -730,7 +730,7 @@ void AreaAuraEffect::Update(uint32 diff)
switch(m_areaAuraType)
{
case AREA_AURA_PARTY:
- source->GetPartyMember(targets, m_radius);
+ source->GetPartyMemberInDist(targets, m_radius);
break;
case AREA_AURA_RAID:
source->GetRaidMember(targets, m_radius);
@@ -7161,3 +7161,29 @@ void AuraEffect::HandleAuraSafeFall( bool Apply, bool Real , bool /*changeAmount
if(Apply && Real && GetId()==32474 && m_target->GetTypeId()==TYPEID_PLAYER)
((Player*)m_target)->ActivateTaxiPathTo(506,GetId());
}
+
+void AuraEffect::HandleReflectSpells( bool Apply, bool Real , bool /*changeAmount*/)
+{
+ // implemented in Unit::SpellHitResult
+
+ // only special case
+ if(!Apply && Real && m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && m_spellProto->SpellFamilyFlags[1] & 0x2)
+ {
+ if (Unit * caster = GetCaster())
+ {
+ // Improved Spell Reflection
+ if (caster->GetDummyAura(59089) || caster->GetDummyAura(59088))
+ {
+ // aura remove - remove auras from all party members
+ std::list<Unit*> PartyMembers;
+ m_target->GetPartyMembers(PartyMembers);
+ for (std::list<Unit*>::iterator itr = PartyMembers.begin();itr!=PartyMembers.end();++itr)
+ {
+ if ((*itr)!= m_target)
+ (*itr)->RemoveAurasWithFamily(SPELLFAMILY_WARRIOR, 0, 0x2, 0, GetCasterGUID());
+ }
+ }
+ }
+ }
+}
+