*Change remove mode from stack to default for single-caster-aura-removal and non-stackable-aura-removal.
--HG-- branch : trunk
This commit is contained in:
+32
-32
@@ -1218,19 +1218,22 @@ void Aura::_RemoveAura()
|
|||||||
}
|
}
|
||||||
uint32 id = GetId();
|
uint32 id = GetId();
|
||||||
// Remove Linked Auras
|
// Remove Linked Auras
|
||||||
if(m_removeMode!=AURA_REMOVE_BY_STACK && m_removeMode!=AURA_REMOVE_BY_DEATH && spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_REMOVE)
|
if(m_removeMode != AURA_REMOVE_BY_STACK && m_removeMode != AURA_REMOVE_BY_DEATH)
|
||||||
|
{
|
||||||
|
if(uint32 customAttr = spellmgr.GetSpellCustomAttr(id))
|
||||||
|
{
|
||||||
|
if(customAttr & SPELL_ATTR_CU_LINK_REMOVE)
|
||||||
{
|
{
|
||||||
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(-(int32)id))
|
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(-(int32)id))
|
||||||
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
|
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
|
||||||
{
|
{
|
||||||
if(*itr < 0)
|
if(*itr < 0)
|
||||||
m_target->RemoveAurasDueToSpell(-(*itr));
|
m_target->RemoveAurasDueToSpell(-(*itr));
|
||||||
else if(Unit* caster = GetCaster())
|
else if (m_removeMode != AURA_REMOVE_BY_DEFAULT)
|
||||||
if (m_removeMode!=AURA_REMOVE_BY_DEFAULT)
|
m_target->CastSpell(m_target, *itr, true, 0, 0, GetCasterGUID());
|
||||||
m_target->CastSpell(m_target, *itr, true, 0, 0, caster->GetGUID());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(m_removeMode!=AURA_REMOVE_BY_STACK && m_removeMode!=AURA_REMOVE_BY_DEATH && spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_AURA)
|
if(customAttr & SPELL_ATTR_CU_LINK_AURA)
|
||||||
{
|
{
|
||||||
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(id + SPELL_LINK_AURA))
|
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(id + SPELL_LINK_AURA))
|
||||||
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
|
for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
|
||||||
@@ -1241,6 +1244,8 @@ void Aura::_RemoveAura()
|
|||||||
m_target->RemoveAurasDueToSpell(*itr);
|
m_target->RemoveAurasDueToSpell(*itr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Proc on aura remove (only spell flags for now)
|
// Proc on aura remove (only spell flags for now)
|
||||||
if (caster)
|
if (caster)
|
||||||
@@ -2527,39 +2532,25 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Waiting to Resurrect
|
switch(m_spellProto->SpellFamilyName)
|
||||||
if(GetId()==2584)
|
|
||||||
{
|
{
|
||||||
|
case SPELLFAMILY_GENERIC:
|
||||||
|
switch(GetId())
|
||||||
|
{
|
||||||
|
case 2584: // Waiting to Resurrect
|
||||||
// Waiting to resurrect spell cancel, we must remove player from resurrect queue
|
// Waiting to resurrect spell cancel, we must remove player from resurrect queue
|
||||||
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
if(m_target->GetTypeId() == TYPEID_PLAYER)
|
||||||
if(BattleGround *bg = ((Player*)m_target)->GetBattleGround())
|
if(BattleGround *bg = ((Player*)m_target)->GetBattleGround())
|
||||||
bg->RemovePlayerFromResurrectQueue(m_target->GetGUID());
|
bg->RemovePlayerFromResurrectQueue(m_target->GetGUID());
|
||||||
return;
|
return;
|
||||||
}
|
case 42783: // Wrath of the Astromancer
|
||||||
|
m_target->CastSpell(m_target,m_amount,true,NULL,this);
|
||||||
// Burning Winds
|
return;
|
||||||
if(GetId()==46308) // casted only at creatures at spawn
|
case 46308: // Burning Winds casted only at creatures at spawn
|
||||||
{
|
|
||||||
m_target->CastSpell(m_target,47287,true,NULL,this);
|
m_target->CastSpell(m_target,47287,true,NULL,this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
// Misdirection
|
|
||||||
if(GetId()==34477)
|
|
||||||
{
|
|
||||||
m_target->SetReducedThreatPercent(0, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wrath of the Astromancer
|
|
||||||
if (GetId()==42783)
|
|
||||||
{
|
|
||||||
m_target->CastSpell(m_target,m_amount,true,NULL,this);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(m_spellProto->SpellFamilyName)
|
|
||||||
{
|
|
||||||
case SPELLFAMILY_WARLOCK:
|
case SPELLFAMILY_WARLOCK:
|
||||||
// Haunt
|
// Haunt
|
||||||
if(m_spellProto->SpellFamilyFlags[1] & 0x40000)
|
if(m_spellProto->SpellFamilyFlags[1] & 0x40000)
|
||||||
@@ -2579,6 +2570,16 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case SPELLFAMILY_HUNTER:
|
||||||
|
// Misdirection
|
||||||
|
if(GetId()==34477)
|
||||||
|
{
|
||||||
|
m_target->SetReducedThreatPercent(0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6692,9 +6693,8 @@ void AuraEffect::PeriodicDummyTick()
|
|||||||
// case 50493: break;
|
// case 50493: break;
|
||||||
// // Love Rocket Barrage
|
// // Love Rocket Barrage
|
||||||
// case 50530: break;
|
// case 50530: break;
|
||||||
// Tenacity
|
case 58549: // Tenacity
|
||||||
case 58549:
|
case 59911: // Tenacity (vehicle)
|
||||||
case 59911:
|
|
||||||
GetParentAura()->RefreshAura();
|
GetParentAura()->RefreshAura();
|
||||||
break;
|
break;
|
||||||
// Exist more after, need add later
|
// Exist more after, need add later
|
||||||
|
|||||||
+2
-2
@@ -3900,7 +3900,7 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects)
|
|||||||
if( (*itr)->GetTarget() != Aur->GetTarget() &&
|
if( (*itr)->GetTarget() != Aur->GetTarget() &&
|
||||||
IsSingleTargetSpells((*itr)->GetSpellProto(),aurSpellInfo) )
|
IsSingleTargetSpells((*itr)->GetSpellProto(),aurSpellInfo) )
|
||||||
{
|
{
|
||||||
(*itr)->GetTarget()->RemoveAurasDueToSpell((*itr)->GetId(), caster->GetGUID(), AURA_REMOVE_BY_STACK);
|
(*itr)->GetTarget()->RemoveAurasDueToSpell((*itr)->GetId(), caster->GetGUID(), AURA_REMOVE_BY_DEFAULT);
|
||||||
restart = true;
|
restart = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -4010,7 +4010,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Remove all auras by aura caster
|
// Remove all auras by aura caster
|
||||||
RemoveAura(i, AURA_REMOVE_BY_STACK);
|
RemoveAura(i, AURA_REMOVE_BY_DEFAULT);
|
||||||
if(i == m_Auras.end())
|
if(i == m_Auras.end())
|
||||||
break;
|
break;
|
||||||
remove = true;
|
remove = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user