*Add procflag PROC_EX_AURA_REMOVE.

*Use new procflag to fix Psyhic Horror.
*Fix a typo in Living Bomb handler.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-03-13 22:48:04 +01:00
parent 8963006729
commit 0d5044863e
6 changed files with 58 additions and 17 deletions
+6
View File
@@ -0,0 +1,6 @@
-- Psyhic Horror
INSERT INTO `spell_proc_event` VALUES (47571, 0x00, 6, 65536, 0x00000000, 0x00000000, 0x00000000, 0x0002000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (47572, 0x00, 6, 59981, 0x00000000, 0x00000000, 0x00000000, 0x0002000, 0.000000, 0.000000, 0);
-- Improved Fear
INSERT INTO `spell_proc_event` VALUES (53754, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0002000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (53759, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0002000, 0.000000, 0.000000, 0);
+1
View File
@@ -78,4 +78,5 @@ INSTALL(FILES
1814_world.sql
1825_world.sql
1828_world.sql
1857_world.sql
DESTINATION share/trinity/sql/updates)
+17 -16
View File
@@ -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)
+1
View File
@@ -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;
+1 -1
View File
@@ -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
+32
View File
@@ -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:
{