From c9ddf9258d159dc8aa5a4e29cd83c158c8479d24 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 13 Aug 2009 17:02:17 -0500 Subject: *Do not assert !map for non-corpse worldobjects. --HG-- branch : trunk --- src/game/Corpse.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game/Corpse.cpp') diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp index 7fc8dc7fb50..6aec1da7ef9 100644 --- a/src/game/Corpse.cpp +++ b/src/game/Corpse.cpp @@ -81,10 +81,6 @@ bool Corpse::Create( uint32 guidlow, Player *owner) { ASSERT(owner); - //we need to assign owner's map for corpse - //in other way we will get a crash in Corpse::SaveToDB() - SetMap(owner->GetMap()); - Relocate(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ(), owner->GetOrientation()); if(!IsPositionValid()) @@ -94,6 +90,10 @@ bool Corpse::Create( uint32 guidlow, Player *owner) return false; } + //we need to assign owner's map for corpse + //in other way we will get a crash in Corpse::SaveToDB() + SetMap(owner->GetMap()); + WorldObject::_Create(guidlow, HIGHGUID_CORPSE, owner->GetPhaseMask()); SetFloatValue( OBJECT_FIELD_SCALE_X, 1 ); -- cgit v1.2.3