mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Fix a crash caused by removecorpse
This commit is contained in:
@@ -199,10 +199,10 @@ void ObjectAccessor::RemoveCorpse(Corpse* corpse)
|
||||
{
|
||||
ASSERT(corpse && corpse->GetType() != CORPSE_BONES);
|
||||
|
||||
if (Map* map = corpse->FindMap())
|
||||
if (corpse->IsInGrid())
|
||||
{
|
||||
corpse->DestroyForNearbyPlayers();
|
||||
map->RemoveFromMap(corpse, false);
|
||||
corpse->GetMap()->RemoveFromMap(corpse, false);
|
||||
}
|
||||
else
|
||||
corpse->RemoveFromWorld();
|
||||
|
||||
Reference in New Issue
Block a user