*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
2009-03-19 10:40:02 +01:00
parent c4a5368d4e
commit 3ff11b64ba
9 changed files with 61 additions and 53 deletions
-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); INSERT INTO `spell_proc_event` VALUES (47539, 0x00, 6, 0x1800, 0x10000, 0x00000000, 0x00014010, 0x00000000, 0.000000, 0.000000, 0);
-- Aspect of the viper -- Aspect of the viper
INSERT INTO `spell_proc_event` VALUES (34074, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0.000000, 0.000000, 0); 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; DELETE FROM `spell_bonus_data` WHERE entry=2944;
INSERT INTO `spell_bonus_data` VALUES ('2944', '0', '0.1849', '0', 'Priest - Devouring Plague'); 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 -- 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 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), (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); (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 1927_world.sql
1939_word.sql 1939_word.sql
1957_word.sql 1957_word.sql
2013_world.sql
DESTINATION share/trinity/sql/updates) DESTINATION share/trinity/sql/updates)
+9 -17
View File
@@ -1051,9 +1051,9 @@ void Aura::_RemoveAura()
ProcVictim = PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT; ProcVictim = PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT;
} }
uint32 procEx=0; uint32 procEx=0;
if (m_removeMode == AURA_REMOVE_BY_DISPEL) if (m_removeMode == AURA_REMOVE_BY_ENEMY_SPELL)
procEx = PROC_EX_AURA_REMOVE_DISPEL; procEx = PROC_EX_AURA_REMOVE_DESTROY;
else if (m_removeMode == AURA_REMOVE_BY_DEFAULT) else if (m_removeMode == AURA_REMOVE_BY_DEFAULT || m_removeMode == AURA_REMOVE_BY_CANCEL)
procEx = PROC_EX_AURA_REMOVE_EXPIRE; procEx = PROC_EX_AURA_REMOVE_EXPIRE;
caster->ProcDamageAndSpell(m_target,ProcCaster, ProcVictim, procEx, m_modifier.m_amount, BASE_ATTACK, m_spellProto); 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 // Living Bomb
if(m_spellProto->SpellFamilyFlags[1] & 0x20000) 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); caster->CastSpell(m_target, GetModifier()->m_amount, true);
return; return;
} }
@@ -2228,7 +2228,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
else else
{ {
// Final heal only on dispelled or duration end // 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; return;
// final heal // 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) void Aura::HandleInvisibility(bool apply, bool Real)
@@ -6358,11 +6348,13 @@ void Aura::PeriodicDummyTick()
// case 51690: break; // case 51690: break;
// Overkill // Overkill
case 58428: case 58428:
m_target->RemoveAurasDueToSpell(58427); if (!m_target->HasAuraType(SPELL_AURA_MOD_STEALTH))
m_target->RemoveAurasDueToSpell(58427);
break; break;
// Master of Subtlety // Master of Subtlety
case 31666: case 31666:
m_target->RemoveAurasDueToSpell(31665); if (!m_target->HasAuraType(SPELL_AURA_MOD_STEALTH))
m_target->RemoveAurasDueToSpell(31665);
break; break;
default: default:
break; 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_1=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_1));
spellInfo_2=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_2)); spellInfo_2=sSpellStore.LookupEntry(GetLastSpellInChain(spellId_2));
if (spellInfo_1==spellInfo_2)
return true;
//if spells have exactly the same effect they cannot stack //if spells have exactly the same effect they cannot stack
for(uint32 i = 0; i < 3; ++i) for(uint32 i = 0; i < 3; ++i)
if(spellInfo_1->Effect[i] != spellInfo_2->Effect[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->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i]
|| spellInfo_1->EffectMiscValue[i] != spellInfo_2->EffectMiscValue[i]) // paladin resist aura || spellInfo_1->EffectMiscValue[i] != spellInfo_2->EffectMiscValue[i]) // paladin resist aura
return false; // need itemtype check? need an example to add that check 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_ABSORB = 0x0000400,
PROC_EX_REFLECT = 0x0000800, PROC_EX_REFLECT = 0x0000800,
PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used) PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used)
PROC_EX_AURA_REMOVE_DISPEL = 0x0002000, PROC_EX_AURA_REMOVE_DESTROY = 0x0002000, // aura absorb destroy or dispel
PROC_EX_AURA_REMOVE_EXPIRE = 0x0004000, 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_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) 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 struct SpellProcEventEntry
{ {
+26 -21
View File
@@ -2181,7 +2181,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
{ {
if ((*i)->GetModifier()->m_amount<=0) 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(); i = vSchoolAbsorb.begin();
} }
else 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()); 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; 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; restart = true;
break; break;
} }
@@ -4149,7 +4149,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
// Remove aura // Remove aura
if (iter->second->modStackAmount(-1)) if (iter->second->modStackAmount(-1))
RemoveAura(iter, AURA_REMOVE_BY_DISPEL); RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
// backfire damage and silence // backfire damage and silence
dispeler->CastCustomSpell(dispeler, 31117, &damage, NULL, NULL, true, NULL, NULL,caster_guid); 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 iter = m_Auras.begin(); // iterator can be invalidate at cast if self-dispel
} }
else if (iter->second->modStackAmount(-1)) else if (iter->second->modStackAmount(-1))
RemoveAura(iter, AURA_REMOVE_BY_DISPEL); RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
} }
else else
++iter; ++iter;
@@ -4189,7 +4189,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
// Remove aura as dispel // Remove aura as dispel
if (iter->second->modStackAmount(-1)) if (iter->second->modStackAmount(-1))
RemoveAura(iter, AURA_REMOVE_BY_DISPEL); RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
} }
else else
++iter; ++iter;
@@ -4273,7 +4273,7 @@ void Unit::RemoveNotOwnSingleTargetAuras()
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); ) for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{ {
if (iter->second->GetCasterGUID()!=GetGUID() && IsSingleTargetSpell(iter->second->GetSpellProto())) if (iter->second->GetCasterGUID()!=GetGUID() && IsSingleTargetSpell(iter->second->GetSpellProto()))
RemoveAura(iter, AURA_REMOVE_BY_CANCEL); RemoveAura(iter, AURA_REMOVE_BY_STACK);
else else
++iter; ++iter;
} }
@@ -4940,6 +4940,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
Unit* target = pVictim; Unit* target = pVictim;
int32 basepoints0 = 0; 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) switch(dummySpell->SpellFamilyName)
{ {
case SPELLFAMILY_GENERIC: case SPELLFAMILY_GENERIC:
@@ -5096,9 +5107,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
// Overkill // Overkill
case 58426: case 58426:
{ {
basepoints0 = -triggerAmount; if (procEx & AURA_REMOVE_PROC_EX_MASK)
triggered_spell_id = 58425; triggered_spell_id = 58428;
target=this; else
{
basepoints0 = -triggerAmount;
triggered_spell_id = 58427;
}
break; break;
} }
// Mark of Malice // Mark of Malice
@@ -5385,9 +5400,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
// Shattered Barrier // Shattered Barrier
if (dummySpell->SpellIconID == 2945) if (dummySpell->SpellIconID == 2945)
{ {
// only on dispel/remove aura by sestroy // only on dispel/remove aura by destroy
if (procEx & PROC_EX_AURA_REMOVE_EXPIRE && damage)
return false;
target = NULL; target = NULL;
triggered_spell_id = 55080; triggered_spell_id = 55080;
CastSpell(target, triggered_spell_id, true); CastSpell(target, triggered_spell_id, true);
@@ -5947,14 +5960,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
} }
return false; return false;
} }
// Master of subtlety
else if( dummySpell->SpellIconID == 2285 )
{
basepoints0 = triggerAmount;
triggered_spell_id = 31665;
target=this;
break;
}
// Deadly Brew // Deadly Brew
else if( dummySpell->SpellIconID == 2963 ) else if( dummySpell->SpellIconID == 2963 )
{ {
@@ -13456,7 +13461,7 @@ void Unit::SendAuraUpdate(uint8 slot)
data << uint8(entry->m_Flags); data << uint8(entry->m_Flags);
data << uint8(entry->m_Level); 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)) if(!(entry->m_Flags & AFLAG_CASTER))
{ {
+3 -3
View File
@@ -325,9 +325,9 @@ enum DamageTypeToSchool
enum AuraRemoveMode enum AuraRemoveMode
{ {
AURA_REMOVE_BY_DEFAULT, AURA_REMOVE_BY_DEFAULT,
AURA_REMOVE_BY_STACK, // at replace by semillar aura AURA_REMOVE_BY_STACK, // at replace by semillar aura (or single target aura remove)
AURA_REMOVE_BY_CANCEL, // single target aura remove is considered as cancel AURA_REMOVE_BY_CANCEL,
AURA_REMOVE_BY_DISPEL, AURA_REMOVE_BY_ENEMY_SPELL, // dispel and absorb aura destroy
AURA_REMOVE_BY_DEATH AURA_REMOVE_BY_DEATH
}; };