aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectAccessor.cpp
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2009-12-17 11:40:23 +0100
committern0n4m3 <none@none>2009-12-17 11:40:23 +0100
commit63659ea18b837a2f9c330de6c70dba16089d5c53 (patch)
treec9e50231f2374ae58a7bc4fac6162755e6963b84 /src/game/ObjectAccessor.cpp
parent5953596cee670517df4cf35fb1d428f9862a01b2 (diff)
Update some code for 322a
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectAccessor.cpp')
-rw-r--r--src/game/ObjectAccessor.cpp8
1 files changed, 7 insertions, 1 deletions
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<Creature>(uint32 mapid, floa
template Corpse* ObjectAccessor::GetObjectInWorld<Corpse>(uint32 mapid, float x, float y, uint64 guid, Corpse* /*fake*/);
template GameObject* ObjectAccessor::GetObjectInWorld<GameObject>(uint32 mapid, float x, float y, uint64 guid, GameObject* /*fake*/);
template DynamicObject* ObjectAccessor::GetObjectInWorld<DynamicObject>(uint32 mapid, float x, float y, uint64 guid, DynamicObject* /*fake*/);
-