aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorUnholychick <lucas__jensen@hotmail.com>2014-06-04 15:49:48 +0200
committerUnholychick <lucas__jensen@hotmail.com>2014-06-09 23:10:56 +0200
commitb651789cb05c304248f427ded09e0a0e43dad317 (patch)
tree30d063772b66f0899d5709a9ef1e21da73081180 /src/server/game/Spells/SpellEffects.cpp
parentf80384a1f26dde4ee81c7373ee048dea905c78f5 (diff)
Core/Spells: Implement Periodic mechanics
Change behaviour of single target periodic aura ticks to be more blizzlike Also add some missing handling of SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE Fixes Deep wounds and Chimera Shot Serpent Remove an ancient hack with Drain Soul, spell id 100001 can now be deleted from spell_dbc table Allows Rolling dot mechanics and allows DK's to roll diseases with pestilence, see link for info: http://forums.elitistjerks.com/topic/82503-frost-dps-in-333this-will-be-a-day-long-remembered/page-88
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 6108bf87478..48c73cf39ca 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -4056,15 +4056,40 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
{
// Get diseases on target of spell
if (m_targets.GetUnitTarget() && // Glyph of Disease - cast on unit target too to refresh aura
- (m_targets.GetUnitTarget() != unitTarget || m_caster->GetAura(63334)))
+ (m_targets.GetUnitTarget() != unitTarget || m_caster->HasAura(63334)))
{
// And spread them on target
// Blood Plague
- if (m_targets.GetUnitTarget()->GetAura(55078))
+ if (m_targets.GetUnitTarget()->HasAura(55078))
+ {
+ AuraEffect* aurEffOld = m_targets.GetUnitTarget()->GetAura(55078)->GetEffect(0);
+ float donePct = aurEffOld->GetDonePct();
+ float critChance = aurEffOld->GetCritChance();
+
m_caster->CastSpell(unitTarget, 55078, true);
+
+ if (unitTarget->HasAura(55078))
+ if (AuraEffect* aurEffNew = unitTarget->GetAura(55078)->GetEffect(0))
+ {
+ aurEffNew->SetCritChance(critChance); // Blood Plague can crit if caster has T9.
+ aurEffNew->SetDonePct(donePct);
+ aurEffNew->SetDamage(m_caster->SpellDamageBonusDone(unitTarget, aurEffNew->GetSpellInfo(), std::max(aurEffNew->GetAmount(), 0), DOT) * donePct);
+ }
+ }
// Frost Fever
- if (m_targets.GetUnitTarget()->GetAura(55095))
+ if (m_targets.GetUnitTarget()->HasAura(55095))
+ {
+ float donePct = m_targets.GetUnitTarget()->GetAura(55095)->GetEffect(0)->GetDonePct();
+
m_caster->CastSpell(unitTarget, 55095, true);
+
+ if (unitTarget->HasAura(55095))
+ if (AuraEffect* aurEffNew = unitTarget->GetAura(55095)->GetEffect(0))
+ {
+ aurEffNew->SetDonePct(donePct);
+ aurEffNew->SetDamage(m_caster->SpellDamageBonusDone(unitTarget, aurEffNew->GetSpellInfo(), std::max(aurEffNew->GetAmount(), 0), DOT) * donePct);
+ }
+ }
}
}
break;