*Do not assert !map for non-corpse worldobjects.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-08-13 17:02:17 -05:00
1 parent deca044373
commit c9ddf9258d
2 files changed
+10 -6

No files matched your search

+4 -4
View File
@@ -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 );