--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-18 17:58:13 -06:00
68 changed files with 1508 additions and 1553 deletions

View File

@@ -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();