Core/Corpses: Fixed leaking corpses

Closes  #15765

(cherry picked from commit bd16520ecc91d827abae7f0447cc292fe9e843e9)
This commit is contained in:
Shauren committed 2015-10-28 21:56:40 +01:00
1 parent 8e7012f076
commit 20b4e6f03a
5 files changed
+41 -35

No files matched your search

+3 -2
View File
@@ -5164,12 +5164,13 @@ Corpse* Player::CreateCorpse()
}
}
// register for player, but not show
GetMap()->AddCorpse(corpse);
// we do not need to save corpses for BG/arenas
if (!GetMap()->IsBattlegroundOrArena())
corpse->SaveToDB();
// register for player, but not show
GetMap()->AddCorpse(corpse);
return corpse;
}