[8102] Simplify code base at new root method WorldObject::CleanupsBeforeDelete Author: VladimirMangos

* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
    * Create Gameobject version to make GO with owner more safe for remove

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-01 18:23:36 -05:00
parent 9a2588a454
commit 111dac5f94
14 changed files with 20 additions and 23 deletions
+2
View File
@@ -498,6 +498,8 @@ class TRINITY_DLL_SPEC WorldObject : public Object
bool HasInArc( const float arcangle, const WorldObject* obj ) const;
bool IsInBetween(const WorldObject *obj1, const WorldObject *obj2, float size = 0) const;
virtual void CleanupsBeforeDelete(); // used in destructor or explicitly before mass creature delete to remove cross-references to already deleted units
virtual void SendMessageToSet(WorldPacket *data, bool self);
virtual void SendMessageToSetInRange(WorldPacket *data, float dist, bool self);