From 87ca52c2a9c77db7b9a3f6a4d4f7f12b57b854a5 Mon Sep 17 00:00:00 2001 From: QAston Date: Tue, 14 Jul 2009 18:31:59 +0200 Subject: [PATCH] *Do not allow spells having damage to break root casted by the spell. *Typohunt: wand skill gain, Improved spell reflection aura drop from party. --HG-- branch : trunk --- src/game/Spell.cpp | 2 +- src/game/SpellAuras.cpp | 2 +- src/game/Unit.cpp | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 108453d0b2..fcacdccbe1 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -781,7 +781,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura) break; default: if (m_spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON && - m_spellInfo->EquippedItemSubClassMask & ITEM_SUBCLASS_WEAPON_WAND + m_spellInfo->EquippedItemSubClassMask & (1<AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG) // Wands auto attack { m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_HIT; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 32b12cf76e..4f84364c30 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -7433,7 +7433,7 @@ void AuraEffect::HandleReflectSpells( bool Apply, bool Real , bool /*changeAmoun if (Unit * caster = GetCaster()) { // Improved Spell Reflection - if (caster->GetDummyAura(SPELLFAMILY_WARRIOR,1935, 0)) + if (caster->GetDummyAura(SPELLFAMILY_WARRIOR,1935, 1)) { // aura remove - remove auras from all party members std::list PartyMembers; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 696c17fba8..e55b54996f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12819,6 +12819,10 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag case SPELL_AURA_MOD_ROOT: if (isVictim && damage) { + // Damage is dealt after proc system - lets ignore auras which wasn't updated yet + // to make spell not remove its own aura + if (i->aura->GetAuraDuration() == i->aura->GetAuraMaxDuration()) + break; int32 damageLeft = triggeredByAura->GetAmount(); // No damage left if (damageLeft < damage )