*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:
+9
-17
@@ -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;
|
||||
|
||||
@@ -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
@@ -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
@@ -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
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user