diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-06-09 03:27:53 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-06-09 03:27:53 +0200 |
commit | 18b6a6450bff8db87583fa83dfa7bf971cbb6d2a (patch) | |
tree | eec2ac121e69a2f0a9cbd6c011a19ca37bb0e4de /src/server/game/Spells/SpellEffects.cpp | |
parent | 434b3a80e1ef4ccef3d66661e6a260b6328eabe5 (diff) | |
parent | 0b3e391ac4048cc3bec0f9287a855bdbaf959392 (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Handlers/MovementHandler.cpp
src/server/game/Spells/Auras/SpellAuraEffects.cpp
src/server/scripts/Spells/spell_hunter.cpp
src/server/scripts/Spells/spell_warlock.cpp
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 8dfa017467a..46f1413c311 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -960,7 +960,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) TC_LOG_DEBUG("spells", "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation); if (unitTarget->GetTypeId() == TYPEID_PLAYER) - unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL : 0); + unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL | TELE_TO_NOT_LEAVE_COMBAT : 0); else if (mapid == unitTarget->GetMapId()) unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster); else @@ -3755,15 +3755,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; |