[11683] More consitence use m_target for DestroyItemWithOnStoreSpell call in aura.

This don't must be cases when caster != m_target but anyway not reason have
not nice look code.
This commit is contained in:
VladimirMangos 2011-06-27 01:56:50 +04:00
parent 6b4f6cee31
commit 52b3f66b38
2 changed files with 3 additions and 3 deletions

View file

@ -8575,10 +8575,10 @@ void SpellAuraHolder::_RemoveSpellAuraHolder()
dynObj->RemoveAffected(m_target);
// remove at-store spell cast items (for all remove modes?)
if (caster && caster->GetTypeId() == TYPEID_PLAYER && m_removeMode != AURA_REMOVE_BY_DEFAULT && m_removeMode != AURA_REMOVE_BY_DELETE)
if (m_target->GetTypeId() == TYPEID_PLAYER && m_removeMode != AURA_REMOVE_BY_DEFAULT && m_removeMode != AURA_REMOVE_BY_DELETE)
if (ObjectGuid castItemGuid = GetCastItemGuid())
if (Item* castItem = ((Player*)m_target)->GetItemByGuid(castItemGuid))
((Player*)caster)->DestroyItemWithOnStoreSpell(castItem);
((Player*)m_target)->DestroyItemWithOnStoreSpell(castItem);
//passive auras do not get put in slots - said who? ;)
// Note: but totem can be not accessible for aura target in time remove (to far for find in grid)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11682"
#define REVISION_NR "11683"
#endif // __REVISION_NR_H__