From 63659ea18b837a2f9c330de6c70dba16089d5c53 Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Thu, 17 Dec 2009 11:40:23 +0100 Subject: Update some code for 322a --HG-- branch : trunk --- src/game/ObjectAccessor.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/game/ObjectAccessor.cpp') diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index 2dfd9c9ae7b..e52423eabd8 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -49,7 +49,10 @@ ObjectAccessor::ObjectAccessor() {} ObjectAccessor::~ObjectAccessor() { for (Player2CorpsesMapType::const_iterator itr = i_player2corpse.begin(); itr != i_player2corpse.end(); ++itr) + { + itr->second->RemoveFromWorld(); delete itr->second; + } } Creature* @@ -351,6 +354,10 @@ ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia) // remove corpse from DB corpse->DeleteFromDB(); + // we don't want bones to save some cpu.. :) + delete corpse; + return NULL; + Corpse *bones = NULL; // create the bones only if the map and the grid is loaded at the corpse's location // ignore bones creating option in case insignia @@ -521,4 +528,3 @@ template Creature* ObjectAccessor::GetObjectInWorld(uint32 mapid, floa template Corpse* ObjectAccessor::GetObjectInWorld(uint32 mapid, float x, float y, uint64 guid, Corpse* /*fake*/); template GameObject* ObjectAccessor::GetObjectInWorld(uint32 mapid, float x, float y, uint64 guid, GameObject* /*fake*/); template DynamicObject* ObjectAccessor::GetObjectInWorld(uint32 mapid, float x, float y, uint64 guid, DynamicObject* /*fake*/); - -- cgit v1.2.3