diff options
author | QAston <none@none> | 2009-07-12 02:34:24 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-12 02:34:24 +0200 |
commit | bda2a721fa777bd1e1ab146036fb6144b09efadc (patch) | |
tree | 7636bac3f43af0b1d399e8f25eed3a9e820aa3fd /src | |
parent | 87213301e7f363abe4ae17c0988fd7262a5feb19 (diff) |
*Remove incorrect object deletion from EffectSummonObject call and use RemoveGameObject() instead.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuras.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellMgr.h | 12 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 3b98301cb2e..8f679517c9b 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1266,7 +1266,7 @@ void Aura::_RemoveAura() if (procEx) { uint32 ProcCaster, ProcVictim; - if (IsPositiveSpell(GetId())) + if (IsPositive()) { ProcCaster = PROC_FLAG_SUCCESSFUL_POSITIVE_MAGIC_SPELL | PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL_HIT; ProcVictim = PROC_FLAG_TAKEN_POSITIVE_MAGIC_SPELL | PROC_FLAG_TAKEN_POSITIVE_SPELL; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 8dc2e696da1..5e2dd395101 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5874,7 +5874,7 @@ void Spell::EffectSummonObject(uint32 i) // Recast case - null spell id to make auras not be removed on object remove from world if (m_spellInfo->Id == obj->GetSpellId()) obj->SetSpellId(0); - obj->Delete(); + m_caster->RemoveGameObject(obj, true); } m_caster->m_ObjectSlot[slot] = 0; } diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 0f2e352fdcd..e087ec66502 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -567,14 +567,10 @@ class PetAura std::map<uint32, uint32>::const_iterator itr = auras.find(petEntry); if(itr != auras.end()) return itr->second; - else - { - std::map<uint32, uint32>::const_iterator itr2 = auras.find(0); - if(itr2 != auras.end()) - return itr2->second; - else - return 0; - } + std::map<uint32, uint32>::const_iterator itr2 = auras.find(0); + if(itr2 != auras.end()) + return itr2->second; + return 0; } void AddAura(uint32 petEntry, uint32 aura) |