aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-03-10 00:55:24 -0300
committerariel- <ariel-@users.noreply.github.com>2018-03-10 00:55:24 -0300
commitbd3530dd1f71ce0cd4ce8368af3947cb525349b2 (patch)
tree04dca3e36a2af41805d7badb3043353b165d51d0 /src/server/game
parent6feee74c5aa5e5724e80bbbf546c4779ec1e648a (diff)
Core/Spells: move m_preCastSpell logic to scripts
- Bad name because it was actaully executed after effects
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Spells/Spell.cpp48
-rw-r--r--src/server/game/Spells/Spell.h1
2 files changed, 0 insertions, 49 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 8604a7f67ca..6f8322332b8 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -588,7 +588,6 @@ m_caster((info->HasAttribute(SPELL_ATTR6_CAST_BY_CHARMER) && caster->GetCharmerO
focusObject = nullptr;
m_cast_count = 0;
m_glyphIndex = 0;
- m_preCastSpell = 0;
m_triggeredByAuraSpell = nullptr;
unitCaster = nullptr;
_spellAura = nullptr;
@@ -2805,30 +2804,6 @@ void Spell::DoSpellEffectHit(Unit* unit, uint8 effIndex, TargetInfo& hitInfo)
void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
{
- // Apply additional spell effects to target
- /// @todo move this code to scripts
- if (m_preCastSpell)
- {
- // Paladin immunity shields
- if (m_preCastSpell == 61988)
- {
- // Cast Forbearance
- m_caster->CastSpell(unit, 25771, true);
- // Cast Avenging Wrath Marker
- unit->CastSpell(unit, 61987, true);
- }
-
- // Avenging Wrath
- if (m_preCastSpell == 61987)
- // Cast the serverside immunity shield marker
- m_caster->CastSpell(unit, 61988, true);
-
- // Blizz seems to just apply aura without bothering to cast
- if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_preCastSpell))
- if (Unit* unitCaster = m_caster->ToUnit())
- unitCaster->AddAura(spellInfo, MAX_EFFECT_MASK, unit);
- }
-
// handle SPELL_AURA_ADD_TARGET_TRIGGER auras
// this is executed after spell proc spells on target hit
// spells are triggered for each hit spell target
@@ -7901,29 +7876,6 @@ bool Spell::CanExecuteTriggersOnHit(uint8 effMask, SpellInfo const* triggeredByA
void Spell::PrepareTriggersExecutedOnHit()
{
- /// @todo move this to scripts
- if (m_spellInfo->SpellFamilyName)
- {
- SpellInfo const* excludeCasterSpellInfo = sSpellMgr->GetSpellInfo(m_spellInfo->ExcludeCasterAuraSpell);
- if (excludeCasterSpellInfo && !excludeCasterSpellInfo->IsPositive())
- m_preCastSpell = m_spellInfo->ExcludeCasterAuraSpell;
- SpellInfo const* excludeTargetSpellInfo = sSpellMgr->GetSpellInfo(m_spellInfo->ExcludeTargetAuraSpell);
- if (excludeTargetSpellInfo && !excludeTargetSpellInfo->IsPositive())
- m_preCastSpell = m_spellInfo->ExcludeTargetAuraSpell;
- }
-
- /// @todo move this to scripts
- switch (m_spellInfo->SpellFamilyName)
- {
- case SPELLFAMILY_MAGE:
- {
- // Permafrost
- if (m_spellInfo->SpellFamilyFlags[1] & 0x00001000 || m_spellInfo->SpellFamilyFlags[0] & 0x00100220)
- m_preCastSpell = 68391;
- break;
- }
- }
-
Unit* unitCaster = m_caster->ToUnit();
if (!unitCaster)
return;
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 39cf1beeb53..d585847f136 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -490,7 +490,6 @@ class TC_GAME_API Spell
uint32 m_castItemEntry;
uint8 m_cast_count;
uint32 m_glyphIndex;
- uint32 m_preCastSpell;
SpellCastTargets m_targets;
void AddComboPointGain(Unit* target, int8 amount)