aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp33
-rw-r--r--src/game/SpellMgr.cpp1
-rw-r--r--src/game/SpellMgr.h2
-rw-r--r--src/game/Unit.cpp32
4 files changed, 51 insertions, 17 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index ad00013bbb7..92323d1c2e8 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1024,6 +1024,22 @@ void Aura::_RemoveAura()
else
m_target->RemoveAurasDueToSpell(*itr);
}
+ // Proc on aura remove (only spell flags for now)
+ if (caster)
+ {
+ uint32 ProcCaster, ProcVictim;
+ if (IsPositiveSpell(GetId()))
+ {
+ ProcCaster = PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL;
+ ProcVictim = PROC_FLAG_TAKEN_POSITIVE_SPELL;
+ }
+ else
+ {
+ ProcCaster = PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT;
+ ProcVictim = PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT;
+ }
+ caster->ProcDamageAndSpell(m_target,ProcCaster, ProcVictim, PROC_EX_AURA_REMOVE, 0, BASE_ATTACK, m_spellProto);
+ }
}
}
@@ -2026,7 +2042,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
switch(m_spellProto->SpellFamilyName)
{
- case SPELLFAMILY_GENERIC:
+ case SPELLFAMILY_MAGE:
// Living Bomb
if (m_spellProto->SpellFamilyFlags[1] & 0x20000)
{
@@ -3157,21 +3173,6 @@ void Aura::HandleModFear(bool apply, bool Real)
//m_target->SetFeared(apply, GetCasterGUID(), GetId());
m_target->SetControlled(apply, UNIT_STAT_FLEEING);
-
- // Improved Fear
- if(!apply && m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK)
- {
- Unit* caster = GetCaster();
- if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
- return;
- uint32 spell_id = 0;
- if(caster->HasAura(53754, 0))
- spell_id = 60946;
- else if(caster->HasAura(53759, 0))
- spell_id = 60947;
- if(spell_id)
- m_target->CastSpell(m_target, spell_id, true);
- }
}
void Aura::HandleFeignDeath(bool apply, bool Real)
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 57efba7560a..2d8e9d5a86b 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -567,6 +567,7 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep)
case SPELL_AURA_MOD_STAT:
case SPELL_AURA_MOD_DAMAGE_DONE: // dependent from bas point sign (negative -> negative)
case SPELL_AURA_MOD_HEALING_DONE:
+ case SPELL_AURA_MOD_DAMAGE_PERCENT_DONE:
{
if(spellproto->EffectBasePoints[effIndex]+int32(spellproto->EffectBaseDice[effIndex]) < 0)
return false;
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index ddbbf92de1d..45e88abe4de 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -603,7 +603,7 @@ enum ProcFlagsEx
PROC_EX_ABSORB = 0x0000400,
PROC_EX_REFLECT = 0x0000800,
PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used)
- PROC_EX_RESERVED1 = 0x0002000,
+ PROC_EX_AURA_REMOVE = 0x0002000,
PROC_EX_RESERVED2 = 0x0004000,
PROC_EX_RESERVED3 = 0x0008000,
PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always ( no matter another flags) used for drop charges
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 26b3d7ce7a3..edbb670187a 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5573,6 +5573,22 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
triggered_spell_id = 30294;
break;
}
+ // Improved Fear
+ case 53754:
+ {
+ if(!pVictim || !pVictim->isAlive())
+ return false;
+ pVictim->CastSpell(pVictim, 60946,true);
+ return true;
+ }
+ // Improved Fear (Rank 2)
+ case 53759:
+ {
+ if(!pVictim || !pVictim->isAlive())
+ return false;
+ pVictim->CastSpell(pVictim, 60947,true);
+ return true;
+ }
// Shadowflame (Voidheart Raiment set bonus)
case 37377:
{
@@ -5664,6 +5680,22 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
triggered_spell_id = 56160;
break;
}
+ // Psychic Horror
+ case 47571:
+ {
+ if(!pVictim || !pVictim->isAlive())
+ return false;
+ pVictim->CastSpell(pVictim, 59980,true);
+ return true;
+ }
+ // Psychic Horror (Rank 2)
+ case 47572:
+ {
+ if(!pVictim || !pVictim->isAlive())
+ return false;
+ pVictim->CastSpell(pVictim, 59981,true);
+ return true;
+ }
// Glyph of Dispel Magic
case 55677:
{