*Remove incorrect object deletion from EffectSummonObject call and use RemoveGameObject() instead.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-12 02:34:24 +02:00
parent 87213301e7
commit bda2a721fa
3 changed files with 6 additions and 10 deletions
+1 -1
View File
@@ -1266,7 +1266,7 @@ void Aura::_RemoveAura()
if (procEx) if (procEx)
{ {
uint32 ProcCaster, ProcVictim; uint32 ProcCaster, ProcVictim;
if (IsPositiveSpell(GetId())) if (IsPositive())
{ {
ProcCaster = PROC_FLAG_SUCCESSFUL_POSITIVE_MAGIC_SPELL | PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL_HIT; 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; ProcVictim = PROC_FLAG_TAKEN_POSITIVE_MAGIC_SPELL | PROC_FLAG_TAKEN_POSITIVE_SPELL;
+1 -1
View File
@@ -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 // Recast case - null spell id to make auras not be removed on object remove from world
if (m_spellInfo->Id == obj->GetSpellId()) if (m_spellInfo->Id == obj->GetSpellId())
obj->SetSpellId(0); obj->SetSpellId(0);
obj->Delete(); m_caster->RemoveGameObject(obj, true);
} }
m_caster->m_ObjectSlot[slot] = 0; m_caster->m_ObjectSlot[slot] = 0;
} }
+4 -8
View File
@@ -567,14 +567,10 @@ class PetAura
std::map<uint32, uint32>::const_iterator itr = auras.find(petEntry); std::map<uint32, uint32>::const_iterator itr = auras.find(petEntry);
if(itr != auras.end()) if(itr != auras.end())
return itr->second; return itr->second;
else std::map<uint32, uint32>::const_iterator itr2 = auras.find(0);
{ if(itr2 != auras.end())
std::map<uint32, uint32>::const_iterator itr2 = auras.find(0); return itr2->second;
if(itr2 != auras.end()) return 0;
return itr2->second;
else
return 0;
}
} }
void AddAura(uint32 petEntry, uint32 aura) void AddAura(uint32 petEntry, uint32 aura)