*Assert !IsInWorld() in reset map
--HG-- branch : trunk
This commit is contained in:
@@ -1695,6 +1695,13 @@ void WorldObject::SetMap(Map * map)
|
|||||||
m_currMap = map;
|
m_currMap = map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WorldObject::ResetMap()
|
||||||
|
{
|
||||||
|
ASSERT(m_currMap);
|
||||||
|
ASSERT(!IsInWorld());
|
||||||
|
m_currMap = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Map const* WorldObject::GetBaseMap() const
|
Map const* WorldObject::GetBaseMap() const
|
||||||
{
|
{
|
||||||
ASSERT(m_currMap);
|
ASSERT(m_currMap);
|
||||||
|
|||||||
+1
-1
@@ -529,10 +529,10 @@ class TRINITY_DLL_SPEC WorldObject : public Object
|
|||||||
void SendPlaySound(uint32 Sound, bool OnlySelf);
|
void SendPlaySound(uint32 Sound, bool OnlySelf);
|
||||||
|
|
||||||
virtual void SetMap(Map * map);
|
virtual void SetMap(Map * map);
|
||||||
|
virtual void ResetMap();
|
||||||
Map * GetMap() const { ASSERT(m_currMap); return m_currMap; }
|
Map * GetMap() const { ASSERT(m_currMap); return m_currMap; }
|
||||||
Map * FindMap() const { return m_currMap; }
|
Map * FindMap() const { return m_currMap; }
|
||||||
//used to check all object's GetMap() calls when object is not in world!
|
//used to check all object's GetMap() calls when object is not in world!
|
||||||
virtual void ResetMap() { assert(m_currMap); m_currMap = NULL; }
|
|
||||||
|
|
||||||
//this function should be removed in nearest time...
|
//this function should be removed in nearest time...
|
||||||
Map const* GetBaseMap() const;
|
Map const* GetBaseMap() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user