Core/Corpses: Fixed leaking corpses
Closes #15765 (cherry picked from commit bd16520ecc91d827abae7f0447cc292fe9e843e9)
This commit is contained in:
1 parent
8e7012f076
commit
20b4e6f03a
5 files changed
+41
-35
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user