diff options
author | megamage <none@none> | 2009-01-18 17:58:13 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-18 17:58:13 -0600 |
commit | c85c89dc0b0564113e48bfcaf96dc2af55d73bb8 (patch) | |
tree | b75e19414c6a9dc8bfd438f9e0c7a2e42aada9a6 /src/game/Unit.cpp | |
parent | 54ed3974138f2f51c3c42c4469f9f1541818f631 (diff) | |
parent | 613217fca7c2959fe3abbe593f4be65beedaeca8 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 8d16842145a..093e5f03643 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -182,8 +182,12 @@ Unit::~Unit() if(m_charmInfo) delete m_charmInfo; - RemoveAllAuras(); - assert(m_Auras.begin() == m_Auras.end()); + if(m_uint32Values) + { + sLog.outDetail("Deconstruct Unit Entry = %u", GetEntry()); + if(m_scAuras.size()) + sLog.outError("Unit %u has sc auras during deconstruction", GetEntry()); + } } void Unit::Update( uint32 p_time ) @@ -297,6 +301,11 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 ty case 1: // stop packet SendMessageToSet( &data, true ); return; + case 2: // not used currently + data << float(0); // orientation + data << float(0); + data << float(0); + break; case 3: // not used currently data << uint64(0); // probably target guid break; @@ -3980,13 +3989,6 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) assert(!Aur->IsInUse()); Aur->ApplyModifier(false,true); Aur->_RemoveAura(); - delete Aur; - - if(caster_channeled) - RemoveAurasAtChanneledTarget (AurSpellInfo); - - if(statue) - statue->UnSummon(); if(mode != AURA_REMOVE_BY_STACK) { @@ -4002,6 +4004,14 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) } } + delete Aur; + + if(caster_channeled) + RemoveAurasAtChanneledTarget (AurSpellInfo); + + if(statue) + statue->UnSummon(); + // only way correctly remove all auras from list if( m_Auras.empty() ) i = m_Auras.end(); |