*Move Overkill and Master of Subtlety to procflag and fix some issues with them.

*Proc Shattered Barrier only on aura destroy.
*Fix some possible issues with aura stackamount display.

--HG--
branch : trunk
This commit is contained in:
QAston committed 2009-03-19 10:40:02 +01:00
1 parent c4a5368d4e
commit 3ff11b64ba
9 files changed
+61 -53

No files matched your search

-6
View File
@@ -7,12 +7,6 @@ INSERT INTO `spell_proc_event` VALUES (47538, 0x00, 6, 0x1800, 0x10000, 0x000000
INSERT INTO `spell_proc_event` VALUES (47539, 0x00, 6, 0x1800, 0x10000, 0x00000000, 0x00014010, 0x00000000, 0.000000, 0.000000, 0);
-- Aspect of the viper
INSERT INTO `spell_proc_event` VALUES (34074, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0.000000, 0.000000, 0);
-- Overkill
INSERT INTO `spell_proc_event` VALUES (58426, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0);
-- Master of subtlety
INSERT INTO `spell_proc_event` VALUES (31221, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (31222, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (31223, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0);
DELETE FROM `spell_bonus_data` WHERE entry=2944;
INSERT INTO `spell_bonus_data` VALUES ('2944', '0', '0.1849', '0', 'Priest - Devouring Plague');
+1 -4
View File
@@ -1,8 +1,5 @@
-- Shattered Barrier
-- Improved Fear
DELETE FROM `spell_proc_event` WHERE `entry` IN (44745, 54787, 53754, 53759);
DELETE FROM `spell_proc_event` WHERE `entry` IN (53754, 53759);
INSERT INTO `spell_proc_event` VALUES
(44745, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0006000, 0.000000, 0.000000, 0),
(54787, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0006000, 0.000000, 0.000000, 0),
(53754, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0),
(53759, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0);
+11
View File
@@ -0,0 +1,11 @@
-- Shattered Barrier
DELETE FROM `spell_proc_event` WHERE `entry` IN (44745, 54787, 58426, 31221, 31222, 31223);
INSERT INTO `spell_proc_event` VALUES
(44745, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0002000, 0.000000, 0.000000, 0),
(54787, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0002000, 0.000000, 0.000000, 0),
-- Overkill
(58426, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0004001, 0.000000, 0.000000, 0),
-- Master of subtlety
(31221, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0004001, 0.000000, 0.000000, 0),
(31222, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0004001, 0.000000, 0.000000, 0),
(31223, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x0004001, 0.000000, 0.000000, 0);
+1
View File
@@ -86,4 +86,5 @@ INSTALL(FILES
1927_world.sql
1939_word.sql
1957_word.sql
2013_world.sql
DESTINATION share/trinity/sql/updates)
+9 -17
View File
@@ -1051,9 +1051,9 @@ void Aura::_RemoveAura()
ProcVictim = PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT;
}
uint32 procEx=0;
if (m_removeMode == AURA_REMOVE_BY_DISPEL)
procEx = PROC_EX_AURA_REMOVE_DISPEL;
else if (m_removeMode == AURA_REMOVE_BY_DEFAULT)
if (m_removeMode == AURA_REMOVE_BY_ENEMY_SPELL)
procEx = PROC_EX_AURA_REMOVE_DESTROY;
else if (m_removeMode == AURA_REMOVE_BY_DEFAULT || m_removeMode == AURA_REMOVE_BY_CANCEL)
procEx = PROC_EX_AURA_REMOVE_EXPIRE;
caster->ProcDamageAndSpell(m_target,ProcCaster, ProcVictim, procEx, m_modifier.m_amount, BASE_ATTACK, m_spellProto);
@@ -2074,7 +2074,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
// Living Bomb
if(m_spellProto->SpellFamilyFlags[1] & 0x20000)
{
if(caster && (m_removeMode == AURA_REMOVE_BY_DISPEL || m_removeMode == AURA_REMOVE_BY_DEFAULT))
if(caster && (m_removeMode == AURA_REMOVE_BY_ENEMY_SPELL || m_removeMode == AURA_REMOVE_BY_DEFAULT))
caster->CastSpell(m_target, GetModifier()->m_amount, true);
return;
}
@@ -2228,7 +2228,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
else
{
// Final heal only on dispelled or duration end
if ( !(GetAuraDuration() <= 0 || m_removeMode==AURA_REMOVE_BY_DISPEL) )
if ( !(GetAuraDuration() <= 0 || m_removeMode==AURA_REMOVE_BY_ENEMY_SPELL) )
return;
// final heal
@@ -3416,16 +3416,6 @@ void Aura::HandleModStealth(bool apply, bool Real)
}
}
}
if (Real && !apply)
{
// Master of Subtlety
if (m_target->HasAura(31665))
m_target->CastSpell(m_target,31666,true);
// Overkill
if (m_target->HasAura(58427))
m_target->CastSpell(m_target,58428,true);
}
}
void Aura::HandleInvisibility(bool apply, bool Real)
@@ -6358,11 +6348,13 @@ void Aura::PeriodicDummyTick()
// case 51690: break;
// Overkill
case 58428:
m_target->RemoveAurasDueToSpell(58427);
if (!m_target->HasAuraType(SPELL_AURA_MOD_STEALTH))
m_target->RemoveAurasDueToSpell(58427);
break;
// Master of Subtlety
case 31666:
m_target->RemoveAurasDueToSpell(31665);
if (!m_target->HasAuraType(SPELL_AURA_MOD_STEALTH))
m_target->RemoveAurasDueToSpell(31665);
break;
default:
break;
+6
View File
@@ -1408,9 +1408,15 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
spellInfo_1=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_1));
spellInfo_2=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_2));
if (spellInfo_1==spellInfo_2)
return true;
//if spells have exactly the same effect they cannot stack
for(uint32 i = 0; i < 3; ++i)
if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i]
// Allow dummy auras stack (needed by 31666 and 58428)
|| spellInfo_1->EffectApplyAuraName[i] == SPELL_AURA_DUMMY
|| spellInfo_1->EffectApplyAuraName[i] == SPELL_AURA_PERIODIC_DUMMY
|| spellInfo_1->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i]
|| spellInfo_1->EffectMiscValue[i] != spellInfo_2->EffectMiscValue[i]) // paladin resist aura
return false; // need itemtype check? need an example to add that check
+4 -2
View File
@@ -417,11 +417,13 @@ enum ProcFlagsEx
PROC_EX_ABSORB = 0x0000400,
PROC_EX_REFLECT = 0x0000800,
PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used)
PROC_EX_AURA_REMOVE_DISPEL = 0x0002000,
PROC_EX_AURA_REMOVE_EXPIRE = 0x0004000,
PROC_EX_AURA_REMOVE_DESTROY = 0x0002000, // aura absorb destroy or dispel
PROC_EX_AURA_REMOVE_EXPIRE = 0x0004000, // aura remove by default and by cancel
PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always ( no matter another flags) used for drop charges
PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000 // If set trigger always but only one time (not used)
};
#define AURA_REMOVE_PROC_EX_MASK \
(PROC_EX_AURA_REMOVE_DESTROY | PROC_EX_AURA_REMOVE_EXPIRE)
struct SpellProcEventEntry
{
+26 -21
View File
@@ -2181,7 +2181,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
{
if ((*i)->GetModifier()->m_amount<=0)
{
pVictim->RemoveAurasByCasterSpell((*i)->GetId(), (*i)->GetCasterGUID());
pVictim->RemoveAurasByCasterSpell((*i)->GetId(), (*i)->GetCasterGUID(), AURA_REMOVE_BY_ENEMY_SPELL);
i = vSchoolAbsorb.begin();
}
else
@@ -3886,7 +3886,7 @@ bool Unit::AddAura(Aura *Aur)
sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for IsSingleTargetSpell", (*itr)->GetId(), (*itr)->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
continue;
}
(*itr)->GetTarget()->RemoveAurasByCasterSpell((*itr)->GetId(),(*itr)->GetEffIndex(), caster->GetGUID(), AURA_REMOVE_BY_CANCEL);
(*itr)->GetTarget()->RemoveAurasByCasterSpell((*itr)->GetId(),(*itr)->GetEffIndex(), caster->GetGUID(), AURA_REMOVE_BY_STACK);
restart = true;
break;
}
@@ -4149,7 +4149,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
// Remove aura
if (iter->second->modStackAmount(-1))
RemoveAura(iter, AURA_REMOVE_BY_DISPEL);
RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
// backfire damage and silence
dispeler->CastCustomSpell(dispeler, 31117, &damage, NULL, NULL, true, NULL, NULL,caster_guid);
@@ -4157,7 +4157,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
iter = m_Auras.begin(); // iterator can be invalidate at cast if self-dispel
}
else if (iter->second->modStackAmount(-1))
RemoveAura(iter, AURA_REMOVE_BY_DISPEL);
RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
}
else
++iter;
@@ -4189,7 +4189,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
// Remove aura as dispel
if (iter->second->modStackAmount(-1))
RemoveAura(iter, AURA_REMOVE_BY_DISPEL);
RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
}
else
++iter;
@@ -4273,7 +4273,7 @@ void Unit::RemoveNotOwnSingleTargetAuras()
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{
if (iter->second->GetCasterGUID()!=GetGUID() && IsSingleTargetSpell(iter->second->GetSpellProto()))
RemoveAura(iter, AURA_REMOVE_BY_CANCEL);
RemoveAura(iter, AURA_REMOVE_BY_STACK);
else
++iter;
}
@@ -4940,6 +4940,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
Unit* target = pVictim;
int32 basepoints0 = 0;
// Master of subtlety (checked here because ranks have different spellfamilynames)
if (dummySpell->Id == 31223 || dummySpell->Id == 31221 || dummySpell->Id == 31222)
{
if (procEx & AURA_REMOVE_PROC_EX_MASK)
triggered_spell_id = 31666;
else
{
triggered_spell_id = 31665;
basepoints0 = triggerAmount;
}
}
switch(dummySpell->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
@@ -5096,9 +5107,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
// Overkill
case 58426:
{
basepoints0 = -triggerAmount;
triggered_spell_id = 58425;
target=this;
if (procEx & AURA_REMOVE_PROC_EX_MASK)
triggered_spell_id = 58428;
else
{
basepoints0 = -triggerAmount;
triggered_spell_id = 58427;
}
break;
}
// Mark of Malice
@@ -5385,9 +5400,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
// Shattered Barrier
if (dummySpell->SpellIconID == 2945)
{
// only on dispel/remove aura by sestroy
if (procEx & PROC_EX_AURA_REMOVE_EXPIRE && damage)
return false;
// only on dispel/remove aura by destroy
target = NULL;
triggered_spell_id = 55080;
CastSpell(target, triggered_spell_id, true);
@@ -5947,14 +5960,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
}
return false;
}
// Master of subtlety
else if( dummySpell->SpellIconID == 2285 )
{
basepoints0 = triggerAmount;
triggered_spell_id = 31665;
target=this;
break;
}
// Deadly Brew
else if( dummySpell->SpellIconID == 2963 )
{
@@ -13456,7 +13461,7 @@ void Unit::SendAuraUpdate(uint8 slot)
data << uint8(entry->m_Flags);
data << uint8(entry->m_Level);
data << uint8(ptr->GetAuraCharges()? ptr->GetAuraCharges() : ptr->GetStackAmount());
data << uint8(ptr->GetStackAmount() ? ptr->GetStackAmount() : ptr->GetAuraCharges());
if(!(entry->m_Flags & AFLAG_CASTER))
{
+3 -3
View File
@@ -325,9 +325,9 @@ enum DamageTypeToSchool
enum AuraRemoveMode
{
AURA_REMOVE_BY_DEFAULT,
AURA_REMOVE_BY_STACK, // at replace by semillar aura
AURA_REMOVE_BY_CANCEL, // single target aura remove is considered as cancel
AURA_REMOVE_BY_DISPEL,
AURA_REMOVE_BY_STACK, // at replace by semillar aura (or single target aura remove)
AURA_REMOVE_BY_CANCEL,
AURA_REMOVE_BY_ENEMY_SPELL, // dispel and absorb aura destroy
AURA_REMOVE_BY_DEATH
};