diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 4 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 6 | ||||
-rw-r--r-- | src/game/SpellHandler.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 23 | ||||
-rw-r--r-- | src/game/Unit.h | 3 |
5 files changed, 13 insertions, 25 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 5f6d17b2ee7..7f9ceffda7f 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6742,7 +6742,7 @@ void Player::DuelComplete(DuelCompleteType type) } for(size_t i=0; i<auras2remove.size(); i++) - duel->opponent->RemoveAurasDueToSpellByCancel(auras2remove[i]); + duel->opponent->RemoveAurasByCasterSpell(auras2remove[i], GetGUID(), AURA_REMOVE_BY_DELETE); auras2remove.clear(); AuraMap const& auras = GetAuras(); @@ -6752,7 +6752,7 @@ void Player::DuelComplete(DuelCompleteType type) auras2remove.push_back(i->second->GetId()); } for(size_t i=0; i<auras2remove.size(); i++) - RemoveAurasDueToSpellByCancel(auras2remove[i]); + RemoveAurasByCasterSpell(auras2remove[i], duel->opponent->GetGUID(), AURA_REMOVE_BY_DELETE); // cleanup combo points if(GetComboTarget()==duel->opponent->GetGUID()) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e0677d99f9a..1798fbf6f21 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1022,10 +1022,10 @@ void Aura::_RemoveAura() ((Player*)caster)->SendCooldownEvent(GetSpellProto()); } - // overkill + // not cancel, overkill // do not proc anything if aura is cancelled - //if(m_removeMode == AURA_REMOVE_BY_CANCEL) - // return; + if(m_removeMode == AURA_REMOVE_BY_DELETE) + return; // Remove Linked Auras (on last aura remove) uint32 id = GetId(); diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index b9e773437b6..d5dfcb8dab4 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -341,7 +341,7 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket) } // non channeled case - _player->RemoveAurasDueToSpellByCancel(spellId); + _player->RemoveAurasByCasterSpell(spellId, _player->GetGUID(), AURA_REMOVE_BY_CANCEL); } void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3c2713c6d91..f0472292027 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3843,7 +3843,7 @@ bool Unit::AddAura(Aura *Aur) if(Aur->GetStackAmount() < aurSpellInfo->StackAmount) Aur->InitStackAmount(Aur->GetStackAmount()+1); } - RemoveAura(i2,AURA_REMOVE_BY_STACK); + RemoveAura(i2,AURA_REMOVE_BY_DELETE); i2=m_Auras.lower_bound(spair); continue; } @@ -3863,7 +3863,7 @@ bool Unit::AddAura(Aura *Aur) ++i2; continue; } - RemoveAura(i2,AURA_REMOVE_BY_STACK); + RemoveAura(i2,AURA_REMOVE_BY_DELETE); i2=m_Auras.lower_bound(spair); continue; } @@ -3901,7 +3901,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_STACK); + (*itr)->GetTarget()->RemoveAurasByCasterSpell((*itr)->GetId(),(*itr)->GetEffIndex(), caster->GetGUID(), AURA_REMOVE_BY_DELETE); restart = true; break; } @@ -3964,7 +3964,7 @@ void Unit::RemoveRankAurasDueToSpell(uint32 spellId) { if(iter->second->GetCasterGUID()==(*i).second->GetCasterGUID()) { - RemoveAura(iter, AURA_REMOVE_BY_STACK); + RemoveAura(iter, AURA_REMOVE_BY_DELETE); iter = m_Auras.lower_bound(spair); } else @@ -4090,7 +4090,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur) { if(iter->second->GetCasterGUID()==caster) { - RemoveAura(iter, AURA_REMOVE_BY_STACK); + RemoveAura(iter, AURA_REMOVE_BY_DELETE); iter = m_Auras.lower_bound(spair); } else @@ -4259,17 +4259,6 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit } } -void Unit::RemoveAurasDueToSpellByCancel(uint32 spellId) -{ - for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); ) - { - if (iter->second->GetId() == spellId) - RemoveAura(iter, AURA_REMOVE_BY_CANCEL); - else - ++iter; - } -} - void Unit::RemoveAurasWithDispelType( DispelType type ) { // Create dispel mask by dispel type @@ -4336,7 +4325,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_STACK); + RemoveAura(iter, AURA_REMOVE_BY_DELETE); else ++iter; } diff --git a/src/game/Unit.h b/src/game/Unit.h index 9bf55edd15a..b735067909b 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -328,7 +328,7 @@ enum DamageTypeToSchool enum AuraRemoveMode { AURA_REMOVE_BY_DEFAULT, - AURA_REMOVE_BY_STACK, // at replace by semillar aura (or single target aura remove) + AURA_REMOVE_BY_DELETE, // change stack, single aura remove, duel complete AURA_REMOVE_BY_CANCEL, AURA_REMOVE_BY_ENEMY_SPELL, // dispel and absorb aura destroy AURA_REMOVE_BY_DEATH @@ -1253,7 +1253,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeler); void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer); - void RemoveAurasDueToSpellByCancel(uint32 spellId); void RemoveAurasAtChanneledTarget(SpellEntry const* spellInfo, Unit * caster); void RemoveNotOwnSingleTargetAuras(); |