aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <none@none>2010-09-19 17:02:05 +0200
committerShauren <none@none>2010-09-19 17:02:05 +0200
commit2983dab1cb1c4a586cf32a9d6c9f1518948727d6 (patch)
treefba6377d02d79babfe2747c2df46a5072942e358
parent21c85a155c780d1114baa8d9178d344e54513a75 (diff)
Core/Spells: Spell's damage should not interrupt auras applied by the same spell (fixes Frost Nova and water elemental Freeze), patch by dr.tenma
Closes issue #3052. --HG-- branch : trunk
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 3e22aa333d2..db6a3e23975 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -14357,6 +14357,14 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
takeCharges = true;
else
{
+ // Spell own direct damage at apply wont break the CC
+ if (procSpell && (procSpell->Id == triggeredByAura->GetId()))
+ {
+ Aura * aura = triggeredByAura->GetBase();
+ // called from spellcast, should not have ticked yet
+ if (aura->GetDuration() == aura->GetMaxDuration())
+ break;
+ }
int32 damageLeft = triggeredByAura->GetAmount();
// No damage left
if (damageLeft < int32(damage))
@@ -14364,8 +14372,8 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
else
triggeredByAura->SetAmount(damageLeft - damage);
}
- }
break;
+ }
//case SPELL_AURA_ADD_FLAT_MODIFIER:
//case SPELL_AURA_ADD_PCT_MODIFIER:
// HandleSpellModAuraProc