fix(Core/Player): check for existing corpse on respawn (#8112)

This commit is contained in:
Axel Cocat
2021-10-04 15:45:54 +02:00
committed by GitHub
parent 9330df59da
commit 02cdbdd538

View File

@@ -4273,7 +4273,7 @@ void Player::BuildPlayerRepop()
// the player cannot have a corpse already on current map, only bones which are not returned by GetCorpse
WorldLocation corpseLocation = GetCorpseLocation();
if (corpseLocation.GetMapId() == GetMapId())
if (GetCorpse() && corpseLocation.GetMapId() == GetMapId())
{
LOG_ERROR("entities.player", "BuildPlayerRepop: player %s (%s) already has a corpse", GetName().c_str(), GetGUID().ToString().c_str());
return;