mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7500] Not allow stacking some auras at target from different casters.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
ebd292a226
commit
610a040240
4 changed files with 37 additions and 3 deletions
|
|
@ -3561,6 +3561,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
SpellSpecific i_spellId_spec = GetSpellSpecific(i_spellId);
|
||||
|
||||
bool is_sspc = IsSingleFromSpellSpecificPerCaster(spellId_spec,i_spellId_spec);
|
||||
bool is_sspt = IsSingleFromSpellSpecificRanksPerTarget(spellId_spec,i_spellId_spec);
|
||||
|
||||
if( is_sspc && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() )
|
||||
{
|
||||
|
|
@ -3582,6 +3583,25 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
else
|
||||
next = m_Auras.begin();
|
||||
}
|
||||
else if( is_sspt && Aur->GetCasterGUID() != (*i).second->GetCasterGUID() && spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId) )
|
||||
{
|
||||
// cannot remove higher rank
|
||||
if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0)
|
||||
return false;
|
||||
|
||||
// Its a parent aura (create this aura in ApplyModifier)
|
||||
if ((*i).second->IsInUse())
|
||||
{
|
||||
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 Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
|
||||
continue;
|
||||
}
|
||||
RemoveAurasDueToSpell(i_spellId);
|
||||
|
||||
if( m_Auras.empty() )
|
||||
break;
|
||||
else
|
||||
next = m_Auras.begin();
|
||||
}
|
||||
else if( !is_sspc && spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId) )
|
||||
{
|
||||
// Its a parent aura (create this aura in ApplyModifier)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue