aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp28
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();