aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Object.cpp2
-rw-r--r--src/game/PetHandler.cpp2
-rw-r--r--src/game/Unit.cpp5
-rw-r--r--src/game/Unit.h3
4 files changed, 9 insertions, 3 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index c8fb721a224..b19a80fc7bf 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -94,6 +94,8 @@ Object::~Object( )
assert(false);
}
+ assert(!m_objectUpdated);
+
//DEBUG_LOG("Object desctr 1 check (%p)",(void*)this);
delete [] m_uint32Values;
delete [] m_uint32Values_mirror;
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index 15f807a3cce..56845eaa656 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -69,7 +69,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
{
//If a pet is dismissed, m_Controlled will change
std::vector<Unit*> controlled;
- for(ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
+ for(Unit::ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
if((*itr)->GetEntry() == pet->GetEntry() && (*itr)->isAlive())
controlled.push_back(*itr);
for(std::vector<Unit*>::iterator itr = controlled.begin(); itr != controlled.end(); ++itr)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 3df54dfe6c7..f9dfc24fac6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -187,6 +187,11 @@ Unit::~Unit()
RemoveAllDynObjects();
if(m_charmInfo) delete m_charmInfo;
+
+ assert(!m_attacking);
+ assert(m_attackers.empty());
+ assert(m_sharedVision.empty());
+ assert(m_Controlled.empty());
}
void Unit::Update( uint32 p_time )
diff --git a/src/game/Unit.h b/src/game/Unit.h
index be729616f26..ce59dbd62ce 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -847,12 +847,11 @@ struct AuraSlotEntry
struct SpellProcEventEntry; // used only privately
-typedef std::set<Unit*> ControlList;
-
class TRINITY_DLL_SPEC Unit : public WorldObject
{
public:
typedef std::set<Unit*> AttackerSet;
+ typedef std::set<Unit*> ControlList;
typedef std::pair<uint32, uint8> spellEffectPair;
typedef std::multimap< spellEffectPair, Aura*> AuraMap;
typedef std::list<Aura *> AuraList;